Re: [PATCH 11/21] perf ui/gtk: Add support to accumulated hist stat

From: Jiri Olsa
Date: Sun Jan 05 2014 - 12:35:54 EST


On Tue, Dec 24, 2013 at 05:22:17PM +0900, Namhyung Kim wrote:
> From: Namhyung Kim <namhyung.kim@xxxxxxx>
>
> Print accumulated stat of a hist entry if requested.
>
> Cc: Arun Sharma <asharma@xxxxxx>
> Cc: Frederic Weisbecker <fweisbec@xxxxxxxxx>
> Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxxx>
> ---
> tools/perf/ui/gtk/hists.c | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)
>
> diff --git a/tools/perf/ui/gtk/hists.c b/tools/perf/ui/gtk/hists.c
> index 2ca66cc1160f..70ed0d5e1b94 100644
> --- a/tools/perf/ui/gtk/hists.c
> +++ b/tools/perf/ui/gtk/hists.c
> @@ -98,11 +98,25 @@ static int perf_gtk__hpp_color_##_type(struct perf_hpp_fmt *fmt __maybe_unused,
> return __hpp__color_fmt(hpp, he, he_get_##_field); \
> }
>
> +#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__color_fmt(hpp, he, he_get_acc_##_field); \
> +}
> +
> __HPP_COLOR_PERCENT_FN(overhead, period)
> __HPP_COLOR_PERCENT_FN(overhead_sys, period_sys)
> __HPP_COLOR_PERCENT_FN(overhead_us, period_us)
> __HPP_COLOR_PERCENT_FN(overhead_guest_sys, period_guest_sys)
> __HPP_COLOR_PERCENT_FN(overhead_guest_us, period_guest_us)
> +__HPP_COLOR_ACC_PERCENT_FN(overhead_acc, period)

and same comment as for ui/hist.c in here

jirka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/