Bug 18885 - Use /* unmodified-fnargs */ in tapsets
Summary: Use /* unmodified-fnargs */ in tapsets
Status: RESOLVED FIXED
Alias: None
Product: systemtap
Classification: Unclassified
Component: tapsets (show other bugs)
Version: unspecified
: P2 enhancement
Target Milestone: ---
Assignee: Martin Cermak
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-28 19:04 UTC by Josh Stone
Modified: 2015-09-23 18:21 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
proposed patch for the rest of tapsets (2.46 KB, patch)
2015-09-16 14:03 UTC, Martin Cermak
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Josh Stone 2015-08-28 19:04:22 UTC
PR11528 added a nice string optimization, and the /* unmodified-fnargs */ pragma for embedded-C functions to opt into this.  But we're not using this anywhere in our own tapsets, and there are plenty of opportunities, e.g. all of logging.stp.
Comment 1 Josh Stone 2015-08-28 20:38:50 UTC
Commit ca9905ac3a31 addresses just logging.stp functions.
Comment 2 Martin Cermak 2015-09-16 14:03:05 UTC
Created attachment 8613 [details]
proposed patch for the rest of tapsets

Testing using full testsuite on el7 x86_64 doesn't show any regression. Testing on all the other supported envs in progress now.
Comment 3 Josh Stone 2015-09-16 20:45:40 UTC
The typecasts which drop const are very suspicious!  If those uses are not const, then they should not be marked unmodified-fnargs.

However, for example, I don't see why _stp_text_str's "in" parameter is not const, so we're probably better off fixing that if possible.  The other casts also look like they ought to be able to take const.
Comment 4 Martin Cermak 2015-09-23 18:21:51 UTC
Fixed in commit 27dd5c13d5dee19228ced3262b5258d874b94ff8