From: "wcohen at redhat dot com" <sourceware-bugzilla@sourceware.org>
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 [thread overview]
Message-ID: <bug-29037-6586@http.sourceware.org/bugzilla/> (raw)
https://sourceware.org/bugzilla/show_bug.cgi?id=29037
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=14053&action=edit
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 = 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
[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.
--
You are receiving this mail because:
You are the assignee for the bug.
next reply other threads:[~2022-04-07 14:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-07 14:10 wcohen at redhat dot com [this message]
2022-04-07 14:30 ` [Bug translator/29037] " wcohen at redhat dot com
2022-04-21 22:03 ` wcohen at redhat dot com
2022-06-15 14:00 ` wcohen at redhat dot com
2022-06-24 21:31 ` wcohen at redhat dot com
2022-07-01 17:39 ` wcohen at redhat dot com
2022-07-08 17:36 ` wcohen at redhat dot com
2023-03-09 22:09 ` fche 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-29037-6586@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).