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

2014-09-04 Thread Richard Biener
On Thu, Sep 4, 2014 at 8:04 AM, Andi Kleen 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 seem to be a

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

2014-09-03 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 cust

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

2014-09-03 Thread Richard Biener
On Tue, Sep 2, 2014 at 5:00 PM, Andi Kleen 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 other object

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, a

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

2014-09-02 Thread Richard Biener
On Mon, Sep 1, 2014 at 10:25 PM, Andi Kleen wrote: > From: Andi Kleen > > [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

[PATCH] Add -fno-instrument-function

2014-09-01 Thread Andi Kleen
From: Andi Kleen [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 program compiled with -pg

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

2013-11-22 Thread Andi Kleen
Andi Kleen writes: PING^4 if it isn't already too late for 4.9. > Andi Kleen 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 part

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

2013-11-11 Thread Andi Kleen
Andi Kleen 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 the patch? Thanks >

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

2013-10-07 Thread Andi Kleen
Andi Kleen writes: PING^2 > Andi Kleen writes: > >> From: Andi Kleen >> >> [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

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

2013-09-08 Thread Andi Kleen
Andi Kleen writes: > From: Andi Kleen > > [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 obsolete with Honza's LTO option wor

[PATCH] Add -fno-instrument-function v2

2013-08-10 Thread Andi Kleen
From: Andi Kleen [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 compiled. This is useful tog

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

2012-11-03 Thread Joseph S. Myers
On Sat, 3 Nov 2012, Andi Kleen wrote: > "Joseph S. Myers" writes: > >> > >> 2012-10-31 Andi Kleen > >> > >>* 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 wo

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

2012-11-03 Thread Andi Kleen
"Joseph S. Myers" writes: >> >> 2012-10-31 Andi Kleen >> >> * 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 start_function, which is called b

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 > > * c.opt (fno-instrument-function): Document. > > gcc/c: > > 2012-10-31 Andi Kleen > > * c-decl.c (start_function): Handle force_no_instrument_function > > gcc/testsuite: > > 2012-10-31 Andi Kleen

[PATCH] Add -fno-instrument-function

2012-10-31 Thread Andi Kleen
From: Andi Kleen 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 it for some specific