From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753619AbbDSEGZ (ORCPT ); Sun, 19 Apr 2015 00:06:25 -0400 Received: from mail-pa0-f45.google.com ([209.85.220.45]:33561 "EHLO mail-pa0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751899AbbDSEFb (ORCPT ); Sun, 19 Apr 2015 00:05:31 -0400 From: Namhyung Kim To: Arnaldo Carvalho de Melo Cc: Ingo Molnar , Peter Zijlstra , Jiri Olsa , LKML , David Ahern Subject: [PATCH 4/7] perf tools: Move init_have_children field to struct hist_entry_tui Date: Sun, 19 Apr 2015 13:04:12 +0900 Message-Id: <1429416255-12070-5-git-send-email-namhyung@kernel.org> X-Mailer: git-send-email 2.3.5 In-Reply-To: <1429416255-12070-1-git-send-email-namhyung@kernel.org> References: <1429416255-12070-1-git-send-email-namhyung@kernel.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The init_have_children is used to init callchain info only for TUI. So it'd be better to move it to the hist_entry_tui struct. Signed-off-by: Namhyung Kim --- tools/perf/ui/browsers/hists.c | 4 ++-- tools/perf/util/sort.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c index 8b8a647be999..8f303eb5044d 100644 --- a/tools/perf/ui/browsers/hists.c +++ b/tools/perf/ui/browsers/hists.c @@ -275,10 +275,10 @@ static void callchain__init_have_children(struct rb_root *root) static void hist_entry__init_have_children(struct hist_entry *he) { - if (!he->init_have_children) { + if (!he->tui.init_have_children) { he->ms.has_children = !RB_EMPTY_ROOT(&he->sorted_chain); callchain__init_have_children(&he->sorted_chain); - he->init_have_children = true; + he->tui.init_have_children = true; } } diff --git a/tools/perf/util/sort.h b/tools/perf/util/sort.h index fae3bc5c1ea6..afdfaeb54b73 100644 --- a/tools/perf/util/sort.h +++ b/tools/perf/util/sort.h @@ -73,6 +73,7 @@ struct hist_entry_diff { struct hist_entry_tui { u16 row_offset; u16 nr_rows; + bool init_have_children; }; /** @@ -101,7 +102,6 @@ struct hist_entry { /* We are added by hists__add_dummy_entry. */ bool dummy; - bool init_have_children; char level; u8 filtered; union { -- 2.3.5