I use OpenSuSe 12.2 with XEN hypervisor. Studying the Systemtap (Chapter 4. User-Space Probing), I saw that it is possible to do probing for applications in user space, but it’s not work in my kernel.
Running the command below, everything works correctly.
stap -v -e ‘probe vfs.read {printf("read performed
"); exit()}’
Pass 1: parsed user script and 90 library script(s) using 80812virt/24360res/2512shr/22300data kb, in 130usr/10sys/151real ms.
Pass 2: analyzed script: 1 probe(s), 1 function(s), 3 embed(s), 0 global(s) using 300208virt/126464res/8372shr/115764data kb, in 1360usr/730sys/2131real ms.
Pass 3: translated to C into “/tmp/stap7aWTJW/stap_6d420bdef22bdcac997a4dae1ea7f20b_1642_src.c” using 289736virt/121028res/5764shr/115764data kb, in 0usr/0sys/8real ms.
Updating /tmp/stap7aWTJW/Makefile.xen
Pass 4: compiled C into “stap_6d420bdef22bdcac997a4dae1ea7f20b_1642.ko” in 1430usr/630sys/2499real ms.
Pass 5: starting run.
read performed
Pass 5: run completed in 10usr/50sys/403real ms.
But, running the command below, nothing works.
stap -e ‘probe process("/lib64/libc-2.15.so").function(“malloc”) {println(“test”)}’
user-space facilities not available without kernel CONFIG_UTRACE or CONFIG_TRACEPOINTS/CONFIG_ARCH_SUPPORTS_UPROBES/CONFIG_UPROBES
Pass 4: compilation failed. Try again with another ‘–vp 0001’ option.
Can someone help me?
Below my settings:
Kernel (recompiled with debuginfo):
3.4.11-2.16-xen #3 SMP Tue Nov 27 19:00:52 BRST 2012 x86_64 x86_64 x86_64 GNU/Linux
Systemtap:
Systemtap translator/driver (version 2.1/0.153, commit release-2.0-108-g6b378b7)
Copyright (C) 2005-2012 Red Hat, Inc. and others
This is free software; see the source for copying conditions.
enabled features: AVAHI LIBSQLITE3 NSS BOOST_SHARED_PTR TR1_UNORDERED_MAP NLS
Packets DEBUG: # rpm -qa | grep debug
glibc-locale-debuginfo-32bit-2.15-22.6.4.x86_64
glibc-locale-debuginfo-2.15-22.6.4.x86_64
kernel-debug-base-3.4.11-2.16.1.x86_64
glibc-devel-debuginfo-2.15-22.6.4.x86_64
glibc-devel-debuginfo-32bit-2.15-22.6.4.x86_64
glibc-utils-debuginfo-2.15-22.6.4.x86_64
kernel-debug-devel-3.4.11-2.16.1.x86_64
glibc-debuginfo-2.15-22.6.4.x86_64
build-initvm-debuginfo-i586-2012.07.19-1.1.1.x86_64
kmtrace-debuginfo-4.8.4-2.1.2.x86_64
glibc-debuginfo-32bit-2.15-22.6.4.x86_64
glibc-utils-debuginfo-32bit-2.15-22.6.4.x86_64
glibc-extra-debuginfo-2.15-22.6.4.x86_64
Hi
I am having the same problem. I need to trace userspace functions with systemtap but I get the following error:
semantic error: process probes not available without kernel CONFIG_UTRACE while resolving probe point process("/opt/iozone/bin/iozone").function(“copy_user_generic_unrolled”).call
Pass 2: analysis failed. Try again with another ‘–vp 01’ option.
I’ve searched everywhere but could not find a utrace kernel patch for my kernel 3.1.0-1.2 .
Can someone provide some assistance regarding this ?
Installed packages :
S | Name | Type | Version | Arch | Repository
–±-------------------------------±--------±-------------------±-------±----------------------------------
i | kernel-debug | package | 3.1.0-1.2.1 | x86_64 | openSUSE-12.1-Oss
i | kernel-debug-debuginfo | package | 3.1.0-1.2.1 | x86_64 | openSUSE-12.1-Debug
i | kernel-debug-devel | package | 3.1.0-1.2.1 | x86_64 | openSUSE-12.1-Oss
i | kernel-default | package | 3.1.0-1.2.1 | x86_64 | openSUSE-12.1-Oss
i | kernel-default-base | package | 3.1.0-1.2.1 | x86_64 | openSUSE-12.1-Oss
i | kernel-default-devel | package | 3.1.0-1.2.1 | x86_64 | openSUSE-12.1-Oss
i | kernel-desktop | package | 3.1.0-1.2.1 | x86_64 | openSUSE-12.1-Oss
i | kernel-desktop-base | package | 3.1.0-1.2.1 | x86_64 | openSUSE-12.1-Oss
i | kernel-desktop-debuginfo | package | 3.1.0-1.2.1 | x86_64 | openSUSE-12.1-Debug
i | kernel-desktop-devel | package | 3.1.0-1.2.1 | x86_64 | openSUSE-12.1-Oss
i | kernel-desktop-devel-debuginfo | package | 3.1.0-1.2.1 | x86_64 | openSUSE-12.1-Debug
i | kernel-devel | package | 3.1.0-1.2.1 | noarch | openSUSE-12.1-Oss
i | kernel-firmware | package | 20111025git-1.13.1 | noarch | Updates for openSUSE 12.1 12.1-1.4
i | kernel-source | package | 3.1.0-1.2.1 | noarch | openSUSE-12.1-Oss
i | kernel-trace | package | 3.1.0-1.2.1 | x86_64 | openSUSE-12.1-Oss
i | kernel-trace-base | package | 3.1.0-1.2.1 | x86_64 | openSUSE-12.1-Oss
i | kernel-trace-devel | package | 3.1.0-1.2.1 | x86_64 | openSUSE-12.1-Oss
i | nfs-kernel-server | package | 1.2.5-4.3.1 | x86_64 | Updates for openSUSE 12.1 12.1-1.4
i | systemtap | package | 1.4-10.1.3 | x86_64 | openSUSE-12.1-Oss
i | systemtap-docs | package | 1.4-10.1.3 | noarch | openSUSE-12.1-Oss
i | systemtap-runtime | package | 1.4-10.1.3 | x86_64 | openSUSE-12.1-Oss
i | systemtap-sdt-devel | package | 1.4-10.1.3 | x86_64 | openSUSE-12.1-Oss
i | systemtap-server | package | 1.4-10.1.3 | x86_64 | openSUSE-12.1-Oss