perf diff: Make hist_entry_diff fields union
[firefly-linux-kernel-4.4.55.git] / tools / perf / util / sort.h
index af192f172fa2995d65eca8a6fa25d77990438eaf..de3303fe726d4e9b52476c58e6f6217f6d1d7095 100644 (file)
@@ -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;
+       };
 };
 
 /**