From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751846AbbEEBOI (ORCPT ); Mon, 4 May 2015 21:14:08 -0400 Received: from mail-pa0-f54.google.com ([209.85.220.54]:35280 "EHLO mail-pa0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750699AbbEEBOA (ORCPT ); Mon, 4 May 2015 21:14:00 -0400 Date: Tue, 5 May 2015 10:12:45 +0900 From: Namhyung Kim To: Arnaldo Carvalho de Melo Cc: Ingo Molnar , Peter Zijlstra , Jiri Olsa , LKML , David Ahern Subject: Re: [PATCH 10/10] perf tools: Move TUI-specific fields out of map_symbol Message-ID: <20150505011245.GA1402@danjae.kornet> References: <1429687101-4360-1-git-send-email-namhyung@kernel.org> <1429687101-4360-11-git-send-email-namhyung@kernel.org> <20150504154227.GD10475@kernel.org> <20150504155116.GE10475@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20150504155116.GE10475@kernel.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Arnaldo, On Mon, May 04, 2015 at 12:51:16PM -0300, Arnaldo Carvalho de Melo wrote: > Em Mon, May 04, 2015 at 12:42:27PM -0300, Arnaldo Carvalho de Melo escreveu: > > Em Wed, Apr 22, 2015 at 04:18:21PM +0900, Namhyung Kim escreveu: > > > The has_children and unfolded fields don't belong to struct map_symbol > > > since they're used by TUI only. Move those fields out of map_symbol > > > since the struct is also used by other places. > > > > This will also help to compact the sizeof struct hist_entry. > > > 7ee14d744acb33e5b3114484d7d850caecb339a2 is the first bad commit > > Author: Namhyung Kim > > Date: Wed Apr 22 16:18:21 2015 +0900 > > > perf tools: Move TUI-specific fields out of map_symbol > > > So I am moving this series to the top of perf/core and then moving it to a > > separate branch, so that you can try to reproduce this and I can push the rest > > to Ingo, ok? > > Moved to perf/core-hists_browser > > > Ah, while trying to find new_slab() in callchains one other thing I tried was > > to press 'E', to expand all the callchains, and it segfaulted, unsure if this > > is related. > > It is related to this patchset, without it, I can press 'E' to expand > all callchains and then 'C' to collapse them all as usual. I tested and reproduced it. There's a recursion by mistake during refactoring. The fix is below, I'll send v2. Thanks, Namhyung diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c index f422e5e82a6a..7a70493e938c 100644 --- a/tools/perf/ui/browsers/hists.c +++ b/tools/perf/ui/browsers/hists.c @@ -361,7 +361,7 @@ static int callchain__set_folding(struct rb_root *chain, bool unfold) static void hist_entry__set_folding(struct hist_entry *he, bool unfold) { hist_entry__init_have_children(he); - hist_entry__set_folding(he, unfold); + he->unfolded = unfold ? he->has_children : false; if (he->has_children) { int n = callchain__set_folding(&he->sorted_chain, unfold);