From: Jin Yao <yao.jin@linux.intel.com>
To: acme@kernel.org, jolsa@kernel.org, peterz@infradead.org,
mingo@redhat.com, alexander.shishkin@linux.intel.com
Cc: Linux-kernel@vger.kernel.org, ak@linux.intel.com,
kan.liang@intel.com, yao.jin@intel.com,
Jin Yao <yao.jin@linux.intel.com>
Subject: [PATCH] perf stat: Disable NMI watchdog message on hybrid
Date: Fri, 28 May 2021 11:55:47 +0800 [thread overview]
Message-ID: <20210528035547.19867-1-yao.jin@linux.intel.com> (raw)
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
<not counted> cpu_atom/cycles/ (0.00%)
2,965,942 cpu_core/instructions/ # 3.169 G/sec
<not counted> cpu_atom/instructions/ (0.00%)
596,579 cpu_core/branches/ # 637.442 M/sec
<not counted> cpu_atom/branches/ (0.00%)
15,744 cpu_core/branch-misses/ # 16.822 M/sec
<not counted> 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
<not counted> cpu_atom/cycles/ (0.00%)
2,986,113 cpu_core/instructions/ # 1.285 G/sec
<not counted> cpu_atom/instructions/ (0.00%)
598,861 cpu_core/branches/ # 257.657 M/sec
<not counted> cpu_atom/branches/ (0.00%)
16,090 cpu_core/branch-misses/ # 6.923 M/sec
<not counted> cpu_atom/branch-misses/ (0.00%)
0.003265716 seconds time elapsed
0.000000000 seconds user
0.003307000 seconds sys
Signed-off-by: Jin Yao <yao.jin@linux.intel.com>
Reviewed-by: Andi Kleen <ak@linux.intel.com>
---
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
next reply other threads:[~2021-05-28 3:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-28 3:55 Jin Yao [this message]
2021-05-30 22:13 ` [PATCH] perf stat: Disable NMI watchdog message on hybrid Jiri Olsa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210528035547.19867-1-yao.jin@linux.intel.com \
--to=yao.jin@linux.intel.com \
--cc=Linux-kernel@vger.kernel.org \
--cc=acme@kernel.org \
--cc=ak@linux.intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=jolsa@kernel.org \
--cc=kan.liang@intel.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=yao.jin@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.