From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750889AbcBJM3j (ORCPT ); Wed, 10 Feb 2016 07:29:39 -0500 Received: from mx1.redhat.com ([209.132.183.28]:42727 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750801AbcBJM3i (ORCPT ); Wed, 10 Feb 2016 07:29:38 -0500 Date: Wed, 10 Feb 2016 13:29:31 +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 14/23] perf ui/stdio: Implement hierarchy output mode Message-ID: <20160210122931.GE19907@krava.redhat.com> References: <1454677315-7515-1-git-send-email-namhyung@kernel.org> <1454677315-7515-15-git-send-email-namhyung@kernel.org> <20160210122345.GD19907@krava.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160210122345.GD19907@krava.redhat.com> 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 Wed, Feb 10, 2016 at 01:23:45PM +0100, Jiri Olsa wrote: > On Fri, Feb 05, 2016 at 10:01:46PM +0900, Namhyung Kim wrote: > > SNIP > > > > > - for (nd = rb_first(&hists->entries); nd; nd = rb_next(nd)) { > > + for (nd = rb_first(&hists->entries); nd; nd = rb_hierarchy_next(nd)) { > > struct hist_entry *h = rb_entry(nd, struct hist_entry, rb_node); > > float percent; > > > > @@ -542,6 +614,9 @@ print_entries: > > MAP__FUNCTION, fp); > > fprintf(fp, "%.10s end\n", graph_dotted_line); > > } > > + > > + if (symbol_conf.report_hierarchy) > > + h->unfolded = true; > > what's this for? > ah it's stdio, we need to show everything.. ok ;-) I was thinking of putting this 'force un/fold' logic into the rb_hierarchy_next interface, because it's also not nice in hists__filter_hierarchy function.. maybe having extra argument telling the walk preference would be easier to read, like: rb_hierarchy_next(&h->rb_node, FORCE_UNFOLD); rb_hierarchy_next(&h->rb_node, FORCE_FOLD); rb_hierarchy_next(&h->rb_node, DEFAULT); with some better names of course just an idea.. it might turn horrible as well ;-) thanks, jirka