diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-01-04 08:37:15 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-01-06 12:42:08 -0500 |
commit | 13d3ee5402970216291d2c514c2ba33ef8a0e8c1 (patch) | |
tree | 79928197e3272259fb41e47cba1eda8b9bfe9067 /tools/perf/util | |
parent | 9e183426bfb52bb44bf3c443d6587e4d02478603 (diff) |
perf hists: Rename total_session to total_period
Nowadays we do it per evsel, not per session (that may have multiple
evsels), so rename it to avoid confusion.
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
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-azsgomr5h4dmaudoogw48w49@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util')
-rw-r--r-- | tools/perf/util/hist.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c index abef2703cd24..20059d1c5591 100644 --- a/tools/perf/util/hist.c +++ b/tools/perf/util/hist.c | |||
@@ -733,7 +733,7 @@ void hists__output_recalc_col_len(struct hists *hists, int max_rows) | |||
733 | static int hist_entry__pcnt_snprintf(struct hist_entry *self, char *s, | 733 | static int hist_entry__pcnt_snprintf(struct hist_entry *self, char *s, |
734 | size_t size, struct hists *pair_hists, | 734 | size_t size, struct hists *pair_hists, |
735 | bool show_displacement, long displacement, | 735 | bool show_displacement, long displacement, |
736 | bool color, u64 session_total) | 736 | bool color, u64 total_period) |
737 | { | 737 | { |
738 | u64 period, total, period_sys, period_us, period_guest_sys, period_guest_us; | 738 | u64 period, total, period_sys, period_us, period_guest_sys, period_guest_us; |
739 | u64 nr_events; | 739 | u64 nr_events; |
@@ -754,7 +754,7 @@ static int hist_entry__pcnt_snprintf(struct hist_entry *self, char *s, | |||
754 | } else { | 754 | } else { |
755 | period = self->period; | 755 | period = self->period; |
756 | nr_events = self->nr_events; | 756 | nr_events = self->nr_events; |
757 | total = session_total; | 757 | total = total_period; |
758 | period_sys = self->period_sys; | 758 | period_sys = self->period_sys; |
759 | period_us = self->period_us; | 759 | period_us = self->period_us; |
760 | period_guest_sys = self->period_guest_sys; | 760 | period_guest_sys = self->period_guest_sys; |
@@ -812,8 +812,8 @@ static int hist_entry__pcnt_snprintf(struct hist_entry *self, char *s, | |||
812 | 812 | ||
813 | if (total > 0) | 813 | if (total > 0) |
814 | old_percent = (period * 100.0) / total; | 814 | old_percent = (period * 100.0) / total; |
815 | if (session_total > 0) | 815 | if (total_period > 0) |
816 | new_percent = (self->period * 100.0) / session_total; | 816 | new_percent = (self->period * 100.0) / total_period; |
817 | 817 | ||
818 | diff = new_percent - old_percent; | 818 | diff = new_percent - old_percent; |
819 | 819 | ||
@@ -864,7 +864,7 @@ int hist_entry__snprintf(struct hist_entry *he, char *s, size_t size, | |||
864 | 864 | ||
865 | int hist_entry__fprintf(struct hist_entry *he, size_t size, struct hists *hists, | 865 | int hist_entry__fprintf(struct hist_entry *he, size_t size, struct hists *hists, |
866 | struct hists *pair_hists, bool show_displacement, | 866 | struct hists *pair_hists, bool show_displacement, |
867 | long displacement, FILE *fp, u64 session_total) | 867 | long displacement, FILE *fp, u64 total_period) |
868 | { | 868 | { |
869 | char bf[512]; | 869 | char bf[512]; |
870 | int ret; | 870 | int ret; |
@@ -874,14 +874,14 @@ int hist_entry__fprintf(struct hist_entry *he, size_t size, struct hists *hists, | |||
874 | 874 | ||
875 | ret = hist_entry__pcnt_snprintf(he, bf, size, pair_hists, | 875 | ret = hist_entry__pcnt_snprintf(he, bf, size, pair_hists, |
876 | show_displacement, displacement, | 876 | show_displacement, displacement, |
877 | true, session_total); | 877 | true, total_period); |
878 | hist_entry__snprintf(he, bf + ret, size - ret, hists); | 878 | hist_entry__snprintf(he, bf + ret, size - ret, hists); |
879 | return fprintf(fp, "%s\n", bf); | 879 | return fprintf(fp, "%s\n", bf); |
880 | } | 880 | } |
881 | 881 | ||
882 | static size_t hist_entry__fprintf_callchain(struct hist_entry *self, | 882 | static size_t hist_entry__fprintf_callchain(struct hist_entry *self, |
883 | struct hists *hists, FILE *fp, | 883 | struct hists *hists, FILE *fp, |
884 | u64 session_total) | 884 | u64 total_period) |
885 | { | 885 | { |
886 | int left_margin = 0; | 886 | int left_margin = 0; |
887 | 887 | ||
@@ -892,7 +892,7 @@ static size_t hist_entry__fprintf_callchain(struct hist_entry *self, | |||
892 | left_margin -= thread__comm_len(self->thread); | 892 | left_margin -= thread__comm_len(self->thread); |
893 | } | 893 | } |
894 | 894 | ||
895 | return hist_entry_callchain__fprintf(fp, self, session_total, | 895 | return hist_entry_callchain__fprintf(fp, self, total_period, |
896 | left_margin); | 896 | left_margin); |
897 | } | 897 | } |
898 | 898 | ||