From mboxrd@z Thu Jan 1 00:00:00 1970 From: compudj@krystal.dyndns.org (Mathieu Desnoyers) Date: Thu, 29 Jan 2009 14:30:38 -0500 Subject: [ltt-dev] simple userspace tracing with LTTng 0.9.10 In-Reply-To: <1E65288790442545B413D69F2A8D27DE046A31F5@ERLD164A.ww004.siemens.net> References: <1E65288790442545B413D69F2A8D27DE0467AB6E@ERLD164A.ww004.siemens.net> <20090128155643.GD6025@Krystal> <1E65288790442545B413D69F2A8D27DE046A31F5@ERLD164A.ww004.siemens.net> Message-ID: <20090129193038.GA13755@Krystal> * 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