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: <20151126135256.GA18551@danjae.kornet>
Date:	Thu, 26 Nov 2015 22:52:56 +0900
From:	Namhyung Kim <namhyung@...nel.org>
To:	Jiri Olsa <jolsa@...hat.com>
Cc:	Arnaldo Carvalho de Melo <acme@...nel.org>,
	Ingo Molnar <mingo@...nel.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	LKML <linux-kernel@...r.kernel.org>,
	David Ahern <dsahern@...il.com>,
	Kan Liang <kan.liang@...el.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Andi Kleen <andi@...stfloor.org>,
	Wang Nan <wangnan0@...wei.com>
Subject: Re: [PATCH 1/3] perf top: Fix freeze on --call-graph flat/folded

Hi Jiri,

On Thu, Nov 26, 2015 at 09:38:53AM +0100, Jiri Olsa wrote:
> On Thu, Nov 26, 2015 at 04:08:18PM +0900, Namhyung Kim wrote:
> > The callchain rbtree is rebuilt periodically, so it needs to
> > reinitialize the root everytime.  Otherwise it can be stuck in the
> > rbtree insertion with stale pointers.
> > 
> > Signed-off-by: Namhyung Kim <namhyung@...nel.org>
> > ---
> >  tools/perf/util/callchain.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/tools/perf/util/callchain.c b/tools/perf/util/callchain.c
> > index fc3b1e0d09ee..564377d2bebf 100644
> > --- a/tools/perf/util/callchain.c
> > +++ b/tools/perf/util/callchain.c
> > @@ -290,6 +290,7 @@ static void
> >  sort_chain_flat(struct rb_root *rb_root, struct callchain_root *root,
> >  		u64 min_hit, struct callchain_param *param __maybe_unused)
> >  {
> > +	*rb_root = RB_ROOT;
> 
> it seems ok, but I did not find how this could be called twice?
> 
> the only sort I can see is done within:
>   __hists__insert_output_entry
> 
> do we allow resorting of the callchains?

No, but I think it's possible though.

It's called from perf top's display thread.

  display_thread()
  -> while (!done)
     -> perf_top__print_sym_table()
        -> hists__output_resort()
           -> __hists__insert_output_entry()

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