diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-12-18 14:02:17 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-01-24 14:40:11 -0500 |
commit | 52168eea32cc01377b31c1ca9a759eae06830ea0 (patch) | |
tree | 025c8ddc82518bf0e8ea508e98fca7d4f18a9519 /tools/perf | |
parent | 7e383de42565ecb2cf641fff11946f9bc45e8235 (diff) |
perf hists: Rename hists__fprintf_nr_events to events_stats__fprintf
As this function deals exclusively with hists->stats.
Preparatory patch for removing the by now needless session->hists, that
should be just session->stats.
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-be0o8si9f1z40cwoa534f7me@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/ui/stdio/hist.c | 6 | ||||
-rw-r--r-- | tools/perf/util/hist.h | 2 | ||||
-rw-r--r-- | tools/perf/util/session.c | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/tools/perf/ui/stdio/hist.c b/tools/perf/ui/stdio/hist.c index 0eae3b2c32f2..f9798298e3e0 100644 --- a/tools/perf/ui/stdio/hist.c +++ b/tools/perf/ui/stdio/hist.c | |||
@@ -459,7 +459,7 @@ out: | |||
459 | return ret; | 459 | return ret; |
460 | } | 460 | } |
461 | 461 | ||
462 | size_t hists__fprintf_nr_events(struct hists *hists, FILE *fp) | 462 | size_t events_stats__fprintf(struct events_stats *stats, FILE *fp) |
463 | { | 463 | { |
464 | int i; | 464 | int i; |
465 | size_t ret = 0; | 465 | size_t ret = 0; |
@@ -467,7 +467,7 @@ size_t hists__fprintf_nr_events(struct hists *hists, FILE *fp) | |||
467 | for (i = 0; i < PERF_RECORD_HEADER_MAX; ++i) { | 467 | for (i = 0; i < PERF_RECORD_HEADER_MAX; ++i) { |
468 | const char *name; | 468 | const char *name; |
469 | 469 | ||
470 | if (hists->stats.nr_events[i] == 0) | 470 | if (stats->nr_events[i] == 0) |
471 | continue; | 471 | continue; |
472 | 472 | ||
473 | name = perf_event__name(i); | 473 | name = perf_event__name(i); |
@@ -475,7 +475,7 @@ size_t hists__fprintf_nr_events(struct hists *hists, FILE *fp) | |||
475 | continue; | 475 | continue; |
476 | 476 | ||
477 | ret += fprintf(fp, "%16s events: %10d\n", name, | 477 | ret += fprintf(fp, "%16s events: %10d\n", name, |
478 | hists->stats.nr_events[i]); | 478 | stats->nr_events[i]); |
479 | } | 479 | } |
480 | 480 | ||
481 | return ret; | 481 | return ret; |
diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h index d3664abea6d6..cb6533b2977a 100644 --- a/tools/perf/util/hist.h +++ b/tools/perf/util/hist.h | |||
@@ -98,7 +98,7 @@ void hists__output_recalc_col_len(struct hists *hists, int max_rows); | |||
98 | 98 | ||
99 | void hists__inc_nr_entries(struct hists *hists, struct hist_entry *h); | 99 | void hists__inc_nr_entries(struct hists *hists, struct hist_entry *h); |
100 | void hists__inc_nr_events(struct hists *self, u32 type); | 100 | void hists__inc_nr_events(struct hists *self, u32 type); |
101 | size_t hists__fprintf_nr_events(struct hists *self, FILE *fp); | 101 | size_t events_stats__fprintf(struct events_stats *stats, FILE *fp); |
102 | 102 | ||
103 | size_t hists__fprintf(struct hists *self, bool show_header, int max_rows, | 103 | size_t hists__fprintf(struct hists *self, bool show_header, int max_rows, |
104 | int max_cols, FILE *fp); | 104 | int max_cols, FILE *fp); |
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index 76d6e257b8a4..6e8dd2abcf0b 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c | |||
@@ -1353,11 +1353,11 @@ size_t perf_session__fprintf_nr_events(struct perf_session *session, FILE *fp) | |||
1353 | struct perf_evsel *pos; | 1353 | struct perf_evsel *pos; |
1354 | size_t ret = fprintf(fp, "Aggregated stats:\n"); | 1354 | size_t ret = fprintf(fp, "Aggregated stats:\n"); |
1355 | 1355 | ||
1356 | ret += hists__fprintf_nr_events(&session->hists, fp); | 1356 | ret += events_stats__fprintf(&session->hists.stats, fp); |
1357 | 1357 | ||
1358 | list_for_each_entry(pos, &session->evlist->entries, node) { | 1358 | list_for_each_entry(pos, &session->evlist->entries, node) { |
1359 | ret += fprintf(fp, "%s stats:\n", perf_evsel__name(pos)); | 1359 | ret += fprintf(fp, "%s stats:\n", perf_evsel__name(pos)); |
1360 | ret += hists__fprintf_nr_events(&pos->hists, fp); | 1360 | ret += events_stats__fprintf(&pos->hists.stats, fp); |
1361 | } | 1361 | } |
1362 | 1362 | ||
1363 | return ret; | 1363 | return ret; |