Preface
This article would illustrate the programs used to benchmark the SoC(include the SMP) performance, also the step to build and run the benchmark programs. And at the end, I give 2 scripts to make the benchmark work more efficiently.
These benchmark programs would evaluate the Integer and FP performance, also the latency of the L1-Cache and L2-Cache. We can fetch these tools from net. And some of them comes from the lmbench. For the lmbench you may view my previous blog post(In Chinese).ARM Linux BenchMark. Also refer the github repo which suit the previous blog post:
https://github.com/tonyho/ARM_BenchMark
Besides, if you want to compare the SoC in the phone and the arm linux board, you can do these:
①Install the benchmark apks(the roylongbottom collect and modify many benchmarks tools for Android) to android phone to make a benchmark
②then use the below repo tools to run a benchmark in ARM linux board:
https://github.com/tonyho/ARM-MP-BenchMark
③compare the result
1. Integer BenchMark: CoreMark(version:1.01)
compile:
downlaod the coremark from http://www.eembc.org/
①compile the source code for single core CPU:
arm-poky-linux-gnueabi-gcc -c -march=armv7-a -mfloat-abi=hard -mfpu=neon -mtune=cortex-a15 -I./ -Isimple -DITERATIONS=0 -DSEED_METHOD=SEED_ARG -DCOMPILER_FLAGS=\""-march=armv7-a-mfloat-abi=hard-mfpu=neon-mtune=cortex-a15-Os\"" -Os core_main.c core_list_join.c core_matrix.c core_state.c core_util.c simple/core_portme.c
Link:
arm-poky-linux-gnueabi-gcc core_main.o core_list_join.o core_matrix.o core_state.o core_util.o core_portme.o -o coremark -lc
For static link:
arm-poky-linux-gnueabi-gcc core_main.o core_list_join.o core_matrix.o core_state.o core_util.o core_portme.o -o coremark.static -lc -static
②compile the source code for multicore CPU:
cp linux/ -r arm_ti
#Modify the CC and LD to cross compile toolchain gcc
gvim arm_ti/core_portme.mak
#build the coremark:
make PORT_DIR=./arm_ti/ XCFLAGS="-DMULTITHREAD=4 -DUSE_FORK=1" make PORT_DIR=./arm_ti/ REBUILD=1