Re: unlikely compiler flag propagation

2015-02-19 Thread Anupam Kapoor
[2015-02-19T00:08:01+0530]: Nicholas Mc Guire (nicholas-mcguire): nicholas-mcguire On Wed, 18 Feb 2015, Greg KH wrote: ,[ greg-kh ] | As proof of this, there was a test of the kernel a year or so ago that | measured the placement of the existing likely/unlikely markers in the | kernel and

unlikely compiler flag propagation

2015-02-18 Thread Matthias Brugger
Hi all, I have a question about the unlikely compiler flag. When a called function is only returns an error with the unlikely flag set, should I set the unlikely compiler flag for the return value check in the callee as well? For example: int function_one(int *list, int num_elements) { int

Re: unlikely compiler flag propagation

2015-02-18 Thread Nicholas Mc Guire
On Wed, 18 Feb 2015, Greg KH wrote: On Wed, Feb 18, 2015 at 07:09:47PM +0100, Matthias Brugger wrote: Hi all, I have a question about the unlikely compiler flag. When a called function is only returns an error with the unlikely flag set, should I set the unlikely compiler flag for the

Re: unlikely compiler flag propagation

2015-02-18 Thread Matthias Brugger
Hi Greg, hi all, 2015-02-18 19:24 GMT+01:00 Greg KH g...@kroah.com: On Wed, Feb 18, 2015 at 07:09:47PM +0100, Matthias Brugger wrote: Hi all, I have a question about the unlikely compiler flag. When a called function is only returns an error with the unlikely flag set, should I set the

Re: unlikely compiler flag propagation

2015-02-18 Thread Valdis . Kletnieks
On Wed, 18 Feb 2015 19:38:01 +0100, Nicholas Mc Guire said: On Wed, 18 Feb 2015, Greg KH wrote: interesting - would you have a reference to some talk/paper/data/... ? Test for yourself :) config PROFILE_ANNOTATED_BRANCHES bool Trace likely/unlikely profiler select

Re: unlikely compiler flag propagation

2015-02-18 Thread Greg KH
On Wed, Feb 18, 2015 at 07:35:37PM +0100, Matthias Brugger wrote: Hi Greg, hi all, 2015-02-18 19:24 GMT+01:00 Greg KH g...@kroah.com: On Wed, Feb 18, 2015 at 07:09:47PM +0100, Matthias Brugger wrote: Hi all, I have a question about the unlikely compiler flag. When a called function

Re: unlikely compiler flag propagation

2015-02-18 Thread Nicholas Mc Guire
On Wed, 18 Feb 2015, valdis.kletni...@vt.edu wrote: On Wed, 18 Feb 2015 19:38:01 +0100, Nicholas Mc Guire said: On Wed, 18 Feb 2015, Greg KH wrote: interesting - would you have a reference to some talk/paper/data/... ? Test for yourself :) config PROFILE_ANNOTATED_BRANCHES

Re: unlikely compiler flag propagation

2015-02-18 Thread Greg KH
On Wed, Feb 18, 2015 at 07:09:47PM +0100, Matthias Brugger wrote: Hi all, I have a question about the unlikely compiler flag. When a called function is only returns an error with the unlikely flag set, should I set the unlikely compiler flag for the return value check in the callee as well?