perf tools: Move all users of event_name to perf_evsel__name
So that we don't use global variables that could make us misreport event names when having a multi window top, for instance. Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung@gmail.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-mccancovi1u0wdkg8ncth509@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
@@ -265,7 +265,7 @@ try_again:
|
||||
|
||||
if (err == ENOENT) {
|
||||
ui__error("The %s event is not supported.\n",
|
||||
event_name(pos));
|
||||
perf_evsel__name(pos));
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
@@ -916,7 +916,7 @@ int cmd_record(int argc, const char **argv, const char *prefix __used)
|
||||
usage_with_options(record_usage, record_options);
|
||||
|
||||
list_for_each_entry(pos, &evsel_list->entries, node) {
|
||||
if (perf_header__push_event(pos->attr.config, event_name(pos)))
|
||||
if (perf_header__push_event(pos->attr.config, perf_evsel__name(pos)))
|
||||
goto out_free_fd;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user