Instrumenting code that's common between user and kernel space
A message that is not in the archive (sent off-list or not yet received): 20150831191309.GA13818@bhshelto-vm
Quoted 8 lines · ----- On Aug 31, 2015, at 3:13 PM, Shelton, Ben [email protected]…
Hi all,
I'm working on using LTTng to instrument a driver that has both a kernel space portion and a user space portion. There is quite a bit of code that's common between the two. Is there a recommended way to handle generating both the user space template files and the kernel space tracepoints / probes for the same code, or is this something we would need to build ourselves?
Hi Ben,
I would recommend creating separate files for the tracepoint probe providers (the TRACEPOINT_EVENT() declarations) since those differ slightly between lttng-modules and UST. Then, you could do a wrapper macro for the tracepoint call: UST's API is tracepoint(provider, name, args), whereas the kernel is trace_eventname(args). Some preprocessor macro magic should allow you to instrument code shared between userspace and kernel.
Hoping this helps,
Thanks for reaching out to us!
Mathieu
Quoted 8 lines
Thanks,
Ben_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
Signature · 3 lines
Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com