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: SystemTap fails to find kernel tracepoints


I just compile compiled a kernel directly in the source tree:

[000]kdr2@debian-sid:~$ ls /lib/modules/3.10.53/ -l
total 1852
lrwxrwxrwx  1 root root     29 Dec  9 11:58 build ->
/home/kdr2/Work/opensrc/linux
drwxr-xr-x 11 root root   4096 Dec  9 11:58 kernel
-rw-r--r--  1 root root 430048 Dec  9 12:00 modules.alias
-rw-r--r--  1 root root 418422 Dec  9 12:00 modules.alias.bin
-rw-r--r--  1 root root   3217 Dec  9 11:58 modules.builtin
-rw-r--r--  1 root root   3998 Dec  9 12:00 modules.builtin.bin
-rw-r--r--  1 root root 145499 Dec  9 12:00 modules.dep
-rw-r--r--  1 root root 216835 Dec  9 12:00 modules.dep.bin
-rw-r--r--  1 root root    353 Dec  9 12:00 modules.devname
-rw-r--r--  1 root root  59959 Dec  9 11:58 modules.order
-rw-r--r--  1 root root     55 Dec  9 12:00 modules.softdep
-rw-r--r--  1 root root 266694 Dec  9 12:00 modules.symbols
-rw-r--r--  1 root root 320351 Dec  9 12:00 modules.symbols.bin
lrwxrwxrwx  1 root root     29 Dec  9 11:58 source ->
/home/kdr2/Work/opensrc/linux
drwxr-xr-x  3 root root   4096 Dec  9 12:00 updates
[000]kdr2@debian-sid:~$

the build and source link to the same dir


And It WOKRS now!

But, will stap support the kernel built in a separate dir?

On Tue, Dec 9, 2014 at 10:41 AM, KDr2 <killy.draw@gmail.com> wrote:
> I did compile a kernel from source myself, but like what was done on
> debian, I used a separate build directory from the source tree:
>
> export BUILDDIR=/opt/kernel/build/3.10
> export KBUILD_OUTPUT=${BUILDDIR}/build
> export INSTALL_PATH=${BUILDDIR}/boot
> export INSTALL_MOD_PATH=${BUILDDIR}/modules
>
> stap can not find the tracepoint for this kernel either.
>
> I'll try a kernel built directly in the source tree later when I get some time.
>
> On Tue, Dec 9, 2014 at 9:37 AM, Josh Stone <jistone@redhat.com> wrote:
>> On 12/08/2014 07:51 AM, David Smith wrote:
>>> Systemtap is probably having problems with finding the tracepoint
>>> header files (which would be in kernel-devel on a fedora system).
>>
>> Looking at a jessie VM I have laying around, I see:
>>
>>   /lib/modules/3.16.0-4-amd64
>>     build -> /usr/src/linux-headers-3.16.0-4-amd64
>>     source -> /usr/src/linux-headers-3.16.0-4-common
>>
>> That is, they're pointing to different locations, whereas on Fedora we
>> have "source -> build".  And Debian's source/ has a lot more in it than
>> build/ does, including the headers in include/trace/events/ that we use
>> to figure out tracepoints and their precise types.
>>
>> It appears to be this way on wheezy too.  Does this mean debian users
>> have never been able to use systemtap with tracepoints?  Does anybody
>> have past experience here?
>>
>> In stap, we do have separate variables for kernel_build_tree and
>> kernel_source_tree.  On Fedora, build_tree has just the headers
>> (including trace/events), and source_tree is used for reading the full
>> kernel sources in /usr/src/debug/kernel-$VERSION, from the
>> kernel-debuginfo rpm.  Debian's source link isn't really that -- it's
>> still just headers -- but we could probably use it that way to get
>> tracepoints working.  AFAIK Debian doesn't have full debuginfo sources
>> in a package anyway.
>
>
>
> --
> --
>
> KDr2, http://kdr2.com



-- 
-- 

KDr2, http://kdr2.com


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