diff options
author | Namhyung Kim <namhyung@kernel.org> | 2015-04-22 10:18:12 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-05-06 00:13:10 +0300 |
commit | 297508216556fbf4e3f70fb97d03280741b4a709 (patch) | |
tree | afa7172bf15e3490a28dc5ef7f3ca50aec981378 /tools | |
parent | a923e2c4b14f99f70692f82ee7bd63717604b738 (diff) | |
download | linux-297508216556fbf4e3f70fb97d03280741b4a709.tar.xz |
perf tools: Move TUI-specific fields into unnamed union
Since perf diff only supports stdio output, TUI fields are only accessed
from perf report (or perf top). So add a new unnamed union and move
struct hist_entry_tui and those TUI-specific fields.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1429687101-4360-2-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/util/sort.h | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/tools/perf/util/sort.h b/tools/perf/util/sort.h index de3303fe726d..7f0c0a8d615d 100644 --- a/tools/perf/util/sort.h +++ b/tools/perf/util/sort.h @@ -93,18 +93,24 @@ struct hist_entry { s32 cpu; u8 cpumode; - struct hist_entry_diff diff; - /* We are added by hists__add_dummy_entry. */ bool dummy; - /* XXX These two should move to some tree widget lib */ - u16 row_offset; - u16 nr_rows; - bool init_have_children; char level; u8 filtered; + union { + /* + * Since perf diff only supports the stdio output, TUI + * fields are only accessed from perf report (or perf + * top). So make it an union to reduce memory usage. + */ + struct hist_entry_diff diff; + struct /* for TUI */ { + u16 row_offset; + u16 nr_rows; + }; + }; char *srcline; struct symbol *parent; struct rb_root sorted_chain; |