|
@@ -47,11 +47,26 @@ static int perf_gtk__hpp_color_##_type(struct perf_hpp_fmt *fmt __maybe_unused,
|
|
__percent_color_snprintf, true); \
|
|
__percent_color_snprintf, true); \
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+#define __HPP_COLOR_ACC_PERCENT_FN(_type, _field) \
|
|
|
|
+static u64 he_get_acc_##_field(struct hist_entry *he) \
|
|
|
|
+{ \
|
|
|
|
+ return he->stat_acc->_field; \
|
|
|
|
+} \
|
|
|
|
+ \
|
|
|
|
+static int perf_gtk__hpp_color_##_type(struct perf_hpp_fmt *fmt __maybe_unused, \
|
|
|
|
+ struct perf_hpp *hpp, \
|
|
|
|
+ struct hist_entry *he) \
|
|
|
|
+{ \
|
|
|
|
+ return __hpp__fmt_acc(hpp, he, he_get_acc_##_field, " %6.2f%%", \
|
|
|
|
+ __percent_color_snprintf, true); \
|
|
|
|
+}
|
|
|
|
+
|
|
__HPP_COLOR_PERCENT_FN(overhead, period)
|
|
__HPP_COLOR_PERCENT_FN(overhead, period)
|
|
__HPP_COLOR_PERCENT_FN(overhead_sys, period_sys)
|
|
__HPP_COLOR_PERCENT_FN(overhead_sys, period_sys)
|
|
__HPP_COLOR_PERCENT_FN(overhead_us, period_us)
|
|
__HPP_COLOR_PERCENT_FN(overhead_us, period_us)
|
|
__HPP_COLOR_PERCENT_FN(overhead_guest_sys, period_guest_sys)
|
|
__HPP_COLOR_PERCENT_FN(overhead_guest_sys, period_guest_sys)
|
|
__HPP_COLOR_PERCENT_FN(overhead_guest_us, period_guest_us)
|
|
__HPP_COLOR_PERCENT_FN(overhead_guest_us, period_guest_us)
|
|
|
|
+__HPP_COLOR_ACC_PERCENT_FN(overhead_acc, period)
|
|
|
|
|
|
#undef __HPP_COLOR_PERCENT_FN
|
|
#undef __HPP_COLOR_PERCENT_FN
|
|
|
|
|
|
@@ -68,6 +83,8 @@ void perf_gtk__init_hpp(void)
|
|
perf_gtk__hpp_color_overhead_guest_sys;
|
|
perf_gtk__hpp_color_overhead_guest_sys;
|
|
perf_hpp__format[PERF_HPP__OVERHEAD_GUEST_US].color =
|
|
perf_hpp__format[PERF_HPP__OVERHEAD_GUEST_US].color =
|
|
perf_gtk__hpp_color_overhead_guest_us;
|
|
perf_gtk__hpp_color_overhead_guest_us;
|
|
|
|
+ perf_hpp__format[PERF_HPP__OVERHEAD_ACC].color =
|
|
|
|
+ perf_gtk__hpp_color_overhead_acc;
|
|
}
|
|
}
|
|
|
|
|
|
static void callchain_list__sym_name(struct callchain_list *cl,
|
|
static void callchain_list__sym_name(struct callchain_list *cl,
|