From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2992486AbbEEVfg (ORCPT ); Tue, 5 May 2015 17:35:36 -0400 Received: from casper.infradead.org ([85.118.1.10]:43528 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1423448AbbEEVck (ORCPT ); Tue, 5 May 2015 17:32:40 -0400 From: Arnaldo Carvalho de Melo To: Ingo Molnar Cc: linux-kernel@vger.kernel.org, Namhyung Kim , David Ahern , Peter Zijlstra , Arnaldo Carvalho de Melo Subject: [PATCH 15/25] perf tools: Move TUI-specific fields into unnamed union Date: Tue, 5 May 2015 18:32:09 -0300 Message-Id: <1430861539-30518-16-git-send-email-acme@kernel.org> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1430861539-30518-1-git-send-email-acme@kernel.org> References: <1430861539-30518-1-git-send-email-acme@kernel.org> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Namhyung Kim 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 Acked-by: Jiri Olsa Cc: David Ahern Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1429687101-4360-2-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/sort.h | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/tools/perf/util/sort.h b/tools/perf/util/sort.h index de3303f..7f0c0a8 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; -- 2.1.0