projects
/
GitHub
/
MotorolaMobilityLLC
/
kernel-slsi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
40491ea
)
perf record: Reset event name when falling back to cpu-clock
author
David Ahern
<dsahern@gmail.com>
Tue, 8 May 2012 16:50:11 +0000
(10:50 -0600)
committer
Arnaldo Carvalho de Melo
<acme@redhat.com>
Wed, 9 May 2012 15:02:10 +0000
(12:02 -0300)
perf-record defaults to the H/W cycles event and if it is not supported
falls back to cpu-clock. Reset the event name as well.
Signed-off-by: David Ahern <dsahern@gmail.com>
Link:
http://lkml.kernel.org/r/1336495811-58461-1-git-send-email-dsahern@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-record.c
patch
|
blob
|
blame
|
history
diff --git
a/tools/perf/builtin-record.c
b/tools/perf/builtin-record.c
index 1a9098c697b44a0d181aa28fd2192578f27150af..d19058a7b84cfbd45547c8e2f004c82d7462580d 100644
(file)
--- a/
tools/perf/builtin-record.c
+++ b/
tools/perf/builtin-record.c
@@
-256,6
+256,10
@@
try_again:
"trying to fall back to cpu-clock-ticks\n");
attr->type = PERF_TYPE_SOFTWARE;
attr->config = PERF_COUNT_SW_CPU_CLOCK;
+ if (pos->name) {
+ free(pos->name);
+ pos->name = NULL;
+ }
goto try_again;
}