diff options
-rwxr-xr-x | tools/testing/selftests/intel_pstate/run.sh | 16 |
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 | ||
98 | echo "==============================================================================" | 98 | echo "========================================================================" |
99 | echo "The marketing frequency of the cpu is $mkt_freq MHz" | 99 | echo "The marketing frequency of the cpu is $mkt_freq MHz" |
100 | echo "The maximum frequency of the cpu is $max_freq MHz" | 100 | echo "The maximum frequency of the cpu is $max_freq MHz" |
101 | echo "The minimum frequency of the cpu is $min_freq MHz" | 101 | echo "The minimum frequency of the cpu is $min_freq MHz" |
102 | 102 | ||
103 | # make a pretty table | 103 | # make a pretty table |
104 | echo "Target Actual Difference MSR(0x199) max_perf_pct" | 104 | echo "Target Actual Difference MSR(0x199) max_perf_pct" | tr " " "\n" > /tmp/result.tab |
105 | for freq in `seq $max_freq -100 $min_freq` | 105 | for freq in `seq $max_freq -100 $min_freq` |
106 | do | 106 | do |
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)) | ||
116 | EOF | ||
111 | done | 117 | done |
118 | |||
119 | # print the table | ||
120 | pr -aTt -5 < /tmp/result.tab | ||
121 | |||
112 | exit 0 | 122 | exit 0 |