[ltt-dev] problems with ust

Sylvain Geneves sylvain.geneves at inrialpes.fr
Wed Apr 7 04:47:58 EDT 2010


Bonjour Pierre-Marc,
Thanks for your answer!

On 04/06/2010 08:30 PM, Pierre-Marc Fournier wrote:
> Bonjour,
>
> Sylvain Geneves wrote:
>> Hi all,
>>
>> I've pulled UST from git yesterday, and noticed some errors, and some
>> are confusing me...
>>
>> first of all, i have a problem for compiling my program (when i include
>> marker.h), it gives the following error :
>>
>> In file included from /usr/local/include/ust/kcompat/kcompat.h:64,
>>                   from /usr/local/include/ust/kernelcompat.h:21,
>>                   from /usr/local/include/ust/marker.h:31,
>>                   from task.lbc.C:4:
>> /usr/local/include/ust/kcompat/jhash.h: In function ‘u32 jhash(const
>> void*, u32, u32)’:
>> /usr/local/include/ust/kcompat/jhash.h:47: error: invalid conversion
>> from ‘const void*’ to ‘const u8*’
>
> Will look into this.

Here's the output of gcc --version, if this helps :
gcc (Debian 4.4.3-7) 4.4.3

>
>>
>>
>> seems like it lacks a cast somewhere, which i added. After that it
>> compiles fine, and there goes another problem :
>>
>> when i run :
>> usttrace -l ./myprog
>>
>> i've got the following output (with debug flags enabled):
>> http://pastebin.com/raw.php?i=4uCgJDM6
>>
>> myprog is calling clone via pthread_create. I have instrumented it with
>> a line like this, which is executed many times (almost 4 million calls):
>>    trace_mark(main, myevent, "calling cb" );
>
> You also seem to have fork()s somewhere because there are directories
> with several different PIDs in your trace directory. Therefore you need
> to add the -f option to usttrace.
>

It is actually quite odd that many tools, like htop, show a different 
"PID" for this application (and others that i suspect not to fork), but 
i'm positive there is no fork in this one, only threads.

Here's the output of ps while running the program :

UID        PID  PPID   LWP  C NLWP STIME TTY          TIME CMD
root      3995  3357  3995  0    6 10:33 pts/15   00:00:00 ./myprog
root      3995  3357  3996  0    6 10:33 pts/15   00:00:00 ./myprog
root      3995  3357  4017 90    6 10:33 pts/15   00:00:10 ./myprog
root      3995  3357  4018 22    6 10:33 pts/15   00:00:02 ./myprog
root      3995  3357  4019 17    6 10:33 pts/15   00:00:01 ./myprog
root      3995  3357  4020 18    6 10:33 pts/15   00:00:02 ./myprog
sylvain   4025  3235  4025  0    1 10:33 pts/4    00:00:00 grep myprog

anyway i tried the -f option like you said :

usttrace -l -f ./myprog

but i still have empty directories in the resulting traces...

i'm using a 2.6.32 kernel (with Debian patches) built with LTTng support 
(desactivated for now, i just use the userspace tracer in this case)

thanks for your help


>>
>> Here's what i see in the resulting trace directory:
>>
>> http://pastebin.com/raw.php?i=TqJWarkA
>>
>> it seems that all traces aren't recorded (some metadata and ust are zero
>> size), i can't understand why, i must be missing something here... ?
>
> -f should fix this.
>
>>
>> also, when using lttv, it says "Cannot open trace : maybe you should
>> enter in the trace directory to select it ?"
>> i note that lttv can open a subdirectory (like
>> /root/.usttraces/californium-20100329172748911948191/8494_5454077942969735172
>> in my example), but obviously all i can see is a subset of what really
>> happenned...
>
> This is a consequence of some files having 0 size.
>
>>
>> i would really appreciate if you could show me what i'm doing wrong.
>>
>>
>> Regards,
>> Sylvain
>>
>> PS: i use userspace-rcu-0.4.3 and the git version of ust and lttv
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> ltt-dev mailing list
>> ltt-dev at lists.casi.polymtl.ca
>> http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
>
>
> _______________________________________________
> ltt-dev mailing list
> ltt-dev at lists.casi.polymtl.ca
> http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev





More information about the lttng-dev mailing list