Skip to content

Commit

Permalink
perf hists: Rename hists__inc_stats()
Browse files Browse the repository at this point in the history
The existing hists__inc_nr_entries() is a misnomer as it's not only
increasing ->nr_entries but also other stats.  So rename it to more
general hists__inc_stats().

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/r/1398327843-31845-3-git-send-email-namhyung@kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
  • Loading branch information
Namhyung Kim authored and Jiri Olsa committed Apr 24, 2014
1 parent 58c311d commit 6263835
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tools/perf/builtin-diff.c
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ static void hists__compute_resort(struct hists *hists)
next = rb_next(&he->rb_node_in);

insert_hist_entry_by_compute(&hists->entries, he, compute);
hists__inc_nr_entries(hists, he);
hists__inc_stats(hists, he);
}
}

Expand Down
6 changes: 3 additions & 3 deletions tools/perf/util/hist.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ static struct hist_entry *hist_entry__new(struct hist_entry *template)
return he;
}

void hists__inc_nr_entries(struct hists *hists, struct hist_entry *h)
void hists__inc_stats(struct hists *hists, struct hist_entry *h)
{
if (!h->filtered) {
hists__calc_col_len(hists, h);
Expand Down Expand Up @@ -686,7 +686,7 @@ void hists__output_resort(struct hists *hists)
next = rb_next(&n->rb_node_in);

__hists__insert_output_entry(&hists->entries, n, min_callchain_hits);
hists__inc_nr_entries(hists, n);
hists__inc_stats(hists, n);
}
}

Expand Down Expand Up @@ -853,7 +853,7 @@ static struct hist_entry *hists__add_dummy_entry(struct hists *hists,
he->hists = hists;
rb_link_node(&he->rb_node_in, parent, p);
rb_insert_color(&he->rb_node_in, root);
hists__inc_nr_entries(hists, he);
hists__inc_stats(hists, he);
he->dummy = true;
}
out:
Expand Down
2 changes: 1 addition & 1 deletion tools/perf/util/hist.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ void hists__decay_entries(struct hists *hists, bool zap_user, bool zap_kernel);
void hists__output_recalc_col_len(struct hists *hists, int max_rows);

u64 hists__total_period(struct hists *hists);
void hists__inc_nr_entries(struct hists *hists, struct hist_entry *h);
void hists__inc_stats(struct hists *hists, struct hist_entry *h);
void hists__inc_nr_events(struct hists *hists, u32 type);
void events_stats__inc(struct events_stats *stats, u32 type);
size_t events_stats__fprintf(struct events_stats *stats, FILE *fp);
Expand Down

0 comments on commit 6263835

Please sign in to comment.