From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id EDA273858401; Fri, 13 Oct 2023 19:24:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EDA273858401 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1697225045; bh=ym6794LHoYGnSMquN5MFd4ul4j6LyyEoi0OuzUua7X0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=gP8EyBOZEDTCDJKs1KhXExxaex3BYbq8iC+tsLkLgBc45Y1tIYmVFchXHFEolvxPM eJ9uUE0OTJo2eq+04txHFf1YCJMjm4fzEFvor/smxzDE0MDDMarpJ1MUqkxKDSZcFS 559CrYnGbOa3Hu49bmDO0KslE7f2gN4DM7rDtxdQ= From: "wcohen at redhat dot com" 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 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: systemtap X-Bugzilla-Component: runtime X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: wcohen at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: systemtap at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D29756 --- Comment #2 from William Cohen --- Did some more poking around to see what the differences are between the rhe= l8 and rhel9 libc.so.6 code. It appears that the problem is linked to functio= ns being inlined on rhel9. On rhel9 the particular function being searched for is inlined while on rhe= l8 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=3D.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=3D.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/deb= ug/glibc-2.28-189.1.el8.s390x/malloc/malloc.c:1803").call /* pc=3D.dynamic+0x92870 */ $av:mstate $i:int process("/usr/lib64/libc-2.28.so").function("malloc_init_state@/usr/src/deb= ug/glibc-2.28-189.1.el8.s390x/malloc/malloc.c:1803").return /* pc=3D.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 nee= ded 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/glib= c-2.34-83.el9_3.7.s390x/malloc/arena.c:281").inline /* pc=3D.dynamic+0xb02b4 */ $tcache:tcache_perthread_struct* process("/usr/lib64/libc.so.6").function("ptmalloc_init@/usr/src/debug/glib= c-2.34-83.el9_3.7.s390x/malloc/arena.c:281").inline /* pc=3D.dynamic+0xb0210 */ $tcache:tcache_perthread_struct* process("/usr/lib64/libc.so.6").function("ptmalloc_init@/usr/src/debug/glib= c-2.34-83.el9_3.7.s390x/malloc/arena.c:281").inline /* pc=3D.dynamic+0xaffa0 */ $tcache:tcache_perthread_struct* process("/usr/lib64/libc.so.6").function("ptmalloc_init@/usr/src/debug/glib= c-2.34-83.el9_3.7.s390x/malloc/arena.c:281").inline /* pc=3D.dynamic+0xafdf8 */ $tcache:tcache_perthread_struct* process("/usr/lib64/libc.so.6").function("ptmalloc_init@/usr/src/debug/glib= c-2.34-83.el9_3.7.s390x/malloc/arena.c:281").inline /* pc=3D.dynamic+0xaf950 */ $tcache:tcache_perthread_struct* process("/usr/lib64/libc.so.6").function("ptmalloc_init@/usr/src/debug/glib= c-2.34-83.el9_3.7.s390x/malloc/arena.c:281").inline /* pc=3D.dynamic+0xaf71e */ $tcache:tcache_perthread_struct* process("/usr/lib64/libc.so.6").function("ptmalloc_init@/usr/src/debug/glib= c-2.34-83.el9_3.7.s390x/malloc/arena.c:281").inline /* pc=3D.dynamic+0xaf6aa */ $tcache:tcache_perthread_struct* process("/usr/lib64/libc.so.6").function("ptmalloc_init@/usr/src/debug/glib= c-2.34-83.el9_3.7.s390x/malloc/arena.c:281").inline /* pc=3D.dynamic+0xaf656 */ $tcache:tcache_perthread_struct* process("/usr/lib64/libc.so.6").function("ptmalloc_init@/usr/src/debug/glib= c-2.34-83.el9_3.7.s390x/malloc/arena.c:281").inline /* pc=3D.dynamic+0xaf31c */ $tcache:tcache_perthread_struct* process("/usr/lib64/libc.so.6").function("ptmalloc_init@/usr/src/debug/glib= c-2.34-83.el9_3.7.s390x/malloc/arena.c:281").inline /* pc=3D.dynamic+0xaea7c */ $tcache:tcache_perthread_struct* process("/usr/lib64/libc.so.6").function("ptmalloc_init@/usr/src/debug/glib= c-2.34-83.el9_3.7.s390x/malloc/arena.c:281").inline /* pc=3D.dynamic+0xb04a2 */ $tcache:tcache_perthread_struct* process("/usr/lib64/libc.so.6").function("ptmalloc_init@/usr/src/debug/glib= c-2.34-83.el9_3.7.s390x/malloc/arena.c:281").inline /* pc=3D.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. --=20 You are receiving this mail because: You are the assignee for the bug.=