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: <87ehkf5gdy.fsf@sejong.aot.lge.com>
Date:	Wed, 31 Oct 2012 15:01:45 +0900
From:	Namhyung Kim <namhyung@...nel.org>
To:	Stephane Eranian <eranian@...gle.com>
Cc:	linux-kernel@...r.kernel.org, peterz@...radead.org, mingo@...e.hu,
	ak@...ux.intel.com, acme@...hat.com, jolsa@...hat.com,
	ming.m.lin@...el.com
Subject: Re: [Patch v1 08/10] perf report: add support for mem access profiling

On Mon, 29 Oct 2012 16:15:50 +0100, Stephane Eranian wrote:
> This patch adds the --mem-mode option to perf report.
>
> This mode requires a perf.data file created with memory
> access samples.
>
> Signed-off-by: Stephane Eranian <eranian@...gle.com>
> ---
[snip]
> +	cost = mi->cost;
> +	if (!cost)
> +		cost = 1;
> +
> +	/*
> +	 * The report shows the percentage of total branches captured
> +	 * and not events sampled. Thus we use a pseudo period of 1.

But cost won't be 1 anymore if PERF_SAMPLE_COST set, right?


> +	 * Only in the newt browser we are doing integrated annotation,
> +	 * so we don't allocated the extra space needed because the stdio
> +	 * code will not use it.

Yes, and gtk too.


> +	 */
> +	he = __hists__add_mem_entry(&evsel->hists, al, parent, mi,
> +				    cost);
> +	if (!he)
> +		return -ENOMEM;
> +
> +	if (sort__has_sym && he->ms.sym && use_browser > 0) {

So I'd rather write 'use_browser == 1' instead of '> 0'.


> +		struct annotation *notes = symbol__annotation(he->ms.sym);
> +
> +		assert(evsel != NULL);
> +
> +		if (notes->src == NULL && symbol__alloc_hist(he->ms.sym) < 0)
> +			goto out;
> +
> +		err = hist_entry__inc_addr_samples(he, evsel->idx, al->addr);
> +		if (err)
> +			goto out;
> +	}
> +
> +	if (sort__has_sym && he->mem_info->daddr.sym && use_browser > 0) {

Ditto.

Thanks,
Namhyung
--
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