@@ -2788,6 +2788,8 @@ int format_counters(struct thread_data *t, struct core_data *c, struct pkg_data
2788
2788
}
2789
2789
2790
2790
for (i = 0 , ppmt = sys .pmt_tp ; ppmt ; i ++ , ppmt = ppmt -> next ) {
2791
+ const unsigned long value_raw = t -> pmt_counter [i ];
2792
+ const double value_converted = 100.0 * value_raw / crystal_hz / interval_float ;
2791
2793
switch (ppmt -> type ) {
2792
2794
case PMT_TYPE_RAW :
2793
2795
if (pmt_counter_get_width (ppmt ) <= 32 )
@@ -2799,9 +2801,6 @@ int format_counters(struct thread_data *t, struct core_data *c, struct pkg_data
2799
2801
break ;
2800
2802
2801
2803
case PMT_TYPE_XTAL_TIME :
2802
- const unsigned long value_raw = t -> pmt_counter [i ];
2803
- const double value_converted = 100.0 * value_raw / crystal_hz / interval_float ;
2804
-
2805
2804
outp += sprintf (outp , "%s%.2f" , (printed ++ ? delim : "" ), value_converted );
2806
2805
break ;
2807
2806
}
@@ -2869,6 +2868,8 @@ int format_counters(struct thread_data *t, struct core_data *c, struct pkg_data
2869
2868
}
2870
2869
2871
2870
for (i = 0 , ppmt = sys .pmt_cp ; ppmt ; i ++ , ppmt = ppmt -> next ) {
2871
+ const unsigned long value_raw = c -> pmt_counter [i ];
2872
+ const double value_converted = 100.0 * value_raw / crystal_hz / interval_float ;
2872
2873
switch (ppmt -> type ) {
2873
2874
case PMT_TYPE_RAW :
2874
2875
if (pmt_counter_get_width (ppmt ) <= 32 )
@@ -2880,9 +2881,6 @@ int format_counters(struct thread_data *t, struct core_data *c, struct pkg_data
2880
2881
break ;
2881
2882
2882
2883
case PMT_TYPE_XTAL_TIME :
2883
- const unsigned long value_raw = c -> pmt_counter [i ];
2884
- const double value_converted = 100.0 * value_raw / crystal_hz / interval_float ;
2885
-
2886
2884
outp += sprintf (outp , "%s%.2f" , (printed ++ ? delim : "" ), value_converted );
2887
2885
break ;
2888
2886
}
@@ -3068,6 +3066,8 @@ int format_counters(struct thread_data *t, struct core_data *c, struct pkg_data
3068
3066
}
3069
3067
3070
3068
for (i = 0 , ppmt = sys .pmt_pp ; ppmt ; i ++ , ppmt = ppmt -> next ) {
3069
+ const unsigned long value_raw = p -> pmt_counter [i ];
3070
+ const double value_converted = 100.0 * value_raw / crystal_hz / interval_float ;
3071
3071
switch (ppmt -> type ) {
3072
3072
case PMT_TYPE_RAW :
3073
3073
if (pmt_counter_get_width (ppmt ) <= 32 )
@@ -3079,9 +3079,6 @@ int format_counters(struct thread_data *t, struct core_data *c, struct pkg_data
3079
3079
break ;
3080
3080
3081
3081
case PMT_TYPE_XTAL_TIME :
3082
- const unsigned long value_raw = p -> pmt_counter [i ];
3083
- const double value_converted = 100.0 * value_raw / crystal_hz / interval_float ;
3084
-
3085
3082
outp += sprintf (outp , "%s%.2f" , (printed ++ ? delim : "" ), value_converted );
3086
3083
break ;
3087
3084
}
0 commit comments