From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753618AbbEFCzq (ORCPT ); Tue, 5 May 2015 22:55:46 -0400 Received: from terminus.zytor.com ([198.137.202.10]:35436 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752893AbbEFCzg (ORCPT ); Tue, 5 May 2015 22:55:36 -0400 Date: Tue, 5 May 2015 19:55:22 -0700 From: tip-bot for Namhyung Kim Message-ID: Cc: acme@redhat.com, dsahern@gmail.com, linux-kernel@vger.kernel.org, jolsa@redhat.com, tglx@linutronix.de, mingo@kernel.org, hpa@zytor.com, a.p.zijlstra@chello.nl, namhyung@kernel.org Reply-To: a.p.zijlstra@chello.nl, hpa@zytor.com, namhyung@kernel.org, tglx@linutronix.de, jolsa@redhat.com, linux-kernel@vger.kernel.org, dsahern@gmail.com, acme@redhat.com, mingo@kernel.org In-Reply-To: <1429416255-12070-3-git-send-email-namhyung@kernel.org> References: <1429416255-12070-3-git-send-email-namhyung@kernel.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf diff: Make hist_entry_diff fields union Git-Commit-ID: a0b404f4c0820a934ae1b6ce39d8a4a0f01a7a20 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: a0b404f4c0820a934ae1b6ce39d8a4a0f01a7a20 Gitweb: http://git.kernel.org/tip/a0b404f4c0820a934ae1b6ce39d8a4a0f01a7a20 Author: Namhyung Kim AuthorDate: Sun, 19 Apr 2015 13:04:10 +0900 Committer: Arnaldo Carvalho de Melo CommitDate: Wed, 29 Apr 2015 10:37:44 -0300 perf diff: Make hist_entry_diff fields union The period_ratio_delta, period_ratio and wdiff are never by used at the same time. Instead, Just one of them is accessed according to a comparison method. So make it union to reduce memory footprint. Signed-off-by: Namhyung Kim Cc: David Ahern Cc: Jiri Olsa Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1429416255-12070-3-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/sort.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/tools/perf/util/sort.h b/tools/perf/util/sort.h index af192f1..de3303f 100644 --- a/tools/perf/util/sort.h +++ b/tools/perf/util/sort.h @@ -58,15 +58,16 @@ struct he_stat { struct hist_entry_diff { bool computed; + union { + /* PERF_HPP__DELTA */ + double period_ratio_delta; - /* PERF_HPP__DELTA */ - double period_ratio_delta; - - /* PERF_HPP__RATIO */ - double period_ratio; + /* PERF_HPP__RATIO */ + double period_ratio; - /* HISTC_WEIGHTED_DIFF */ - s64 wdiff; + /* HISTC_WEIGHTED_DIFF */ + s64 wdiff; + }; }; /**