aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf')
-rw-r--r--tools/perf/util/hist.c34
1 files changed, 18 insertions, 16 deletions
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index 4df449549b0c..6f505d1abac7 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -919,20 +919,6 @@ size_t hists__fprintf(struct hists *hists, struct hists *pair,
919 919
920 fprintf(fp, "# %s", pair ? "Baseline" : "Overhead"); 920 fprintf(fp, "# %s", pair ? "Baseline" : "Overhead");
921 921
922 if (symbol_conf.show_nr_samples) {
923 if (sep)
924 fprintf(fp, "%cSamples", *sep);
925 else
926 fputs(" Samples ", fp);
927 }
928
929 if (symbol_conf.show_total_period) {
930 if (sep)
931 ret += fprintf(fp, "%cPeriod", *sep);
932 else
933 ret += fprintf(fp, " Period ");
934 }
935
936 if (symbol_conf.show_cpu_utilization) { 922 if (symbol_conf.show_cpu_utilization) {
937 if (sep) { 923 if (sep) {
938 ret += fprintf(fp, "%csys", *sep); 924 ret += fprintf(fp, "%csys", *sep);
@@ -942,8 +928,8 @@ size_t hists__fprintf(struct hists *hists, struct hists *pair,
942 ret += fprintf(fp, "%cguest us", *sep); 928 ret += fprintf(fp, "%cguest us", *sep);
943 } 929 }
944 } else { 930 } else {
945 ret += fprintf(fp, " sys "); 931 ret += fprintf(fp, " sys ");
946 ret += fprintf(fp, " us "); 932 ret += fprintf(fp, " us ");
947 if (perf_guest) { 933 if (perf_guest) {
948 ret += fprintf(fp, " guest sys "); 934 ret += fprintf(fp, " guest sys ");
949 ret += fprintf(fp, " guest us "); 935 ret += fprintf(fp, " guest us ");
@@ -951,6 +937,20 @@ size_t hists__fprintf(struct hists *hists, struct hists *pair,
951 } 937 }
952 } 938 }
953 939
940 if (symbol_conf.show_nr_samples) {
941 if (sep)
942 fprintf(fp, "%cSamples", *sep);
943 else
944 fputs(" Samples ", fp);
945 }
946
947 if (symbol_conf.show_total_period) {
948 if (sep)
949 ret += fprintf(fp, "%cPeriod", *sep);
950 else
951 ret += fprintf(fp, " Period ");
952 }
953
954 if (pair) { 954 if (pair) {
955 if (sep) 955 if (sep)
956 ret += fprintf(fp, "%cDelta", *sep); 956 ret += fprintf(fp, "%cDelta", *sep);
@@ -995,6 +995,8 @@ size_t hists__fprintf(struct hists *hists, struct hists *pair,
995 goto print_entries; 995 goto print_entries;
996 996
997 fprintf(fp, "# ........"); 997 fprintf(fp, "# ........");
998 if (symbol_conf.show_cpu_utilization)
999 fprintf(fp, " ....... .......");
998 if (symbol_conf.show_nr_samples) 1000 if (symbol_conf.show_nr_samples)
999 fprintf(fp, " .........."); 1001 fprintf(fp, " ..........");
1000 if (symbol_conf.show_total_period) 1002 if (symbol_conf.show_total_period)