Messages in this thread Patch in this message | | | From | Namhyung Kim <> | Subject | [PATCH 4/7] perf tools: Move init_have_children field to struct hist_entry_tui | Date | Mon, 20 Apr 2015 22:00:47 +0900 |
| |
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 c4598984e366..6057d8aaf19e 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
| |