Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
From: gausinghnsit@gmail.com (Gaurav Singh)
Subject: [ltt-dev] Arming only a few markers in LTTng
Date: Tue, 10 Feb 2009 12:05:39 +0530	[thread overview]
Message-ID: <3cc7a0df0902092235w70475502s7124ba99332dd20d@mail.gmail.com> (raw)
In-Reply-To: <3cc7a0df0902092231y298ef59dmbf817f276af85c46@mail.gmail.com>

Hi Mathieu, Pierre, others,

As Mathieu suggested GDB pinpointed the segfault to
lttv_trace_hook_remove_all function in tracecontext.c - the patch given
before has been tested for traces with all markers enabled and traces with a
few mrakers enabled. Pierre - I could not find any dependencies to hinder my
analysis.

Thanks again :)
Regards
Gaurav

On Tue, Feb 10, 2009 at 12:01 PM, Gaurav Singh <gausinghnsit at gmail.com>wrote:

> Hi Mathieu, Pierre and others,
>
> Following is a script ltt-arm which I use to arm only few markers for
> tracing. Please check if this is the correct implementation.
>
> Usage: ltt-arm -m <names of markers to be armed>
>
> #!/bin/sh
> mflag=0
> startflag=0
> zero=0
>         while getopts 'm:h' OPTION
>         do
>           case $OPTION in
>           m)    mflag=1
>                 if [ $startflag = $zero ]
>                 then
>                         echo Connecting internal_kernel_sched_schedule
>                         echo "connect internal_kernel_sched_schedule
> scheduler" > /proc/ltt
>                         MARKERS=`cat /proc/ltt|grep -v %k|awk '{print
> $2}'|sort -u|grep -v ^core_|grep -v ^locking_ |grep -v ^internal_`
>                         startflag=1
>                 fi
>                 for a in $MARKERS; do if [ $a = $OPTARG ]; then
>                 echo Connecting $OPTARG
>                 echo "connect $OPTARG default" > /proc/ltt
>                 fi;
>                 done;
>                         ;;
>           h)    printf "Help \n arguments : \n-m <names of markers
> seperated by spaces>\n"
>                         ;;
>           ?)    printf "error"
>                         exit 2
>                         ;;
>            esac
>         done
> shift $(($OPTIND - 1))
> if [ "$mflag" ]
>         then
>           for a in $*; do for b in $MARKERS; do if [ $a = $b ]; then echo
> Connecting $a; echo "connect $a default" > /proc/ltt;fi; done; done;
>         fi
>
> also following is the patch for LTTV to solve the seg fault that I was
> getting. Again grateful if you can suggest any changes:
>
> diff -uprN lttv_orig/lttv-0.10.0-pre11-10032008/lttv/lttv/tracecontext.c
> lttv-0.10.0-pre11-10032008/lttv/lttv/tracecontext.c
> ---
> lttv_orig/lttv-0.10.0-pre11-10032008/lttv/lttv/tracecontext.c 2007-11-12
> 10:03:20.000000000 +0530
> +++ lttv-0.10.0-pre11-10032008/lttv/lttv/tracecontext.c 2009-02-10
> 11:44:24.000000000 +0530
> @@ -1038,10 +1038,14 @@ skip_marker:
>  void lttv_trace_hook_remove_all(GArray **th)
>  {
>    int i;
> + if((*th)->len!=0)
> + {
>    for(i=0; i<(*th)->len; i++) {
>      g_ptr_array_free(g_array_index(*th, LttvTraceHook, i).fields, TRUE);
>    }
> +
>    *th = g_array_remove_range(*th, 0, (*th)->len);
> + }
>  }
>
> Thanks Pierre and Mathieu
> Regards
> Gaurav Singh
>
>
>
>
> On Mon, Feb 2, 2009 at 9:40 PM, Mathieu Desnoyers <
> compudj at krystal.dyndns.org> wrote:
>
>> * Pierre-Marc Fournier (pierre-marc.fournier at polymtl.ca) wrote:
>> > Hi Gaurav,
>> >
>> > Please tell us what tracepoints from the standard ones you tried to
>> > enable. LTTV has some analyses that are pretty tied to some of them and
>> > it might not digest well that some are absent.
>> >
>> > Does it work in text dump?
>> > lttv.real -m textDump -t /tmp/your/trace
>> >
>> > Does it work in gui when the only loaded plugin is the event viewer?
>> > lttv.real -m lttvwindow -m guievents -t /tmp/your/trace
>> >
>> > If so, you might try enabling other views until it segfaults to find the
>> > culprit.
>> >
>>
>> Hi Gaurav,
>>
>> LTTV *should* support the fact that probes are missing. If you can,
>> please compile with :
>>
>> ./configure CFLAGS="-g"
>> make
>> make install
>>
>> and run through gdb
>>
>> gdb path_to/lttv.real
>> set args -m textDump -t /tmp/trace
>> or
>> set args -m guicontrolflow -t /tmp/trace
>>
>> So you can report the backtrace (bt full) when it segfaults.
>>
>> Thanks,
>>
>> Mathieu
>>
>> > Thanks
>> >
>> > pmf
>> >
>> >
>> > Gaurav Singh wrote:
>> > > Hi,
>> > >
>> > > Just a small query on ltt-armall. I tried enabling only a few markers
>> at
>> > > runtime instead of running ltt-armall. The trace was successfully
>> > > collected but viewing the trace in LTTV is giving a segmentation
>> fault.
>> > > Has anyone tried this before?
>> > >
>> > > Regards
>> > > Gaurav
>> > >
>> > >
>> > >
>> ------------------------------------------------------------------------
>> > >
>> > > _______________________________________________
>> > > ltt-dev mailing list
>> > > ltt-dev at lists.casi.polymtl.ca
>> > > http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
>> >
>>
>> --
>> Mathieu Desnoyers
>> OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE
>> 9A68
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.casi.polymtl.ca/pipermail/lttng-dev/attachments/20090210/1c853dac/attachment-0003.htm>


  reply	other threads:[~2009-02-10  6:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-02 10:56 Gaurav Singh
2009-02-02 14:30 ` Pierre-Marc Fournier
2009-02-02 16:10   ` Mathieu Desnoyers
2009-02-10  6:31     ` Gaurav Singh
2009-02-10  6:35       ` Gaurav Singh [this message]
2009-02-11  7:36       ` Mathieu Desnoyers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3cc7a0df0902092235w70475502s7124ba99332dd20d@mail.gmail.com \
    --to=gausinghnsit@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox