Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a0b404f4 authored by Namhyung Kim's avatar Namhyung Kim Committed by Arnaldo Carvalho de Melo
Browse files

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: default avatarNamhyung 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: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent cc5e461a
Loading
Loading
Loading
Loading
+8 −7
Original line number Diff line number Diff line
@@ -58,7 +58,7 @@ struct he_stat {

struct hist_entry_diff {
	bool	computed;

	union {
		/* PERF_HPP__DELTA */
		double	period_ratio_delta;

@@ -68,6 +68,7 @@ struct hist_entry_diff {
		/* HISTC_WEIGHTED_DIFF */
		s64	wdiff;
	};
};

/**
 * struct hist_entry - histogram entry