Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934507AbcKWUGd (ORCPT ); Wed, 23 Nov 2016 15:06:33 -0500 Received: from bombadil.infradead.org ([198.137.202.9]:58011 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933575AbcKWUGc (ORCPT ); Wed, 23 Nov 2016 15:06:32 -0500 Date: Wed, 23 Nov 2016 21:06:14 +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 02/14] perf/x86: output NMI overhead Message-ID: <20161123200614.GX3092@twins.programming.kicks-ass.net> References: <1479894292-16277-1-git-send-email-kan.liang@intel.com> <1479894292-16277-3-git-send-email-kan.liang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1479894292-16277-3-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 Content-Length: 916 Lines: 22 On Wed, Nov 23, 2016 at 04:44:40AM -0500, kan.liang@intel.com wrote: > From: Kan Liang > > 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 > --- > 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.