Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2139095pxj; Sun, 30 May 2021 15:20:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy4n4xzTWeHtHyxnaXilcthiugZWA0DELuv/fdCWjc+cF/oiJM5oVnalRvxxkKOjRv3MoE7 X-Received: by 2002:a5e:c708:: with SMTP id f8mr14957962iop.198.1622413219223; Sun, 30 May 2021 15:20:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622413219; cv=none; d=google.com; s=arc-20160816; b=P70VhgRKfuxS0/hdbROXaqraiAIyDCnus9ecpHIdgDHSzFbTUIRSEdEqsXVzZWaaya UmzRPPIGOIww5xkoE/KcaLkRDmVDtL35bngy0dRg8U95RB28dzXFV0i54r1YnKHEOHOg Tb1mzJxVlI7yO1WMilwRdGy4Aht217p5V6EYyBr6oDEghYQsINPtIm2KrGmI4eYriNgq ynFQeqDdoLXaKYc709HiP+UhUGs6Aw88sJYv2owgFguD0IeWmqyDfCCg9UmrwPbWveZU RRh4KS3Yka6hiUygTA3anBwHV+kqVW2ys6928OVEYhZ7GfyoQWc3JmMqhtkjrFrtkqVv cwGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=HLuI6HWNEvcLGe0r2GBrYDZYGfmYoJR2FuR9JVQ5yaE=; b=NEUud2SivycUFuGzMHQBIjBshNfDUIRwHETpB6BvEdONxqplCxQoa4XE/gIyRf17yU nGSw+lKHWhkH4fjbl2ro7XHXkyRaSiz3DBNC4+kQETqq2RdxUAJFxs+ozH0s9YAObCsi VTjmZrflL/ZUPb73LuykkjlXNhFpAgtkAjaTYh5ciO0r2O1SWVEqbMy3/3BtQb01n21Y 75vsgtdwgL0waaeGNdhQf2kJ4S1qlaRLbMnvOUZTWB+y6eSDCjzwvn2hik6ear15RorF DCroYyW9/NlLVuGMka2oeivln4ZpxTfi0+ENlYRIhbmO8ZA/DKZoKG0xupCi4sJN/uu0 P1Mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=jU7+l2jn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w17si13158641jad.108.2021.05.30.15.19.43; Sun, 30 May 2021 15:20:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=jU7+l2jn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229915AbhE3WPf (ORCPT + 99 others); Sun, 30 May 2021 18:15:35 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:23541 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229897AbhE3WPe (ORCPT ); Sun, 30 May 2021 18:15:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622412835; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=HLuI6HWNEvcLGe0r2GBrYDZYGfmYoJR2FuR9JVQ5yaE=; b=jU7+l2jnNfeqXvQK+GPv3bsHXFAPjuKKFY3sdqHe8lvv+BgUM1g6w8V+aQ23U2giw8KkQv vP/1EBi3cb8BuU6sP86P1DVKieppH+iS32pxyEOeAsU7f//bogD6PIshGo1EIyusJtktIk inwEWVGTGiNOI1yEXgR1CQE61Y/bcU0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-455-pKztLGQ6P72GArvCVOlTAw-1; Sun, 30 May 2021 18:13:53 -0400 X-MC-Unique: pKztLGQ6P72GArvCVOlTAw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0E97E107ACC7; Sun, 30 May 2021 22:13:52 +0000 (UTC) Received: from krava (unknown [10.40.192.48]) by smtp.corp.redhat.com (Postfix) with SMTP id E4B4D5D6D7; Sun, 30 May 2021 22:13:49 +0000 (UTC) Date: Mon, 31 May 2021 00:13:48 +0200 From: Jiri Olsa To: Jin Yao Cc: acme@kernel.org, jolsa@kernel.org, peterz@infradead.org, mingo@redhat.com, alexander.shishkin@linux.intel.com, Linux-kernel@vger.kernel.org, ak@linux.intel.com, kan.liang@intel.com, yao.jin@intel.com Subject: Re: [PATCH] perf stat: Disable NMI watchdog message on hybrid Message-ID: References: <20210528035547.19867-1-yao.jin@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210528035547.19867-1-yao.jin@linux.intel.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 28, 2021 at 11:55:47AM +0800, Jin Yao wrote: > If we run a single workload that only runs on big core, there is always a > ugly message about disabling the NMI watchdog because the atom is not > counted. > > Before: > > # perf stat ls > ... > > Performance counter stats for 'ls': > > 0.94 msec task-clock # 0.620 CPUs utilized > 0 context-switches # 0.000 /sec > 0 cpu-migrations # 0.000 /sec > 111 page-faults # 118.603 K/sec > 3,111,368 cpu_core/cycles/ # 3.324 G/sec > cpu_atom/cycles/ (0.00%) > 2,965,942 cpu_core/instructions/ # 3.169 G/sec > cpu_atom/instructions/ (0.00%) > 596,579 cpu_core/branches/ # 637.442 M/sec > cpu_atom/branches/ (0.00%) > 15,744 cpu_core/branch-misses/ # 16.822 M/sec > cpu_atom/branch-misses/ (0.00%) > > 0.001509271 seconds time elapsed > > 0.001572000 seconds user > 0.000000000 seconds sys > > Some events weren't counted. Try disabling the NMI watchdog: > echo 0 > /proc/sys/kernel/nmi_watchdog > perf stat ... > echo 1 > /proc/sys/kernel/nmi_watchdog > > Now we disable the NMI watchdog message on hybrid, otherwise there > are too many false positives. > > After: > > # perf stat ls > ... > > Performance counter stats for 'ls': > > 2.32 msec task-clock # 0.712 CPUs utilized > 0 context-switches # 0.000 /sec > 0 cpu-migrations # 0.000 /sec > 110 page-faults # 47.327 K/sec > 2,313,349 cpu_core/cycles/ # 995.308 M/sec > cpu_atom/cycles/ (0.00%) > 2,986,113 cpu_core/instructions/ # 1.285 G/sec > cpu_atom/instructions/ (0.00%) > 598,861 cpu_core/branches/ # 257.657 M/sec > cpu_atom/branches/ (0.00%) > 16,090 cpu_core/branch-misses/ # 6.923 M/sec > cpu_atom/branch-misses/ (0.00%) > > 0.003265716 seconds time elapsed > > 0.000000000 seconds user > 0.003307000 seconds sys > > Signed-off-by: Jin Yao > Reviewed-by: Andi Kleen Acked-by: Jiri Olsa thanks, jirka > --- > tools/perf/util/stat-display.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/tools/perf/util/stat-display.c b/tools/perf/util/stat-display.c > index b759dfd633b4..db3c7a105a2b 100644 > --- a/tools/perf/util/stat-display.c > +++ b/tools/perf/util/stat-display.c > @@ -465,7 +465,8 @@ static void printout(struct perf_stat_config *config, struct aggr_cpu_id id, int > config->csv_sep); > > if (counter->supported) { > - config->print_free_counters_hint = 1; > + if (!perf_pmu__is_hybrid(counter->pmu_name)) > + config->print_free_counters_hint = 1; > if (is_mixed_hw_group(counter)) > config->print_mixed_hw_group_error = 1; > } > -- > 2.17.1 >