[lttng-dev] [PATCH] Expose kernel tracer to user-space (version 6)

Francis Giraldeau francis.giraldeau at gmail.com
Tue Jul 3 09:34:23 EDT 2012


Le 2012-07-03 13:39, Mathieu Desnoyers a écrit :
> * Francis Giraldeau (francis.giraldeau at gmail.com) wrote:
>> Le 2012-07-03 00:23, Mathieu Desnoyers a écrit :
>>> * Francis Giraldeau (francis.giraldeau at gmail.com) wrote:
>>>> By writing to the file /proc/lttng_uevent, a user-space application creates a
>>>> kernel event. The event's payload is by default UTF-8 text, but any data can be
>>>> written, up to 1024 bytes. Null-character is optional and is not enforced.
>>>
>>> The 1024 byte limit is removed now, right ?
>>
>> Exactly.
> 
> OK, please provide an updated version with the updated changelog.

Fixed.

> 
>>
>>>> + * Expose kernel tracer to user-space through /proc/lttng
>>
>> I just saw a typo here, we should read "through /proc/lttng_uevent"
> 
> Same here.

Fixed.

> 
>>
>>>> + * Copyright (C) 2009-2012 Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
>>>
>>> you might want to add your own copyright in here too.
>>
>> I transfer you the copyright.
> 
> Thanks!
> 
> One more thing:
> 
> In the testing you did, did you try running, in parallel:
> 
> for a in $(seq 1 10000); do
>         modprobe nameofuevent_module
>         rmmod nameofevent_module
> done
> 
> and in 4 another terminals:
> 
> echo "blahblahblah" > /proc/lttng_uevent
> 
> ?
> 
> I understand that you tested only the write path in parallel, but I'm
> not sure, from your changelog, that you stress-tested load/unload vs
> write.

The test I did was to write in parallel to /proc/lttng_uevent and see
the behavior. It takes about 15us on my i5 2.5Ghz to log an event this
way in a tight loop, so yeah, it's quite slow.

It's not possible to remove the module while an active tracing session
references the event lttng_uevent. I tested insertion/removal of the
module while tracing with the previous version that was using RCU and it
was working well.

Cheers,

Francis

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4489 bytes
Desc: Signature cryptographique S/MIME
URL: <http://lists.lttng.org/pipermail/lttng-dev/attachments/20120703/a06c86ae/attachment.bin>


More information about the lttng-dev mailing list