This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug translator/18389] New: gcc5 code folding breaks tracepoint queries
- From: "jistone at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sourceware dot org
- Date: Fri, 08 May 2015 19:49:25 +0000
- Subject: [Bug translator/18389] New: gcc5 code folding breaks tracepoint queries
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=18389
Bug ID: 18389
Summary: gcc5 code folding breaks tracepoint queries
Product: systemtap
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: translator
Assignee: systemtap at sourceware dot org
Reporter: jistone at redhat dot com
Target Milestone: ---
GCC5 now has Identical Code Folding, -fipa-icf, and it's enabled by default at
-O2 or higher.
SystemTap's tracepoint queries use stub functions like:
void stapprobe_##name(proto) {}
When multiple tracepoint's proto is the same in a given object, GCC5 is merging
them, so we only find one of them in debuginfo.
For instance, sys_enter takes (struct pt_regs *regs, long id), and sys_exit
takes (struct pt_regs *regs, long reg). These are identical as far as gcc is
concerned, so they're merged. So stap -l 'kernel.trace("sys_*")' only shows me
sys_exit.
The "winner" may not be deterministic, but for now it appears to be the last
one declared. Another example is that there are 8 "ext4_*" tracepoints which
take just (struct inode *inode), and only ext4_load_inode shows up in stap.
Adding -fno-ipa-icf will disable this, if we can do that in a compatible way.
Another possibility is to force uniqueness, perhaps something like:
int stapprobe_##name(proto) {
static int i = 0;
return ++i;
}
(The tracepoint query objects are never linked or executed, so the function
body is irrelevant as long as they all show up in debuginfo.)
--
You are receiving this mail because:
You are the assignee for the bug.