aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xtools/testing/selftests/intel_pstate/run.sh16
1 files changed, 13 insertions, 3 deletions
diff --git a/tools/testing/selftests/intel_pstate/run.sh b/tools/testing/selftests/intel_pstate/run.sh
index 928978804342..8576f6564307 100755
--- a/tools/testing/selftests/intel_pstate/run.sh
+++ b/tools/testing/selftests/intel_pstate/run.sh
@@ -95,18 +95,28 @@ done
95 95
96[ $EVALUATE_ONLY -eq 0 ] && cpupower frequency-set -g powersave --max=${max_freq}MHz >& /dev/null 96[ $EVALUATE_ONLY -eq 0 ] && cpupower frequency-set -g powersave --max=${max_freq}MHz >& /dev/null
97 97
98echo "==============================================================================" 98echo "========================================================================"
99echo "The marketing frequency of the cpu is $mkt_freq MHz" 99echo "The marketing frequency of the cpu is $mkt_freq MHz"
100echo "The maximum frequency of the cpu is $max_freq MHz" 100echo "The maximum frequency of the cpu is $max_freq MHz"
101echo "The minimum frequency of the cpu is $min_freq MHz" 101echo "The minimum frequency of the cpu is $min_freq MHz"
102 102
103# make a pretty table 103# make a pretty table
104echo "Target Actual Difference MSR(0x199) max_perf_pct" 104echo "Target Actual Difference MSR(0x199) max_perf_pct" | tr " " "\n" > /tmp/result.tab
105for freq in `seq $max_freq -100 $min_freq` 105for freq in `seq $max_freq -100 $min_freq`
106do 106do
107 result_freq=$(cat /tmp/result.${freq} | grep "cpu MHz" | awk ' { print $4 } ' | awk -F "." ' { print $1 } ') 107 result_freq=$(cat /tmp/result.${freq} | grep "cpu MHz" | awk ' { print $4 } ' | awk -F "." ' { print $1 } ')
108 msr=$(cat /tmp/result.${freq} | grep "msr" | awk ' { print $3 } ') 108 msr=$(cat /tmp/result.${freq} | grep "msr" | awk ' { print $3 } ')
109 max_perf_pct=$(cat /tmp/result.${freq} | grep "max_perf_pct" | awk ' { print $2 } ' ) 109 max_perf_pct=$(cat /tmp/result.${freq} | grep "max_perf_pct" | awk ' { print $2 } ' )
110 echo " $freq $result_freq $(($result_freq-$freq)) $msr $(($max_perf_pct*$max_freq))" 110 cat >> /tmp/result.tab << EOF
111$freq
112$result_freq
113$((result_freq - freq))
114$msr
115$((max_perf_pct * max_freq))
116EOF
111done 117done
118
119# print the table
120pr -aTt -5 < /tmp/result.tab
121
112exit 0 122exit 0