projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a09603f
)
perf stat: Fix --interval_clear option
author
Jiri Olsa
<
[email protected]
>
Mon, 2 Jul 2018 13:42:02 +0000
(15:42 +0200)
committer
Arnaldo Carvalho de Melo
<
[email protected]
>
Wed, 11 Jul 2018 13:43:03 +0000
(09:43 -0400)
Currently we display extra header line, like:
# perf stat -I 1000 -a --interval-clear
# time counts unit events
insn per cycle branch-misses of all branches
2.
964917103
3855.349912 cpu-clock (msec) # 3.855 CPUs utilized
2.
964917103
23,993 context-switches # 0.006 M/sec
2.
964917103
1,301 cpu-migrations # 0.329 K/sec
...
Fixing the condition and getting proper:
# perf stat -I 1000 -a --interval-clear
# time counts unit events
2.
359048938
1432.492228 cpu-clock (msec) # 1.432 CPUs utilized
2.
359048938
7,613 context-switches # 0.002 M/sec
2.
359048938
419 cpu-migrations # 0.133 K/sec
...
Signed-off-by: Jiri Olsa <
[email protected]
>
Tested-by: Arnaldo Carvalho de Melo <
[email protected]
>
Cc: Alexander Shishkin <
[email protected]
>
Cc: David Ahern <
[email protected]
>
Cc: Namhyung Kim <
[email protected]
>
Cc: Peter Zijlstra <
[email protected]
>
Fixes: 9660e08ee8cb ("perf stat: Add --interval-clear option")
Link:
http://lkml.kernel.org/r/
[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <
[email protected]
>
tools/perf/builtin-stat.c
patch
|
blob
|
history
diff --git
a/tools/perf/builtin-stat.c
b/tools/perf/builtin-stat.c
index 22547a490e1f9ec4e20f18a1b0483c0b2e5b0f32..05be023c3f0eda0066394651602f5be4ba6823ca 100644
(file)
--- a/
tools/perf/builtin-stat.c
+++ b/
tools/perf/builtin-stat.c
@@
-1742,7
+1742,7
@@
static void print_interval(char *prefix, struct timespec *ts)
}
}
- if ((num_print_interval == 0
&& metric_only) || interval_clear
)
+ if ((num_print_interval == 0
|| interval_clear) && metric_only
)
print_metric_headers(" ", true);
if (++num_print_interval == 25)
num_print_interval = 0;