lkml.org 
[lkml]   [2023]   [Jan]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 6/7] x86/power: Sprinkle some noinstr
On Tue, Jan 17, 2023 at 10:31:05AM +0100, Ingo Molnar wrote:
>
> * Peter Zijlstra <peterz@infradead.org> wrote:
>
> > + /*
> > + * Definitely wrong, but at this point we should have at least enough
> > + * to do CALL/RET (consider SKL callthunks) and this avoids having
> > + * to deal with the noinstr explosion for now :/
> > + */
> > + instrumentation_begin();
>
> BTW., readability side note: instrumentation_begin()/end() are the
> misnomers of the century - they don't signal the start/end of instrumented
> code areas like the name falsely & naively suggests, but the exact
> opposite: start/end of *non-*instrumented code areas.

Nope, they do as they say on the tin.

noinstr void foo(void)
{
}

declares the whole function as non-instrumented.

Within such functions, we demark regions where instrumentation is
allowed by:

noinstr void foo(void)
{
instrumentation_begin();
/* code that calls non-noinstr functions goes here */
instrumentation_end();
}

(note the double negative in the comment)

\
 
 \ /
  Last update: 2023-03-26 23:44    [W:0.064 / U:0.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site