From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 5E5DC1387B1 for ; Mon, 21 Sep 2015 05:16:19 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 87CEC21C00F; Mon, 21 Sep 2015 05:16:01 +0000 (UTC) Received: from mail-ig0-f181.google.com (mail-ig0-f181.google.com [209.85.213.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 69E5CE08C7 for ; Mon, 21 Sep 2015 05:16:00 +0000 (UTC) Received: by igbni9 with SMTP id ni9so50961425igb.0 for ; Sun, 20 Sep 2015 22:15:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=wY+NA3nsd9PEBdvhsZBkVc9fbC3wkKtnsTt8nwGZtoM=; b=SwjOkFeGQ2qa9KECwyvEB56CRwxdNawioONXJWpl5FyC7v63J41iiAhUMXb1ZZERtF 3NTX9O8XEC2PQISQbENi0KnKnRGTmnyY594sOpZSiqISosMxXWCiYCoMhjdNxlXXw/pu X8/p/xjqm5gEZ+cLN05jj8WLhOzN0t8WyTyatfdVjmIPC+vhZoOHf2Tx6fWcbGqYpgJu GyF41fDpSTC9Hc5rwiaymVjoZuE747JSe0VUpW3MW3wY+G5408cTgndMF2VgFDZKUfUT FF+JP0qVqYM9Mcnax2Qp8iuCE/UXrRIsYc4ts36M9OhZx9SiNSJJeU2gNnu5/xgM684S h7zw== Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 X-Received: by 10.50.47.81 with SMTP id b17mr8594299ign.39.1442812559807; Sun, 20 Sep 2015 22:15:59 -0700 (PDT) Received: by 10.64.123.67 with HTTP; Sun, 20 Sep 2015 22:15:59 -0700 (PDT) Date: Mon, 21 Sep 2015 07:15:59 +0200 Message-ID: Subject: [gentoo-user] SystemTap failing on basic check From: =?UTF-8?B?THVrw6HFoSBPbGl2YQ==?= To: gentoo-user@lists.gentoo.org Content-Type: multipart/alternative; boundary=089e013d061a1adb3c05203afa3d X-Archives-Salt: 7b877822-e079-4920-a3db-ecd28054e7dd X-Archives-Hash: 2e5f7e36642d7d8d8fa42f951bf83feb --089e013d061a1adb3c05203afa3d Content-Type: text/plain; charset=UTF-8 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 --089e013d061a1adb3c05203afa3d Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
=C2=A0 Hi,
I am trying SystemTap - a to= ol for dynamic tracing on Gentoo and I have some troubles to make it workin= g. I followed the guide on

https://sourceware.org/systemtap/wiki= /SystemTapWithSelfBuiltKernel

and built the kernel with re= quired options:

zgrep -E 'CONFIG_DEBUG_INFO|CONFIG_KPROBES|CONFI= G_RELAY|CONFIG_DEBUG_FS|CONFIG_MODULES|CONFIG_MODULE_UNLOAD|CONFIG_UPROBES|= CONFIG_DEBUG_INFO' /proc/config.gz
CONFIG_RELAY=3Dy
CONFIG_KPROB= ES=3Dy
CONFIG_UPROBES=3Dy
CONFIG_MODULES_USE_ELF_RELA=3Dy
CONFIG_M= ODULES=3Dy
CONFIG_MODULE_UNLOAD=3Dy
CONFIG_DEBUG_INFO=3Dy
# CONFIG= _DEBUG_INFO_REDUCED is not set
# CONFIG_DEBUG_INFO_SPLIT is not set
C= ONFIG_DEBUG_INFO_DWARF4=3Dy
CONFIG_DEBUG_FS=3Dy
# CONFIG_KPROBES_SANI= TY_TEST is not set

But even the simplest check fails on:
stap -r /usr/src/linux -v -e 'probe vfs.read {printf("read p= erformed\n"); exit()}'
Pass 1: parsed user script and 122 libra= ry script(s) using 214692virt/125980res/5604shr/122476data kb, in 450usr/20= sys/464real ms.
Pass 2: analyzed script: 1 probe(s), 1 function(s), 3 em= bed(s), 0 global(s) using 347656virt/260520res/6984shr/255440data kb, in 12= 10usr/250sys/1462real ms.
Pass 3: translated to C into "/tmp/stap2n= Y7sY/stap_9aad5fb97c53bb7c4bc51dce0ccbb236_1259_src.c" using 347656vir= t/260772res/7236shr/255440data kb, in 0usr/0sys/4real ms.
In file includ= ed from /usr/share/systemtap/runtime/linux/task_finder.c:17:0,
=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 from /usr/share/systemtap/runtime/linux/runtime.h:206,
=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 from /usr/share/systemtap/runtime/runtime.h:24,
=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 from /tmp/stap2nY7sY/stap_9aad5fb97c53bb7c4bc51dce0ccbb2= 36_1259_src.c:24:
/usr/share/systemtap/runtime/linux/task_finder2.c: In = function '__stp_call_mmap_callbacks_with_addr':
/usr/share/syste= mtap/runtime/linux/task_finder2.c:695:24: error: 'struct file' has = no member named 'f_dentry'
=C2=A0=C2=A0 dentry =3D vma->vm_fi= le->f_dentry;
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 ^
/usr/share/systemtap/runtime/linux/task_finder2.c: In functi= on '__stp_call_mmap_callbacks_for_task':
/usr/share/systemtap/ru= ntime/linux/task_finder2.c:1198:42: error: 'struct file' has no mem= ber named 'f_dentry'
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = vma_cache_p->dentry =3D vma->vm_file->f_dentry;
=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 ^
scripts/Makefile.build:258: recipe for target '/tmp/stap2nY= 7sY/stap_9aad5fb97c53bb7c4bc51dce0ccbb236_1259_src.o' failed
make[1]= : *** [/tmp/stap2nY7sY/stap_9aad5fb97c53bb7c4bc51dce0ccbb236_1259_src.o] Er= ror 1
Makefile:1390: recipe for target '_module_/tmp/stap2nY7sY'= failed
make: *** [_module_/tmp/stap2nY7sY] Error 2
WARNING: kbuild e= xited with status: 2
Pass 4: compiled C into "stap_9aad5fb97c53bb7c= 4bc51dce0ccbb236_1259.ko" in 3230usr/260sys/4290real ms.
Pass 4: co= mpilation failed.=C2=A0 [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?
=C2=A0 Lukas

--089e013d061a1adb3c05203afa3d--