diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-06-12 11:34:58 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-06-19 12:06:20 -0400 |
commit | 7289f83cceb437ca56c77eb45b8b1cda15e2e476 (patch) | |
tree | 5f4e98492f34a80b5332db8336e7749091d183c1 /tools/perf/builtin-stat.c | |
parent | a446083604fe2bafe0f46b1e95b22f7b06e3a63f (diff) |
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>
Diffstat (limited to 'tools/perf/builtin-stat.c')
-rw-r--r-- | tools/perf/builtin-stat.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index 262589991ea4..875bf2675326 100644 --- a/tools/perf/builtin-stat.c +++ b/tools/perf/builtin-stat.c | |||
@@ -391,7 +391,7 @@ static int read_counter_aggr(struct perf_evsel *counter) | |||
391 | 391 | ||
392 | if (verbose) { | 392 | if (verbose) { |
393 | fprintf(output, "%s: %" PRIu64 " %" PRIu64 " %" PRIu64 "\n", | 393 | fprintf(output, "%s: %" PRIu64 " %" PRIu64 " %" PRIu64 "\n", |
394 | event_name(counter), count[0], count[1], count[2]); | 394 | perf_evsel__name(counter), count[0], count[1], count[2]); |
395 | } | 395 | } |
396 | 396 | ||
397 | /* | 397 | /* |
@@ -496,7 +496,7 @@ static int run_perf_stat(int argc __used, const char **argv) | |||
496 | errno == ENXIO) { | 496 | errno == ENXIO) { |
497 | if (verbose) | 497 | if (verbose) |
498 | ui__warning("%s event is not supported by the kernel.\n", | 498 | ui__warning("%s event is not supported by the kernel.\n", |
499 | event_name(counter)); | 499 | perf_evsel__name(counter)); |
500 | counter->supported = false; | 500 | counter->supported = false; |
501 | continue; | 501 | continue; |
502 | } | 502 | } |
@@ -594,7 +594,7 @@ static void nsec_printout(int cpu, struct perf_evsel *evsel, double avg) | |||
594 | csv_output ? 0 : -4, | 594 | csv_output ? 0 : -4, |
595 | evsel_list->cpus->map[cpu], csv_sep); | 595 | evsel_list->cpus->map[cpu], csv_sep); |
596 | 596 | ||
597 | fprintf(output, fmt, cpustr, msecs, csv_sep, event_name(evsel)); | 597 | fprintf(output, fmt, cpustr, msecs, csv_sep, perf_evsel__name(evsel)); |
598 | 598 | ||
599 | if (evsel->cgrp) | 599 | if (evsel->cgrp) |
600 | fprintf(output, "%s%s", csv_sep, evsel->cgrp->name); | 600 | fprintf(output, "%s%s", csv_sep, evsel->cgrp->name); |
@@ -792,7 +792,7 @@ static void abs_printout(int cpu, struct perf_evsel *evsel, double avg) | |||
792 | else | 792 | else |
793 | cpu = 0; | 793 | cpu = 0; |
794 | 794 | ||
795 | fprintf(output, fmt, cpustr, avg, csv_sep, event_name(evsel)); | 795 | fprintf(output, fmt, cpustr, avg, csv_sep, perf_evsel__name(evsel)); |
796 | 796 | ||
797 | if (evsel->cgrp) | 797 | if (evsel->cgrp) |
798 | fprintf(output, "%s%s", csv_sep, evsel->cgrp->name); | 798 | fprintf(output, "%s%s", csv_sep, evsel->cgrp->name); |
@@ -908,7 +908,7 @@ static void print_counter_aggr(struct perf_evsel *counter) | |||
908 | counter->supported ? CNTR_NOT_COUNTED : CNTR_NOT_SUPPORTED, | 908 | counter->supported ? CNTR_NOT_COUNTED : CNTR_NOT_SUPPORTED, |
909 | csv_sep, | 909 | csv_sep, |
910 | csv_output ? 0 : -24, | 910 | csv_output ? 0 : -24, |
911 | event_name(counter)); | 911 | perf_evsel__name(counter)); |
912 | 912 | ||
913 | if (counter->cgrp) | 913 | if (counter->cgrp) |
914 | fprintf(output, "%s%s", csv_sep, counter->cgrp->name); | 914 | fprintf(output, "%s%s", csv_sep, counter->cgrp->name); |
@@ -961,7 +961,7 @@ static void print_counter(struct perf_evsel *counter) | |||
961 | counter->supported ? CNTR_NOT_COUNTED : CNTR_NOT_SUPPORTED, | 961 | counter->supported ? CNTR_NOT_COUNTED : CNTR_NOT_SUPPORTED, |
962 | csv_sep, | 962 | csv_sep, |
963 | csv_output ? 0 : -24, | 963 | csv_output ? 0 : -24, |
964 | event_name(counter)); | 964 | perf_evsel__name(counter)); |
965 | 965 | ||
966 | if (counter->cgrp) | 966 | if (counter->cgrp) |
967 | fprintf(output, "%s%s", | 967 | fprintf(output, "%s%s", |