lkml.org 
[lkml]   [2015]   [Apr]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 4/7] perf tools: Move init_have_children field to struct hist_entry_tui
Date
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


\
 
 \ /
  Last update: 2015-04-19 06:41    [W:0.149 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site