* non-working .return probepoint from modules
@ 2021-12-15 20:51 Matt Vibrys
2021-12-16 17:38 ` Matt Vibrys
0 siblings, 1 reply; 7+ messages in thread
From: Matt Vibrys @ 2021-12-15 20:51 UTC (permalink / raw)
To: systemtap
Hi Systemtap Team
my drm.stp script looks like following:
#+begin_src systemtap
probe module("mymod").function("mymod_getparam_ioctl")
{
printf("-->. %s %s %s\n", thread_indent(0), ppfunc(), $$parms);
}
probe module("mymod").function("mymod_getparam_ioctl").return
{
printf("<--\n");
}
#+end_src
roughly it traces call/return of ~mymod_getparam_ioctl~ symbol.
The symbol is non-static one:
#+begin_src C
int mymod_getparam_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv);
#+end_src
used like:
#+begin_src C
DRM_IOCTL_DEF_DRV(MYMOD_GET_PARAMETER, mymod_getparam_ioctl, 0),
#+end_src
symbol is defined within module:
#+begin_src bash
gmm@MY-HOST:~/user$ nm /lib/modules/5.13.0-22-generic/extra/mymod.ko | grep mymod_getparam_ioctl
0000000000001010 T mymod_getparam_ioctl
#+end_src
The output below provides function calls, but it's silent about it's returns. Why so?:
#+begin_quote
gmm@MY-HOST:~/user$ sudo /opt/systemtap-4.6/bin/stap -vv /home/gmm/user/scripts/drm.stp
Systemtap translator/driver (version 4.6/0.176, non-git sources)
Copyright (C) 2005-2021 Red Hat, Inc. and others
This is free software; see the source for copying conditions.
tested kernel versions: 2.6.32 ... 5.15.0-rc7
enabled features: BPF PYTHON3 LIBVIRT LIBXML2 NLS
Created temporary directory "/tmp/stapCRebKu"
Session arch: x86_64 release: 5.13.0-22-generic
Build tree: "/lib/modules/5.13.0-22-generic/build"
Kernel symbol table /lib/modules/5.13.0-22-generic/build/System.map unavailable, (No such file or directory)
Searched for library macro files: "/opt/systemtap-4.6/share/systemtap/tapset/linux", found: 7, processed: 7
Searched for library macro files: "/opt/systemtap-4.6/share/systemtap/tapset", found: 11, processed: 11
Searched: "/opt/systemtap-4.6/share/systemtap/tapset/linux/x86_64", found: 20, processed: 20
Searched: "/opt/systemtap-4.6/share/systemtap/tapset/linux", found: 407, processed: 407
Searched: "/opt/systemtap-4.6/share/systemtap/tapset/x86_64", found: 1, processed: 1
Searched: "/opt/systemtap-4.6/share/systemtap/tapset", found: 34, processed: 34
Pass 1: parsed user script and 480 library scripts using 121144virt/100392res/6124shr/94364data kb, in 100usr/10sys/113real ms.
derive-probes (location #0): module("mymod").function("mymod_getparam_ioctl") of keyword at /home/gmm/user/scripts/drm.stp:6:1
probe mymod_getparam_ioctl@/home/gmm/user/git/char-misc-mymod/drivers/gpu/drm/mymod/ioctl.c:142 module=mymod reloc=.text pc=0x11070
derive-probes (location #0): module("mymod").function("mymod_getparam_ioctl").return of keyword at /home/gmm/user/scripts/drm.stp:11:1
probe mymod_getparam_ioctl@/home/gmm/user/git/char-misc-mymod/drivers/gpu/drm/mymod/ioctl.c:142 module=mymod reloc=.text pc=0x11070
Pass 2: analyzed script: 2 probes, 12 functions, 1 embed, 2 globals using 123568virt/103804res/7068shr/96788data kb, in 10usr/10sys/22real ms.
function recursion-analysis: max-nesting 4 non-recursive
probe 0 ('module("mymod").function("mymod_getparam_ioctl@/home/gmm/user/git/char-misc-mymod/drivers/gpu/drm/mymod/ioctl.c:142")') locks __private__opt_systemtap_4_6_share_systemtap_tapset_indent_stp__indent_counters[rw] __private__opt_systemtap_4_6_share_systemtap_tapset_indent_stp__indent_timestamps[rw]
5 statements for probe probe_6335
probe 1 ('module("mymod").function("mymod_getparam_ioctl@/home/gmm/user/git/char-misc-mymod/drivers/gpu/drm/mymod/ioctl.c:142").return') locks nothing
1 statements for probe probe_6337
dump_unwindsyms mymod index=0 base=0x10000
Found build-id in mymod, length 20, start at 0x10
Pass 3: translated to C into "/tmp/stapCRebKu/stap_b4ca169e028eeab49ab6872384de1d4f_4617_src.c" using 123568virt/103944res/7208shr/96788data kb, in 10usr/0sys/8real ms.
Pass 4: using cached /root/.systemtap/cache/14/stapconf_14af95633f25eea4f38d1eb6ef710bb1_799.h
Running env -uARCH -uKBUILD_EXTMOD -uCROSS_COMPILE -uKBUILD_IMAGE -uKCONFIG_CONFIG -uINSTALL_PATH -uLD_LIBRARY_PATH PATH=/usr/bin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin make -C /lib/modules/5.13.0-22-generic/build M=/tmp/stapCRebKu modules CONFIG_DEBUG_INFO= CONFIG_DEBUG_INFO_BTF_MODULES= ARCH=x86_64 --no-print-directory -j21
CC [M] /tmp/stapCRebKu/stap_b4ca169e028eeab49ab6872384de1d4f_4617_src.o
CC [M] /tmp/stapCRebKu/stap_b4ca169e028eeab49ab6872384de1d4f_4617_aux_0.o
CC [M] /tmp/stapCRebKu/stap_symbols.o
LD [M] /tmp/stapCRebKu/stap_b4ca169e028eeab49ab6872384de1d4f_4617.o
MODPOST /tmp/stapCRebKu/Module.symvers
CC [M] /tmp/stapCRebKu/stap_b4ca169e028eeab49ab6872384de1d4f_4617.mod.o
LD [M] /tmp/stapCRebKu/stap_b4ca169e028eeab49ab6872384de1d4f_4617.ko
Spawn waitpid result (0x0): 0
Pass 4: compiled C into "stap_b4ca169e028eeab49ab6872384de1d4f_4617.ko" in 1680usr/400sys/2072real ms.
Cleaning cache, interval reached 9711 s > 300 s.
Copying /tmp/stapCRebKu/stap_b4ca169e028eeab49ab6872384de1d4f_4617.ko to /root/.systemtap/cache/b4/stap_b4ca169e028eeab49ab6872384de1d4f_4617.ko
Copying /tmp/stapCRebKu/stap_b4ca169e028eeab49ab6872384de1d4f_4617_src.c to /root/.systemtap/cache/b4/stap_b4ca169e028eeab49ab6872384de1d4f_4617.c
Copying /tmp/stapCRebKu/stapconf_14af95633f25eea4f38d1eb6ef710bb1_799.h to /root/.systemtap/cache/14/stapconf_14af95633f25eea4f38d1eb6ef710bb1_799.h
Pass 5: starting run.
Running /opt/systemtap-4.6/bin/staprun -v -R /tmp/stapCRebKu/stap_b4ca169e028eeab49ab6872384de1d4f_4617.ko
staprun:insert_module:191 Module stap_b4ca169e028eeab49ab6872384de1d4f_3902 inserted from file /tmp/stapCRebKu/stap_b4ca169e028eeab49ab6872384de1d4f_4617.ko
-->. 0 mymod-test(3936): mymod_getparam_ioctl dev=0xffff9942117f5000 data=0xffffa452047dfd48 file_priv=0xffff994209352a00
-->. 0 mymod-test(3936): mymod_getparam_ioctl dev=0xffff9942117f5000 data=0xffffa452047dfd48 file_priv=0xffff994209352a00
-->. 0 mymod-test(3936): mymod_getparam_ioctl dev=0xffff9942117f5000 data=0xffffa452047dfe18 file_priv=0xffff994209352a00
-->. 0 mymod-test(3936): mymod_getparam_ioctl dev=0xffff9942117f5000 data=0xffffa452047dfdf8 file_priv=0xffff994209352a00
-->. 0 mymod-test(3936): mymod_getparam_ioctl dev=0xffff9942117f5000 data=0xffffa452047dfdf8 file_priv=0xffff994209352a00
C-c C-cstapio:cleanup_and_exit:352 detach=0
stapio:cleanup_and_exit:369 closing control channel
staprun:remove_module:292 Module stap_b4ca169e028eeab49ab6872384de1d4f_3902 removed.
Spawn waitpid result (0x0): 0
Pass 5: run completed in 0usr/160sys/463082real ms.
Running rm -rf /tmp/stapCRebKu
Spawn waitpid result (0x0): 0
Removed temporary directory "/tmp/stapCRebKu"
#+end_quote
some info about config:
prompt$ cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.1 LTS (Focal Fossa)"
ID=ubuntu
systemtap is compiled from sources:
prompt$ /opt/systemtap-4.6/bin/stap --version
Systemtap translator/driver (version 4.6/0.176, non-git sources)
Copyright (C) 2005-2021 Red Hat, Inc. and others
This is free software; see the source for copying conditions.
tested kernel versions: 2.6.32 ... 5.15.0-rc7
enabled features: BPF PYTHON3 LIBVIRT LIBXML2 NLS
prompt$ uname -a
Linux MY-HOST 5.13.0-22-generic #22~20.04.1-Ubuntu SMP Tue Nov 9 15:07:24 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
prompt$ dpkg --list | grep kernel | grep 5.13
ii linux-headers-5.13.0-22-generic 5.13.0-22.22~20.04.1 amd64 Linux kernel headers for version 5.13.0 on 64 bit x86 SMP
ii linux-hwe-5.13-headers-5.13.0-22 5.13.0-22.22~20.04.1 all Header files related to Linux kernel version 5.13.0
ii linux-image-5.13.0-22-generic-dbgsym 5.13.0-22.22~20.04.1 amd64 Signed kernel image generic
ii linux-image-unsigned-5.13.0-22-generic 5.13.0-22.22~20.04.1 amd64 Linux kernel image for version 5.13.0 on 64 bit x86 SMP
ii linux-image-unsigned-5.13.0-22-generic-dbgsym 5.13.0-22.22~20.04.1 amd64 Linux kernel debug image for version 5.13.0 on 64 bit x86 SMP
ii linux-modules-5.13.0-22-generic 5.13.0-22.22~20.04.1 amd64 Linux kernel extra modules for version 5.13.0 on 64 bit x86 SMP
ii linux-modules-extra-5.13.0-22-generic 5.13.0-22.22~20.04.1 amd64 Linux kernel extra modules for version 5.13.0 on 64 bit x86 SMP
prompt$ apt-cache show linux-image-unsigned-5.13.0-22-generic
Package: linux-image-unsigned-5.13.0-22-generic
Architecture: amd64
Version: 5.13.0-22.22~20.04.1
Priority: optional
Section: kernel
Source: linux-hwe-5.13
Origin: Ubuntu
Maintainer: Ubuntu Kernel Team <kernel-team@lists.ubuntu.com>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 10132
Provides: aufs-dkms, fuse-module, ivtv-modules, kvm-api-4, linux-image, redhat-cluster-modules, spl-dkms, spl-modules, virtualbox-guest-modules, zfs-dkms, zfs-modules
Depends: kmod, linux-base (>= 4.5ubuntu1~16.04.1), linux-modules-5.13.0-22-generic
Recommends: grub-pc | grub-efi-amd64 | grub-efi-ia32 | grub | lilo, initramfs-tools | linux-initramfs-tool
Suggests: fdutils, linux-doc | linux-hwe-5.13-source-5.13.0, linux-hwe-5.13-tools, linux-headers-5.13.0-22-generic, linux-modules-extra-5.13.0-22-generic
Conflicts: linux-image-5.13.0-22-generic
Filename: pool/main/l/linux-hwe-5.13/linux-image-unsigned-5.13.0-22-generic_5.13.0-22.22~20.04.1_amd64.deb
Size: 10039156
MD5sum: eea929b583136567362a8439e976bcad
SHA1: 890c47a0a351dfa5b0cb024a1ff174735ab909c1
SHA256: 0bd9e89d9fd063b26f6aba7bba02311411f90826f71080fc31674dfd1b996739
SHA512: 5e1e33075767261d45b1219e3d2d6eb2388ed24cd06eda86f3c7fcb3a9519407a8b79721c77a00ac6a63293c16bb02265aea78f41686a69b41a2a0fb6f01a237
Description-en: Linux kernel image for version 5.13.0 on 64 bit x86 SMP
This package contains the unsigned Linux kernel image for version 5.13.0 on
64 bit x86 SMP.
.
Supports Generic processors.
.
Geared toward desktop and server systems.
.
You likely do not want to install this package directly. Instead, install
the linux-generic meta-package, which will ensure that upgrades work
correctly, and that supporting packages are also installed.
Description-md5: 467b5f7a4ed1e24f7128afd6453df516
what am I missing?
regards,
Matt
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: non-working .return probepoint from modules
2021-12-15 20:51 non-working .return probepoint from modules Matt Vibrys
@ 2021-12-16 17:38 ` Matt Vibrys
2021-12-17 2:33 ` Frank Ch. Eigler
0 siblings, 1 reply; 7+ messages in thread
From: Matt Vibrys @ 2021-12-16 17:38 UTC (permalink / raw)
To: systemtap
Matt Vibrys via Systemtap <systemtap@sourceware.org> writes:
> Hi Systemtap Team
>
> my drm.stp script looks like following:
> #+begin_src systemtap
> probe module("mymod").function("mymod_getparam_ioctl")
> {
> printf("-->. %s %s %s\n", thread_indent(0), ppfunc(), $$parms);
> }
>
> probe module("mymod").function("mymod_getparam_ioctl").return
> {
> printf("<--\n");
> }
> #+end_src
>
> roughly it traces call/return of ~mymod_getparam_ioctl~ symbol.
>
> The symbol is non-static one:
> #+begin_src C
> int mymod_getparam_ioctl(struct drm_device *dev, void *data,
> struct drm_file *file_priv);
> #+end_src
>
> used like:
> #+begin_src C
> DRM_IOCTL_DEF_DRV(MYMOD_GET_PARAMETER, mymod_getparam_ioctl, 0),
> #+end_src
>
> symbol is defined within module:
> #+begin_src bash
> gmm@MY-HOST:~/user$ nm /lib/modules/5.13.0-22-generic/extra/mymod.ko | grep mymod_getparam_ioctl
> 0000000000001010 T mymod_getparam_ioctl
> #+end_src
>
>
> The output below provides function calls, but it's silent about it's returns. Why so?:
> #+begin_quote
> gmm@MY-HOST:~/user$ sudo /opt/systemtap-4.6/bin/stap -vv /home/gmm/user/scripts/drm.stp
> Systemtap translator/driver (version 4.6/0.176, non-git sources)
> Copyright (C) 2005-2021 Red Hat, Inc. and others
> This is free software; see the source for copying conditions.
> tested kernel versions: 2.6.32 ... 5.15.0-rc7
> enabled features: BPF PYTHON3 LIBVIRT LIBXML2 NLS
> Created temporary directory "/tmp/stapCRebKu"
> Session arch: x86_64 release: 5.13.0-22-generic
> Build tree: "/lib/modules/5.13.0-22-generic/build"
> Kernel symbol table /lib/modules/5.13.0-22-generic/build/System.map unavailable, (No such file or directory)
> Searched for library macro files: "/opt/systemtap-4.6/share/systemtap/tapset/linux", found: 7, processed: 7
> Searched for library macro files: "/opt/systemtap-4.6/share/systemtap/tapset", found: 11, processed: 11
> Searched: "/opt/systemtap-4.6/share/systemtap/tapset/linux/x86_64", found: 20, processed: 20
> Searched: "/opt/systemtap-4.6/share/systemtap/tapset/linux", found: 407, processed: 407
> Searched: "/opt/systemtap-4.6/share/systemtap/tapset/x86_64", found: 1, processed: 1
> Searched: "/opt/systemtap-4.6/share/systemtap/tapset", found: 34, processed: 34
> Pass 1: parsed user script and 480 library scripts using 121144virt/100392res/6124shr/94364data kb, in 100usr/10sys/113real ms.
> derive-probes (location #0): module("mymod").function("mymod_getparam_ioctl") of keyword at /home/gmm/user/scripts/drm.stp:6:1
> probe mymod_getparam_ioctl@/home/gmm/user/git/char-misc-mymod/drivers/gpu/drm/mymod/ioctl.c:142 module=mymod reloc=.text pc=0x11070
> derive-probes (location #0): module("mymod").function("mymod_getparam_ioctl").return of keyword at /home/gmm/user/scripts/drm.stp:11:1
> probe mymod_getparam_ioctl@/home/gmm/user/git/char-misc-mymod/drivers/gpu/drm/mymod/ioctl.c:142 module=mymod reloc=.text pc=0x11070
> Pass 2: analyzed script: 2 probes, 12 functions, 1 embed, 2 globals using 123568virt/103804res/7068shr/96788data kb, in 10usr/10sys/22real ms.
> function recursion-analysis: max-nesting 4 non-recursive
> probe 0 ('module("mymod").function("mymod_getparam_ioctl@/home/gmm/user/git/char-misc-mymod/drivers/gpu/drm/mymod/ioctl.c:142")') locks __private__opt_systemtap_4_6_share_systemtap_tapset_indent_stp__indent_counters[rw] __private__opt_systemtap_4_6_share_systemtap_tapset_indent_stp__indent_timestamps[rw]
> 5 statements for probe probe_6335
> probe 1 ('module("mymod").function("mymod_getparam_ioctl@/home/gmm/user/git/char-misc-mymod/drivers/gpu/drm/mymod/ioctl.c:142").return') locks nothing
> 1 statements for probe probe_6337
> dump_unwindsyms mymod index=0 base=0x10000
> Found build-id in mymod, length 20, start at 0x10
> Pass 3: translated to C into "/tmp/stapCRebKu/stap_b4ca169e028eeab49ab6872384de1d4f_4617_src.c" using 123568virt/103944res/7208shr/96788data kb, in 10usr/0sys/8real ms.
> Pass 4: using cached /root/.systemtap/cache/14/stapconf_14af95633f25eea4f38d1eb6ef710bb1_799.h
> Running env -uARCH -uKBUILD_EXTMOD -uCROSS_COMPILE -uKBUILD_IMAGE -uKCONFIG_CONFIG -uINSTALL_PATH -uLD_LIBRARY_PATH PATH=/usr/bin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin make -C /lib/modules/5.13.0-22-generic/build M=/tmp/stapCRebKu modules CONFIG_DEBUG_INFO= CONFIG_DEBUG_INFO_BTF_MODULES= ARCH=x86_64 --no-print-directory -j21
> CC [M] /tmp/stapCRebKu/stap_b4ca169e028eeab49ab6872384de1d4f_4617_src.o
> CC [M] /tmp/stapCRebKu/stap_b4ca169e028eeab49ab6872384de1d4f_4617_aux_0.o
> CC [M] /tmp/stapCRebKu/stap_symbols.o
> LD [M] /tmp/stapCRebKu/stap_b4ca169e028eeab49ab6872384de1d4f_4617.o
> MODPOST /tmp/stapCRebKu/Module.symvers
> CC [M] /tmp/stapCRebKu/stap_b4ca169e028eeab49ab6872384de1d4f_4617.mod.o
> LD [M] /tmp/stapCRebKu/stap_b4ca169e028eeab49ab6872384de1d4f_4617.ko
> Spawn waitpid result (0x0): 0
> Pass 4: compiled C into "stap_b4ca169e028eeab49ab6872384de1d4f_4617.ko" in 1680usr/400sys/2072real ms.
> Cleaning cache, interval reached 9711 s > 300 s.
> Copying /tmp/stapCRebKu/stap_b4ca169e028eeab49ab6872384de1d4f_4617.ko to /root/.systemtap/cache/b4/stap_b4ca169e028eeab49ab6872384de1d4f_4617.ko
> Copying /tmp/stapCRebKu/stap_b4ca169e028eeab49ab6872384de1d4f_4617_src.c to /root/.systemtap/cache/b4/stap_b4ca169e028eeab49ab6872384de1d4f_4617.c
> Copying /tmp/stapCRebKu/stapconf_14af95633f25eea4f38d1eb6ef710bb1_799.h to /root/.systemtap/cache/14/stapconf_14af95633f25eea4f38d1eb6ef710bb1_799.h
> Pass 5: starting run.
> Running /opt/systemtap-4.6/bin/staprun -v -R /tmp/stapCRebKu/stap_b4ca169e028eeab49ab6872384de1d4f_4617.ko
> staprun:insert_module:191 Module stap_b4ca169e028eeab49ab6872384de1d4f_3902 inserted from file /tmp/stapCRebKu/stap_b4ca169e028eeab49ab6872384de1d4f_4617.ko
> -->. 0 mymod-test(3936): mymod_getparam_ioctl dev=0xffff9942117f5000 data=0xffffa452047dfd48 file_priv=0xffff994209352a00
> -->. 0 mymod-test(3936): mymod_getparam_ioctl dev=0xffff9942117f5000 data=0xffffa452047dfd48 file_priv=0xffff994209352a00
> -->. 0 mymod-test(3936): mymod_getparam_ioctl dev=0xffff9942117f5000 data=0xffffa452047dfe18 file_priv=0xffff994209352a00
> -->. 0 mymod-test(3936): mymod_getparam_ioctl dev=0xffff9942117f5000 data=0xffffa452047dfdf8 file_priv=0xffff994209352a00
> -->. 0 mymod-test(3936): mymod_getparam_ioctl dev=0xffff9942117f5000 data=0xffffa452047dfdf8 file_priv=0xffff994209352a00
> C-c C-cstapio:cleanup_and_exit:352 detach=0
> stapio:cleanup_and_exit:369 closing control channel
> staprun:remove_module:292 Module stap_b4ca169e028eeab49ab6872384de1d4f_3902 removed.
> Spawn waitpid result (0x0): 0
> Pass 5: run completed in 0usr/160sys/463082real ms.
> Running rm -rf /tmp/stapCRebKu
> Spawn waitpid result (0x0): 0
> Removed temporary directory "/tmp/stapCRebKu"
> #+end_quote
>
>
> some info about config:
> prompt$ cat /etc/os-release
> NAME="Ubuntu"
> VERSION="20.04.1 LTS (Focal Fossa)"
> ID=ubuntu
>
>
> systemtap is compiled from sources:
> prompt$ /opt/systemtap-4.6/bin/stap --version
> Systemtap translator/driver (version 4.6/0.176, non-git sources)
> Copyright (C) 2005-2021 Red Hat, Inc. and others
> This is free software; see the source for copying conditions.
> tested kernel versions: 2.6.32 ... 5.15.0-rc7
> enabled features: BPF PYTHON3 LIBVIRT LIBXML2 NLS
>
> prompt$ uname -a
> Linux MY-HOST 5.13.0-22-generic #22~20.04.1-Ubuntu SMP Tue Nov 9 15:07:24 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
>
>
> prompt$ dpkg --list | grep kernel | grep 5.13
> ii linux-headers-5.13.0-22-generic 5.13.0-22.22~20.04.1 amd64 Linux kernel headers for version 5.13.0 on 64 bit x86 SMP
> ii linux-hwe-5.13-headers-5.13.0-22 5.13.0-22.22~20.04.1 all Header files related to Linux kernel version 5.13.0
> ii linux-image-5.13.0-22-generic-dbgsym 5.13.0-22.22~20.04.1 amd64 Signed kernel image generic
> ii linux-image-unsigned-5.13.0-22-generic 5.13.0-22.22~20.04.1 amd64 Linux kernel image for version 5.13.0 on 64 bit x86 SMP
> ii linux-image-unsigned-5.13.0-22-generic-dbgsym 5.13.0-22.22~20.04.1 amd64 Linux kernel debug image for version 5.13.0 on 64 bit x86 SMP
> ii linux-modules-5.13.0-22-generic 5.13.0-22.22~20.04.1 amd64 Linux kernel extra modules for version 5.13.0 on 64 bit x86 SMP
> ii linux-modules-extra-5.13.0-22-generic 5.13.0-22.22~20.04.1 amd64 Linux kernel extra modules for version 5.13.0 on 64 bit x86 SMP
>
>
> prompt$ apt-cache show linux-image-unsigned-5.13.0-22-generic
> Package: linux-image-unsigned-5.13.0-22-generic
> Architecture: amd64
> Version: 5.13.0-22.22~20.04.1
> Priority: optional
> Section: kernel
> Source: linux-hwe-5.13
> Origin: Ubuntu
> Maintainer: Ubuntu Kernel Team <kernel-team@lists.ubuntu.com>
> Bugs: https://bugs.launchpad.net/ubuntu/+filebug
> Installed-Size: 10132
> Provides: aufs-dkms, fuse-module, ivtv-modules, kvm-api-4, linux-image, redhat-cluster-modules, spl-dkms, spl-modules, virtualbox-guest-modules, zfs-dkms, zfs-modules
> Depends: kmod, linux-base (>= 4.5ubuntu1~16.04.1), linux-modules-5.13.0-22-generic
> Recommends: grub-pc | grub-efi-amd64 | grub-efi-ia32 | grub | lilo, initramfs-tools | linux-initramfs-tool
> Suggests: fdutils, linux-doc | linux-hwe-5.13-source-5.13.0, linux-hwe-5.13-tools, linux-headers-5.13.0-22-generic, linux-modules-extra-5.13.0-22-generic
> Conflicts: linux-image-5.13.0-22-generic
> Filename: pool/main/l/linux-hwe-5.13/linux-image-unsigned-5.13.0-22-generic_5.13.0-22.22~20.04.1_amd64.deb
> Size: 10039156
> MD5sum: eea929b583136567362a8439e976bcad
> SHA1: 890c47a0a351dfa5b0cb024a1ff174735ab909c1
> SHA256: 0bd9e89d9fd063b26f6aba7bba02311411f90826f71080fc31674dfd1b996739
> SHA512: 5e1e33075767261d45b1219e3d2d6eb2388ed24cd06eda86f3c7fcb3a9519407a8b79721c77a00ac6a63293c16bb02265aea78f41686a69b41a2a0fb6f01a237
> Description-en: Linux kernel image for version 5.13.0 on 64 bit x86 SMP
> This package contains the unsigned Linux kernel image for version 5.13.0 on
> 64 bit x86 SMP.
> .
> Supports Generic processors.
> .
> Geared toward desktop and server systems.
> .
> You likely do not want to install this package directly. Instead, install
> the linux-generic meta-package, which will ensure that upgrades work
> correctly, and that supporting packages are also installed.
> Description-md5: 467b5f7a4ed1e24f7128afd6453df516
>
> what am I missing?
>
> regards,
> Matt
For better insight I've used drm module drm_ioctl function instead. The problem persists, ie .return "locks nothing":
#+begin_src systemtap
probe module("drm").function("drm_ioctl")
{
printf("-->. %s %s %s\n", thread_indent(0), ppfunc(), $$parms);
}
probe module("drm").function("drm_ioctl").return
{
printf("<--\n");
}
#+end_src
result:
#+begin_src bash
prompt$ sudo /opt/systemtap-4.6/bin/stap -vv ~/user/scripts/drm.stp
Systemtap translator/driver (version 4.6/0.176, non-git sources)
Copyright (C) 2005-2021 Red Hat, Inc. and others
This is free software; see the source for copying conditions.
tested kernel versions: 2.6.32 ... 5.15.0-rc7
enabled features: BPF PYTHON3 LIBVIRT LIBXML2 NLS
Created temporary directory "/tmp/stapYIXn3K"
Session arch: x86_64 release: 5.13.0-22-generic
Build tree: "/lib/modules/5.13.0-22-generic/build"
Kernel symbol table /lib/modules/5.13.0-22-generic/build/System.map unavailable, (No such file or directory)
Searched for library macro files: "/opt/systemtap-4.6/share/systemtap/tapset/linux", found: 7, processed: 7
Searched for library macro files: "/opt/systemtap-4.6/share/systemtap/tapset", found: 11, processed: 11
Searched: "/opt/systemtap-4.6/share/systemtap/tapset/linux/x86_64", found: 20, processed: 20
Searched: "/opt/systemtap-4.6/share/systemtap/tapset/linux", found: 407, processed: 407
Searched: "/opt/systemtap-4.6/share/systemtap/tapset/x86_64", found: 1, processed: 1
Searched: "/opt/systemtap-4.6/share/systemtap/tapset", found: 34, processed: 34
Pass 1: parsed user script and 480 library scripts using 121152virt/100400res/6124shr/94372data kb, in 90usr/20sys/113real ms.
derive-probes (location #0): module("drm").function("drm_ioctl") of keyword at /home/gmm/user/scripts/drm.stp:16:1
probe drm_ioctl@/build/linux-hwe-5.13-ADyN9x/linux-hwe-5.13-5.13.0/drivers/gpu/drm/drm_ioctl.c:811 module=drm reloc=.text pc=0x143b0
derive-probes (location #0): module("drm").function("drm_ioctl").return of keyword at /home/gmm/user/scripts/drm.stp:21:1
probe drm_ioctl@/build/linux-hwe-5.13-ADyN9x/linux-hwe-5.13-5.13.0/drivers/gpu/drm/drm_ioctl.c:811 module=drm reloc=.text pc=0x143b0
Pass 2: analyzed script: 2 probes, 12 functions, 1 embed, 2 globals using 124920virt/105184res/7108shr/98140data kb, in 130usr/10sys/159real ms.
function recursion-analysis: max-nesting 4 non-recursive
probe 0 ('module("drm").function("drm_ioctl@/build/linux-hwe-5.13-ADyN9x/linux-hwe-5.13-5.13.0/drivers/gpu/drm/drm_ioctl.c:811")') locks __private__opt_systemtap_4_6_share_systemtap_tapset_indent_stp__indent_counters[rw] __private__opt_systemtap_4_6_share_systemtap_tapset_indent_stp__indent_timestamps[rw]
5 statements for probe probe_6335
probe 1 ('module("drm").function("drm_ioctl@/build/linux-hwe-5.13-ADyN9x/linux-hwe-5.13-5.13.0/drivers/gpu/drm/drm_ioctl.c:811").return') locks nothing
1 statements for probe probe_6337
dump_unwindsyms drm index=0 base=0x10000
Found build-id in drm, length 20, start at 0x10
Pass 3: translated to C into "/tmp/stapYIXn3K/stap_27791b5d9addbd4c9df8f411264ee992_4630_src.c" using 124920virt/105312res/7236shr/98140data kb, in 110usr/10sys/118real ms.
Pass 4: using cached /root/.systemtap/cache/14/stapconf_14af95633f25eea4f38d1eb6ef710bb1_799.h
Running env -uARCH -uKBUILD_EXTMOD -uCROSS_COMPILE -uKBUILD_IMAGE -uKCONFIG_CONFIG -uINSTALL_PATH -uLD_LIBRARY_PATH PATH=/usr/bin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin make -C /lib/modules/5.13.0-22-generic/build M=/tmp/stapYIXn3K modules CONFIG_DEBUG_INFO= CONFIG_DEBUG_INFO_BTF_MODULES= ARCH=x86_64 --no-print-directory -j21
CC [M] /tmp/stapYIXn3K/stap_27791b5d9addbd4c9df8f411264ee992_4630_src.o
CC [M] /tmp/stapYIXn3K/stap_27791b5d9addbd4c9df8f411264ee992_4630_aux_0.o
CC [M] /tmp/stapYIXn3K/stap_symbols.o
LD [M] /tmp/stapYIXn3K/stap_27791b5d9addbd4c9df8f411264ee992_4630.o
MODPOST /tmp/stapYIXn3K/Module.symvers
CC [M] /tmp/stapYIXn3K/stap_27791b5d9addbd4c9df8f411264ee992_4630.mod.o
LD [M] /tmp/stapYIXn3K/stap_27791b5d9addbd4c9df8f411264ee992_4630.ko
Spawn waitpid result (0x0): 0
Pass 4: compiled C into "stap_27791b5d9addbd4c9df8f411264ee992_4630.ko" in 1420usr/380sys/1689real ms.
Cleaning cache, interval reached 8726 s > 300 s.
Copying /tmp/stapYIXn3K/stap_27791b5d9addbd4c9df8f411264ee992_4630.ko to /root/.systemtap/cache/27/stap_27791b5d9addbd4c9df8f411264ee992_4630.ko
Copying /tmp/stapYIXn3K/stap_27791b5d9addbd4c9df8f411264ee992_4630_src.c to /root/.systemtap/cache/27/stap_27791b5d9addbd4c9df8f411264ee992_4630.c
Copying /tmp/stapYIXn3K/stapconf_14af95633f25eea4f38d1eb6ef710bb1_799.h to /root/.systemtap/cache/14/stapconf_14af95633f25eea4f38d1eb6ef710bb1_799.h
Pass 5: starting run.
Running /opt/systemtap-4.6/bin/staprun -v -R /tmp/stapYIXn3K/stap_27791b5d9addbd4c9df8f411264ee992_4630.ko
staprun:insert_module:191 Module stap_27791b5d9addbd4c9df8f411264ee992_8956 inserted from file /tmp/stapYIXn3K/stap_27791b5d9addbd4c9df8f411264ee992_4630.ko
-->. 0 myapp-test(9005): drm_ioctl filp=0xffff994270c00200 cmd=0xc0406400 arg=0x25c4740
-->. 0 myapp-test(9005): drm_ioctl filp=0xffff994270c00200 cmd=0xc0406400 arg=0x25c4740
-->. 0 myapp-test(9005): drm_ioctl filp=0xffff994270c00200 cmd=0xc0106401 arg=0x7ffdad907b70
-->. 0 myapp-test(9005): drm_ioctl filp=0xffff994270c00200 cmd=0xc0106401 arg=0x7ffdad907b70
-->. 0 myapp-test(9005): drm_ioctl filp=0xffff994270c00200 cmd=0xc0086441 arg=0x25c4898
-->. 0 myapp-test(9005): drm_ioctl filp=0xffff994270c00200 cmd=0xc0086441 arg=0x25c4818
-->. 0 myapp-test(9005): drm_ioctl filp=0xffff994270c00200 cmd=0xc0086441 arg=0x25c4858
-->. 0 myapp-test(9005): drm_ioctl filp=0xffff994270c00200 cmd=0xc0086441 arg=0x25c47d8
C-c C-cstapio:cleanup_and_exit:352 detach=0
stapio:cleanup_and_exit:369 closing control channel
staprun:remove_module:292 Module stap_27791b5d9addbd4c9df8f411264ee992_8956 removed.
Spawn waitpid result (0x0): 0
Pass 5: run completed in 20usr/110sys/207272real ms.
Running rm -rf /tmp/stapYIXn3K
Spawn waitpid result (0x0): 0
Removed temporary directory "/tmp/stapYIXn3K"
#+end_src
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: non-working .return probepoint from modules
2021-12-16 17:38 ` Matt Vibrys
@ 2021-12-17 2:33 ` Frank Ch. Eigler
2021-12-17 10:32 ` Matt Vibrys
0 siblings, 1 reply; 7+ messages in thread
From: Frank Ch. Eigler @ 2021-12-17 2:33 UTC (permalink / raw)
To: Matt Vibrys; +Cc: systemtap
>> The output below provides function calls, but it's silent about it's
>> returns. Why so?:
Good question, I wonder too!
>> gmm@MY-HOST:~/user$ sudo /opt/systemtap-4.6/bin/stap -vv /home/gmm/user/scripts/drm.stp
>> Systemtap translator/driver (version 4.6/0.176, non-git sources)
>> [...]
This is good, it contains the module-insertion fix PR28557.
The stap console trace looks okay.
> For better insight I've used drm module drm_ioctl function
> instead. The problem persists, ie .return "locks nothing":
> #+begin_src systemtap
> probe module("drm").function("drm_ioctl")
> {
> printf("-->. %s %s %s\n", thread_indent(0), ppfunc(), $$parms);
> }
>
> probe module("drm").function("drm_ioctl").return
> {
> printf("<--\n");
> }
Would you consider rerunning a bit more pass-5 runtime side
tracing such as
% sudo stap -DDEBUG_KPROBES -DDEBUG_SYMBOLS [...]
- FChE
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: non-working .return probepoint from modules
2021-12-17 2:33 ` Frank Ch. Eigler
@ 2021-12-17 10:32 ` Matt Vibrys
2022-03-22 9:48 ` Matt Vibrys
0 siblings, 1 reply; 7+ messages in thread
From: Matt Vibrys @ 2021-12-17 10:32 UTC (permalink / raw)
To: Frank Ch. Eigler; +Cc: systemtap
Frank Ch. Eigler <fche@redhat.com> writes:
>>> The output below provides function calls, but it's silent about it's
>>> returns. Why so?:
>
> Good question, I wonder too!
>
>>> gmm@MY-HOST:~/user$ sudo /opt/systemtap-4.6/bin/stap -vv /home/gmm/user/scripts/drm.stp
>>> Systemtap translator/driver (version 4.6/0.176, non-git sources)
>>> [...]
>
> This is good, it contains the module-insertion fix PR28557.
> The stap console trace looks okay.
>
>> For better insight I've used drm module drm_ioctl function
>> instead. The problem persists, ie .return "locks nothing":
>> #+begin_src systemtap
>> probe module("drm").function("drm_ioctl")
>> {
>> printf("-->. %s %s %s\n", thread_indent(0), ppfunc(), $$parms);
>> }
>>
>> probe module("drm").function("drm_ioctl").return
>> {
>> printf("<--\n");
>> }
>
> Would you consider rerunning a bit more pass-5 runtime side
> tracing such as
>
> % sudo stap -DDEBUG_KPROBES -DDEBUG_SYMBOLS [...]
>
>
> - FChE
Hi Frank,
thank You for response.
here's the output:
#+begin_src bash
prompt$ sudo /opt/systemtap-4.6/bin/stap -vv -DDEBUG_KPROBES -DDEBUG_SYMBOLS ~/user/scripts/drm.stp
Systemtap translator/driver (version 4.6/0.176, non-git sources)
Copyright (C) 2005-2021 Red Hat, Inc. and others
This is free software; see the source for copying conditions.
tested kernel versions: 2.6.32 ... 5.15.0-rc7
enabled features: BPF PYTHON3 LIBVIRT LIBXML2 NLS
Created temporary directory "/tmp/staprnTrv2"
Session arch: x86_64 release: 5.13.0-22-generic
Build tree: "/lib/modules/5.13.0-22-generic/build"
Kernel symbol table /lib/modules/5.13.0-22-generic/build/System.map unavailable, (No such file or directory)
Searched for library macro files: "/opt/systemtap-4.6/share/systemtap/tapset/linux", found: 7, processed: 7
Searched for library macro files: "/opt/systemtap-4.6/share/systemtap/tapset", found: 11, processed: 11
Searched: "/opt/systemtap-4.6/share/systemtap/tapset/linux/x86_64", found: 20, processed: 20
Searched: "/opt/systemtap-4.6/share/systemtap/tapset/linux", found: 407, processed: 407
Searched: "/opt/systemtap-4.6/share/systemtap/tapset/x86_64", found: 1, processed: 1
Searched: "/opt/systemtap-4.6/share/systemtap/tapset", found: 34, processed: 34
Pass 1: parsed user script and 480 library scripts using 121164virt/100540res/6252shr/94384data kb, in 100usr/20sys/115real ms.
derive-probes (location #0): module("drm").function("drm_ioctl") of keyword at /home/gmm/user/scripts/drm.stp:16:1
probe drm_ioctl@/build/linux-hwe-5.13-ADyN9x/linux-hwe-5.13-5.13.0/drivers/gpu/drm/drm_ioctl.c:811 module=drm reloc=.text pc=0x143b0
derive-probes (location #0): module("drm").function("drm_ioctl").return of keyword at /home/gmm/user/scripts/drm.stp:21:1
probe drm_ioctl@/build/linux-hwe-5.13-ADyN9x/linux-hwe-5.13-5.13.0/drivers/gpu/drm/drm_ioctl.c:811 module=drm reloc=.text pc=0x143b0
Pass 2: analyzed script: 2 probes, 12 functions, 1 embed, 2 globals using 124932virt/105328res/7236shr/98152data kb, in 130usr/0sys/135real ms.
function recursion-analysis: max-nesting 4 non-recursive
probe 0 ('module("drm").function("drm_ioctl@/build/linux-hwe-5.13-ADyN9x/linux-hwe-5.13-5.13.0/drivers/gpu/drm/drm_ioctl.c:811")') locks __private__opt_systemtap_4_6_share_systemtap_tapset_indent_stp__indent_counters[rw] __private__opt_systemtap_4_6_share_systemtap_tapset_indent_stp__indent_timestamps[rw]
5 statements for probe probe_6335
probe 1 ('module("drm").function("drm_ioctl@/build/linux-hwe-5.13-ADyN9x/linux-hwe-5.13-5.13.0/drivers/gpu/drm/drm_ioctl.c:811").return') locks nothing
1 statements for probe probe_6337
dump_unwindsyms drm index=0 base=0x10000
Found build-id in drm, length 20, start at 0x10
Pass 3: translated to C into "/tmp/staprnTrv2/stap_33df05986440b0b57b4062d608cf18eb_4656_src.c" using 124932virt/105456res/7364shr/98152data kb, in 120usr/10sys/121real ms.
Pass 4: using cached /root/.systemtap/cache/14/stapconf_14af95633f25eea4f38d1eb6ef710bb1_799.h
Running env -uARCH -uKBUILD_EXTMOD -uCROSS_COMPILE -uKBUILD_IMAGE -uKCONFIG_CONFIG -uINSTALL_PATH -uLD_LIBRARY_PATH PATH=/usr/bin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin make -C /lib/modules/5.13.0-22-generic/build M=/tmp/staprnTrv2 modules CONFIG_DEBUG_INFO= CONFIG_DEBUG_INFO_BTF_MODULES= ARCH=x86_64 --no-print-directory -j21
CC [M] /tmp/staprnTrv2/stap_33df05986440b0b57b4062d608cf18eb_4656_src.o
CC [M] /tmp/staprnTrv2/stap_33df05986440b0b57b4062d608cf18eb_4656_aux_0.o
CC [M] /tmp/staprnTrv2/stap_symbols.o
LD [M] /tmp/staprnTrv2/stap_33df05986440b0b57b4062d608cf18eb_4656.o
MODPOST /tmp/staprnTrv2/Module.symvers
CC [M] /tmp/staprnTrv2/stap_33df05986440b0b57b4062d608cf18eb_4656.mod.o
LD [M] /tmp/staprnTrv2/stap_33df05986440b0b57b4062d608cf18eb_4656.ko
Spawn waitpid result (0x0): 0
Pass 4: compiled C into "stap_33df05986440b0b57b4062d608cf18eb_4656.ko" in 1400usr/360sys/1637real ms.
Cleaning cache, interval reached 61190 s > 300 s.
Copying /tmp/staprnTrv2/stap_33df05986440b0b57b4062d608cf18eb_4656.ko to /root/.systemtap/cache/33/stap_33df05986440b0b57b4062d608cf18eb_4656.ko
Copying /tmp/staprnTrv2/stap_33df05986440b0b57b4062d608cf18eb_4656_src.c to /root/.systemtap/cache/33/stap_33df05986440b0b57b4062d608cf18eb_4656.c
Copying /tmp/staprnTrv2/stapconf_14af95633f25eea4f38d1eb6ef710bb1_799.h to /root/.systemtap/cache/14/stapconf_14af95633f25eea4f38d1eb6ef710bb1_799.h
Pass 5: starting run.
Running /opt/systemtap-4.6/bin/staprun -v -R /tmp/staprnTrv2/stap_33df05986440b0b57b4062d608cf18eb_4656.ko
staprun:insert_module:191 Module stap_33df05986440b0b57b4062d608cf18e_10362 inserted from file /tmp/staprnTrv2/stap_33df05986440b0b57b4062d608cf18eb_4656.ko
_stp_set_stext:44: found kernel _stext load address: 0xffffffff8bc00000
_stp_kmodule_update_address:1115: module drm section .altinstr_aux address 0xffffffffc05684e2
_stp_kmodule_update_address:1115: module drm section .altinstr_replacement address 0xffffffffc0568075
_stp_kmodule_update_address:1115: module drm section .altinstructions address 0xffffffffc057cb54
_stp_kmodule_update_address:1115: module drm section .bss address 0xffffffffc0588d80
_stp_kmodule_update_address:1115: module drm section .data address 0xffffffffc0587000
_stp_kmodule_update_address:1115: module drm section .data..read_mostly address 0xffffffffc05886f4
_stp_kmodule_update_address:1115: module drm section .data.once address 0xffffffffc05886ec
_stp_kmodule_update_address:1115: module drm section .gnu.linkonce.this_module address 0xffffffffc0588a00
_stp_kmodule_update_address:1115: module drm section .init.text address 0x0
_stp_kmodule_update_address:1102: module drm special section .note.gnu.build-id address 0xffffffffc0569000
_stp_kmodule_update_address:1115: module drm section .parainstructions address 0xffffffffc057c608
_stp_kmodule_update_address:1115: module drm section .ref.data address 0xffffffffc0588780
_stp_kmodule_update_address:1115: module drm section .rodata address 0xffffffffc056b080
_stp_kmodule_update_address:1115: module drm section .rodata.str1.1 address 0xffffffffc057d760
_stp_kmodule_update_address:1115: module drm section .rodata.str1.8 address 0xffffffffc05801c0
_stp_kmodule_update_address:1115: module drm section .smp_locks address 0xffffffffc057c3ac
_stp_kmodule_update_address:1115: module drm section .static_call.text address 0xffffffffc0568518
_stp_kmodule_update_address:1115: module drm section .static_call_sites address 0xffffffffc05889e0
_stp_kmodule_update_address:1115: module drm section .text address 0xffffffffc0534000
_stp_kmodule_update_address:1115: module drm section .text.unlikely address 0xffffffffc0568191
_stp_kmodule_update_address:1115: module drm section ___srcu_struct_ptrs address 0xffffffffc05855b0
_stp_kmodule_update_address:1115: module drm section __bpf_raw_tp_map address 0xffffffffc0588700
_stp_kmodule_update_address:1115: module drm section __bug_table address 0xffffffffc0587ae0
_stp_kmodule_update_address:1115: module drm section __dyndbg address 0xffffffffc05889a8
_stp_kmodule_update_address:1115: module drm section __jump_table address 0xffffffffc0586000
_stp_kmodule_update_address:1115: module drm section __kcrctab address 0xffffffffc056a86c
_stp_kmodule_update_address:1115: module drm section __kcrctab_gpl address 0xffffffffc056aff0
_stp_kmodule_update_address:1115: module drm section __ksymtab address 0xffffffffc0569054
_stp_kmodule_update_address:1115: module drm section __ksymtab_gpl address 0xffffffffc056a6e0
_stp_kmodule_update_address:1115: module drm section __ksymtab_strings address 0xffffffffc0577430
_stp_kmodule_update_address:1115: module drm section __mcount_loc address 0xffffffffc057a6a4
_stp_kmodule_update_address:1115: module drm section __param address 0xffffffffc05855b8
_stp_kmodule_update_address:1115: module drm section __tracepoints address 0xffffffffc05888a0
_stp_kmodule_update_address:1115: module drm section __tracepoints_ptrs address 0xffffffffc0585680
_stp_kmodule_update_address:1115: module drm section __tracepoints_strings address 0xffffffffc0585690
_stp_kmodule_update_address:1115: module drm section _ftrace_events address 0xffffffffc0588760
_stp_module_check:775: build-id validation [drm]
_stp_build_id_check:731: build-id validation [drm] 4c8ebf4428e1562c2877a2be4c5f804cf306d2a3 vs. notes@=ffffffffc0569010 4c8ebf4428e1562c2877a2be4c5f804cf306d2a3
stapkp_init:756: looking up 2 probes
stapkp_init:770: found 2 probes
stapkp_register_probe:364: stapkp_register_probe module drm addr 0x4350 reg 0
stapkp_register_probe:364: stapkp_register_probe module drm addr 0x4350 reg 0
_stp_kmodule_relocate:38: drm, .text, 4350
_stp_kmodule_relocate:57: address=ffffffffc0538350
stapkp_arch_register_kprobe:230: +kprobe (null)+0
stapkp_register_kprobe:258: stapkp_register_kprobe module drm addr 0x4350 rc 0
-->. 0 myapp-test(10402): drm_ioctl filp=0xffff994332d2f200 cmd=0xc0406400 arg=0x19cf740
-->. 0 myapp-test(10402): drm_ioctl filp=0xffff994332d2f200 cmd=0xc0406400 arg=0x19cf740
-->. 0 myapp-test(10402): drm_ioctl filp=0xffff994332d2f200 cmd=0xc0106401 arg=0x7ffcb3a8ad10
-->. 0 myapp-test(10402): drm_ioctl filp=0xffff994332d2f200 cmd=0xc0106401 arg=0x7ffcb3a8ad10
-->. 0 myapp-test(10402): drm_ioctl filp=0xffff994332d2f200 cmd=0xc0086441 arg=0x19cf898
-->. 0 myapp-test(10402): drm_ioctl filp=0xffff994332d2f200 cmd=0xc0086441 arg=0x19cf818
-->. 0 myapp-test(10402): drm_ioctl filp=0xffff994332d2f200 cmd=0xc0086441 arg=0x19cf858
-->. 0 myapp-test(10402): drm_ioctl filp=0xffff994332d2f200 cmd=0xc0086441 arg=0x19cf7d8
-->. 0 myapp-test(10402): drm_ioctl filp=0xffff994332d2f500 cmd=0xc0406400 arg=0x19cd590
-->. 0 myapp-test(10402): drm_ioctl filp=0xffff994332d2f500 cmd=0xc0406400 arg=0x19cd590
-->. 0 myapp-test(10402): drm_ioctl filp=0xffff994332d2f500 cmd=0xc0106401 arg=0x7ffcb3a8ad10
-->. 0 myapp-test(10402): drm_ioctl filp=0xffff994332d2f500 cmd=0xc0106401 arg=0x7ffcb3a8ad10
-->. 0 myapp-test(10402): drm_ioctl filp=0xffff994332d2f500 cmd=0xc0086441 arg=0x19cf588
C-c C-cstapkp_batch_unregister_probes:514: -kprobe * 1
stapio:cleanup_and_exit:352 detach=0
stapio:cleanup_and_exit:369 closing control channel
staprun:remove_module:292 Module stap_33df05986440b0b57b4062d608cf18e_10362 removed.
Spawn waitpid result (0x0): 0
Pass 5: run completed in 20usr/90sys/50060real ms.
Running rm -rf /tmp/staprnTrv2
Spawn waitpid result (0x0): 0
Removed temporary directory "/tmp/staprnTrv2"
#+end_src
regards,
Matt
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: non-working .return probepoint from modules
2021-12-17 10:32 ` Matt Vibrys
@ 2022-03-22 9:48 ` Matt Vibrys
2022-03-22 18:56 ` Frank Ch. Eigler
0 siblings, 1 reply; 7+ messages in thread
From: Matt Vibrys @ 2022-03-22 9:48 UTC (permalink / raw)
To: Frank Ch. Eigler, systemtap
Matt Vibrys via Systemtap <systemtap@sourceware.org> writes:
> Frank Ch. Eigler <fche@redhat.com> writes:
>
>>>> The output below provides function calls, but it's silent about it's
>>>> returns. Why so?:
>>
>> Good question, I wonder too!
>>
>>>> gmm@MY-HOST:~/user$ sudo /opt/systemtap-4.6/bin/stap -vv /home/gmm/user/scripts/drm.stp
>>>> Systemtap translator/driver (version 4.6/0.176, non-git sources)
>>>> [...]
>>
>> This is good, it contains the module-insertion fix PR28557.
>> The stap console trace looks okay.
>>
>>> For better insight I've used drm module drm_ioctl function
>>> instead. The problem persists, ie .return "locks nothing":
>>> #+begin_src systemtap
>>> probe module("drm").function("drm_ioctl")
>>> {
>>> printf("-->. %s %s %s\n", thread_indent(0), ppfunc(), $$parms);
>>> }
>>>
>>> probe module("drm").function("drm_ioctl").return
>>> {
>>> printf("<--\n");
>>> }
>>
>> Would you consider rerunning a bit more pass-5 runtime side
>> tracing such as
>>
>> % sudo stap -DDEBUG_KPROBES -DDEBUG_SYMBOLS [...]
>>
>>
>> - FChE
>
> Hi Frank,
> thank You for response.
>
> here's the output:
> #+begin_src bash
> prompt$ sudo /opt/systemtap-4.6/bin/stap -vv -DDEBUG_KPROBES -DDEBUG_SYMBOLS ~/user/scripts/drm.stp
> Systemtap translator/driver (version 4.6/0.176, non-git sources)
> Copyright (C) 2005-2021 Red Hat, Inc. and others
> This is free software; see the source for copying conditions.
> tested kernel versions: 2.6.32 ... 5.15.0-rc7
> enabled features: BPF PYTHON3 LIBVIRT LIBXML2 NLS
> Created temporary directory "/tmp/staprnTrv2"
> Session arch: x86_64 release: 5.13.0-22-generic
> Build tree: "/lib/modules/5.13.0-22-generic/build"
> Kernel symbol table /lib/modules/5.13.0-22-generic/build/System.map unavailable, (No such file or directory)
> Searched for library macro files: "/opt/systemtap-4.6/share/systemtap/tapset/linux", found: 7, processed: 7
> Searched for library macro files: "/opt/systemtap-4.6/share/systemtap/tapset", found: 11, processed: 11
> Searched: "/opt/systemtap-4.6/share/systemtap/tapset/linux/x86_64", found: 20, processed: 20
> Searched: "/opt/systemtap-4.6/share/systemtap/tapset/linux", found: 407, processed: 407
> Searched: "/opt/systemtap-4.6/share/systemtap/tapset/x86_64", found: 1, processed: 1
> Searched: "/opt/systemtap-4.6/share/systemtap/tapset", found: 34, processed: 34
> Pass 1: parsed user script and 480 library scripts using 121164virt/100540res/6252shr/94384data kb, in 100usr/20sys/115real ms.
> derive-probes (location #0): module("drm").function("drm_ioctl") of keyword at /home/gmm/user/scripts/drm.stp:16:1
> probe drm_ioctl@/build/linux-hwe-5.13-ADyN9x/linux-hwe-5.13-5.13.0/drivers/gpu/drm/drm_ioctl.c:811 module=drm reloc=.text pc=0x143b0
> derive-probes (location #0): module("drm").function("drm_ioctl").return of keyword at /home/gmm/user/scripts/drm.stp:21:1
> probe drm_ioctl@/build/linux-hwe-5.13-ADyN9x/linux-hwe-5.13-5.13.0/drivers/gpu/drm/drm_ioctl.c:811 module=drm reloc=.text pc=0x143b0
> Pass 2: analyzed script: 2 probes, 12 functions, 1 embed, 2 globals using 124932virt/105328res/7236shr/98152data kb, in 130usr/0sys/135real ms.
> function recursion-analysis: max-nesting 4 non-recursive
> probe 0 ('module("drm").function("drm_ioctl@/build/linux-hwe-5.13-ADyN9x/linux-hwe-5.13-5.13.0/drivers/gpu/drm/drm_ioctl.c:811")') locks __private__opt_systemtap_4_6_share_systemtap_tapset_indent_stp__indent_counters[rw] __private__opt_systemtap_4_6_share_systemtap_tapset_indent_stp__indent_timestamps[rw]
> 5 statements for probe probe_6335
> probe 1 ('module("drm").function("drm_ioctl@/build/linux-hwe-5.13-ADyN9x/linux-hwe-5.13-5.13.0/drivers/gpu/drm/drm_ioctl.c:811").return') locks nothing
> 1 statements for probe probe_6337
> dump_unwindsyms drm index=0 base=0x10000
> Found build-id in drm, length 20, start at 0x10
> Pass 3: translated to C into "/tmp/staprnTrv2/stap_33df05986440b0b57b4062d608cf18eb_4656_src.c" using 124932virt/105456res/7364shr/98152data kb, in 120usr/10sys/121real ms.
> Pass 4: using cached /root/.systemtap/cache/14/stapconf_14af95633f25eea4f38d1eb6ef710bb1_799.h
> Running env -uARCH -uKBUILD_EXTMOD -uCROSS_COMPILE -uKBUILD_IMAGE -uKCONFIG_CONFIG -uINSTALL_PATH -uLD_LIBRARY_PATH PATH=/usr/bin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin make -C /lib/modules/5.13.0-22-generic/build M=/tmp/staprnTrv2 modules CONFIG_DEBUG_INFO= CONFIG_DEBUG_INFO_BTF_MODULES= ARCH=x86_64 --no-print-directory -j21
> CC [M] /tmp/staprnTrv2/stap_33df05986440b0b57b4062d608cf18eb_4656_src.o
> CC [M] /tmp/staprnTrv2/stap_33df05986440b0b57b4062d608cf18eb_4656_aux_0.o
> CC [M] /tmp/staprnTrv2/stap_symbols.o
> LD [M] /tmp/staprnTrv2/stap_33df05986440b0b57b4062d608cf18eb_4656.o
> MODPOST /tmp/staprnTrv2/Module.symvers
> CC [M] /tmp/staprnTrv2/stap_33df05986440b0b57b4062d608cf18eb_4656.mod.o
> LD [M] /tmp/staprnTrv2/stap_33df05986440b0b57b4062d608cf18eb_4656.ko
> Spawn waitpid result (0x0): 0
> Pass 4: compiled C into "stap_33df05986440b0b57b4062d608cf18eb_4656.ko" in 1400usr/360sys/1637real ms.
> Cleaning cache, interval reached 61190 s > 300 s.
> Copying /tmp/staprnTrv2/stap_33df05986440b0b57b4062d608cf18eb_4656.ko to /root/.systemtap/cache/33/stap_33df05986440b0b57b4062d608cf18eb_4656.ko
> Copying /tmp/staprnTrv2/stap_33df05986440b0b57b4062d608cf18eb_4656_src.c to /root/.systemtap/cache/33/stap_33df05986440b0b57b4062d608cf18eb_4656.c
> Copying /tmp/staprnTrv2/stapconf_14af95633f25eea4f38d1eb6ef710bb1_799.h to /root/.systemtap/cache/14/stapconf_14af95633f25eea4f38d1eb6ef710bb1_799.h
> Pass 5: starting run.
> Running /opt/systemtap-4.6/bin/staprun -v -R /tmp/staprnTrv2/stap_33df05986440b0b57b4062d608cf18eb_4656.ko
> staprun:insert_module:191 Module stap_33df05986440b0b57b4062d608cf18e_10362 inserted from file /tmp/staprnTrv2/stap_33df05986440b0b57b4062d608cf18eb_4656.ko
> _stp_set_stext:44: found kernel _stext load address: 0xffffffff8bc00000
> _stp_kmodule_update_address:1115: module drm section .altinstr_aux address 0xffffffffc05684e2
> _stp_kmodule_update_address:1115: module drm section .altinstr_replacement address 0xffffffffc0568075
> _stp_kmodule_update_address:1115: module drm section .altinstructions address 0xffffffffc057cb54
> _stp_kmodule_update_address:1115: module drm section .bss address 0xffffffffc0588d80
> _stp_kmodule_update_address:1115: module drm section .data address 0xffffffffc0587000
> _stp_kmodule_update_address:1115: module drm section .data..read_mostly address 0xffffffffc05886f4
> _stp_kmodule_update_address:1115: module drm section .data.once address 0xffffffffc05886ec
> _stp_kmodule_update_address:1115: module drm section .gnu.linkonce.this_module address 0xffffffffc0588a00
> _stp_kmodule_update_address:1115: module drm section .init.text address 0x0
> _stp_kmodule_update_address:1102: module drm special section .note.gnu.build-id address 0xffffffffc0569000
> _stp_kmodule_update_address:1115: module drm section .parainstructions address 0xffffffffc057c608
> _stp_kmodule_update_address:1115: module drm section .ref.data address 0xffffffffc0588780
> _stp_kmodule_update_address:1115: module drm section .rodata address 0xffffffffc056b080
> _stp_kmodule_update_address:1115: module drm section .rodata.str1.1 address 0xffffffffc057d760
> _stp_kmodule_update_address:1115: module drm section .rodata.str1.8 address 0xffffffffc05801c0
> _stp_kmodule_update_address:1115: module drm section .smp_locks address 0xffffffffc057c3ac
> _stp_kmodule_update_address:1115: module drm section .static_call.text address 0xffffffffc0568518
> _stp_kmodule_update_address:1115: module drm section .static_call_sites address 0xffffffffc05889e0
> _stp_kmodule_update_address:1115: module drm section .text address 0xffffffffc0534000
> _stp_kmodule_update_address:1115: module drm section .text.unlikely address 0xffffffffc0568191
> _stp_kmodule_update_address:1115: module drm section ___srcu_struct_ptrs address 0xffffffffc05855b0
> _stp_kmodule_update_address:1115: module drm section __bpf_raw_tp_map address 0xffffffffc0588700
> _stp_kmodule_update_address:1115: module drm section __bug_table address 0xffffffffc0587ae0
> _stp_kmodule_update_address:1115: module drm section __dyndbg address 0xffffffffc05889a8
> _stp_kmodule_update_address:1115: module drm section __jump_table address 0xffffffffc0586000
> _stp_kmodule_update_address:1115: module drm section __kcrctab address 0xffffffffc056a86c
> _stp_kmodule_update_address:1115: module drm section __kcrctab_gpl address 0xffffffffc056aff0
> _stp_kmodule_update_address:1115: module drm section __ksymtab address 0xffffffffc0569054
> _stp_kmodule_update_address:1115: module drm section __ksymtab_gpl address 0xffffffffc056a6e0
> _stp_kmodule_update_address:1115: module drm section __ksymtab_strings address 0xffffffffc0577430
> _stp_kmodule_update_address:1115: module drm section __mcount_loc address 0xffffffffc057a6a4
> _stp_kmodule_update_address:1115: module drm section __param address 0xffffffffc05855b8
> _stp_kmodule_update_address:1115: module drm section __tracepoints address 0xffffffffc05888a0
> _stp_kmodule_update_address:1115: module drm section __tracepoints_ptrs address 0xffffffffc0585680
> _stp_kmodule_update_address:1115: module drm section __tracepoints_strings address 0xffffffffc0585690
> _stp_kmodule_update_address:1115: module drm section _ftrace_events address 0xffffffffc0588760
> _stp_module_check:775: build-id validation [drm]
> _stp_build_id_check:731: build-id validation [drm] 4c8ebf4428e1562c2877a2be4c5f804cf306d2a3 vs. notes@=ffffffffc0569010 4c8ebf4428e1562c2877a2be4c5f804cf306d2a3
> stapkp_init:756: looking up 2 probes
> stapkp_init:770: found 2 probes
> stapkp_register_probe:364: stapkp_register_probe module drm addr 0x4350 reg 0
> stapkp_register_probe:364: stapkp_register_probe module drm addr 0x4350 reg 0
> _stp_kmodule_relocate:38: drm, .text, 4350
> _stp_kmodule_relocate:57: address=ffffffffc0538350
> stapkp_arch_register_kprobe:230: +kprobe (null)+0
> stapkp_register_kprobe:258: stapkp_register_kprobe module drm addr 0x4350 rc 0
> -->. 0 myapp-test(10402): drm_ioctl filp=0xffff994332d2f200 cmd=0xc0406400 arg=0x19cf740
> -->. 0 myapp-test(10402): drm_ioctl filp=0xffff994332d2f200 cmd=0xc0406400 arg=0x19cf740
> -->. 0 myapp-test(10402): drm_ioctl filp=0xffff994332d2f200 cmd=0xc0106401 arg=0x7ffcb3a8ad10
> -->. 0 myapp-test(10402): drm_ioctl filp=0xffff994332d2f200 cmd=0xc0106401 arg=0x7ffcb3a8ad10
> -->. 0 myapp-test(10402): drm_ioctl filp=0xffff994332d2f200 cmd=0xc0086441 arg=0x19cf898
> -->. 0 myapp-test(10402): drm_ioctl filp=0xffff994332d2f200 cmd=0xc0086441 arg=0x19cf818
> -->. 0 myapp-test(10402): drm_ioctl filp=0xffff994332d2f200 cmd=0xc0086441 arg=0x19cf858
> -->. 0 myapp-test(10402): drm_ioctl filp=0xffff994332d2f200 cmd=0xc0086441 arg=0x19cf7d8
> -->. 0 myapp-test(10402): drm_ioctl filp=0xffff994332d2f500 cmd=0xc0406400 arg=0x19cd590
> -->. 0 myapp-test(10402): drm_ioctl filp=0xffff994332d2f500 cmd=0xc0406400 arg=0x19cd590
> -->. 0 myapp-test(10402): drm_ioctl filp=0xffff994332d2f500 cmd=0xc0106401 arg=0x7ffcb3a8ad10
> -->. 0 myapp-test(10402): drm_ioctl filp=0xffff994332d2f500 cmd=0xc0106401 arg=0x7ffcb3a8ad10
> -->. 0 myapp-test(10402): drm_ioctl filp=0xffff994332d2f500 cmd=0xc0086441 arg=0x19cf588
> C-c C-cstapkp_batch_unregister_probes:514: -kprobe * 1
> stapio:cleanup_and_exit:352 detach=0
> stapio:cleanup_and_exit:369 closing control channel
> staprun:remove_module:292 Module stap_33df05986440b0b57b4062d608cf18e_10362 removed.
> Spawn waitpid result (0x0): 0
> Pass 5: run completed in 20usr/90sys/50060real ms.
> Running rm -rf /tmp/staprnTrv2
> Spawn waitpid result (0x0): 0
> Removed temporary directory "/tmp/staprnTrv2"
> #+end_src
>
> regards,
> Matt
hi systemtap team
any ideas?
regards,
Mat
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: non-working .return probepoint from modules
2022-03-22 9:48 ` Matt Vibrys
@ 2022-03-22 18:56 ` Frank Ch. Eigler
2022-04-06 12:37 ` Matt Vibrys
0 siblings, 1 reply; 7+ messages in thread
From: Frank Ch. Eigler @ 2022-03-22 18:56 UTC (permalink / raw)
To: Matt Vibrys; +Cc: systemtap
Matt Vibrys via Systemtap <systemtap@sourceware.org> writes:
> hi systemtap team
> any ideas?
> regards,
> Mat
Please check git/master stap. I believe Stan Cox fixed this problem
about a month ago in commit 9b6f4d4e4f2
- FChE
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: non-working .return probepoint from modules
2022-03-22 18:56 ` Frank Ch. Eigler
@ 2022-04-06 12:37 ` Matt Vibrys
0 siblings, 0 replies; 7+ messages in thread
From: Matt Vibrys @ 2022-04-06 12:37 UTC (permalink / raw)
To: Frank Ch. Eigler; +Cc: systemtap
Frank Ch. Eigler <fche@redhat.com> writes:
> Matt Vibrys via Systemtap <systemtap@sourceware.org> writes:
>
>> hi systemtap team
>> any ideas?
>> regards,
>> Mat
>
> Please check git/master stap. I believe Stan Cox fixed this problem
> about a month ago in commit 9b6f4d4e4f2
>
> - FChE
confirmed
thank You for fix and information
regards,
Matt
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-04-06 12:37 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-15 20:51 non-working .return probepoint from modules Matt Vibrys
2021-12-16 17:38 ` Matt Vibrys
2021-12-17 2:33 ` Frank Ch. Eigler
2021-12-17 10:32 ` Matt Vibrys
2022-03-22 9:48 ` Matt Vibrys
2022-03-22 18:56 ` Frank Ch. Eigler
2022-04-06 12:37 ` Matt Vibrys
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).