public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: "wcohen at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: systemtap@sourceware.org
Subject: [Bug runtime/29756] stap -L regexp match broken on some arches
Date: Fri, 13 Oct 2023 19:24:05 +0000	[thread overview]
Message-ID: <bug-29756-6586-yoSjgUYyjS@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-29756-6586@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=29756

--- Comment #2 from William Cohen <wcohen at redhat dot com> ---
Did some more poking around to see what the differences are between the rhel8
and rhel9 libc.so.6 code.  It appears that the problem is linked to functions
being inlined on rhel9.

On rhel9 the particular function being searched for is inlined while on rhel8
it is an actual function.  RHEL9:

# ../install/bin/stap -v  -L
'process("/lib64/libc.so.6").function("malloc_init_state*").*'
Pass 1: parsed user script and 489 library scripts using
127816virt/106228res/10964shr/94752data kb, in 240usr/40sys/286real ms.
process("/usr/lib64/libc.so.6").function("malloc_init_state@/usr/src/debug/glibc-2.34-83.el9_3.7.s390x/malloc/malloc.c:1932").inline
/* pc=.dynamic+0xab576 */ $av:mstate $tcache:tcache_perthread_struct*
process("/usr/lib64/libc.so.6").function("malloc_init_state@/usr/src/debug/glibc-2.34-83.el9_3.7.s390x/malloc/malloc.c:1932").inline
/* pc=.dynamic+0xab9e0 */ $av:mstate $tcache:tcache_perthread_struct*
Pass 2: analyzed script: 2 probes, 0 functions, 0 embeds, 0 globals using
152984virt/132752res/12260shr/119920data kb, in 130usr/10sys/142real ms.

0xab576 is inlined in arena_get2.part.0
0xab9e0 is inlined in ptmalloc_init.part.0

on rhel8 see .call and .return:
# ../install/bin/stap -v  -L
'process("/lib64/libc.so.6").function("malloc_init_state*").*'
Pass 1: parsed user script and 480 library scripts using
122520virt/102760res/12516shr/89836data kb, in 230usr/20sys/248real ms.
process("/usr/lib64/libc-2.28.so").function("malloc_init_state@/usr/src/debug/glibc-2.28-189.1.el8.s390x/malloc/malloc.c:1803").call
/* pc=.dynamic+0x92870 */ $av:mstate $i:int
process("/usr/lib64/libc-2.28.so").function("malloc_init_state@/usr/src/debug/glibc-2.28-189.1.el8.s390x/malloc/malloc.c:1803").return
/* pc=.dynamic+0x92870 */ $av:mstate $i:int
Pass 2: analyzed script: 2 probes, 0 functions, 0 embeds, 0 globals using
143736virt/125236res/13712shr/111052data kb, in 110usr/10sys/124real ms.

When trying "stap -v -L ..." on rhel9 libc.so.6 functions that were regular
functions no trailing '*' was required.  However, for inlined functions needed
the '*' to get them listed out.  For example ptmalloc_init.

