Support changing fentry name per function
It can be useful to have some classes of functions that use a different
__fentry__ instrumentation than others. Currently it is only
possible to disable instrumentation on the command line or with
no_instrument_function, but not to change the instrumentation function
on a case by case base.
Add some flexibility to allow to change the instrumentation function
name per file with an option or per function with a new attribute.
This also allows switching to nops for individual functions.
gcc/:
2018-11-29 Andi Kleen <ak@linux.intel.com>
* config/i386/i386.c (x86_print_call_or_nop): Handle nop name.
(current_fentry_name): Add.
(x86_function_profiler): Handle fentry_name attribute.
(ix86_handle_fentry_name): Add.
(ix86_attribute_table): Add fentry_name.
* config/i386/i386.opt: Add -mfentry-name
* doc/extend.texi: Document fentry_name.
* doc/invoke.texi: Document minstrument-return.
gcc/testsuite/:
2018-11-29 Andi Kleen <ak@linux.intel.com>
* gcc.target/i386/fentryname1.c: New test.
From-SVN: r266653