public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* Inline matching with filenames
@ 2006-03-16 19:57 Stone, Joshua I
  2006-03-17  1:40 ` Frank Ch. Eigler
  0 siblings, 1 reply; 2+ messages in thread
From: Stone, Joshua I @ 2006-03-16 19:57 UTC (permalink / raw)
  To: SystemTap

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Inline matching with filenames
  2006-03-16 19:57 Inline matching with filenames Stone, Joshua I
@ 2006-03-17  1:40 ` Frank Ch. Eigler
  0 siblings, 0 replies; 2+ messages in thread
From: Frank Ch. Eigler @ 2006-03-17  1:40 UTC (permalink / raw)
  To: Stone, Joshua I; +Cc: SystemTap

"Stone, Joshua I" <joshua.i.stone@intel.com> writes:

> [...]
> 	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? [...]

I agree, matching by definition site rather than use site makes more
sense, and was probably intended.

- FChE

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-03-17  1:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-16 19:57 Inline matching with filenames Stone, Joshua I
2006-03-17  1:40 ` Frank Ch. Eigler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).