public inbox for linux-kernel@vger.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

* [tip:perf/core] perf record: Reset event name when falling back to cpu-clock
  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-bot for David Ahern
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for David Ahern @ 2012-05-11  6:48 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: acme, linux-kernel, hpa, mingo, dsahern, tglx

Commit-ID:  d1cae34d6fda59391e1b06ac1642ef4a740ba3ef
Gitweb:     http://git.kernel.org/tip/d1cae34d6fda59391e1b06ac1642ef4a740ba3ef
Author:     David Ahern <dsahern@gmail.com>
AuthorDate: Tue, 8 May 2012 10:50:11 -0600
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 9 May 2012 12:02:10 -0300

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>
---
 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;
 			}
 

^ 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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox