Difference between revisions of "Benchmarking: Coremark"

From Define Wiki
Jump to navigation Jump to search
(Created page with "== Decompress == <syntaxhighlight> root@jph1:~# tar zxvf coremark_v1.0 cd coremark_v1.0 </syntaxhighlight> == Adjust compilation flags == Seems to be in <code>./linux64/core_portme.mak</code> * Ch...")
 
Line 9: Line 9:
 
* Change '''<code>PORT_CFLAGS</code>''' value to '''<code>-O3</code>'''
 
* Change '''<code>PORT_CFLAGS</code>''' value to '''<code>-O3</code>'''
 
* Add extra flags to the end of the '''<code>CFLAGS</code>''' statement
 
* Add extra flags to the end of the '''<code>CFLAGS</code>''' statement
 +
For example:
 +
<syntaxhighlight>
 +
CC = gcc
 +
# Flag: CFLAGS
 +
#      Use this flag to define compiler options. Note, you can add compiler options from the command line using XCFLAGS="other flags"
 +
PORT_CFLAGS = -O3
 +
FLAGS_STR = "$(PORT_CFLAGS) $(XCFLAGS) $(XLFLAGS) $(LFLAGS_END)"
 +
CFLAGS = $(PORT_CFLAGS) -I$(PORT_DIR) -I. -DFLAGS_STR=\"$(FLAGS_STR)\" -funroll-all-loops --param max-inline-insns-auto=200
 +
</syntaxhighlight>
  
 
==  Run benchmark ==
 
==  Run benchmark ==

Revision as of 14:47, 1 April 2014

Decompress

root@jph1:~# tar zxvf coremark_v1.0
cd coremark_v1.0

Adjust compilation flags

Seems to be in ./linux64/core_portme.mak

  • Change PORT_CFLAGS value to -O3
  • Add extra flags to the end of the CFLAGS statement

For example:

CC = gcc
# Flag: CFLAGS
#       Use this flag to define compiler options. Note, you can add compiler options from the command line using XCFLAGS="other flags"
PORT_CFLAGS = -O3
FLAGS_STR = "$(PORT_CFLAGS) $(XCFLAGS) $(XLFLAGS) $(LFLAGS_END)"
CFLAGS = $(PORT_CFLAGS) -I$(PORT_DIR) -I. -DFLAGS_STR=\"$(FLAGS_STR)\" -funroll-all-loops --param max-inline-insns-auto=200

Run benchmark

Run benchmark with

make</code>:
<syntaxhighlight>
root@jph1:~/coremark_v1.0# pwd
/root/coremark_v1.0
root@jph1:~/coremark_v1.0# make

If you have a fast system (faster than a RaspberryPi), increase the number of iterations to increase the test run to give a more meaningful result:

root@jph1:~/coremark_v1.0# make ITERATIONS=10

Results