Re: Help with user events

Mathieu Desnoyers <[email protected]> Wed, 29 Aug 2007 08:21:31 -0400
Newsgroups gmane.linux.kernel.tracing
Message-ID <20070829122131.GC9734@Krystal>
Can you tell us more about the LTTng version you are using, which
architecture ? I see that ltt-usertrace is 0.33, but I'll need the rest
of the info.

Thanks,

Mathieu

* Pane, Chris ([email protected]) wrote:
> OK - So I have things working great, I can run the lttv-gui program and
> capture traces. Now I am trying to see how the user events mechanism
> works. I am starting with the README file, which shows the 3 techniques.
> I figured I would start with the simplest one. 
> 
>  
> 
> Currently, I do a capture and don't see Any events. In the example here,
> I see my dots "." Getting printed in the trace (lttv-gui), but no user
> events which should be in-between the dots. I run the program below, and
> don't get the expected LTT_SHOW_DEBUG defined output the README says
> that I should see. I just get my dots 1 second apart. 
> 
>  
> 
> I build this file with the following: 
> 
>  
> 
> gcc  -D LTT_SHOW_DEBUG -I/usr/src/ltt-usertrace-0.33/ltt -L
> /usr/src/ltt-usertrace-0.33 -lltt-loader-user_generic     -g main.c -o
> ./Debug/lttest
> 
>  
> 
>  
> 
>  
> 
> Thanks !
> 
>  
> 
> -Chris
> 
>  
> 
>  
> 
>  
> 
> <Begin main.c listing>
> 
>  
> 
> #define LTT_TRACE
> 
> #define  LTT_BLOCKING 1
> 
> /* #define LTT_SHOW_DEBUG 1*/                 NOTE: Tried defining this,
> still don't see the run-time message saying it is defined 
> 
> #include <ltt/ltt-facility-user_generic.h>
> 
> #include <ltt/ltt-facility-custom-user_generic.h>
> 
> #include <stdio.h>
> 
>  
> 
> main()
> 
> {
> 
>                 int count=0;
> 
>                 while(1)
> 
>                 {
> 
>                                 printf(".\n");
> 
>                                 trace_user_generic_slow_printf("in: %s
> at: %s:%d: Counter value is: %u.",
> 
>  
> __FILE__,__func__,__LINE__,count);
> 
>                                 ++count;
> 
>                                 sleep(1);
> 
>                 }
> 
> }
> 

> _______________________________________________
> Ltt-dev mailing list
> [email protected]
> http://listserv.shafik.org/mailman/listinfo/ltt-dev


-- 
Mathieu Desnoyers
Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68