LTTng logger ABI
Add a user-space ABI (new file /proc/lttng-logger) to lttng-modules
which can be written into by any user on the system. The content is
saved into the kernel trace stream into the "lttng_logger" kernel event.
The content of a single write is written into an lttng_logger event.
The write count is truncated to 1024 bytes (if larger), which is much
smaller than the smallest subbuffer size available (4096 bytes). This
ensures all written data makes it into the active tracing buffers.
Example use:
lttng-sessiond -d # (as root)
lttng create
lttng enable-event -k lttng_logger
lttng start
echo -n "this is a test" > /proc/lttng-logger
lttng stop
lttng view
Example result:
[17:00:04.
251970425] (+179.
750663203) thinkos lttng_logger: { cpu_id = 3 }, { _msg_length = 14, msg = "this is a test" }
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
CC: Karim Yaghmour <karim.yaghmour@opersys.com>