[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-a0b404f4c0820a934ae1b6ce39d8a4a0f01a7a20@git.kernel.org>
Date: Tue, 5 May 2015 19:55:22 -0700
From: tip-bot for Namhyung Kim <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: acme@...hat.com, dsahern@...il.com, linux-kernel@...r.kernel.org,
jolsa@...hat.com, tglx@...utronix.de, mingo@...nel.org,
hpa@...or.com, a.p.zijlstra@...llo.nl, namhyung@...nel.org
Subject: [tip:perf/core] perf diff: Make hist_entry_diff fields union
Commit-ID: a0b404f4c0820a934ae1b6ce39d8a4a0f01a7a20
Gitweb: http://git.kernel.org/tip/a0b404f4c0820a934ae1b6ce39d8a4a0f01a7a20
Author: Namhyung Kim <namhyung@...nel.org>
AuthorDate: Sun, 19 Apr 2015 13:04:10 +0900
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
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 <namhyung@...nel.org>
Cc: David Ahern <dsahern@...il.com>
Cc: Jiri Olsa <jolsa@...hat.com>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Link: http://lkml.kernel.org/r/1429416255-12070-3-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
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;
+ };
};
/**
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists