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:
61d5bf5
)
perf record: Use sw counter only if hw pmu is not detected
author
Robert Richter
<
[email protected]
>
Thu, 5 Apr 2012 16:26:28 +0000
(18:26 +0200)
committer
Arnaldo Carvalho de Melo
<
[email protected]
>
Wed, 11 Apr 2012 20:39:19 +0000
(17:39 -0300)
Use cpu-clock-tick sw counter for cpu-cycles only if there is no hw
pmu available. This is the case if the syscall reports ENOENT. In
other cases (e.g. invalid attributes) we don't want the sw counter to
be used.
Cc: Ingo Molnar <
[email protected]
>
Link:
http://lkml.kernel.org/r/
[email protected]
Signed-off-by: Robert Richter <
[email protected]
>
Signed-off-by: Arnaldo Carvalho de Melo <
[email protected]
>
tools/perf/builtin-record.c
patch
|
blob
|
history
diff --git
a/tools/perf/builtin-record.c
b/tools/perf/builtin-record.c
index be4e1eee782e658f00ab06cfa679414341952086..10b1f1f25ed7c6d61db3b9ed6a356b9ecb9789f8 100644
(file)
--- a/
tools/perf/builtin-record.c
+++ b/
tools/perf/builtin-record.c
@@
-245,7
+245,7
@@
try_again:
* based cpu-clock-tick sw counter, which
* is always available even if no PMU support:
*/
- if (attr->type == PERF_TYPE_HARDWARE
+ if (
err == ENOENT &&
attr->type == PERF_TYPE_HARDWARE
&& attr->config == PERF_COUNT_HW_CPU_CYCLES) {
if (verbose)