Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
* [ltt-dev] simple userspace tracing with LTTng 0.9.10
@ 2009-01-26 18:44 Akyurek, Ali (EXT)
  2009-01-28 15:56 ` Mathieu Desnoyers
  0 siblings, 1 reply; 4+ messages in thread
From: Akyurek, Ali (EXT) @ 2009-01-26 18:44 UTC (permalink / raw)


Hi all,
 
I've used simple userspace event tracing with the latest version by
writing to the  mnt/debugfs/ltt/write_event.
But now i'm using an old LTTng (because i have to), 0.9.10. 

Is it possible to port this simple uspace tracing feature to the old
lttng versions?

Or it is not possible because of some architectural restrictions of
kernel or LTTng?
Thanks.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ltt-dev] simple userspace tracing with LTTng 0.9.10
  2009-01-26 18:44 [ltt-dev] simple userspace tracing with LTTng 0.9.10 Akyurek, Ali (EXT)
@ 2009-01-28 15:56 ` Mathieu Desnoyers
  2009-01-29 18:02   ` Akyurek, Ali (EXT)
  0 siblings, 1 reply; 4+ messages in thread
From: Mathieu Desnoyers @ 2009-01-28 15:56 UTC (permalink / raw)


* Akyurek, Ali (EXT) (ali.akyurek.ext at siemens.com) wrote:
> Hi all,
>  
> I've used simple userspace event tracing with the latest version by
> writing to the  mnt/debugfs/ltt/write_event.
> But now i'm using an old LTTng (because i have to), 0.9.10. 
> 
> Is it possible to port this simple uspace tracing feature to the old
> lttng versions?
> 
> Or it is not possible because of some architectural restrictions of
> kernel or LTTng?
> Thanks.
> 

That should be easily doable, as long as you have a kernel with debugfs.

The main patch concerned is :
lttng-userspace-write-event.patch

Mathieu

> _______________________________________________
> 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




^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ltt-dev] simple userspace tracing with LTTng 0.9.10
  2009-01-28 15:56 ` Mathieu Desnoyers
@ 2009-01-29 18:02   ` Akyurek, Ali (EXT)
  2009-01-29 19:30     ` Mathieu Desnoyers
  0 siblings, 1 reply; 4+ messages in thread
From: Akyurek, Ali (EXT) @ 2009-01-29 18:02 UTC (permalink / raw)



Hi,

Since there is no specialized trace concept in legacy LTTng 0.9.10, 

I'm thinking of defining a new marker and use it as below. I think this would be ok, but it'll require many additions.

What if i use an existing trace_mark like kernel_printk below, instead of defining a new marker. 
I know this is ugly and tricky, but can i make it work?

Thanks.



static ssize_t write_event(struct file *file, const char __user *user_buf,
		size_t count, loff_t *ppos)
{
.
..
...
-	marker = &GET_MARKER(userspace, event);
-	ltt_specialized_trace(marker, marker->single.probe_private,
-		page, count + 1, sizeof(char));

+	trace_mark(userspace_event,"%s",string_from_user_buf);

...
..
.
}

 

-----Urspr?ngliche Nachricht-----
Von: Mathieu Desnoyers [mailto:compudj at krystal.dyndns.org] 
Gesendet: Mittwoch, 28. Januar 2009 16:57
An: Akyurek, Ali (EXT)
Cc: ltt-dev at lists.casi.polymtl.ca
Betreff: Re: [ltt-dev] simple userspace tracing with LTTng 0.9.10

* Akyurek, Ali (EXT) (ali.akyurek.ext at siemens.com) wrote:
> Hi all,
>  
> I've used simple userspace event tracing with the latest version by
> writing to the  mnt/debugfs/ltt/write_event.
> But now i'm using an old LTTng (because i have to), 0.9.10. 
> 
> Is it possible to port this simple uspace tracing feature to the old
> lttng versions?
> 
> Or it is not possible because of some architectural restrictions of
> kernel or LTTng?
> Thanks.
> 

That should be easily doable, as long as you have a kernel with debugfs.

The main patch concerned is :
lttng-userspace-write-event.patch

Mathieu

> _______________________________________________
> 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




^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ltt-dev] simple userspace tracing with LTTng 0.9.10
  2009-01-29 18:02   ` Akyurek, Ali (EXT)
@ 2009-01-29 19:30     ` Mathieu Desnoyers
  0 siblings, 0 replies; 4+ messages in thread
From: Mathieu Desnoyers @ 2009-01-29 19:30 UTC (permalink / raw)


* Akyurek, Ali (EXT) (ali.akyurek.ext at siemens.com) wrote:
> 
> Hi,
> 
> Since there is no specialized trace concept in legacy LTTng 0.9.10, 
> 
> I'm thinking of defining a new marker and use it as below. I think this would be ok, but it'll require many additions.
> 
> What if i use an existing trace_mark like kernel_printk below, instead of defining a new marker. 
> I know this is ugly and tricky, but can i make it work?
> 
> Thanks.
> 
> 
> 
> static ssize_t write_event(struct file *file, const char __user *user_buf,
> 		size_t count, loff_t *ppos)
> {
> .
> ..
> ...
> -	marker = &GET_MARKER(userspace, event);
> -	ltt_specialized_trace(marker, marker->single.probe_private,
> -		page, count + 1, sizeof(char));
> 
> +	trace_mark(userspace_event,"%s",string_from_user_buf);
> 

Never pass a __user pointer to a marker. First do a copy_from_user.

Mathieu

> ...
> ..
> .
> }
> 
>  
> 
> -----Urspr?ngliche Nachricht-----
> Von: Mathieu Desnoyers [mailto:compudj at krystal.dyndns.org] 
> Gesendet: Mittwoch, 28. Januar 2009 16:57
> An: Akyurek, Ali (EXT)
> Cc: ltt-dev at lists.casi.polymtl.ca
> Betreff: Re: [ltt-dev] simple userspace tracing with LTTng 0.9.10
> 
> * Akyurek, Ali (EXT) (ali.akyurek.ext at siemens.com) wrote:
> > Hi all,
> >  
> > I've used simple userspace event tracing with the latest version by
> > writing to the  mnt/debugfs/ltt/write_event.
> > But now i'm using an old LTTng (because i have to), 0.9.10. 
> > 
> > Is it possible to port this simple uspace tracing feature to the old
> > lttng versions?
> > 
> > Or it is not possible because of some architectural restrictions of
> > kernel or LTTng?
> > Thanks.
> > 
> 
> That should be easily doable, as long as you have a kernel with debugfs.
> 
> The main patch concerned is :
> lttng-userspace-write-event.patch
> 
> Mathieu
> 
> > _______________________________________________
> > 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
> 

-- 
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-01-29 19:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-26 18:44 [ltt-dev] simple userspace tracing with LTTng 0.9.10 Akyurek, Ali (EXT)
2009-01-28 15:56 ` Mathieu Desnoyers
2009-01-29 18:02   ` Akyurek, Ali (EXT)
2009-01-29 19:30     ` Mathieu Desnoyers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox