提交 d1cae34d 编写于 作者: D David Ahern 提交者: Arnaldo Carvalho de Melo

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: NDavid Ahern <dsahern@gmail.com>
Link: http://lkml.kernel.org/r/1336495811-58461-1-git-send-email-dsahern@gmail.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
上级 40491eaa
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册