This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push:
new 005a4c60c benchmarks/coremark: Improve CoreMark result message
005a4c60c is described below
commit 005a4c60c9a0e37463e722297a171f4097f728b2
Author: Lucas Saavedra Vaz <[email protected]>
AuthorDate: Tue Mar 7 18:27:17 2023 -0300
benchmarks/coremark: Improve CoreMark result message
---
benchmarks/coremark/Kconfig | 19 +++++++++++--------
benchmarks/coremark/Makefile | 12 ++++++++++--
benchmarks/coremark/add_init_message.patch | 12 ++++++++++++
3 files changed, 33 insertions(+), 10 deletions(-)
diff --git a/benchmarks/coremark/Kconfig b/benchmarks/coremark/Kconfig
index e733083c6..8f08eb9e7 100644
--- a/benchmarks/coremark/Kconfig
+++ b/benchmarks/coremark/Kconfig
@@ -4,31 +4,34 @@
#
menuconfig BENCHMARK_COREMARK
- bool "Coremark Benchmark"
+ bool "CoreMark Benchmark"
+ select LIBC_FLOATINGPOINT
default n
---help---
- Enable support for the EEMBC's Coremark benchmark application.
+ Enable support for the EEMBC's CoreMark benchmark application.
if BENCHMARK_COREMARK
config COREMARK_PROGNAME
- string "Coremark program name"
+ string "CoreMark program name"
default "coremark"
---help---
This is the name of the program that will be used when the NSH
ELF
program is installed.
config COREMARK_PRIORITY
- int "Coremark task priority"
+ int "CoreMark task priority"
default 100
config COREMARK_STACKSIZE
- int "Coremark task stack size"
+ int "CoreMark task stack size"
default 4096
-config COREMARK_MEM_LOCATION
- string "Coremark memory location string"
- default "Defined by the NuttX configuration"
+config COREMARK_PRINT_ARGS
+ bool "Print CoreMark arguments when executing"
+ default n
+ ---help---
+ Print the command line arguments passed on to coremark.
config COREMARK_MULTITHREAD_OVERRIDE
bool "Override number of threads"
diff --git a/benchmarks/coremark/Makefile b/benchmarks/coremark/Makefile
index 31277712e..afd371d4e 100644
--- a/benchmarks/coremark/Makefile
+++ b/benchmarks/coremark/Makefile
@@ -51,10 +51,17 @@ COREMARK_NTHREADS = 1
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}MULTITHREAD=$(COREMARK_NTHREADS)
-CFLAGS += ${DEFINE_PREFIX}FLAGS_STR="\"Using NuttX compilation options\""
-CFLAGS += ${DEFINE_PREFIX}MEM_LOCATION=\"$(CONFIG_COREMARK_MEM_LOCATION)\"
+CFLAGS += ${DEFINE_PREFIX}FLAGS_STR=\""$(ARCHOPTIMIZATION)\""
+CFLAGS += ${DEFINE_PREFIX}PRINT_ARGS=$(COREMARK_PRINT_ARGS)
+CFLAGS += ${DEFINE_PREFIX}MEM_LOCATION=\"Stack\"
ifeq ($(CONFIG_COREMARK_ITERATIONS_OVERRIDE),y)
CFLAGS += ${DEFINE_PREFIX}ITERATIONS=$(CONFIG_COREMARK_ITERATIONS_COUNT)
@@ -78,6 +85,7 @@ $(COREMARK_UNPACKNAME): $(COREMARK_ZIP)
@echo "Unpacking: $(COREMARK_ZIP) -> $(COREMARK_UNPACKNAME)"
$(Q) $(UNPACK) $(COREMARK_ZIP)
$(Q) mv coremark-$(COREMARK_VERSION) $(COREMARK_UNPACKNAME)
+ $(Q) patch -p0 < add_init_message.patch # Update init message
$(Q) touch $(COREMARK_UNPACKNAME)
clean::
diff --git a/benchmarks/coremark/add_init_message.patch
b/benchmarks/coremark/add_init_message.patch
new file mode 100644
index 000000000..6ceecc063
--- /dev/null
+++ b/benchmarks/coremark/add_init_message.patch
@@ -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++)