Can't set statement probe in self-built linux-4.4
David Smith
dsmith@redhat.com
Thu Jul 14 18:23:00 GMT 2016
On 07/14/2016 12:27 PM, Chris Dunlop wrote:
> On Thu, Jul 14, 2016 at 11:54:56AM -0500, David Smith wrote:
>> I'd say that the compiler has optimized and reorganized things to the
>> point where systemtap can't recognize a single line number in that function.
>
> Actually, register_shrinker was a random example: I was originally trying to
> (and am still wanting to) set statement probes in an externally compiled
> kernel module (zfsonlinux). That was (and is) failing the same way, so I
> thought I'd try to go back to basics and ended up at register_shinker.
Ah, I didn't realize that.
> I haven't been able to set statement probes on anything I've tried: kernel,
> modules, external modules.
Hmm, so we've got a bigger problem than just register_shrinker().
> For what it's worth, if this is expected to bring back all the line numbers
> systemtap can find in the whole kernel, it's not finding any at all:
>
> $ stap -v -L 'kernel.statement("*@*:*")'
> Pass 1: parsed user script and 116 library scripts using 93372virt/31144res/3000shr/28456data kb, in 190usr/20sys/204real ms.
> Pass 2: analyzed script: 0 probes, 0 functions, 0 embeds, 0 globals using 132988virt/70760res/3764shr/68072data kb, in 300usr/40sys/351real ms.
> $
OK, so I downloaded your kernel and looked at the build options. In your
config file, you've got:
CONFIG_DEBUG_INFO=y
# CONFIG_DEBUG_INFO_REDUCED is not set
CONFIG_DEBUG_INFO_SPLIT=y
CONFIG_DEBUG_INFO_DWARF4=y
In a Fedora 23 kernel, you'll see:
CONFIG_DEBUG_INFO=y
# CONFIG_DEBUG_INFO_REDUCED is not set
# CONFIG_DEBUG_INFO_SPLIT is not set
# CONFIG_DEBUG_INFO_DWARF4 is not set
CONFIG_DEBUG_INFO_VTA=y
My guess would be that systemtap is having trouble with either the
CONFIG_DEBUG_INFO_SPLIT option (which adds the '-gsplit-dwarf' gcc
option) or the CONFIG_DEBUG_INFO_DWARF4 option (which adds the
'-gdwarf-4' gcc option).
I'd suspect split debuginfo first. As far as I know, systemtap has never
been used with those individual .dwo files. Can you recompile without
CONFIG_DEBUG_INFO_SPLIT?
--
David Smith
dsmith@redhat.com
Red Hat
http://www.redhat.com
256.217.0141 (direct)
256.837.0057 (fax)
More information about the Systemtap
mailing list