Re: [PATCH 02/14] perf/x86: output NMI overhead

From: Peter Zijlstra
Date: Wed Nov 23 2016 - 15:06:36 EST


On Wed, Nov 23, 2016 at 04:44:40AM -0500, kan.liang@xxxxxxxxx wrote:
> From: Kan Liang <kan.liang@xxxxxxxxx>
>
> NMI handler is one of the most important part which brings overhead.
>
> There are lots of NMI during sampling. It's very expensive to log each
> NMI. So the accumulated time and NMI# will be output when event is going
> to be disabled or task is scheduling out.
> The newly introduced flag PERF_EF_LOG indicate to output the overhead
> log.
>
> Signed-off-by: Kan Liang <kan.liang@xxxxxxxxx>
> ---
> arch/x86/events/core.c | 19 ++++++++++++++-
> arch/x86/events/perf_event.h | 2 ++
> include/linux/perf_event.h | 1 +
> include/uapi/linux/perf_event.h | 2 ++
> kernel/events/core.c | 54 ++++++++++++++++++++++-------------------
> 5 files changed, 52 insertions(+), 26 deletions(-)

The subject says this patch is x86 specific, but most changes are in
core code.