Elie De Brauwer | 3 Jul 2012 21:42
Picon
Gravatar

Pointing systemtap to an out of tree kernel module

Hello list,

I'm doing a little experiment with systemtap, where I'm trying to do 
remote cross-system-tapping. Meaning on my laptop I have a 
cross-compiler, my kernel and and module in some path which isn't 
related to the kernel directory. And I'd like to create a script which 
allows me to gather information on the custom module. But I don't see 
any way to specify to systemtap where it should look for my kernel 
module (and debug symbols).

And I'm just trying to glue something to probe 
module("common").function("*"). Now suppose my module lives in 
/home/e/module how would I tell systemtap that that might be an 
interesting place to look for it ?

e <at> lap:/tmp$ stap -vvvv   -r /home/e/linux-3.3/ -a powerpc -B 
CROSS_COMPILE=powerpc-e500v2-linux-gnuspe-  --remote=ssh://root <at> 1.2.3.4 
   bla.stp
Located kernel source tree (COPYING) at '/home/e/linux-3.3/'
Systemtap translator/driver (version 1.7/0.152 Debian version 1.7-1+b1 
(sid))
Copyright (C) 2005-2012 Red Hat, Inc. and others
This is free software; see the source for copying conditions.
enabled features: AVAHI LIBSQLITE3 NSS BOOST_SHARED_PTR 
TR1_UNORDERED_MAP NLS
Created temporary directory "/tmp/stap68cup9"
Running ssh -q root <at> 1.2.3.4 /bin/bash -c 'cmd=`type -P stapsh || exit 
127` && exec "$cmd" -v -v'
sh: /bin/bash: not found
Spawn waitpid result (0x7f00): 127
(Continue reading)

David Smith | 3 Jul 2012 23:15
Picon
Favicon

Re: Pointing systemtap to an out of tree kernel module

On 07/03/2012 02:42 PM, Elie De Brauwer wrote:
> Hello list,
> 
> I'm doing a little experiment with systemtap, where I'm trying to do
> remote cross-system-tapping. Meaning on my laptop I have a
> cross-compiler, my kernel and and module in some path which isn't
> related to the kernel directory. And I'd like to create a script which
> allows me to gather information on the custom module. But I don't see
> any way to specify to systemtap where it should look for my kernel
> module (and debug symbols).
> 
> And I'm just trying to glue something to probe
> module("common").function("*"). Now suppose my module lives in
> /home/e/module how would I tell systemtap that that might be an
> interesting place to look for it ?

Read stappaths man page, and look for the "Debuginfo Path" section.
Basically set SYSTEMTAP_DEBUGINFO_PATH.

--

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

Turgis, Frederic | 5 Jul 2012 23:04
Picon
Favicon

RE: Pointing systemtap to an out of tree kernel module

Elie,

Please tell us if you make it work.
I am cross-compiling for a ARM platform with systemtap v1.8/elfutils v0.148 and this does not works so I put
kernel module in my kernel folder. With interesting behaviour when I set SYSTEMTAP_DEBUGINFO_PATH to
another path:
- kernel module including debug symbols can still be probed if in kernel folder
- kernel module with separate debug package can no longer be probed if in kernel folder

I suspect elfutils lib to be too old.

Regards
fred

OMAP Platform Business Unit - System Platform Engineering - Platform & Product Entitlement

>
Texas Instruments France SA, 821 Avenue Jack Kilby, 06270 Villeneuve Loubet. 036 420 040 R.C.S Antibes.
Capital de EUR 753.920

-----Original Message-----
>From: systemtap-owner <at> sourceware.org [mailto:systemtap-owner <at> sourceware.org] On Behalf Of David Smith
>Sent: Tuesday, July 03, 2012 11:15 PM
>To: Elie De Brauwer
>Cc: systemtap <at> sourceware.org
>Subject: Re: Pointing systemtap to an out of tree kernel module
>
>On 07/03/2012 02:42 PM, Elie De Brauwer wrote:
>> Hello list,
>>
(Continue reading)


Gmane