From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E4D1B3857822; Thu, 7 Apr 2022 14:10:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E4D1B3857822 From: "wcohen at redhat dot com" To: systemtap@sourceware.org Subject: [Bug translator/29037] New: Systemtap unable to find struct bitfield members for gcc11 compiled code Date: Thu, 07 Apr 2022 14:10:32 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: systemtap X-Bugzilla-Component: translator 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: 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 X-BeenThere: systemtap@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Systemtap mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Apr 2022 14:10:33 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D29037 Bug ID: 29037 Summary: Systemtap unable to find struct bitfield members for gcc11 compiled code Product: systemtap Version: unspecified Status: NEW Severity: normal Priority: P2 Component: translator Assignee: systemtap at sourceware dot org Reporter: wcohen at redhat dot com Target Milestone: --- Created attachment 14053 --> https://sourceware.org/bugzilla/attachment.cgi?id=3D14053&action=3Ded= it Tarball of the code for gcc11 bitfield reproducer When reviewing the testsuite results for the systemtap examples I noticed several examples (tcp_trace, tcpdumplike, and schedtimes) failed because systemtap was not able to access various struct member bitfields for code generated by gcc11 compiler. GCC11 is in Fedora 34 and later, so those examples do not work in fedora 34 or later. However, they work in Fedora 33 and RHEL8. Made a small reproducer to demonstrate the issue, fields.c and an associated fields_probes.stp. On RHEL can see that systemtap finds the bitfield and prints out the information: [wcohen@rhel8 ~]$ gcc -O2 -g -o fields fields.c [wcohen@rhel8 ~]$ sudo stap -v fields_probes.stp -c "./fields" Pass 1: parsed user script and 501 library scripts using 352200virt/152564res/18004shr/136660data kb, in 260usr/30sys/282real ms. Pass 2: analyzed script: 1 probe, 2 functions, 0 embeds, 0 globals using 356688virt/158504res/19128shr/141148data kb, in 20usr/0sys/20real ms. Pass 3: translated to C into "/tmp/staplw3Mn1/stap_728fe8eaae91c669f6cd3df4b02f5bf7_1361_src.c" using 356952virt/158964res/19320shr/141412data kb, in 10usr/60sys/69real ms. Pass 4: compiled C into "stap_728fe8eaae91c669f6cd3df4b02f5bf7_1361.ko" in 2190usr/470sys/2763real ms. Pass 5: starting run. a.icsk_ca_state: false a.icsk_ca_initialized: false a.icsk_ca_setsockopt: false a.icsk_ca_dst_locked: false $a->icsk_ca_state =3D 0 Pass 5: run completed in 30usr/40sys/326real ms. However, on Fedora Rawhide unable to find the bitfield: [wcohen@rawhide ~]$ gcc -O2 -g -o fields fields.c=20 [wcohen@rawhide ~]$ sudo stap -v fields_probes.stp -c "./fields" Pass 1: parsed user script and 506 library scripts using 454360virt/212868res/17668shr/195016data kb, in 390usr/70sys/463real ms. Pass 2: analyzed script: 1 probe, 1 function, 0 embeds, 0 globals using 462060virt/222736res/19484shr/202716data kb, in 30usr/0sys/39real ms. Pass 3: translated to C into "/tmp/stapUdlYqF/stap_d24e675b2dbd63c03baff5e35cb87ef3_1219_src.c" using 463116virt/223908res/19612shr/203772data kb, in 10usr/60sys/63real ms. Pass 4: compiled C into "stap_d24e675b2dbd63c03baff5e35cb87ef3_1219.ko" in 1760usr/270sys/2064real ms. Pass 5: starting run. a.icsk_ca_state: false a.icsk_ca_initialized: false a.icsk_ca_setsockopt: false a.icsk_ca_dst_locked: false no field icsk_ca_state Pass 5: run completed in 10usr/40sys/342real ms. The fields.c, fields_probes.stp and the dumps of the object code and dwarf = are in the gcc11_bitfield.tar.gz. --=20 You are receiving this mail because: You are the assignee for the bug.=