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.
Commit ca9905ac3a31 addresses just logging.stp functions.
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.
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.
Fixed in commit 27dd5c13d5dee19228ced3262b5258d874b94ff8