[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20161206112531.GM3124@twins.programming.kicks-ass.net>
Date: Tue, 6 Dec 2016 12:25:31 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: kan.liang@...el.com
Cc: mingo@...hat.com, acme@...nel.org, linux-kernel@...r.kernel.org,
alexander.shishkin@...ux.intel.com, tglx@...utronix.de,
namhyung@...nel.org, jolsa@...nel.org, adrian.hunter@...el.com,
wangnan0@...wei.com, mark.rutland@....com, andi@...stfloor.org
Subject: Re: [PATCH V2 05/13] perf/core: output side-band events overhead
On Fri, Dec 02, 2016 at 04:19:13PM -0500, kan.liang@...el.com wrote:
> From: Kan Liang <kan.liang@...el.com>
>
> Iterating all events which need to receive side-band events also bring
> some overhead.
>
> The side-band events overhead PERF_CORE_SB_OVERHEAD is a common overhead
> type.
>
> Signed-off-by: Kan Liang <kan.liang@...el.com>
> diff --git a/kernel/events/core.c b/kernel/events/core.c
> index 025a19d..85706fb 100644
> --- a/kernel/events/core.c
> +++ b/kernel/events/core.c
> @@ -1830,8 +1830,12 @@ event_sched_out(struct perf_event *event,
> if (event->attr.exclusive || !cpuctx->active_oncpu)
> cpuctx->exclusive = 0;
>
> - if (log_overhead && cpuctx->mux_overhead.nr)
> - perf_log_overhead(event, PERF_CORE_MUX_OVERHEAD, &cpuctx->mux_overhead);
> + if (log_overhead) {
> + if (cpuctx->mux_overhead.nr)
> + perf_log_overhead(event, PERF_CORE_MUX_OVERHEAD, &cpuctx->mux_overhead);
> + if (ctx->sb_overhead.nr)
> + perf_log_overhead(event, PERF_CORE_SB_OVERHEAD, &ctx->sb_overhead);
> + }
Urgh, that's getting uglier by the minute, and again, its not mentioned.
>
> perf_pmu_enable(event->pmu);
> }
Powered by blists - more mailing lists