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: <87y5i7mtl2.fsf@sejong.aot.lge.com>
Date:	Mon, 12 Nov 2012 11:40:57 +0900
From:	Namhyung Kim <namhyung@...nel.org>
To:	Arnaldo Carvalho de Melo <acme@...radead.org>
Cc:	Ingo Molnar <mingo@...nel.org>, linux-kernel@...r.kernel.org,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	David Ahern <dsahern@...il.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Jiri Olsa <jolsa@...hat.com>, Mike Galbraith <efault@....de>,
	Paul Mackerras <paulus@...ba.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH 10/21] perf hists: Introduce hists__link

On Fri,  9 Nov 2012 18:42:59 -0300, Arnaldo Carvalho de Melo wrote:
> From: Arnaldo Carvalho de Melo <acme@...hat.com>
>
> That given two hists will find the hist_entries (buckets) in the second
> hists that are for the same bucket in the first and link them, then it
> will look for all buckets in the second that don't have a counterpart in
> the first and will create a dummy counterpart that will then be linked
> to the entry in the second.
>
> For multiple events this will be done pairing the leader with all the
> other events in the group, so that in the end the leader will have all
> the buckets in all the hists in a group, dummy or not while the other
> hists will be left untouched.
[snip]
> +	he = hist_entry__new(pair);
> +	if (he) {
> +		he->stat.nr_events = 0;
> +		he->stat.period    = 0;

What about other fields?
Why not use "memset(&he->stat, 0, sizeof(he->stat))" for this?

Thanks,
Namhyung


> +		he->hists	   = hists;
> +		rb_link_node(&he->rb_node, parent, p);
> +		rb_insert_color(&he->rb_node, &hists->entries);
> +		hists__inc_nr_entries(hists, he);
> +	}
> +out:
> +	return he;
> +}
> +
--
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