Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

perf hists: Rename __hists__add_entry to hists__add_entry

There's no reason we should suffer the '__' prefix for the base global
function.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1465928361-2442-12-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Jiri Olsa and committed by
Arnaldo Carvalho de Melo
0102ef3e cbb0bba9

+28 -38
+1 -1
tools/perf/builtin-annotate.c
··· 75 75 sample->period = 1; 76 76 sample->weight = 1; 77 77 78 - he = __hists__add_entry(hists, al, NULL, NULL, NULL, sample, true); 78 + he = hists__add_entry(hists, al, NULL, NULL, NULL, sample, true); 79 79 if (he == NULL) 80 80 return -ENOMEM; 81 81
+1 -11
tools/perf/builtin-diff.c
··· 310 310 return -1; 311 311 } 312 312 313 - static int hists__add_entry(struct hists *hists, 314 - struct addr_location *al, 315 - struct perf_sample *sample) 316 - { 317 - if (__hists__add_entry(hists, al, NULL, NULL, NULL, 318 - sample, true) != NULL) 319 - return 0; 320 - return -ENOMEM; 321 - } 322 - 323 313 static int diff__process_sample_event(struct perf_tool *tool __maybe_unused, 324 314 union perf_event *event, 325 315 struct perf_sample *sample, ··· 326 336 return -1; 327 337 } 328 338 329 - if (hists__add_entry(hists, &al, sample)) { 339 + if (!hists__add_entry(hists, &al, NULL, NULL, NULL, sample, true)) { 330 340 pr_warning("problem incrementing symbol period, skipping event\n"); 331 341 goto out_put; 332 342 }
+2 -2
tools/perf/tests/hists_link.c
··· 84 84 if (machine__resolve(machine, &al, &sample) < 0) 85 85 goto out; 86 86 87 - he = __hists__add_entry(hists, &al, NULL, 87 + he = hists__add_entry(hists, &al, NULL, 88 88 NULL, NULL, &sample, true); 89 89 if (he == NULL) { 90 90 addr_location__put(&al); ··· 103 103 if (machine__resolve(machine, &al, &sample) < 0) 104 104 goto out; 105 105 106 - he = __hists__add_entry(hists, &al, NULL, 106 + he = hists__add_entry(hists, &al, NULL, 107 107 NULL, NULL, &sample, true); 108 108 if (he == NULL) { 109 109 addr_location__put(&al);
+17 -17
tools/perf/util/hist.c
··· 531 531 return he; 532 532 } 533 533 534 - struct hist_entry *__hists__add_entry(struct hists *hists, 535 - struct addr_location *al, 536 - struct symbol *sym_parent, 537 - struct branch_info *bi, 538 - struct mem_info *mi, 539 - struct perf_sample *sample, 540 - bool sample_self) 534 + struct hist_entry *hists__add_entry(struct hists *hists, 535 + struct addr_location *al, 536 + struct symbol *sym_parent, 537 + struct branch_info *bi, 538 + struct mem_info *mi, 539 + struct perf_sample *sample, 540 + bool sample_self) 541 541 { 542 542 struct hist_entry entry = { 543 543 .thread = al->thread, ··· 622 622 */ 623 623 sample->period = cost; 624 624 625 - he = __hists__add_entry(hists, al, iter->parent, NULL, mi, 626 - sample, true); 625 + he = hists__add_entry(hists, al, iter->parent, NULL, mi, 626 + sample, true); 627 627 if (!he) 628 628 return -ENOMEM; 629 629 ··· 727 727 sample->period = 1; 728 728 sample->weight = bi->flags.cycles ? bi->flags.cycles : 1; 729 729 730 - he = __hists__add_entry(hists, al, iter->parent, &bi[i], NULL, 731 - sample, true); 730 + he = hists__add_entry(hists, al, iter->parent, &bi[i], NULL, 731 + sample, true); 732 732 if (he == NULL) 733 733 return -ENOMEM; 734 734 ··· 764 764 struct perf_sample *sample = iter->sample; 765 765 struct hist_entry *he; 766 766 767 - he = __hists__add_entry(evsel__hists(evsel), al, iter->parent, NULL, NULL, 768 - sample, true); 767 + he = hists__add_entry(evsel__hists(evsel), al, iter->parent, NULL, NULL, 768 + sample, true); 769 769 if (he == NULL) 770 770 return -ENOMEM; 771 771 ··· 825 825 struct hist_entry *he; 826 826 int err = 0; 827 827 828 - he = __hists__add_entry(hists, al, iter->parent, NULL, NULL, 829 - sample, true); 828 + he = hists__add_entry(hists, al, iter->parent, NULL, NULL, 829 + sample, true); 830 830 if (he == NULL) 831 831 return -ENOMEM; 832 832 ··· 900 900 } 901 901 } 902 902 903 - he = __hists__add_entry(evsel__hists(evsel), al, iter->parent, NULL, NULL, 904 - sample, false); 903 + he = hists__add_entry(evsel__hists(evsel), al, iter->parent, NULL, NULL, 904 + sample, false); 905 905 if (he == NULL) 906 906 return -ENOMEM; 907 907
+7 -7
tools/perf/util/hist.h
··· 120 120 extern const struct hist_iter_ops hist_iter_mem; 121 121 extern const struct hist_iter_ops hist_iter_cumulative; 122 122 123 - struct hist_entry *__hists__add_entry(struct hists *hists, 124 - struct addr_location *al, 125 - struct symbol *parent, 126 - struct branch_info *bi, 127 - struct mem_info *mi, 128 - struct perf_sample *sample, 129 - bool sample_self); 123 + struct hist_entry *hists__add_entry(struct hists *hists, 124 + struct addr_location *al, 125 + struct symbol *parent, 126 + struct branch_info *bi, 127 + struct mem_info *mi, 128 + struct perf_sample *sample, 129 + bool sample_self); 130 130 int hist_entry_iter__add(struct hist_entry_iter *iter, struct addr_location *al, 131 131 int max_stack_depth, void *arg); 132 132