diff options
Diffstat (limited to 'tools/perf/util/hist.c')
-rw-r--r-- | tools/perf/util/hist.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c index 24cca0a7ffa3..32c90865940f 100644 --- a/tools/perf/util/hist.c +++ b/tools/perf/util/hist.c | |||
@@ -664,6 +664,13 @@ int hist_entry__snprintf(struct hist_entry *self, char *s, size_t size, | |||
664 | ret += snprintf(s + ret, size - ret, "%11" PRIu64, nr_events); | 664 | ret += snprintf(s + ret, size - ret, "%11" PRIu64, nr_events); |
665 | } | 665 | } |
666 | 666 | ||
667 | if (symbol_conf.show_total_period) { | ||
668 | if (sep) | ||
669 | ret += snprintf(s + ret, size - ret, "%c%" PRIu64, *sep, period); | ||
670 | else | ||
671 | ret += snprintf(s + ret, size - ret, " %12" PRIu64, period); | ||
672 | } | ||
673 | |||
667 | if (pair_hists) { | 674 | if (pair_hists) { |
668 | char bf[32]; | 675 | char bf[32]; |
669 | double old_percent = 0, new_percent = 0, diff; | 676 | double old_percent = 0, new_percent = 0, diff; |
@@ -770,6 +777,13 @@ size_t hists__fprintf(struct hists *hists, struct hists *pair, | |||
770 | fputs(" Samples ", fp); | 777 | fputs(" Samples ", fp); |
771 | } | 778 | } |
772 | 779 | ||
780 | if (symbol_conf.show_total_period) { | ||
781 | if (sep) | ||
782 | ret += fprintf(fp, "%cPeriod", *sep); | ||
783 | else | ||
784 | ret += fprintf(fp, " Period "); | ||
785 | } | ||
786 | |||
773 | if (symbol_conf.show_cpu_utilization) { | 787 | if (symbol_conf.show_cpu_utilization) { |
774 | if (sep) { | 788 | if (sep) { |
775 | ret += fprintf(fp, "%csys", *sep); | 789 | ret += fprintf(fp, "%csys", *sep); |
@@ -834,6 +848,8 @@ size_t hists__fprintf(struct hists *hists, struct hists *pair, | |||
834 | fprintf(fp, "# ........"); | 848 | fprintf(fp, "# ........"); |
835 | if (symbol_conf.show_nr_samples) | 849 | if (symbol_conf.show_nr_samples) |
836 | fprintf(fp, " .........."); | 850 | fprintf(fp, " .........."); |
851 | if (symbol_conf.show_total_period) | ||
852 | fprintf(fp, " ............"); | ||
837 | if (pair) { | 853 | if (pair) { |
838 | fprintf(fp, " .........."); | 854 | fprintf(fp, " .........."); |
839 | if (show_displacement) | 855 | if (show_displacement) |
@@ -917,6 +933,9 @@ unsigned int hists__sort_list_width(struct hists *hists) | |||
917 | if (symbol_conf.show_nr_samples) | 933 | if (symbol_conf.show_nr_samples) |
918 | ret += 11; | 934 | ret += 11; |
919 | 935 | ||
936 | if (symbol_conf.show_total_period) | ||
937 | ret += 13; | ||
938 | |||
920 | list_for_each_entry(se, &hist_entry__sort_list, list) | 939 | list_for_each_entry(se, &hist_entry__sort_list, list) |
921 | if (!se->elide) | 940 | if (!se->elide) |
922 | ret += 2 + hists__col_len(hists, se->se_width_idx); | 941 | ret += 2 + hists__col_len(hists, se->se_width_idx); |