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 26, 2023
1 parent 512af7f commit 7326369
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 3 deletions.
26 changes: 26 additions & 0 deletions benchmarks/coremark/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,32 @@ 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_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
23 changes: 20 additions & 3 deletions benchmarks/coremark/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,31 @@ else
COREMARK_PRINT_ARGS = 0
endif

CFLAGS += ${DEFINE_PREFIX}USE_PTHREAD ${DEFINE_PREFIX}PERFORMANCE_RUN=1
CFLAGS += ${DEFINE_PREFIX}MULTITHREAD=$(COREMARK_NTHREADS)
ifeq ($(CONFIG_COREMARK_MEM_METHOD), 1)
CFLAGS += ${DEFINE_PREFIX}MEM_LOCATION=\"HEAP\"
else ifeq ($(CONFIG_COREMARK_MEM_METHOD), 2)
CFLAGS += ${DEFINE_PREFIX}MEM_LOCATION=\"STACK\"
else
CFLAGS += ${DEFINE_PREFIX}MEM_LOCATION=\"GLOBAL\"
endif

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_METHOD=$(CONFIG_COREMARK_MEM_METHOD)
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 7326369

Please sign in to comment.