Re: [PATCH] Add -fno-instrument-function

2014-09-04 Thread Andi Kleen
No, not a new fake option either but just initialize DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT properly when not doing -pg or -mfentry (that is, set it to 1). The only way would be to handle it in build_decl itself. There seem to be a bazillion callers all over the tree that all do their custom

Re: [PATCH] Add -fno-instrument-function

2014-09-04 Thread Richard Biener
On Thu, Sep 4, 2014 at 8:04 AM, Andi Kleen a...@firstfloor.org wrote: No, not a new fake option either but just initialize DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT properly when not doing -pg or -mfentry (that is, set it to 1). The only way would be to handle it in build_decl itself. There

Re: [PATCH] Add -fno-instrument-function

2014-09-03 Thread Richard Biener
On Tue, Sep 2, 2014 at 5:00 PM, Andi Kleen a...@linux.intel.com wrote: Hmm, why not make -no-pg (does that exist?) and/or -mno-fentry I'm not sure. do this? That is, I don't see the need for a new option. That would be really odd behavior. An yes/no option whose default is controlled by

Re: [PATCH] Add -fno-instrument-function

2014-09-02 Thread Richard Biener
On Mon, Sep 1, 2014 at 10:25 PM, Andi Kleen a...@firstfloor.org wrote: From: Andi Kleen a...@linux.intel.com [This was an old patch of mine that has been posted before, but never made it in] This adds a new C/C++ option to force __attribute__((no_instrument_function)) on every function

Re: [PATCH] Add -fno-instrument-function

2014-09-02 Thread Andi Kleen
Hmm, why not make -no-pg (does that exist?) and/or -mno-fentry I'm not sure. do this? That is, I don't see the need for a new option. That would be really odd behavior. An yes/no option whose default is controlled by other object files' command line. And -pg would be for all files in LTO,

[PATCH] Add -fno-instrument-function

2014-09-01 Thread Andi Kleen
From: Andi Kleen a...@linux.intel.com [This was an old patch of mine that has been posted before, but never made it in] This adds a new C/C++ option to force __attribute__((no_instrument_function)) on every function compiled. This is useful together with LTO. You may want to have the whole

Re: PING^4 Re: [PATCH] Add -fno-instrument-function v2

2013-11-22 Thread Andi Kleen
Andi Kleen a...@firstfloor.org writes: PING^4 if it isn't already too late for 4.9. Andi Kleen a...@firstfloor.org writes: PING^3 Since it doesn't look like a generic solution for the LTO options problem will appear this development cycle, I would still like to pursue this option for

Re: PING^3 Re: [PATCH] Add -fno-instrument-function v2

2013-11-11 Thread Andi Kleen
Andi Kleen a...@firstfloor.org writes: PING^3 Since it doesn't look like a generic solution for the LTO options problem will appear this development cycle, I would still like to pursue this option for 4.9. This would help fixing parts of the linux kernel LTO build. Can someone please review

Re: PING^2 Re: [PATCH] Add -fno-instrument-function v2

2013-10-07 Thread Andi Kleen
Andi Kleen a...@firstfloor.org writes: PING^2 Andi Kleen a...@firstfloor.org writes: From: Andi Kleen a...@linux.intel.com [I posted this originally quite some time ago. This version fixes all review problems, particularly it works for C++ too and the test case really works.] Ping!

PING Re: [PATCH] Add -fno-instrument-function v2

2013-09-08 Thread Andi Kleen
Andi Kleen a...@firstfloor.org writes: From: Andi Kleen a...@linux.intel.com [I posted this originally quite some time ago. This version fixes all review problems, particularly it works for C++ too and the test case really works.] Ping! Could someone please review it. Note this might be

[PATCH] Add -fno-instrument-function v2

2013-08-10 Thread Andi Kleen
From: Andi Kleen a...@linux.intel.com [I posted this originally quite some time ago. This version fixes all review problems, particularly it works for C++ too and the test case really works.] This adds a new C/C++ option to force __attribute__((no_instrument_function)) on every function

Re: [PATCH] Add -fno-instrument-function

2012-11-03 Thread Joseph S. Myers
On Wed, 31 Oct 2012, Andi Kleen wrote: gcc/: 2012-10-31 Andi Kleen a...@linux.intel.com * c.opt (fno-instrument-function): Document. gcc/c: 2012-10-31 Andi Kleen a...@linux.intel.com * c-decl.c (start_function): Handle force_no_instrument_function gcc/testsuite:

Re: [PATCH] Add -fno-instrument-function

2012-11-03 Thread Andi Kleen
Joseph S. Myers jos...@codesourcery.com writes: 2012-10-31 Andi Kleen a...@linux.intel.com * g++.dg/fno-instrument-function.C: Add. * gcc.dg/fno-instrument-function.c: Add. You have a C++ test but no corresponding C++ front-end change; how does that work? The code is in

Re: [PATCH] Add -fno-instrument-function

2012-11-03 Thread Joseph S. Myers
On Sat, 3 Nov 2012, Andi Kleen wrote: Joseph S. Myers jos...@codesourcery.com writes: 2012-10-31 Andi Kleen a...@linux.intel.com * g++.dg/fno-instrument-function.C: Add. * gcc.dg/fno-instrument-function.c: Add. You have a C++ test but no corresponding C++ front-end change;

[PATCH] Add -fno-instrument-function

2012-10-31 Thread Andi Kleen
From: Andi Kleen a...@linux.intel.com This adds a new C/C++ option to force __attribute__((no_instrument_function)) on every function compiled. This is useful together with LTO. You may want to have the whole program compiled with -pg and have to specify that in the LTO link, but want to disable