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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140220104716.GC11018@krava.brq.redhat.com>
Date:	Thu, 20 Feb 2014 11:47:16 +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>,
	Ingo Molnar <mingo@...nel.org>,
	Paul Mackerras <paulus@...ba.org>,
	Namhyung Kim <namhyung.kim@....com>,
	LKML <linux-kernel@...r.kernel.org>,
	David Ahern <dsahern@...il.com>,
	Andi Kleen <andi@...stfloor.org>
Subject: Re: [PATCH 5/8] perf diff: Add --percentage option

On Mon, Feb 10, 2014 at 11:47:22AM +0900, Namhyung Kim wrote:
> The --percentage option is for controlling overhead percentage
> displayed.  It can only receive either of "relative" or "absolute" and
> affects -c delta output only.
> 
> For more information, please see previous commit same thing done to
> "perf report".
> 
> Cc: Jiri Olsa <jolsa@...hat.com>
> Signed-off-by: Namhyung Kim <namhyung@...nel.org>
> ---

SNIP

>  ~~~~~
>  If specified the 'Ratio' column is displayed with value 'r' computed as:
> diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c
> index a77e31246c00..2c7406d9eb5d 100644
> --- a/tools/perf/builtin-diff.c
> +++ b/tools/perf/builtin-diff.c
> @@ -221,6 +221,10 @@ static int setup_compute(const struct option *opt, const char *str,
>  static double period_percent(struct hist_entry *he, u64 period)
>  {
>  	u64 total = he->hists->stats.total_period;
> +
> +	if (symbol_conf.filter_relative)
> +		total = he->hists->stats.total_filtered_period;
> +
>  	return (period * 100.0) / total;

yet another perf_hists__total_period user

>  }
>  
> @@ -259,11 +263,18 @@ static s64 compute_wdiff(struct hist_entry *he, struct hist_entry *pair)
>  static int formula_delta(struct hist_entry *he, struct hist_entry *pair,
>  			 char *buf, size_t size)
>  {
> +	u64 he_total = he->hists->stats.total_period;
> +	u64 pair_total = pair->hists->stats.total_period;

SNIP

>  
>  static double baseline_percent(struct hist_entry *he)
>  {
>  	struct hists *hists = he->hists;
> -	return 100.0 * he->stat.period / hists->stats.total_period;
> +	u64 total = hists->stats.total_period;
> +
> +	if (symbol_conf.filter_relative)
> +		total = hists->stats.total_filtered_period;
> +
> +	return 100.0 * he->stat.period / total;
>  }

and another ;-)

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

Powered by Openwall GNU/*/Linux Powered by OpenVZ