]> git.ipfire.org Git - thirdparty/gcc.git/commit
Support changing fentry name per function
authorak <ak@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 29 Nov 2018 23:11:53 +0000 (23:11 +0000)
committerak <ak@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 29 Nov 2018 23:11:53 +0000 (23:11 +0000)
commitd4b85bdc318c3d3dd85e893acbb99b0188fc4fad
tree27bcf2cfea64f7e88559ae5c0d5f6748a793857e
parentaccf2ab873f17ed97d487e7cdb0ee60d80d25651
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@266653 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/config/i386/i386.c
gcc/config/i386/i386.opt
gcc/doc/extend.texi
gcc/doc/invoke.texi
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/fentryname1.c [new file with mode: 0644]