From mboxrd@z Thu Jan 1 00:00:00 1970 From: francis.giraldeau@gmail.com (Francis Giraldeau) Date: Wed, 06 Jun 2012 01:40:33 +0200 Subject: [lttng-dev] [PATCH] Expose kernel tracer to user-space In-Reply-To: <1338938654-16515-1-git-send-email-francis.giraldeau@gmail.com> References: <1338938654-16515-1-git-send-email-francis.giraldeau@gmail.com> Message-ID: <4FCE98F1.4020803@gmail.com> Le 2012-06-06 01:24, Francis Giraldeau a ?crit : > By writing to the file /proc/lttng, 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 event uses sequence for space efficiency and to store any > data as payload. > > Update: split the probe code into it's own module and make it an optional > feature of lttng-abi. The feature is enabled when the module is loaded. The > lttng-abi module exports a register function and includes a wrapper for > lttng_fops write. This is required since struct file_operations must be const. > Since the module dependency is reversed, unloading the lttng-uevent module is > done only when it's not used anymore. This is done with rwlock synchronisation. > The synchronisation doesn't prevent starvation, but this situation is unlikely > and can be prevented by stop active tracing sessions. One little gotcha: after modprobe lttng-uevent, the module lttng-probe-uevent must be loaded manually, otherwise lttng_uevent is not listed with "lttng list -k". Is there a way to make the probe load automatically when lttng-uevent is loaded? Cheers, Francis -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4476 bytes Desc: Signature cryptographique S/MIME URL: