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: <20140423133536.GC11124@krava.brq.redhat.com>
Date:	Wed, 23 Apr 2014 15:35:36 +0200
From:	Jiri Olsa <jolsa@...hat.com>
To:	Namhyung Kim <namhyung@...nel.org>
Cc:	Arnaldo Carvalho de Melo <acme@...nel.org>,
	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 2/7] perf tools: Account entry stats when it's added to
 the output tree

On Wed, Apr 23, 2014 at 04:00:03PM +0900, Namhyung Kim wrote:
> Currently, accounting each sample is done in multiple places - once
> when adding them to the input tree, other when adding them to the
> output tree.  It's not only confusing but also can cause a subtle
> problem since concurrent processing like in perf top might see the
> updated stats before adding entries into the output tree - like seeing
> more (blank) lines at the end and/or slight inaccurate percentage.
> 
> To fix this, only account the entries when it's moved into the output
> tree so that they cannot be seen prematurely.  There're some
> exceptional cases here and there - they should be addressed separately
> with comments.

sry to be PITA, but need to ask you to split the patch,
otherwise I'd get beaten for that ;-)

I can see several separated changes here:
 * remove stats for input tree (as stated in changelog)
 * hists__inc_nr_entries -> hists__inc_stats rename
 * add hists__reset_stats function
 * move hists__calc_col_len out of hists__inc_nr_entries


> 
> Signed-off-by: Namhyung Kim <namhyung@...nel.org>
> ---

SNIP

>  
> diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
> index aed52036468d..4bdcc040b216 100644
> --- a/tools/perf/builtin-report.c
> +++ b/tools/perf/builtin-report.c
> @@ -85,6 +85,10 @@ static void report__inc_stats(struct report *rep, struct hist_entry *he)
>  	 */
>  	if (he->stat.nr_events == 1)
>  		rep->nr_entries++;
> +
> +	hists__inc_nr_events(he->hists, PERF_RECORD_SAMPLE);
> +	if (!he->filtered)
> +		he->hists->stats.nr_non_filtered_samples++;

could you put here some comments as for the diff command
I mean why is this exception in stats counting for input tree

thanks,
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