diff options
author | David Ahern <dsahern@gmail.com> | 2012-05-08 16:50:11 (GMT) |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-05-09 15:02:10 (GMT) |
commit | d1cae34d6fda59391e1b06ac1642ef4a740ba3ef (patch) | |
tree | f1f518a8769cd55cfa0750dd7aced93148c4b5c1 /tools/perf | |
parent | 40491eaa46a693e8c6ef94102350a747c63e584d (diff) | |
download | linux-fsl-qoriq-d1cae34d6fda59391e1b06ac1642ef4a740ba3ef.tar.xz |
perf record: Reset event name when falling back to cpu-clock
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>
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/builtin-record.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index 1a9098c..d19058a 100644 --- 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; } |