All of lore.kernel.org
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Jiri Olsa <jolsa@redhat.com>, LKML <linux-kernel@vger.kernel.org>,
	David Ahern <dsahern@gmail.com>
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	[thread overview]
Message-ID: <1429416255-12070-5-git-send-email-namhyung@kernel.org> (raw)
In-Reply-To: <1429416255-12070-1-git-send-email-namhyung@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 <namhyung@kernel.org>
---
 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


  parent reply	other threads:[~2015-04-19  4:06 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-19  4:04 [PATCHSET 0/7] perf tools: Assorted cleanup for TUI (v1) Namhyung Kim
2015-04-19  4:04 ` [PATCH 1/7] perf tools: Get rid of position field from struct hist_entry Namhyung Kim
2015-05-06  2:55   ` [tip:perf/core] perf hists: " tip-bot for Namhyung Kim
2015-04-19  4:04 ` [PATCH 2/7] perf diff: Make hist_entry_diff fields union Namhyung Kim
2015-05-06  2:55   ` [tip:perf/core] " tip-bot for Namhyung Kim
2015-04-19  4:04 ` [PATCH 3/7] perf tools: Move TUI-specific fields to struct hist_entry_tui Namhyung Kim
2015-04-20  8:20   ` Jiri Olsa
2015-04-20 12:10     ` Namhyung Kim
2015-04-19  4:04 ` Namhyung Kim [this message]
2015-04-19  4:04 ` [PATCH 5/7] perf hists browser: Fix possible memory leak Namhyung Kim
2015-04-20  8:24   ` Jiri Olsa
2015-04-20 12:13     ` Namhyung Kim
2015-04-19  4:04 ` [PATCH 6/7] perf hists browser: Split popup menu actions Namhyung Kim
2015-04-20  9:21   ` Jiri Olsa
2015-04-20 12:21     ` Namhyung Kim
2015-04-20  9:46   ` Jiri Olsa
2015-04-20 12:25     ` Namhyung Kim
2015-04-20 14:00   ` Arnaldo Carvalho de Melo
2015-04-20 15:22     ` Namhyung Kim
2015-04-20 21:28       ` Arnaldo Carvalho de Melo
2015-04-21  6:10         ` Namhyung Kim
2015-04-19  4:04 ` [PATCH 7/7] perf hists browser: Simplify zooming code a bit Namhyung Kim
2015-04-20 14:02 ` [PATCHSET 0/7] perf tools: Assorted cleanup for TUI (v1) Arnaldo Carvalho de Melo
2015-04-20 13:00 [PATCHSET 0/7] perf tools: Assorted cleanup for TUI (v2) Namhyung Kim
2015-04-20 13:00 ` [PATCH 4/7] perf tools: Move init_have_children field to struct hist_entry_tui Namhyung Kim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1429416255-12070-5-git-send-email-namhyung@kernel.org \
    --to=namhyung@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@kernel.org \
    --cc=dsahern@gmail.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.