benchmarks/coremark: Improve CoreMark result message

This commit is contained in:
Lucas Saavedra Vaz 2023-03-07 18:27:17 -03:00 committed by Xiang Xiao
parent dbf7d34a2a
commit 005a4c60c9
3 changed files with 33 additions and 10 deletions

View File

@ -4,31 +4,34 @@
# #
menuconfig BENCHMARK_COREMARK menuconfig BENCHMARK_COREMARK
bool "Coremark Benchmark" bool "CoreMark Benchmark"
select LIBC_FLOATINGPOINT
default n default n
---help--- ---help---
Enable support for the EEMBC's Coremark benchmark application. Enable support for the EEMBC's CoreMark benchmark application.
if BENCHMARK_COREMARK if BENCHMARK_COREMARK
config COREMARK_PROGNAME config COREMARK_PROGNAME
string "Coremark program name" string "CoreMark program name"
default "coremark" default "coremark"
---help--- ---help---
This is the name of the program that will be used when the NSH ELF This is the name of the program that will be used when the NSH ELF
program is installed. program is installed.
config COREMARK_PRIORITY config COREMARK_PRIORITY
int "Coremark task priority" int "CoreMark task priority"
default 100 default 100
config COREMARK_STACKSIZE config COREMARK_STACKSIZE
int "Coremark task stack size" int "CoreMark task stack size"
default 4096 default 4096
config COREMARK_MEM_LOCATION config COREMARK_PRINT_ARGS
string "Coremark memory location string" bool "Print CoreMark arguments when executing"
default "Defined by the NuttX configuration" default n
---help---
Print the command line arguments passed on to coremark.
config COREMARK_MULTITHREAD_OVERRIDE config COREMARK_MULTITHREAD_OVERRIDE
bool "Override number of threads" bool "Override number of threads"

View File

@ -51,10 +51,17 @@ COREMARK_NTHREADS = 1
endif endif
endif endif
ifeq ($(CONFIG_COREMARK_PRINT_ARGS),y)
COREMARK_PRINT_ARGS = 1
else
COREMARK_PRINT_ARGS = 0
endif
CFLAGS += ${DEFINE_PREFIX}USE_PTHREAD ${DEFINE_PREFIX}PERFORMANCE_RUN=1 CFLAGS += ${DEFINE_PREFIX}USE_PTHREAD ${DEFINE_PREFIX}PERFORMANCE_RUN=1
CFLAGS += ${DEFINE_PREFIX}MULTITHREAD=$(COREMARK_NTHREADS) CFLAGS += ${DEFINE_PREFIX}MULTITHREAD=$(COREMARK_NTHREADS)
CFLAGS += ${DEFINE_PREFIX}FLAGS_STR="\"Using NuttX compilation options\"" CFLAGS += ${DEFINE_PREFIX}FLAGS_STR=\""$(ARCHOPTIMIZATION)\""
CFLAGS += ${DEFINE_PREFIX}MEM_LOCATION=\"$(CONFIG_COREMARK_MEM_LOCATION)\" CFLAGS += ${DEFINE_PREFIX}PRINT_ARGS=$(COREMARK_PRINT_ARGS)
CFLAGS += ${DEFINE_PREFIX}MEM_LOCATION=\"Stack\"
ifeq ($(CONFIG_COREMARK_ITERATIONS_OVERRIDE),y) ifeq ($(CONFIG_COREMARK_ITERATIONS_OVERRIDE),y)
CFLAGS += ${DEFINE_PREFIX}ITERATIONS=$(CONFIG_COREMARK_ITERATIONS_COUNT) CFLAGS += ${DEFINE_PREFIX}ITERATIONS=$(CONFIG_COREMARK_ITERATIONS_COUNT)
@ -78,6 +85,7 @@ $(COREMARK_UNPACKNAME): $(COREMARK_ZIP)
@echo "Unpacking: $(COREMARK_ZIP) -> $(COREMARK_UNPACKNAME)" @echo "Unpacking: $(COREMARK_ZIP) -> $(COREMARK_UNPACKNAME)"
$(Q) $(UNPACK) $(COREMARK_ZIP) $(Q) $(UNPACK) $(COREMARK_ZIP)
$(Q) mv coremark-$(COREMARK_VERSION) $(COREMARK_UNPACKNAME) $(Q) mv coremark-$(COREMARK_VERSION) $(COREMARK_UNPACKNAME)
$(Q) patch -p0 < add_init_message.patch # Update init message
$(Q) touch $(COREMARK_UNPACKNAME) $(Q) touch $(COREMARK_UNPACKNAME)
clean:: clean::

View File

@ -0,0 +1,12 @@
--- coremark/posix/core_portme.c
+++ coremark/posix/core_portme.c
@@ -208,6 +208,9 @@ ee_u32 default_num_contexts = MULTITHREAD;
void
portable_init(core_portable *p, int *argc, char *argv[])
{
+
+ ee_printf("Running CoreMark...\n");
+
#if PRINT_ARGS
int i;
for (i = 0; i < *argc; i++)