* [PATCH] perf stat: Disable NMI watchdog message on hybrid
@ 2021-05-28 3:55 Jin Yao
2021-05-30 22:13 ` Jiri Olsa
0 siblings, 1 reply; 2+ messages in thread
From: Jin Yao @ 2021-05-28 3:55 UTC (permalink / raw)
To: acme, jolsa, peterz, mingo, alexander.shishkin
Cc: Linux-kernel, ak, kan.liang, yao.jin, Jin Yao
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] perf stat: Disable NMI watchdog message on hybrid
2021-05-28 3:55 [PATCH] perf stat: Disable NMI watchdog message on hybrid Jin Yao
@ 2021-05-30 22:13 ` Jiri Olsa
0 siblings, 0 replies; 2+ messages in thread
From: Jiri Olsa @ 2021-05-30 22:13 UTC (permalink / raw)
To: Jin Yao
Cc: acme, jolsa, peterz, mingo, alexander.shishkin, Linux-kernel, ak,
kan.liang, yao.jin
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
> <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>
Acked-by: Jiri Olsa <jolsa@redhat.com>
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
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-05-30 22:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-28 3:55 [PATCH] perf stat: Disable NMI watchdog message on hybrid Jin Yao
2021-05-30 22:13 ` Jiri Olsa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).