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]
Date:	Thu, 17 Apr 2014 15:10:15 +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 1/3] perf hists: Add missing updates on
 nr_non_filtered_entries

On Thu, Apr 17, 2014 at 04:53:24PM +0900, Namhyung Kim wrote:
> When a filter is used for perf top, its hists->nr_non_filtered_entries
> was not updated after applying the filter.  But it needs to be updated
> as new samples are captured.
> 
> Signed-off-by: Namhyung Kim <namhyung@...nel.org>
> ---
>  tools/perf/util/hist.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
> index 5a892477aa50..2edbcd717f0e 100644
> --- a/tools/perf/util/hist.c
> +++ b/tools/perf/util/hist.c
> @@ -259,8 +259,11 @@ void hists__decay_entries(struct hists *hists, bool zap_user, bool zap_kernel)
>  			if (sort__need_collapse)
>  				rb_erase(&n->rb_node_in, &hists->entries_collapsed);
>  
> -			hist_entry__free(n);
>  			--hists->nr_entries;
> +			if (!n->filtered)
> +				--hists->nr_non_filtered_entries;
> +
> +			hist_entry__free(n);
>  		}
>  	}
>  }
> @@ -394,6 +397,9 @@ static struct hist_entry *add_hist_entry(struct hists *hists,
>  		return NULL;
>  
>  	hists->nr_entries++;
> +	if (!he->filtered)
> +		hists->nr_non_filtered_entries++;
> +

I'm probably missing something, but what is hists->nr_non_filtered_entries
used for? I can only see it being inc/dec-ed, but not used..

jirka

>  	rb_link_node(&he->rb_node_in, parent, p);
>  	rb_insert_color(&he->rb_node_in, hists->entries_in);
>  out:
> -- 
> 1.9.2
> 
--
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