From: tip-bot for Namhyung Kim <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
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
Subject: [tip:perf/core] perf diff: Make hist_entry_diff fields union
Date: Tue, 5 May 2015 19:55:22 -0700 [thread overview]
Message-ID: <tip-a0b404f4c0820a934ae1b6ce39d8a4a0f01a7a20@git.kernel.org> (raw)
In-Reply-To: <1429416255-12070-3-git-send-email-namhyung@kernel.org>
Commit-ID: a0b404f4c0820a934ae1b6ce39d8a4a0f01a7a20
Gitweb: http://git.kernel.org/tip/a0b404f4c0820a934ae1b6ce39d8a4a0f01a7a20
Author: Namhyung Kim <namhyung@kernel.org>
AuthorDate: Sun, 19 Apr 2015 13:04:10 +0900
Committer: Arnaldo Carvalho de Melo <acme@redhat.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@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1429416255-12070-3-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.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;
+ };
};
/**
next prev parent reply other threads:[~2015-05-06 2:55 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-19 4:04 [PATCHSET 0/7] perf tools: Assorted cleanup for TUI (v1) Namhyung Kim
2015-04-19 4:04 ` [PATCH 1/7] perf tools: Get rid of position field from struct hist_entry Namhyung Kim
2015-05-06 2:55 ` [tip:perf/core] perf hists: " tip-bot for Namhyung Kim
2015-04-19 4:04 ` [PATCH 2/7] perf diff: Make hist_entry_diff fields union Namhyung Kim
2015-05-06 2:55 ` tip-bot for Namhyung Kim [this message]
2015-04-19 4:04 ` [PATCH 3/7] perf tools: Move TUI-specific fields to struct hist_entry_tui Namhyung Kim
2015-04-20 8:20 ` Jiri Olsa
2015-04-20 12:10 ` Namhyung Kim
2015-04-19 4:04 ` [PATCH 4/7] perf tools: Move init_have_children field " Namhyung Kim
2015-04-19 4:04 ` [PATCH 5/7] perf hists browser: Fix possible memory leak Namhyung Kim
2015-04-20 8:24 ` Jiri Olsa
2015-04-20 12:13 ` Namhyung Kim
2015-04-19 4:04 ` [PATCH 6/7] perf hists browser: Split popup menu actions Namhyung Kim
2015-04-20 9:21 ` Jiri Olsa
2015-04-20 12:21 ` Namhyung Kim
2015-04-20 9:46 ` Jiri Olsa
2015-04-20 12:25 ` Namhyung Kim
2015-04-20 14:00 ` Arnaldo Carvalho de Melo
2015-04-20 15:22 ` Namhyung Kim
2015-04-20 21:28 ` Arnaldo Carvalho de Melo
2015-04-21 6:10 ` Namhyung Kim
2015-04-19 4:04 ` [PATCH 7/7] perf hists browser: Simplify zooming code a bit Namhyung Kim
2015-04-20 14:02 ` [PATCHSET 0/7] perf tools: Assorted cleanup for TUI (v1) Arnaldo Carvalho de Melo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-a0b404f4c0820a934ae1b6ce39d8a4a0f01a7a20@git.kernel.org \
--to=tipbot@zytor.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=dsahern@gmail.com \
--cc=hpa@zytor.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome