1 |
Hi, |
2 |
I am trying SystemTap - a tool for dynamic tracing on Gentoo and I have |
3 |
some troubles to make it working. I followed the guide on |
4 |
|
5 |
https://sourceware.org/systemtap/wiki/SystemTapWithSelfBuiltKernel |
6 |
|
7 |
and built the kernel with required options: |
8 |
|
9 |
zgrep -E |
10 |
'CONFIG_DEBUG_INFO|CONFIG_KPROBES|CONFIG_RELAY|CONFIG_DEBUG_FS|CONFIG_MODULES|CONFIG_MODULE_UNLOAD|CONFIG_UPROBES|CONFIG_DEBUG_INFO' |
11 |
/proc/config.gz |
12 |
CONFIG_RELAY=y |
13 |
CONFIG_KPROBES=y |
14 |
CONFIG_UPROBES=y |
15 |
CONFIG_MODULES_USE_ELF_RELA=y |
16 |
CONFIG_MODULES=y |
17 |
CONFIG_MODULE_UNLOAD=y |
18 |
CONFIG_DEBUG_INFO=y |
19 |
# CONFIG_DEBUG_INFO_REDUCED is not set |
20 |
# CONFIG_DEBUG_INFO_SPLIT is not set |
21 |
CONFIG_DEBUG_INFO_DWARF4=y |
22 |
CONFIG_DEBUG_FS=y |
23 |
# CONFIG_KPROBES_SANITY_TEST is not set |
24 |
|
25 |
But even the simplest check fails on: |
26 |
|
27 |
stap -r /usr/src/linux -v -e 'probe vfs.read {printf("read performed\n"); |
28 |
exit()}' |
29 |
Pass 1: parsed user script and 122 library script(s) using |
30 |
214692virt/125980res/5604shr/122476data kb, in 450usr/20sys/464real ms. |
31 |
Pass 2: analyzed script: 1 probe(s), 1 function(s), 3 embed(s), 0 global(s) |
32 |
using 347656virt/260520res/6984shr/255440data kb, in |
33 |
1210usr/250sys/1462real ms. |
34 |
Pass 3: translated to C into |
35 |
"/tmp/stap2nY7sY/stap_9aad5fb97c53bb7c4bc51dce0ccbb236_1259_src.c" using |
36 |
347656virt/260772res/7236shr/255440data kb, in 0usr/0sys/4real ms. |
37 |
In file included from /usr/share/systemtap/runtime/linux/task_finder.c:17:0, |
38 |
from /usr/share/systemtap/runtime/linux/runtime.h:206, |
39 |
from /usr/share/systemtap/runtime/runtime.h:24, |
40 |
from |
41 |
/tmp/stap2nY7sY/stap_9aad5fb97c53bb7c4bc51dce0ccbb236_1259_src.c:24: |
42 |
/usr/share/systemtap/runtime/linux/task_finder2.c: In function |
43 |
'__stp_call_mmap_callbacks_with_addr': |
44 |
/usr/share/systemtap/runtime/linux/task_finder2.c:695:24: error: 'struct |
45 |
file' has no member named 'f_dentry' |
46 |
dentry = vma->vm_file->f_dentry; |
47 |
^ |
48 |
/usr/share/systemtap/runtime/linux/task_finder2.c: In function |
49 |
'__stp_call_mmap_callbacks_for_task': |
50 |
/usr/share/systemtap/runtime/linux/task_finder2.c:1198:42: error: 'struct |
51 |
file' has no member named 'f_dentry' |
52 |
vma_cache_p->dentry = vma->vm_file->f_dentry; |
53 |
^ |
54 |
scripts/Makefile.build:258: recipe for target |
55 |
'/tmp/stap2nY7sY/stap_9aad5fb97c53bb7c4bc51dce0ccbb236_1259_src.o' failed |
56 |
make[1]: *** |
57 |
[/tmp/stap2nY7sY/stap_9aad5fb97c53bb7c4bc51dce0ccbb236_1259_src.o] Error 1 |
58 |
Makefile:1390: recipe for target '_module_/tmp/stap2nY7sY' failed |
59 |
make: *** [_module_/tmp/stap2nY7sY] Error 2 |
60 |
WARNING: kbuild exited with status: 2 |
61 |
Pass 4: compiled C into "stap_9aad5fb97c53bb7c4bc51dce0ccbb236_1259.ko" in |
62 |
3230usr/260sys/4290real ms. |
63 |
Pass 4: compilation failed. [man error::pass4] |
64 |
|
65 |
I am wondering now - is there anything wrong with my aproach? Does anyone |
66 |
succesfully use SystemTap on Gentoo? And if so, could you help me to make |
67 |
this running? |
68 |
|
69 |
Lukas |