* [gentoo-user] SystemTap failing on basic check
@ 2015-09-21 5:15 Lukáš Oliva
2015-09-21 7:14 ` Fernando Rodriguez
2015-09-21 12:17 ` [gentoo-user] " James
0 siblings, 2 replies; 3+ messages in thread
From: Lukáš Oliva @ 2015-09-21 5:15 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 2856 bytes --]
Hi,
I am trying SystemTap - a tool for dynamic tracing on Gentoo and I have
some troubles to make it working. I followed the guide on
https://sourceware.org/systemtap/wiki/SystemTapWithSelfBuiltKernel
and built the kernel with required options:
zgrep -E
'CONFIG_DEBUG_INFO|CONFIG_KPROBES|CONFIG_RELAY|CONFIG_DEBUG_FS|CONFIG_MODULES|CONFIG_MODULE_UNLOAD|CONFIG_UPROBES|CONFIG_DEBUG_INFO'
/proc/config.gz
CONFIG_RELAY=y
CONFIG_KPROBES=y
CONFIG_UPROBES=y
CONFIG_MODULES_USE_ELF_RELA=y
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
CONFIG_DEBUG_INFO=y
# CONFIG_DEBUG_INFO_REDUCED is not set
# CONFIG_DEBUG_INFO_SPLIT is not set
CONFIG_DEBUG_INFO_DWARF4=y
CONFIG_DEBUG_FS=y
# CONFIG_KPROBES_SANITY_TEST is not set
But even the simplest check fails on:
stap -r /usr/src/linux -v -e 'probe vfs.read {printf("read performed\n");
exit()}'
Pass 1: parsed user script and 122 library script(s) using
214692virt/125980res/5604shr/122476data kb, in 450usr/20sys/464real ms.
Pass 2: analyzed script: 1 probe(s), 1 function(s), 3 embed(s), 0 global(s)
using 347656virt/260520res/6984shr/255440data kb, in
1210usr/250sys/1462real ms.
Pass 3: translated to C into
"/tmp/stap2nY7sY/stap_9aad5fb97c53bb7c4bc51dce0ccbb236_1259_src.c" using
347656virt/260772res/7236shr/255440data kb, in 0usr/0sys/4real ms.
In file included from /usr/share/systemtap/runtime/linux/task_finder.c:17:0,
from /usr/share/systemtap/runtime/linux/runtime.h:206,
from /usr/share/systemtap/runtime/runtime.h:24,
from
/tmp/stap2nY7sY/stap_9aad5fb97c53bb7c4bc51dce0ccbb236_1259_src.c:24:
/usr/share/systemtap/runtime/linux/task_finder2.c: In function
'__stp_call_mmap_callbacks_with_addr':
/usr/share/systemtap/runtime/linux/task_finder2.c:695:24: error: 'struct
file' has no member named 'f_dentry'
dentry = vma->vm_file->f_dentry;
^
/usr/share/systemtap/runtime/linux/task_finder2.c: In function
'__stp_call_mmap_callbacks_for_task':
/usr/share/systemtap/runtime/linux/task_finder2.c:1198:42: error: 'struct
file' has no member named 'f_dentry'
vma_cache_p->dentry = vma->vm_file->f_dentry;
^
scripts/Makefile.build:258: recipe for target
'/tmp/stap2nY7sY/stap_9aad5fb97c53bb7c4bc51dce0ccbb236_1259_src.o' failed
make[1]: ***
[/tmp/stap2nY7sY/stap_9aad5fb97c53bb7c4bc51dce0ccbb236_1259_src.o] Error 1
Makefile:1390: recipe for target '_module_/tmp/stap2nY7sY' failed
make: *** [_module_/tmp/stap2nY7sY] Error 2
WARNING: kbuild exited with status: 2
Pass 4: compiled C into "stap_9aad5fb97c53bb7c4bc51dce0ccbb236_1259.ko" in
3230usr/260sys/4290real ms.
Pass 4: compilation failed. [man error::pass4]
I am wondering now - is there anything wrong with my aproach? Does anyone
succesfully use SystemTap on Gentoo? And if so, could you help me to make
this running?
Lukas
[-- Attachment #2: Type: text/html, Size: 3441 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [gentoo-user] SystemTap failing on basic check
2015-09-21 5:15 [gentoo-user] SystemTap failing on basic check Lukáš Oliva
@ 2015-09-21 7:14 ` Fernando Rodriguez
2015-09-21 12:17 ` [gentoo-user] " James
1 sibling, 0 replies; 3+ messages in thread
From: Fernando Rodriguez @ 2015-09-21 7:14 UTC (permalink / raw
To: gentoo-user
On Monday, September 21, 2015 7:15:59 AM Lukáš Oliva wrote:
> Hi,
> I am trying SystemTap - a tool for dynamic tracing on Gentoo and I have
> some troubles to make it working. I followed the guide on
>
> https://sourceware.org/systemtap/wiki/SystemTapWithSelfBuiltKernel
>
> and built the kernel with required options:
>
> zgrep -E
> 'CONFIG_DEBUG_INFO|CONFIG_KPROBES|CONFIG_RELAY|CONFIG_DEBUG_FS|
CONFIG_MODULES|CONFIG_MODULE_UNLOAD|CONFIG_UPROBES|CONFIG_DEBUG_INFO'
> /proc/config.gz
> CONFIG_RELAY=y
> CONFIG_KPROBES=y
> CONFIG_UPROBES=y
> CONFIG_MODULES_USE_ELF_RELA=y
> CONFIG_MODULES=y
> CONFIG_MODULE_UNLOAD=y
> CONFIG_DEBUG_INFO=y
> # CONFIG_DEBUG_INFO_REDUCED is not set
> # CONFIG_DEBUG_INFO_SPLIT is not set
> CONFIG_DEBUG_INFO_DWARF4=y
> CONFIG_DEBUG_FS=y
> # CONFIG_KPROBES_SANITY_TEST is not set
>
> But even the simplest check fails on:
>
> stap -r /usr/src/linux -v -e 'probe vfs.read {printf("read performed\n");
> exit()}'
> Pass 1: parsed user script and 122 library script(s) using
> 214692virt/125980res/5604shr/122476data kb, in 450usr/20sys/464real ms.
> Pass 2: analyzed script: 1 probe(s), 1 function(s), 3 embed(s), 0 global(s)
> using 347656virt/260520res/6984shr/255440data kb, in
> 1210usr/250sys/1462real ms.
> Pass 3: translated to C into
> "/tmp/stap2nY7sY/stap_9aad5fb97c53bb7c4bc51dce0ccbb236_1259_src.c" using
> 347656virt/260772res/7236shr/255440data kb, in 0usr/0sys/4real ms.
> In file included from /usr/share/systemtap/runtime/linux/task_finder.c:17:0,
> from /usr/share/systemtap/runtime/linux/runtime.h:206,
> from /usr/share/systemtap/runtime/runtime.h:24,
> from
> /tmp/stap2nY7sY/stap_9aad5fb97c53bb7c4bc51dce0ccbb236_1259_src.c:24:
> /usr/share/systemtap/runtime/linux/task_finder2.c: In function
> '__stp_call_mmap_callbacks_with_addr':
> /usr/share/systemtap/runtime/linux/task_finder2.c:695:24: error: 'struct
> file' has no member named 'f_dentry'
> dentry = vma->vm_file->f_dentry;
> ^
> /usr/share/systemtap/runtime/linux/task_finder2.c: In function
> '__stp_call_mmap_callbacks_for_task':
> /usr/share/systemtap/runtime/linux/task_finder2.c:1198:42: error: 'struct
> file' has no member named 'f_dentry'
> vma_cache_p->dentry = vma->vm_file->f_dentry;
> ^
> scripts/Makefile.build:258: recipe for target
> '/tmp/stap2nY7sY/stap_9aad5fb97c53bb7c4bc51dce0ccbb236_1259_src.o' failed
> make[1]: ***
> [/tmp/stap2nY7sY/stap_9aad5fb97c53bb7c4bc51dce0ccbb236_1259_src.o] Error 1
> Makefile:1390: recipe for target '_module_/tmp/stap2nY7sY' failed
> make: *** [_module_/tmp/stap2nY7sY] Error 2
> WARNING: kbuild exited with status: 2
> Pass 4: compiled C into "stap_9aad5fb97c53bb7c4bc51dce0ccbb236_1259.ko" in
> 3230usr/260sys/4290real ms.
> Pass 4: compilation failed. [man error::pass4]
>
> I am wondering now - is there anything wrong with my aproach? Does anyone
> succesfully use SystemTap on Gentoo? And if so, could you help me to make
> this running?
>
> Lukas
It is outdated. It's trying to build a module that was written for an old
kernel. I remember that change because it broke some module for me, I think it
was on kernel 3.12.x or 3.14.x
--
Fernando Rodriguez
^ permalink raw reply [flat|nested] 3+ messages in thread
* [gentoo-user] Re: SystemTap failing on basic check
2015-09-21 5:15 [gentoo-user] SystemTap failing on basic check Lukáš Oliva
2015-09-21 7:14 ` Fernando Rodriguez
@ 2015-09-21 12:17 ` James
1 sibling, 0 replies; 3+ messages in thread
From: James @ 2015-09-21 12:17 UTC (permalink / raw
To: gentoo-user
Lukáš Oliva <olivalukas <at> gmail.com> writes:
> I am trying SystemTap -
> Lukas
Hello Lukas,
trace-cmd is in the portage tree. It has 'kernelshark' as part of the
package. You can google and find lots of examples on how to use kernelshark.
Heaptrack is very good for memory analysis, along with other tools.
' eix -cC dev-util' will yeild a short description of the codes/tools found
in dev-util.
good hunting!
James
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-09-21 12:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-21 5:15 [gentoo-user] SystemTap failing on basic check Lukáš Oliva
2015-09-21 7:14 ` Fernando Rodriguez
2015-09-21 12:17 ` [gentoo-user] " James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox