Back to home page

OSCL-LXR

 
 

    


0001 #!/bin/sh
0002 # perf stat csv summary test
0003 # SPDX-License-Identifier: GPL-2.0
0004 
0005 set -e
0006 
0007 #
0008 #     1.001364330 9224197  cycles 8012885033 100.00
0009 #         summary 9224197  cycles 8012885033 100.00
0010 #
0011 perf stat -e cycles  -x' ' -I1000 --interval-count 1 --summary 2>&1 | \
0012 grep -e summary | \
0013 while read summary num event run pct
0014 do
0015         if [ $summary != "summary" ]; then
0016                 exit 1
0017         fi
0018 done
0019 
0020 #
0021 #     1.001360298 9148534  cycles 8012853854 100.00
0022 #9148534  cycles 8012853854 100.00
0023 #
0024 perf stat -e cycles  -x' ' -I1000 --interval-count 1 --summary --no-csv-summary 2>&1 | \
0025 grep -e summary | \
0026 while read num event run pct
0027 do
0028         exit 1
0029 done
0030 
0031 exit 0