This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Can't set statement probe in self-built linux-4.4
- From: fche at redhat dot com (Frank Ch. Eigler)
- To: Chris Dunlop <chris at onthe dot net dot au>
- Cc: systemtap at sourceware dot org
- Date: Thu, 30 Jun 2016 10:58:47 -0400
- Subject: Re: Can't set statement probe in self-built linux-4.4
- Authentication-results: sourceware.org; auth=none
- References: <20160630075744 dot GA3637 at onthe dot net dot au>
Hi -
chris wrote:
> [...]
> I can't seem to set statement probes in a self-built linux-4.4. What can
> be going wrong? [...]
It sounds like you're setting up everything all right, good job.
> I can set a kernel function probe, e.g.:
>
> $ stap -p2 -e 'probe kernel.function("register_shrinker") { printf("foo\n"); }'
> [...]
> But I can't set a kernel statement probe using either a function offset or
> explicit line number [...]
> $ stap -v -p2 -e 'probe kernel.statement("register_shinker@mm/vmscan.c+3") { printf("foo\n"); }'
> [...]
Have you tried:
$ stap -L 'kernel.statement("register_shrinker@*:*")'
to get the list of line numbers that systemtap recognizes?
> The full -vvvvvv output from above is available at:
> https://www.dropbox.com/s/dfepzebixd7yb36/stap.out.gz?dl=0
Will look at that shortly.
> ----------------------------------------------------------------------
> $ readelf --debug-dump=line $SYSTEMTAP_RELEASE/vmlinux | head -45
> Raw dump of debug contents of section .debug_line:
> [...]
> [0x0000006e] Copy
> [0x0000006f] Special opcode 81: advance Address by 5 to 0xffffffff81000005 and Line by 6 to 75
> [0x00000070] Special opcode 104: advance Address by 7 to 0xffffffff8100000c and Line by 1 to 76
> [0x00000071] Special opcode 106: advance Address by 7 to 0xffffffff81000013 and Line by 3 to 79
> [0x00000072] Special opcode 48: advance Address by 3 to 0xffffffff81000016 and Line by 1 to 80
> [0x00000073] Special opcode 76: advance Address by 5 to 0xffffffff8100001b and Line by 1 to 81
> [0x00000074] Special opcode 34: advance Address by 2 to 0xffffffff8100001d and Line by 1 to 82
> [0x00000075] Special opcode 94: advance Address by 6 to 0xffffffff81000023 and Line by 5 to 87
> ----------------------------------------------------------------------
This too looks OK. Keep in mind though that systemtap does filter out
line numbers that are not uniquely mappable to a single PC address.
Highly optimized code can smear statements from a single line to
multiple locations, and stap doesn't want to guess wrong from ambiguous
alternatives.
- FChE