From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753285AbcLFLXm (ORCPT ); Tue, 6 Dec 2016 06:23:42 -0500 Received: from merlin.infradead.org ([205.233.59.134]:36332 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751427AbcLFLXj (ORCPT ); Tue, 6 Dec 2016 06:23:39 -0500 Date: Tue, 6 Dec 2016 12:23:30 +0100 From: Peter Zijlstra To: kan.liang@intel.com Cc: mingo@redhat.com, acme@kernel.org, linux-kernel@vger.kernel.org, alexander.shishkin@linux.intel.com, tglx@linutronix.de, namhyung@kernel.org, jolsa@kernel.org, adrian.hunter@intel.com, wangnan0@huawei.com, mark.rutland@arm.com, andi@firstfloor.org Subject: Re: [PATCH V2 04/13] perf/core: output multiplexing overhead Message-ID: <20161206112330.GL3124@twins.programming.kicks-ass.net> References: <1480713561-6617-1-git-send-email-kan.liang@intel.com> <1480713561-6617-5-git-send-email-kan.liang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1480713561-6617-5-git-send-email-kan.liang@intel.com> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 02, 2016 at 04:19:12PM -0500, kan.liang@intel.com wrote: > From: Kan Liang > > Multiplexing overhead is one of the key overhead when the number of > events is more than available counters. > > The multiplexing overhead PERF_CORE_MUX_OVERHEAD is a common overhead > type. > > diff --git a/include/uapi/linux/perf_event.h b/include/uapi/linux/perf_event.h > index fe7b1fb..355086f 100644 > --- a/include/uapi/linux/perf_event.h > +++ b/include/uapi/linux/perf_event.h > @@ -999,6 +999,7 @@ struct perf_branch_entry { > */ > enum perf_record_overhead_type { > PERF_CORE_OVERHEAD = 0, > + PERF_CORE_MUX_OVERHEAD = 0, '0' already had a name ?! > > PERF_PMU_OVERHEAD = 20, > PERF_PMU_SAMPLE_OVERHEAD = 20, Same here I suppose, why are there two with the same name? > diff --git a/kernel/events/core.c b/kernel/events/core.c > index 306bc92..025a19d 100644 > --- a/kernel/events/core.c > +++ b/kernel/events/core.c > @@ -1830,6 +1830,9 @@ 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); > + This isn't mentioned in the Changelog. Why is it here? > perf_pmu_enable(event->pmu); > } >