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 <namhy...@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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to