aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2014-04-24 03:21:46 -0400
committerJiri Olsa <jolsa@kernel.org>2014-04-24 10:30:30 -0400
commit6263835a1b1ad137f3c26a1383c0487a9388d06e (patch)
tree182e8d9566b516e55ce853be1eb4813dd950cdbf
parent58c311da9cec97d7a665156a726bd1653384c65c (diff)
perf hists: Rename hists__inc_stats()
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>
-rw-r--r--tools/perf/builtin-diff.c2
-rw-r--r--tools/perf/util/hist.c6
-rw-r--r--tools/perf/util/hist.h2
3 files changed, 5 insertions, 5 deletions
diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c
index 6ef80f22c1e2..0e46fa1b5ca0 100644
--- a/tools/perf/builtin-diff.c
+++ b/tools/perf/builtin-diff.c
@@ -586,7 +586,7 @@ static void hists__compute_resort(struct hists *hists)
586 next = rb_next(&he->rb_node_in); 586 next = rb_next(&he->rb_node_in);
587 587
588 insert_hist_entry_by_compute(&hists->entries, he, compute); 588 insert_hist_entry_by_compute(&hists->entries, he, compute);
589 hists__inc_nr_entries(hists, he); 589 hists__inc_stats(hists, he);
590 } 590 }
591} 591}
592 592
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index 5a892477aa50..12d6c1bd761d 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -317,7 +317,7 @@ static struct hist_entry *hist_entry__new(struct hist_entry *template)
317 return he; 317 return he;
318} 318}
319 319
320void hists__inc_nr_entries(struct hists *hists, struct hist_entry *h) 320void hists__inc_stats(struct hists *hists, struct hist_entry *h)
321{ 321{
322 if (!h->filtered) { 322 if (!h->filtered) {
323 hists__calc_col_len(hists, h); 323 hists__calc_col_len(hists, h);
@@ -686,7 +686,7 @@ void hists__output_resort(struct hists *hists)
686 next = rb_next(&n->rb_node_in); 686 next = rb_next(&n->rb_node_in);
687 687
688 __hists__insert_output_entry(&hists->entries, n, min_callchain_hits); 688 __hists__insert_output_entry(&hists->entries, n, min_callchain_hits);
689 hists__inc_nr_entries(hists, n); 689 hists__inc_stats(hists, n);
690 } 690 }
691} 691}
692 692
@@ -853,7 +853,7 @@ static struct hist_entry *hists__add_dummy_entry(struct hists *hists,
853 he->hists = hists; 853 he->hists = hists;
854 rb_link_node(&he->rb_node_in, parent, p); 854 rb_link_node(&he->rb_node_in, parent, p);
855 rb_insert_color(&he->rb_node_in, root); 855 rb_insert_color(&he->rb_node_in, root);
856 hists__inc_nr_entries(hists, he); 856 hists__inc_stats(hists, he);
857 he->dummy = true; 857 he->dummy = true;
858 } 858 }
859out: 859out:
diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h
index 5a0343eb22e2..51478c94d976 100644
--- a/tools/perf/util/hist.h
+++ b/tools/perf/util/hist.h
@@ -116,7 +116,7 @@ void hists__decay_entries(struct hists *hists, bool zap_user, bool zap_kernel);
116void hists__output_recalc_col_len(struct hists *hists, int max_rows); 116void hists__output_recalc_col_len(struct hists *hists, int max_rows);
117 117
118u64 hists__total_period(struct hists *hists); 118u64 hists__total_period(struct hists *hists);
119void hists__inc_nr_entries(struct hists *hists, struct hist_entry *h); 119void hists__inc_stats(struct hists *hists, struct hist_entry *h);
120void hists__inc_nr_events(struct hists *hists, u32 type); 120void hists__inc_nr_events(struct hists *hists, u32 type);
121void events_stats__inc(struct events_stats *stats, u32 type); 121void events_stats__inc(struct events_stats *stats, u32 type);
122size_t events_stats__fprintf(struct events_stats *stats, FILE *fp); 122size_t events_stats__fprintf(struct events_stats *stats, FILE *fp);