All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/2] perf record: reset event name when falling back to cpu-clock
@ 2012-05-08 16:50 David Ahern
  2012-05-11  6:48 ` [tip:perf/core] perf record: Reset " tip-bot for David Ahern
  0 siblings, 1 reply; 2+ messages in thread
From: David Ahern @ 2012-05-08 16:50 UTC (permalink / raw)
  To: acme, linux-kernel; +Cc: David Ahern

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>
---
 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 42e2414..42d0fcf 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -252,6 +252,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;
 			}
 
-- 
1.7.5.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-05-11  6:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-08 16:50 [PATCH 2/2] perf record: reset event name when falling back to cpu-clock David Ahern
2012-05-11  6:48 ` [tip:perf/core] perf record: Reset " tip-bot for David Ahern

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.