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.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 7e383de4
...@@ -459,7 +459,7 @@ size_t hists__fprintf(struct hists *hists, bool show_header, int max_rows, ...@@ -459,7 +459,7 @@ size_t hists__fprintf(struct hists *hists, bool show_header, int max_rows,
return ret; return ret;
} }
size_t hists__fprintf_nr_events(struct hists *hists, FILE *fp) size_t events_stats__fprintf(struct events_stats *stats, FILE *fp)
{ {
int i; int i;
size_t ret = 0; size_t ret = 0;
...@@ -467,7 +467,7 @@ size_t hists__fprintf_nr_events(struct hists *hists, FILE *fp) ...@@ -467,7 +467,7 @@ size_t hists__fprintf_nr_events(struct hists *hists, FILE *fp)
for (i = 0; i < PERF_RECORD_HEADER_MAX; ++i) { for (i = 0; i < PERF_RECORD_HEADER_MAX; ++i) {
const char *name; const char *name;
if (hists->stats.nr_events[i] == 0) if (stats->nr_events[i] == 0)
continue; continue;
name = perf_event__name(i); name = perf_event__name(i);
...@@ -475,7 +475,7 @@ size_t hists__fprintf_nr_events(struct hists *hists, FILE *fp) ...@@ -475,7 +475,7 @@ size_t hists__fprintf_nr_events(struct hists *hists, FILE *fp)
continue; continue;
ret += fprintf(fp, "%16s events: %10d\n", name, ret += fprintf(fp, "%16s events: %10d\n", name,
hists->stats.nr_events[i]); stats->nr_events[i]);
} }
return ret; return ret;
......
...@@ -98,7 +98,7 @@ void hists__output_recalc_col_len(struct hists *hists, int max_rows); ...@@ -98,7 +98,7 @@ void hists__output_recalc_col_len(struct hists *hists, int max_rows);
void hists__inc_nr_entries(struct hists *hists, struct hist_entry *h); void hists__inc_nr_entries(struct hists *hists, struct hist_entry *h);
void hists__inc_nr_events(struct hists *self, u32 type); void hists__inc_nr_events(struct hists *self, u32 type);
size_t hists__fprintf_nr_events(struct hists *self, FILE *fp); size_t events_stats__fprintf(struct events_stats *stats, FILE *fp);
size_t hists__fprintf(struct hists *self, bool show_header, int max_rows, size_t hists__fprintf(struct hists *self, bool show_header, int max_rows,
int max_cols, FILE *fp); int max_cols, FILE *fp);
......
...@@ -1353,11 +1353,11 @@ size_t perf_session__fprintf_nr_events(struct perf_session *session, FILE *fp) ...@@ -1353,11 +1353,11 @@ size_t perf_session__fprintf_nr_events(struct perf_session *session, FILE *fp)
struct perf_evsel *pos; struct perf_evsel *pos;
size_t ret = fprintf(fp, "Aggregated stats:\n"); size_t ret = fprintf(fp, "Aggregated stats:\n");
ret += hists__fprintf_nr_events(&session->hists, fp); ret += events_stats__fprintf(&session->hists.stats, fp);
list_for_each_entry(pos, &session->evlist->entries, node) { list_for_each_entry(pos, &session->evlist->entries, node) {
ret += fprintf(fp, "%s stats:\n", perf_evsel__name(pos)); ret += fprintf(fp, "%s stats:\n", perf_evsel__name(pos));
ret += hists__fprintf_nr_events(&pos->hists, fp); ret += events_stats__fprintf(&pos->hists.stats, fp);
} }
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment