This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Inline matching with filenames


Is there any way to write a probe that matches all inline functions
*defined* within a particular file?  For example, I thought that I could
do this:
	probe kernel.inline("*@include/linux/mm.h")

But I found that this will put probes at all inlines that are *used*
within that file.  Is this the intended behavior?  It seems incorrect,
because the location names that are actually generated from the above
probe are as follows:

  char const * dwarf_kprobe_0_location_names[17688] = {
    "kernel.inline(\"unlock_kernel@include/linux/smp_lock.h:53\")",
    "kernel.inline(\"execve@include/asm/unistd.h:437\")",
    "kernel.inline(\"get_current@include/asm/current.h:9\")",
    "kernel.inline(\"get_current@include/asm/current.h:9\")",
    "kernel.inline(\"fixup_cpu_present_map@init/main.c:761\")",
    ...
  };

So the location names are based on where the inline was defined, even
though it matched my filename based on what inlines were used there.
This doesn't seem to explain it either though, because I have no idea
how execve fits in...

What I would like is to match all inlines defined here, but used
anywhere.  To make any sense, "anywhere" probably needs to be restricted
to the specified module (kernel), but one could also use
module("foo").inline("*@include/linux/mm.h") to get uses of the inlines
within a different module.


Josh


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]