lkml.org 
[lkml]   [2017]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] x86: Implement __WARN using UD0
From
Date
On 2/23/2017 5:28 AM, Peter Zijlstra wrote:
>
> By using "UD0" for WARNs we remove the function call and its possible
> __FILE__ and __LINE__ immediate arguments from the instruction stream.
>
> Total image size will not change much, what we win in the instruction
> stream we'll loose because of the __bug_table entries. Still, saves on
> I$ footprint and the total image size does go down a bit.

well I am a little sceptical; WARNs are rare so the code (other than the test)
should be waaay out of line already (unlikely() and co).
And I assume you're not removing the __FILE__ and __LINE__ info, since that info
is actually high value for us developers... so what are you actually saving?

(icache saving is only real if the line that the cold code lives on would actually
end up in icache for other reasons; I would hope the compiler puts the out
of line code WAY out of line)


\
 
 \ /
  Last update: 2017-02-23 15:15    [W:0.120 / U:0.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site