[lttng-dev] using --function/--probe

Mathieu Desnoyers mathieu.desnoyers at efficios.com
Tue Jun 5 11:49:50 EDT 2012


* Bill Trost (trost at cloud.rain.com) wrote:
> Hi,
> 
> I'm trying to investigate a problem under Linux 2.6.39.4 involving
> kworker threads and am pretty much stymied. I've tried enabling
> various events using --function and --probe and it's been
> very hit or miss. Very often, "lttng enable-event" comes back
> with nothing more specific than "bad ioctl", but every once
> in a while I'll find a symbol I can add a probe point for.
> 
> So: What does "--probe" mean?

--probe allows to put a kprobe (breakpoint) at a kernel text address or
symbol.

> What does "--function" mean,

--function allows to put a kretprobes at a function entry site (using
its symbol name), which will trigger events at function entry return.

> and how does
> it differ from "--probe"? How do I determine what symbols are valid for
> each of these options?

It entirely depends on which functions are blacklisted in the kernel
(this is an attribute added to the functions specifically for kprobes).
The keyword is "__kprobes".

> And, maybe as a worked example, how do I
> trace what work is being enqueued and run by the kworker threads?

For this level of details, I think kprobes/kretprobes will not currently
allow you to fetch it. The two options we have are:

- use static tracepoints. Is there a tracepoint that targets the
  information you are looking for ? Try "lttng list -k".
- or extend the dynamic probing to allow fetching variables from
  debug information,

Thanks,

Mathieu

> 
> Thanks,
> Bill
> 
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com



More information about the lttng-dev mailing list