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]

Re: Can't set statement probe in self-built linux-4.4


On 07/14/2016 11:08 AM, Chris Dunlop wrote:
> Hi Frank,
> 
> On Fri, Jul 01, 2016 at 01:43:02PM +1000, Chris Dunlop wrote:
>> On Thu, Jun 30, 2016 at 08:57:38PM -0400, Frank Ch. Eigler wrote:
>>> Something's weird about your -vvvvv trace too; a similar command
>>> that works here gives a lot more "function cache ...." type lines.
>>>
>>> Any chance you could tar.xz up the whole vmlinux build tree?
>>
>> Of course: https://www.dropbox.com/s/l7cvs773mw8jqga/build.tar.xz?dl=0 (193M)
> 
> Any ideas?

I haven't had a chance to look at your tree, but since stap can find
register_shrinker() itself:

> $ stap -L 'kernel.function("register_shrinker").*'
> kernel.function("register_shrinker").call
> kernel.function("register_shrinker").exported
> kernel.function("register_shrinker").return

But not any lines from it:

> $ stap -v -L 'kernel.statement("register_shrinker@*:*")'
> Pass 1: parsed user script and 116 library scripts using
> 93372virt/31140res/3000shr/28456data kb, in 190usr/20sys/206real ms.
> Pass 2: analyzed script: 0 probes, 0 functions, 0 embeds, 0 globals
> using 131260virt/69116res/3764shr/66344data kb, in
310usr/40sys/354real ms.

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.

So, what to do about it? Off the top of my head, you've got a few options:

1) One option would be to probe at a different spot, say either in the
functions that call register_shrinker() or in the functions that
register_shrinker() calls.

2) Another option would be to try to lower the gcc's optimization level
for that source file.

3) Since you are building your own kernel, you could add a tracepoint(s)
to that function that contains the info you need at the point(s) you are
interested in, then hook up systemtap to that tracepoint(s).

-- 
David Smith
dsmith@redhat.com
Red Hat
http://www.redhat.com
256.217.0141 (direct)
256.837.0057 (fax)


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