diff options
author | David Ahern <dsahern@gmail.com> | 2012-05-08 10:50:11 -0600 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-05-09 12:02:10 -0300 |
commit | d1cae34d6fda59391e1b06ac1642ef4a740ba3ef (patch) | |
tree | f1f518a8769cd55cfa0750dd7aced93148c4b5c1 /tools | |
parent | 40491eaa46a693e8c6ef94102350a747c63e584d (diff) |
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')
-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 1a9098c697b..d19058a7b84 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; } |