Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d1cae34d authored by David Ahern's avatar David Ahern Committed by Arnaldo Carvalho de Melo
Browse files

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: default avatarDavid Ahern <dsahern@gmail.com>
Link: http://lkml.kernel.org/r/1336495811-58461-1-git-send-email-dsahern@gmail.com


Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 40491eaa
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -256,6 +256,10 @@ static void perf_record__open(struct perf_record *rec)
						    "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;
			}