[root@s390x-kvm-032 systemtap]# ../install/bin/stap -v  -L
'process("/lib64/libc.so.6").function("ptmalloc_init").inline'
Pass 1: parsed user script and 489 library scripts using
127812virt/106224res/10964shr/94748data kb, in 230usr/30sys/309real ms.
Pass 2: analyzed script: 0 probes, 0 functions, 0 embeds, 0 globals using
152848virt/132860res/12452shr/119784data kb, in 110usr/10sys/124real ms.
[root@s390x-kvm-032 systemtap]# ../install/bin/stap -v  -L
'process("/lib64/libc.so.6").function("ptmalloc_init*").inline'
Pass 1: parsed user script and 489 library scripts using
127816virt/106228res/10964shr/94752data kb, in 230usr/30sys/274real ms.
process("/usr/lib64/libc.so.6").function("ptmalloc_init@/usr/src/debug/glibc-2.34-83.el9_3.7.s390x/malloc/arena.c:281").inline
/* pc=.dynamic+0xb02b4 */ $tcache:tcache_perthread_struct*
process("/usr/lib64/libc.so.6").function("ptmalloc_init@/usr/src/debug/glibc-2.34-83.el9_3.7.s390x/malloc/arena.c:281").inline
/* pc=.dynamic+0xb0210 */ $tcache:tcache_perthread_struct*
process("/usr/lib64/libc.so.6").function("ptmalloc_init@/usr/src/debug/glibc-2.34-83.el9_3.7.s390x/malloc/arena.c:281").inline
/* pc=.dynamic+0xaffa0 */ $tcache:tcache_perthread_struct*
process("/usr/lib64/libc.so.6").function("ptmalloc_init@/usr/src/debug/glibc-2.34-83.el9_3.7.s390x/malloc/arena.c:281").inline
/* pc=.dynamic+0xafdf8 */ $tcache:tcache_perthread_struct*
process("/usr/lib64/libc.so.6").function("ptmalloc_init@/usr/src/debug/glibc-2.34-83.el9_3.7.s390x/malloc/arena.c:281").inline
/* pc=.dynamic+0xaf950 */ $tcache:tcache_perthread_struct*
process("/usr/lib64/libc.so.6").function("ptmalloc_init@/usr/src/debug/glibc-2.34-83.el9_3.7.s390x/malloc/arena.c:281").inline
/* pc=.dynamic+0xaf71e */ $tcache:tcache_perthread_struct*
process("/usr/lib64/libc.so.6").function("ptmalloc_init@/usr/src/debug/glibc-2.34-83.el9_3.7.s390x/malloc/arena.c:281").inline
/* pc=.dynamic+0xaf6aa */ $tcache:tcache_perthread_struct*
process("/usr/lib64/libc.so.6").function("ptmalloc_init@/usr/src/debug/glibc-2.34-83.el9_3.7.s390x/malloc/arena.c:281").inline
/* pc=.dynamic+0xaf656 */ $tcache:tcache_perthread_struct*
process("/usr/lib64/libc.so.6").function("ptmalloc_init@/usr/src/debug/glibc-2.34-83.el9_3.7.s390x/malloc/arena.c:281").inline
/* pc=.dynamic+0xaf31c */ $tcache:tcache_perthread_struct*
process("/usr/lib64/libc.so.6").function("ptmalloc_init@/usr/src/debug/glibc-2.34-83.el9_3.7.s390x/malloc/arena.c:281").inline
/* pc=.dynamic+0xaea7c */ $tcache:tcache_perthread_struct*
process("/usr/lib64/libc.so.6").function("ptmalloc_init@/usr/src/debug/glibc-2.34-83.el9_3.7.s390x/malloc/arena.c:281").inline
/* pc=.dynamic+0xb04a2 */ $tcache:tcache_perthread_struct*
process("/usr/lib64/libc.so.6").function("ptmalloc_init@/usr/src/debug/glibc-2.34-83.el9_3.7.s390x/malloc/arena.c:281").inline
/* pc=.dynamic+0xb0504 */ $tcache:tcache_perthread_struct*
Pass 2: analyzed script: 12 probes, 0 functions, 0 embeds, 0 globals using
152984virt/132764res/12260shr/119920data kb, in 120usr/10sys/129real ms.

-- 
You are receiving this mail because:
You are the assignee for the bug.

  parent reply	other threads:[~2023-10-13 19:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-07 10:35 [Bug runtime/29756] New: " mcermak at redhat dot com
2023-10-12 20:16 ` [Bug runtime/29756] " wcohen at redhat dot com
2023-10-13 19:24 ` wcohen at redhat dot com [this message]
2023-10-16 19:58 ` [Bug translator/29756] " wcohen at redhat dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-29756-6586-yoSjgUYyjS@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=systemtap@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).