Skip to content

Commit

Permalink
benchmarks/coremark: apply SEED_METHOD/MEM_METHOD update
Browse files Browse the repository at this point in the history
Signed-off-by: haopengxiang <[email protected]>
  • Loading branch information
haopengxiang committed Aug 25, 2023
1 parent a4f0349 commit eaadefa
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 3 deletions.
37 changes: 37 additions & 0 deletions benchmarks/coremark/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,43 @@ config COREMARK_STACKSIZE
int "CoreMark task stack size"
default 4096

config COREMARK_SEED_METHOD
int "Coremark Seed Method"
default 2
---help---
Set Coremark Seed Method:
0: SEED_ARG
1: SEED_FUNC
2: SEED_VOLATILE

config COREMARK_MEM_METHOD
int "Coremark Memory Method"
default 1
---help---
Set Coremark Memory Method:
0: MEM_STATIC
1: MEM_MALLOC
2: MEM_STACK

config COREMARK_MEM_LOCATION
string
default "global" if COREMARK_MEM_METHOD == 0
default "heap" if COREMARK_MEM_METHOD == 1
default "stack" if COREMARK_MEM_METHOD == 2
---help---
Set Coremark Memory Location:
0: global
1: heap
2: stack

config COREMARK_DEBUG
int "Coremark Core Debug"
default 0
---help---
Enable the Core Debug:
0: Disable
1: Enable

config COREMARK_PRINT_ARGS
bool "Print CoreMark arguments when executing"
default n
Expand Down
17 changes: 14 additions & 3 deletions benchmarks/coremark/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,25 @@ else
COREMARK_PRINT_ARGS = 0
endif

CFLAGS += ${DEFINE_PREFIX}USE_PTHREAD ${DEFINE_PREFIX}PERFORMANCE_RUN=1
CFLAGS += ${DEFINE_PREFIX}MULTITHREAD=$(COREMARK_NTHREADS)
CFLAGS += ${DEFINE_PREFIX}CALLGRIND_RUN=0
CFLAGS += ${DEFINE_PREFIX}COMPILER_REQUIRES_SORT_RETURN=0
CFLAGS += ${DEFINE_PREFIX}CORE_DEBUG=$(CONFIG_COREMARK_DEBUG)
CFLAGS += ${DEFINE_PREFIX}FLAGS_STR=\""$(ARCHOPTIMIZATION)\""
CFLAGS += ${DEFINE_PREFIX}MEM_LOCATION=$(CONFIG_COREMARK_MEM_LOCATION)
CFLAGS += ${DEFINE_PREFIX}MEM_METHOD=$(CONFIG_COREMARK_MEM_METHOD)
CFLAGS += ${DEFINE_PREFIX}PRINT_ARGS=0
CFLAGS += ${DEFINE_PREFIX}MICA=0
CFLAGS += ${DEFINE_PREFIX}MULTITHREAD=$(COREMARK_NTHREADS)
CFLAGS += ${DEFINE_PREFIX}PERFORMANCE_RUN=1
CFLAGS += ${DEFINE_PREFIX}PRINT_ARGS=$(COREMARK_PRINT_ARGS)
CFLAGS += ${DEFINE_PREFIX}MEM_LOCATION=\"Stack\"
CFLAGS += ${DEFINE_PREFIX}SEED_METHOD=$(CONFIG_COREMARK_SEED_METHOD)
CFLAGS += ${DEFINE_PREFIX}USE_CLOCK=1
CFLAGS += ${DEFINE_PREFIX}USE_PTHREAD

ifeq ($(CONFIG_COREMARK_ITERATIONS_OVERRIDE),y)
CFLAGS += ${DEFINE_PREFIX}ITERATIONS=$(CONFIG_COREMARK_ITERATIONS_COUNT)
else
CFLAGS += ${DEFINE_PREFIX}ITERATIONS=0
endif

CSRCS += core_list_join.c
Expand Down

0 comments on commit eaadefa

Please sign in to comment.