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]

systemtap LKET help


Hello-

I am not able to get systemtap and LKET to work right together, and
don't know if I am missing a step somewhere. I would be grateful for
your guidance. 

I built the systemtap from source, as well as the Linux I am running it
on. This is all on an x86_64 machine with linux-2.6.16. Simple examples
from systemtap examples directory such as helloworld.stp and top.stp
work fine. 
(However, "make check" exits with a could not find "runtest" error --as
there was no runtest under the testsuite directory after "make all"
finished). I am working with systemtap version 0.5.12.

Next I tried to test it with one of the LKET primitives as I need to
collect a pagefault trace. What happens is shown below. Eventhough there
is a definition for _GROUP_PAGEFAULT in tapset/LKET/hookid_defs.stp and
a corresponding _register_sys_event in tapset/LKET/register_event.stp,
the compile fails because _GROUP_PAGEFAULT is undefined at the point of
compiling. I am new to using LKET and wondering if I am supposed to
invoke stap differently. I could not find anything suggestive in the
stap documentation.

I am attaching the C code that was generated after phase 3.

Thanks in advance!
regards,
-K. Doshi-



## stap -D ASCII_TRACE -vv -e "probe addevent.pagefault {}"

SystemTap translator/driver (version 0.5.12 built 2007-08-22)
(Using Red Hat elfutils 0.125 libraries.)
Copyright (C) 2005-2007 Red Hat, Inc. and others
This is free software; see the source for copying conditions.
Created temporary directory "/tmp/stap1ynGsl"
Searched '/usr/local/share/systemtap/tapset/2.6.16/x86_64/*.stp', match
count 0
Searched '/usr/local/share/systemtap/tapset/2.6.16/*.stp', match count 0
Searched '/usr/local/share/systemtap/tapset/2.6.16/x86_64/*.stp', match
count 0
Searched '/usr/local/share/systemtap/tapset/2.6.16/*.stp', match count 0
Searched '/usr/local/share/systemtap/tapset/2.6.16/x86_64/*.stp', match
count 0
Searched '/usr/local/share/systemtap/tapset/2.6.16/*.stp', match count 0
Searched '/usr/local/share/systemtap/tapset/2.6/x86_64/*.stp', match
count 0
Searched '/usr/local/share/systemtap/tapset/2.6/*.stp', match count 0
Searched '/usr/local/share/systemtap/tapset/x86_64/*.stp', match count 1
Searched '/usr/local/share/systemtap/tapset/*.stp', match count 34
Searched '/usr/local/share/systemtap/tapset/LKET/2.6.16/x86_64/*.stp',
match count 0
Searched '/usr/local/share/systemtap/tapset/LKET/2.6.16/*.stp', match
count 0
Searched '/usr/local/share/systemtap/tapset/LKET/2.6.16/x86_64/*.stp',
match count 0
Searched '/usr/local/share/systemtap/tapset/LKET/2.6.16/*.stp', match
count 0
Searched '/usr/local/share/systemtap/tapset/LKET/2.6.16/x86_64/*.stp',
match count 0
Searched '/usr/local/share/systemtap/tapset/LKET/2.6.16/*.stp', match
count 0
Searched '/usr/local/share/systemtap/tapset/LKET/2.6/x86_64/*.stp',
match count 0
Searched '/usr/local/share/systemtap/tapset/LKET/2.6/*.stp', match count
0
Searched '/usr/local/share/systemtap/tapset/LKET/x86_64/*.stp', match
count 0
Searched '/usr/local/share/systemtap/tapset/LKET/*.stp', match count 19
Pass 1: parsed user script and 54 library script(s) in
190usr/0sys/197real ms.
probe __handle_mm_fault@mm/memory.c:2550 kernel section=.text
pc=0xffffffff8016b0f0
Pass 2: analyzed script: 1 probe(s), 4 function(s), 3 embed(s), 0
global(s) in 150usr/100sys/249real ms.
probe_1495 locks nothing
Pass 3: translated to C into
"/tmp/stap1ynGsl/stap_eac41405853586191d7bb839d028a578_5361.c" in
0usr/0sys/0real ms.
Running make -C "/lib/modules/2.6.16/build" M="/tmp/stap1ynGsl" modules
V=1
make: Entering directory `/usr/src/linux-2.6.16'
rm -rf /tmp/stap1ynGsl/.tmp_versions
mkdir -p /tmp/stap1ynGsl/.tmp_versions
make -f scripts/Makefile.build obj=/tmp/stap1ynGsl
  gcc
-Wp,-MD,/tmp/stap1ynGsl/.stap_eac41405853586191d7bb839d028a578_5361.o.d
-nostdinc -isystem /usr/lib64/gcc/x86_64-suse-linux/4.1.2/include
-D__KERNEL__ -Iinclude  -include
/usr/src/linux-2.6.16/include/linux/autoconf.h  -Wall -Wundef
-Wstrict-prototypes -Wno-trigraphs -Werror-implicit-function-declaration
-fno-strict-aliasing -fno-common -ffreestanding -Os     -mtune=generic
-m64 -mno-red-zone -mcmodel=kernel -pipe -fno-reorder-blocks
-Wno-sign-compare -fno-asynchronous-unwind-tables -funit-at-a-time
-mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fomit-frame-pointer -g
-fno-stack-protector -Wdeclaration-after-statement -Wno-pointer-sign -D
"ASCII_TRACE" -freorder-blocks -Wno-unused -Werror
-I"/usr/local/share/systemtap/runtime"   -DMODULE -D"KBUILD_STR(s)=#s"
-D"KBUILD_BASENAME=KBUILD_STR(stap_eac41405853586191d7bb839d028a578_5361
)"
-D"KBUILD_MODNAME=KBUILD_STR(stap_eac41405853586191d7bb839d028a578_5361)
" -c -o
/tmp/stap1ynGsl/.tmp_stap_eac41405853586191d7bb839d028a578_5361.o
/tmp/stap1ynGsl/stap_eac41405853586191d7bb839d028a578_5361.c
/tmp/stap1ynGsl/stap_eac41405853586191d7bb839d028a578_5361.c: In
function 'function_log_pagefault_tracedata':
/tmp/stap1ynGsl/stap_eac41405853586191d7bb839d028a578_5361.c:357: error:
'_GROUP_PAGEFAULT' undeclared (first use in this function)
/tmp/stap1ynGsl/stap_eac41405853586191d7bb839d028a578_5361.c:357: error:
(Each undeclared identifier is reported only once
/tmp/stap1ynGsl/stap_eac41405853586191d7bb839d028a578_5361.c:357: error:
for each function it appears in.)
/tmp/stap1ynGsl/stap_eac41405853586191d7bb839d028a578_5361.c:357: error:
'_HOOKID_PAGEFAULT' undeclared (first use in this function)
make[1]: ***
[/tmp/stap1ynGsl/stap_eac41405853586191d7bb839d028a578_5361.o] Error 1
make: *** [_module_/tmp/stap1ynGsl] Error 2
make: Leaving directory `/usr/src/linux-2.6.16'
Pass 4: compiled C into "stap_eac41405853586191d7bb839d028a578_5361.ko"
in 320usr/60sys/392real ms.
Pass 4: compilation failed.  Try again with more '-v' (verbose) options.
Running rm -rf /tmp/stap1ynGsl

Attachment: pagefault_stp.c
Description: pagefault_stp.c


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