Sorry, I’m answering my own question: When I built a new kernel with “CONFIG_MODULE_SIG” disabled, the probes in my loadable driver started working.
It would be helpful to have this documented in the tutorial on kernel tracing. On Tue, Aug 4, 2015 at 3:46 PM, Joe VanAndel <[email protected]> wrote: > I’m trying to add LTTng probes to a driver module, but I don’t get any > output from my probe in the LTTng session. > > > Any idea what else I need to configure to get the output from my probe? > > > Kernel: 3.10.0 > > OS: Centos 7.1.1503 > > LTTng tools : from EfficiOS-RHEL7-x86-64 repository > > lttng-modules: 2.6.2 > > > The running kernel has the following enabled: > > CONFIG_MODULES > > CONFIG_KALLSYMS > > CONFIG_HIGH_RES_TIMERS > > CONFIG_TRACEPOINTS > > > I’ve defined/used tracepoints in my driver with the mainline TRACE_EVENT() > macros. My tracepoints are on the open/close entry points of the device. > > > I’ve added the LTTng adaptation layer for my probe in LTTng-modules. > > > I’ve started the daemon to load my custom probe > > lttng-sessiond -d --extra-kmod-probes=db2k > > > I’ve verified that my event is available, by running > > > lttng list --kernel | grep db2k > > db2k_hello (loglevel: TRACE_EMERG (0)) (type: tracepoint) > > > There’s an entry for my probe in > > /sys/kernel/debug/tracing/events/db2k/db2k_hello > > > When I run the following as root: > > lttng create trace_db2k > > lttng enable-event --kernel --tracepoint db2k_hello --tracepoint > kmem_kmalloc --tracepoint kmem_kfree \ > > --tracepoint timer_start --tracepoint timer_cancel > > lttng start > > ——————— > > the output is: > > Session trace_db2k created. > > Traces will be written in /root/lttng-traces/trace_db2k-20150804-193318 > > Kernel event db2k_hello created in channel channel0 > > Tracing started for session trace_db2k > > =========== > > I run a test program that uses the driver, and then stop the session. > > # lttng stop > > Waiting for data availability. > > Tracing stopped for session trace_db2k > > # lttng view > > Trace directory: /root/lttng-traces/trace_db2k-20150804-193318 > > <No output> > > > Here is the “mainline” db2k.h > > http://pastebin.com/0i8eWF1a > > > Here is the > > LTTng adaptation db2k.h > > http://pastebin.com/fXW9ppqM > > > Here is the > > lttng-probe-db2k.c > > http://pastebin.com/WHuWKpPZ > > > The drive contains the lines: > > #define CREATE_TRACE_POINTS > > #include "trace/events/db2k.h" > > static int > db2k_open(struct inode *inode, struct file *file) > { > int minor = MINOR(inode->i_rdev); > int stat = 0; > DEVICE_EXTENSION *pde = NULL; > dbg("db2k_open called"); > trace_db2k_hello(minor, "open"); > . > . > } > > -- > Joe VanAndel > NCAR/EOL > -- Joe VanAndel NCAR/EOL
_______________________________________________ lttng-dev mailing list [email protected] http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
