From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757907AbcBJML2 (ORCPT ); Wed, 10 Feb 2016 07:11:28 -0500 Received: from mx1.redhat.com ([209.132.183.28]:33330 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757800AbcBJML1 (ORCPT ); Wed, 10 Feb 2016 07:11:27 -0500 Date: Wed, 10 Feb 2016 13:11:19 +0100 From: Jiri Olsa To: Namhyung Kim Cc: Arnaldo Carvalho de Melo , Ingo Molnar , Peter Zijlstra , Jiri Olsa , LKML , David Ahern , Andi Kleen , Stephane Eranian , Wang Nan Subject: Re: [PATCH 13/23] perf hists: Support filtering in hierarchy mode Message-ID: <20160210121119.GB19907@krava.redhat.com> References: <1454677315-7515-1-git-send-email-namhyung@kernel.org> <1454677315-7515-14-git-send-email-namhyung@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1454677315-7515-14-git-send-email-namhyung@kernel.org> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 05, 2016 at 10:01:45PM +0900, Namhyung Kim wrote: SNIP > + /* force to go to sibling in the hierarchy */ > + saved_unfolded = h->unfolded; > + h->unfolded = false; > + > + nd = rb_hierarchy_next(&h->rb_node); > + h->unfolded = saved_unfolded; > + } > + } > + > + /* resort output (top-level entries only) */ > + nd = rb_first(&hists->entries); > + while (nd) { > + struct hist_entry *h = rb_entry(nd, struct hist_entry, rb_node); > + > + nd = rb_next(nd); > + rb_erase(&h->rb_node, &hists->entries); > + > + __hists__insert_output_entry(&tmp, h, 0, false); > + } what's the purpose of this resort? the only affect I see is to recalculate callchains thanks, jirka