lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 5 Jan 2014 18:33:56 +0100
From:	Jiri Olsa <jolsa@...hat.com>
To:	Namhyung Kim <namhyung@...nel.org>
Cc:	Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Paul Mackerras <paulus@...ba.org>,
	Ingo Molnar <mingo@...nel.org>,
	Namhyung Kim <namhyung.kim@....com>,
	LKML <linux-kernel@...r.kernel.org>,
	Arun Sharma <asharma@...com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Rodrigo Campos <rodrigo@...g.com.ar>
Subject: Re: [PATCH 10/21] perf ui/browser: Add support to accumulated hist
 stat

On Tue, Dec 24, 2013 at 05:22:16PM +0900, Namhyung Kim wrote:
> From: Namhyung Kim <namhyung.kim@....com>
> 
> Print accumulated stat of a hist entry if requested.
> 
> Cc: Arun Sharma <asharma@...com>
> Cc: Frederic Weisbecker <fweisbec@...il.com>
> Signed-off-by: Namhyung Kim <namhyung@...nel.org>
> ---
>  tools/perf/ui/browsers/hists.c | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
> 
> diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
> index a440e03cd8c2..efa78894f70d 100644
> --- a/tools/perf/ui/browsers/hists.c
> +++ b/tools/perf/ui/browsers/hists.c
> @@ -693,11 +693,26 @@ hist_browser__hpp_color_##_type(struct perf_hpp_fmt *fmt __maybe_unused,\
>  	return __hpp__color_fmt(hpp, he, __hpp_get_##_field, _cb);	\
>  }
>  
> +#define __HPP_COLOR_ACC_PERCENT_FN(_type, _field, _cb)			\
> +static u64 __hpp_get_acc_##_field(struct hist_entry *he)		\
> +{									\
> +	return he->stat_acc->_field;					\
> +}									\
> +									\
> +static int								\
> +hist_browser__hpp_color_##_type(struct perf_hpp_fmt *fmt __maybe_unused,\
> +				struct perf_hpp *hpp,			\
> +				struct hist_entry *he)			\
> +{									\
> +	return __hpp__color_fmt(hpp, he, __hpp_get_acc_##_field, _cb);	\
> +}
> +
>  __HPP_COLOR_PERCENT_FN(overhead, period, __hpp__color_callchain)
>  __HPP_COLOR_PERCENT_FN(overhead_sys, period_sys, NULL)
>  __HPP_COLOR_PERCENT_FN(overhead_us, period_us, NULL)
>  __HPP_COLOR_PERCENT_FN(overhead_guest_sys, period_guest_sys, NULL)
>  __HPP_COLOR_PERCENT_FN(overhead_guest_us, period_guest_us, NULL)
> +__HPP_COLOR_ACC_PERCENT_FN(overhead_acc, period, NULL)

same comment as for ui/hist.c..

including _type parameter in __HPP_COLOR_PERCENT_FN ;-)

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

Powered by blists - more mailing lists