Re: [PATCH V2 02/13] perf/core: output overhead when sched out from context

From: Peter Zijlstra
Date: Tue Dec 06 2016 - 06:21:28 EST


On Fri, Dec 02, 2016 at 04:19:10PM -0500, kan.liang@xxxxxxxxx wrote:
> From: Kan Liang <kan.liang@xxxxxxxxx>
>
> Outputing every overhead when it happens is very costly. The accumulated
> time is more meaningful. So the overhead information should be outputted
> at the very end.
>
> The overhead information is outputted when task is scheduling out or the
> event is going to be disabled.

Why? The context switch stuff can happen very frequently. Doesn't seem
like a good place to add overhead.

> The arch specific overhead is outputted in event pmu delete, when Flag
> PERF_EF_LOG is set.