代码拉取完成,页面将自动刷新
#!/bin/bash
#Usage: local_prof.sh full_benchmark_name executable_name
#Example: local_prof.sh 600 perlbench_s.maplearm
#------------- configuration -----------------------
benchmark=$1
executable=$2
account="maple_perf"
pw="perf_maple"
profiler="perf"
log="t.log"
#----------------------------------------------------
more_profiling="n"
#echo $benchmark $executable
#base_run 'all options'
function base_run {
args="$1"
(echo ${pw} | time -o time.log sudo -Sk ${profiler} stat -e 'instructions:u' ./${executable} ${args} ) > ${log} 2>&1
instructions=$(grep "instructions:u" ${log} | column -t | cut -d' ' -f 1)
exec_time=$(grep "seconds user" ${log} | column -t | cut -d' ' -f 1)
#cat ${log}
echo "SPEC17(${benchmark}:${executable}) with args (${args}): ${instructions} instructions executed in ${exec_time} seconds"
echo ""
#Verification of results are not included
if [ "${more_profiling}" = "y" ]; then
( echo ${pw} | sudo -S -p '' ${profiler} record -e cpu-clock,faults ./${executable} ${args} ) > /dev/null 2>&1
echo ${pw} | sudo -S -p '' chmod 777 perf.data
${profiler} report --stdio > ${log}
echo top 5 hotspots:
head -n 16 "${log}" | tail -n 5
echo ""
echo ""
fi
}
function prof_600 {
cp /usr/local/spec2017/benchspec/CPU/500.perlbench_r/data/train/input/dictionary .
cp /usr/local/spec2017/benchspec/CPU/500.perlbench_r/data/all/input/cpu2017_mhonarc.rc .
cp /usr/local/spec2017/benchspec/CPU/500.perlbench_r/data/train/input/WORDS .
#test
base_run '-I. -I./lib /usr/local/spec2017/benchspec/CPU/500.perlbench_r/data/test/input/makerand.pl'
# base_run '-I. -I./lib /usr/local/spec2017/benchspec/CPU/500.perlbench_r/data/test/input/test.pl'
#train
base_run '-I/usr/local/spec2017/benchspec/CPU/500.perlbench_r/data/all/input/lib /usr/local/spec2017/benchspec/CPU/500.perlbench_r/data/all/input/diffmail.pl 2 550 15 24 23 100'
base_run '-I/usr/local/spec2017/benchspec/CPU/500.perlbench_r/data/all/input/lib /usr/local/spec2017/benchspec/CPU/500.perlbench_r/data/train/input/perfect.pl b 3'
base_run '-I/usr/local/spec2017/benchspec/CPU/500.perlbench_r/data/all/input/lib -I/usr/local/spec2017/benchspec/CPU/500.perlbench_r/data/train/input /usr/local/spec2017/benchspec/CPU/500.perlbench_r/data/train/input/scrabbl.pl </usr/local/spec2017/benchspec/CPU/500.perlbench_r/data/train/input/scrabbl.in'
base_run '-I/usr/local/spec2017/benchspec/CPU/500.perlbench_r/data/all/input/lib /usr/local/spec2017/benchspec/CPU/500.perlbench_r/data/all/input/splitmail.pl 535 13 25 24 1091 1'
base_run '-I/usr/local/spec2017/benchspec/CPU/500.perlbench_r/data/all/input/lib -I/usr/local/spec2017/benchspec/CPU/500.perlbench_r/data/all/input /usr/local/spec2017/benchspec/CPU/500.perlbench_r/data/train/input/suns.pl'
}
function prof_602 {
#test
base_run '/usr/local/spec2017/benchspec/CPU/502.gcc_r/data/test/input/t1.c -O3 -finline-limit=50000 -o t1.opts-O3_-finline-limit_50000.maplearm.s'
#train
base_run '/usr/local/spec2017/benchspec/CPU/502.gcc_r/data/train/input/200.c -O3 -finline-limit=50000 -o 200.opts-O3_-finline-limit_50000.maplearm.s'
base_run '/usr/local/spec2017/benchspec/CPU/502.gcc_r/data/train/input/scilab.c -O3 -finline-limit=50000 -o scilab.opts-O3_-finline-limit_50000.maplearm.s'
base_run '/usr/local/spec2017/benchspec/CPU/502.gcc_r/data/train/input/train01.c -O3 -finline-limit=50000 -o train01.opts-O3_-finline-limit_50000.maplearm.s'
}
function prof_605 {
#test
base_run '/usr/local/spec2017/benchspec/CPU/505.mcf_r/data/test/input/inp.in'
#train
base_run '/usr/local/spec2017/benchspec/CPU/505.mcf_r/data/train/input/inp.in'
}
function prof_625 {
#test
base_run '--dumpyuv 50 --frames 156 -o BuckBunny_New.264 /usr/local/spec2017/tests/625.x264_s/BuckBunny.yuv 1280x720'
#train
base_run '--dumpyuv 50 --frames 142 -o BuckBunny_New.264 /usr/local/spec2017/tests/625.x264_s/BuckBunny.yuv 1280x720'
}
function prof_657 {
#test
base_run '/usr/local/spec2017/benchspec/CPU/557.xz_r/data/all/input/cpu2006docs.tar.xz 4 055ce243071129412e9dd0b3b69a21654033a9b723d874b2015c774fac1553d9713be561ca86f74e4f16f22e664fc17a79f30caa5ad2c04fbc447549c2810fae 1548636 1555348 0'
base_run '/usr/local/spec2017/benchspec/CPU/557.xz_r/data/all/input/cpu2006docs.tar.xz 4 055ce243071129412e9dd0b3b69a21654033a9b723d874b2015c774fac1553d9713be561ca86f74e4f16f22e664fc17a79f30caa5ad2c04fbc447549c2810fae 1462248 -1 1'
base_run '/usr/local/spec2017/benchspec/CPU/557.xz_r/data/all/input/cpu2006docs.tar.xz 4 055ce243071129412e9dd0b3b69a21654033a9b723d874b2015c774fac1553d9713be561ca86f74e4f16f22e664fc17a79f30caa5ad2c04fbc447549c2810fae 1428548 -1 2'
base_run '/usr/local/spec2017/benchspec/CPU/557.xz_r/data/all/input/cpu2006docs.tar.xz 4 055ce243071129412e9dd0b3b69a21654033a9b723d874b2015c774fac1553d9713be561ca86f74e4f16f22e664fc17a79f30caa5ad2c04fbc447549c2810fae 1034828 -1 3e'
base_run '/usr/local/spec2017/benchspec/CPU/557.xz_r/data/all/input/cpu2006docs.tar.xz 4 055ce243071129412e9dd0b3b69a21654033a9b723d874b2015c774fac1553d9713be561ca86f74e4f16f22e664fc17a79f30caa5ad2c04fbc447549c2810fae 1061968 -1 4'
base_run '/usr/local/spec2017/benchspec/CPU/557.xz_r/data/all/input/cpu2006docs.tar.xz 4 055ce243071129412e9dd0b3b69a21654033a9b723d874b2015c774fac1553d9713be561ca86f74e4f16f22e664fc17a79f30caa5ad2c04fbc447549c2810fae 1034588 -1 4e'
base_run '/usr/local/spec2017/benchspec/CPU/557.xz_r/data/all/input/cpu2006docs.tar.xz 1 055ce243071129412e9dd0b3b69a21654033a9b723d874b2015c774fac1553d9713be561ca86f74e4f16f22e664fc17a79f30caa5ad2c04fbc447549c2810fae 650156 -1 0'
base_run '/usr/local/spec2017/benchspec/CPU/557.xz_r/data/all/input/cpu2006docs.tar.xz 1 055ce243071129412e9dd0b3b69a21654033a9b723d874b2015c774fac1553d9713be561ca86f74e4f16f22e664fc17a79f30caa5ad2c04fbc447549c2810fae 639996 -1 1'
base_run '/usr/local/spec2017/benchspec/CPU/557.xz_r/data/all/input/cpu2006docs.tar.xz 1 055ce243071129412e9dd0b3b69a21654033a9b723d874b2015c774fac1553d9713be561ca86f74e4f16f22e664fc17a79f30caa5ad2c04fbc447549c2810fae 637616 -1 2'
base_run '/usr/local/spec2017/benchspec/CPU/557.xz_r/data/all/input/cpu2006docs.tar.xz 1 055ce243071129412e9dd0b3b69a21654033a9b723d874b2015c774fac1553d9713be561ca86f74e4f16f22e664fc17a79f30caa5ad2c04fbc447549c2810fae 628996 -1 3e'
base_run '/usr/local/spec2017/benchspec/CPU/557.xz_r/data/all/input/cpu2006docs.tar.xz 1 055ce243071129412e9dd0b3b69a21654033a9b723d874b2015c774fac1553d9713be561ca86f74e4f16f22e664fc17a79f30caa5ad2c04fbc447549c2810fae 631912 -1 4'
base_run '/usr/local/spec2017/benchspec/CPU/557.xz_r/data/all/input/cpu2006docs.tar.xz 1 055ce243071129412e9dd0b3b69a21654033a9b723d874b2015c774fac1553d9713be561ca86f74e4f16f22e664fc17a79f30caa5ad2c04fbc447549c2810fae 629064 -1 4e'
#train
base_run '/usr/local/spec2017/benchspec/CPU/557.xz_r/data/all/input/input.combined.xz 40 a841f68f38572a49d86226b7ff5baeb31bd19dc637a922a972b2e6d1257a890f6a544ecab967c313e370478c74f760eb229d4eef8a8d2836d233d3e9dd1430bf 6356684 -1 8'
base_run '/usr/local/spec2017/benchspec/CPU/557.xz_r/data/train/input/IMG_2560.cr2.xz 40 ec03e53b02deae89b6650f1de4bed76a012366fb3d4bdc791e8633d1a5964e03004523752ab008eff0d9e693689c53056533a05fc4b277f0086544c6c3cbbbf6 40822692 40824404 4'
}
if [ "$3" = "m" ]; then
#more profiling info
more_profiling="y"
fi
prof_${benchmark}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。