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: <20140220110112.GF11018@krava.brq.redhat.com>
Date:	Thu, 20 Feb 2014 12:01:12 +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 6/8] perf tools: Add hist.percentage config option

On Mon, Feb 10, 2014 at 11:47:23AM +0900, Namhyung Kim wrote:
> Add hist.percentage option for setting default value of the
> symbol_conf.filter_relative.  It affects the output of various perf
> commands (like perf report, top and diff) only if filter(s) applied.
> 
> An user can write .perfconfig file like below to show absolute
> percentage of filtered entries by default:

SNIP

> +++ b/tools/perf/util/hist.c
> @@ -934,3 +934,17 @@ int hists__link(struct hists *leader, struct hists *other)
>  
>  	return 0;
>  }
> +
> +int perf_hist_config(const char *var, const char *value)
> +{
> +	if (!strcmp(var, "hist.percentage")) {
> +		if (!strcmp(value, "relative"))
> +			symbol_conf.filter_relative = true;
> +		else if (!strcmp(value, "absolute"))
> +			symbol_conf.filter_relative = false;
> +		else
> +			return -1;
> +	}
> +
> +	return 0;
> +}

the inner stuff could be done in parse_percentage function
not to duplicate the symbol_conf.filter_relative assignment

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