Skip to contentSkip to conversation

package/coremark: new package

PATCH New Chris Packham 3 participants 7 messages Nov 11, 2020 – Jan 8, 2021

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 package/coremark: new package

CoreMark is a simple, yet sophisticated benchmark that is designed specifically to test the functionality of a processor core. Running CoreMark produces a single-number score allowing users to make quick comparisons between processors.

https://www.eembc.org/coremark/

---
Changes in v2:
- None

 DEVELOPERS                     |  1 +
 package/Config.in              |  1 +
 package/coremark/Config.in     |  8 ++++++++
 package/coremark/coremark.hash |  3 +++
 package/coremark/coremark.mk   | 21 +++++++++++++++++++++
 5 files changed, 34 insertions(+)
 create mode 100644 package/coremark/Config.in
 create mode 100644 package/coremark/coremark.hash
 create mode 100644 package/coremark/coremark.mk
DEVELOPERS +1 -0
index 43cc1b55ae..ff823a2e3d 100644
@@ -490,6 +490,7 @@ F:	configs/olimex_a13_olinuxino_defconfig
 F:	configs/orangepi_plus_defconfig
 
 N:	Chris Packham <[email protected]>
+F:	package/coremark/
 F:	package/gstreamer1/gst1-shark/
 F:	package/micropython/
 F:	package/micropython-lib/
package/Config.in +1 -0
index 016a99ed1a..16fd95fe38 100644
@@ -87,6 +87,7 @@ menu "Debugging, profiling and benchmark"
 	source "package/bonnie/Config.in"
 	source "package/cache-calibrator/Config.in"
 	source "package/clinfo/Config.in"
+	source "package/coremark/Config.in"
 	source "package/dacapo/Config.in"
 	source "package/dhrystone/Config.in"
 	source "package/dieharder/Config.in"
package/coremark/Config.in new file +8 -0
new file mode 100644
index 0000000000..f0e13eda63
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_COREMARK
+	bool "coremark"
+	help
+	  CoreMark is a benchmark that measures the performance of
+	  microcontrollers (MCUs) and central processing units (CPUs)
+	  used in embedded systems
+
+	  https://www.eembc.org/coremark/
package/coremark/coremark.hash new file +3 -0
new file mode 100644
index 0000000000..57da3e998c
@@ -0,0 +1,3 @@
+#locally computed
+sha256  99c5a6d63af85a281b4e4d6ccb522c446653c435dfec9455ad73ef9e71f28bde  coremark-1.01.tar.gz
+sha256  d72094a3cb629dc7712ae09b7b777416903c6670930928b5530f2ddfb2296888  LICENSE.md
package/coremark/coremark.mk new file +21 -0
new file mode 100644
index 0000000000..418fd5c8d3
@@ -0,0 +1,21 @@
+################################################################################
+#
+# CoreMark
+#
+################################################################################
+
+COREMARK_VERSION = 1.01
+COREMARK_SITE = $(call github,eembc,coremark,v$(COREMARK_VERSION))
+COREMARK_LICENSE = Apache-2.0
+COREMARK_LICENSE_FILES = LICENSE.md
+
+define COREMARK_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) CC="$(TARGET_CC)" -C $(@D) \
+		PORT_DIR=linux$(if $(BR2_ARCH_IS_64),64) EXE= link
+endef
+
+define COREMARK_INSTALL_TARGET_CMDS
+	$(INSTALL) -D $(@D)/coremark $(TARGET_DIR)/usr/bin/coremark
+endef
+
+$(eval $(generic-package))
Signature · 1 line
2.29.2
#1 lore raw

PATCH v2 2/2 package/coremark-pro: new package

CoreMark-Pro is a comprehensive, advanced processor benchmark that works with and enhances the market-proven industry-standard EEMBC CoreMark benchmark.

https://www.eembc.org/coremark-pro/

---
Changes in v2:
- Add depends on BR2_USE_MMU (thanks Matt)

 DEVELOPERS                             |  1 +
 package/Config.in                      |  1 +
 package/coremark-pro/Config.in         |  8 +++++
 package/coremark-pro/coremark-pro.hash |  3 ++
 package/coremark-pro/coremark-pro.mk   | 42 ++++++++++++++++++++++++++
 package/coremark-pro/coremark-pro.sh   | 36 ++++++++++++++++++++++
 6 files changed, 91 insertions(+)
 create mode 100644 package/coremark-pro/Config.in
 create mode 100644 package/coremark-pro/coremark-pro.hash
 create mode 100644 package/coremark-pro/coremark-pro.mk
 create mode 100755 package/coremark-pro/coremark-pro.sh
DEVELOPERS +1 -0
index ff823a2e3d..291dd41286 100644
@@ -491,6 +491,7 @@ F:	configs/orangepi_plus_defconfig
 
 N:	Chris Packham <[email protected]>
 F:	package/coremark/
+F:	package/coremark-pro/
 F:	package/gstreamer1/gst1-shark/
 F:	package/micropython/
 F:	package/micropython-lib/
package/Config.in +1 -0
index 16fd95fe38..0011ccd684 100644
@@ -88,6 +88,7 @@ menu "Debugging, profiling and benchmark"
 	source "package/cache-calibrator/Config.in"
 	source "package/clinfo/Config.in"
 	source "package/coremark/Config.in"
+	source "package/coremark-pro/Config.in"
 	source "package/dacapo/Config.in"
 	source "package/dhrystone/Config.in"
 	source "package/dieharder/Config.in"
package/coremark-pro/Config.in new file +8 -0
new file mode 100644
index 0000000000..dd6821056c
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_COREMARK_PRO
+	bool "coremark-pro"
+	depends on BR2_USE_MMU # perl uses fork()
+	select BR2_PACKAGE_PERL
+	help
+	  CoreMark-PRO is a comprehensive, advanced processor benchmark.
+
+	  https://www.eembc.org/coremark-pro/
package/coremark-pro/coremark-pro.hash new file +3 -0
new file mode 100644
index 0000000000..16b121edb3
@@ -0,0 +1,3 @@
+#locally computed
+sha256  440223554134832efec4ad220795611769ded3869fbc3ce3c59b05b7ddeb9f6d  coremark-pro-1.1.2743.tar.gz
+sha256  0d7775bd793ea71fef3594c18164a08ed2f5f66c898958d0644f7a236a536f2b  LICENSE.md
package/coremark-pro/coremark-pro.mk new file +42 -0

42 lines not on this page · raw message

package/coremark-pro/coremark-pro.sh new file +36 -0
new file mode 100755
index 0000000000..65ad9df645
@@ -0,0 +1,36 @@
+#!/bin/sh
+# SPDX-License-Identifier: Apache-2.0
+
+workloads="cjpeg-rose7-preset core linear_alg-mid-100x100-sp \
+    loops-all-mid-10k-sp nnet_test parser-125k radix2-big-64k sha-test zip-test"
+
+rm -rf /tmp/coremark-pro
+mkdir -p /tmp/coremark-pro
+cp /usr/share/coremark-pro/Rose256.bmp /tmp/coremark-pro
+cp /usr/share/coremark-pro/logs/*.size.log /tmp/coremark-pro
+
+cd /tmp/coremark-pro
+
+for contype in single best; do
+    cat /usr/share/coremark-pro/util/perl/headings.txt >>result.log
+    for wld in $workloads; do
+        [ "$contype" = "single" ] && XCMD="-c1 -w1"
+        [ "$contype" = "best" ] && XCMD="-c$(nproc) -w$(nproc)"
+        echo "#Results for verification run started at $(date +%y%j:%H:%M:%S) XCMD=$XCMD" >$wld-$contype-result.log
+        echo "Verification run for $wld"
+        $wld $XCMD -v1 > $wld.run.log
+        LC_ALL=C perl /usr/share/coremark-pro/util/perl/results_parser.pl $wld-$contype-result.log $wld.run.log
+        echo "#Results for performance runs started at $(date +%y%j:%H:%M:%S) XCMD=$XCMD" >>$wld-$contype-result.log
+        echo "Performance run for $wld"
+        for i in 1 2 3; do
+            $wld $XCMD -v0 > $wld.run.log
+            LC_ALL=C perl /usr/share/coremark-pro/util/perl/results_parser.pl $wld-$contype-result.log $wld.run.log
+        done
+        echo "#Median for final result $wld" >>$wld-$contype-result.log
+        LC_ALL=C perl /usr/share/coremark-pro/util/perl/cert_median.pl $wld-$contype-result.log $contype >>$wld-$contype-result.log
+        cat $wld-$contype-result.log >>result.log
+    done
+done
+LC_ALL=C perl /usr/share/coremark-pro/util/perl/cert_mark.pl -i result.log -s coremarkpro > result.mark
+cat result.mark
+cd - >/dev/null
Signature · 1 line
2.29.2
#3 lore raw

PATCH v2 2/2 package/coremark-pro: new package

In reply to Chris Packham
Quoted 11 lines · Chris Packham

CoreMark-Pro is a comprehensive, advanced processor benchmark that works with and enhances the market-proven industry-standard EEMBC CoreMark benchmark.

https://www.eembc.org/coremark-pro/

---
Changes in v2:
- Add depends on BR2_USE_MMU (thanks Matt)

[snip]

package/coremark-pro/coremark-pro.hash line 1

Quoted 7 lines
package/coremark-pro/coremark-pro.hash new file +1 -0
new file mode 100644
index 0000000000..16b121edb3
@@ -0,0 +1,3 @@
+#locally computed

(nitpick)

# Locally computed

Quoted 33 lines
package/coremark-pro/coremark-pro.hash new file +2 -0
+sha256  440223554134832efec4ad220795611769ded3869fbc3ce3c59b05b7ddeb9f6d  coremark-pro-1.1.2743.tar.gz
+sha256  0d7775bd793ea71fef3594c18164a08ed2f5f66c898958d0644f7a236a536f2b  LICENSE.md
package/coremark-pro/coremark-pro.mk new file +25 -0
new file mode 100644
index 0000000000..d3e99fcdfd
@@ -0,0 +1,42 @@
+################################################################################
+#
+# CoreMark-PRO
+#
+################################################################################
+
+COREMARK_PRO_VERSION = 1.1.2743
+COREMARK_PRO_SITE = $(call github,eembc,coremark-pro,v$(COREMARK_PRO_VERSION))
+COREMARK_PRO_LICENSE = Apache-2.0
+COREMARK_PRO_LICENSE_FILES = LICENSE.md
+COREMARK_PRO_DEPENDENCIES = perl
+
+ifeq ($(BR2_ENDIAN),"BIG")
+COREMARK_PRO_MAKE_OPTS += PLATFORM_DEFINES='EE_BIG_ENDIAN=1 EE_LITTLE_ENDIAN=0'
+else
+COREMARK_PRO_MAKE_OPTS += PLATFORM_DEFINES='EE_BIG_ENDIAN=0 EE_LITTLE_ENDIAN=1'
+endif
+
+COREMARK_PRO_MAKE_OPTS += \
+	TARGET=linux$(if $(BR2_ARCH_IS_64),64) \
+	EXE=
+
+define COREMARK_PRO_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) CC="$(TARGET_CC)" LD="$(TARGET_CC)" -C $(@D) \
+		$(COREMARK_PRO_MAKE_OPTS) build

package/coremark-pro/coremark-pro.mk line 35

Quoted 10 lines
package/coremark-pro/coremark-pro.mk new file +10 -0
+endef
+
+COREMARK_PRO_MARKS = cjpeg-rose7-preset core linear_alg-mid-100x100-sp loops-all-mid-10k-sp nnet_test parser-125k radix2-big-64k sha-test zip-test
+COREMARK_PRO_SCRIPTS = results_parser.pl cert_median.pl cert_mark.pl headings.txt
+
+define COREMARK_PRO_INSTALL_TARGET_CMDS
+	mkdir -p  $(TARGET_DIR)/usr/share/coremark-pro/logs
+	$(foreach m,$(COREMARK_PRO_MARKS),\
+		$(INSTALL) -D $(@D)/builds/linux$(if $(BR2_ARCH_IS_64),64)/gcc$(if $(BR2_ARCH_IS_64),64)/bin/$(m) $(TARGET_DIR)/usr/bin/$(m)$(sep) \
+		size $(TARGET_DIR)/usr/bin/$(m) > $(TARGET_DIR)/usr/share/coremark-pro/logs/$(m).size.log$(sep))

Why is this size.log needed? Would be nice to have mentioned that in the commit
message.

Quoted 13 lines
package/coremark-pro/coremark-pro.mk new file +7 -0
+	$(INSTALL) -D $(@D)/builds/linux$(if $(BR2_ARCH_IS_64),64)/gcc$(if $(BR2_ARCH_IS_64),64)/data/libbmp/Rose256.bmp $(TARGET_DIR)/usr/share/coremark-pro/Rose256.bmp
+	$(foreach s,$(COREMARK_PRO_SCRIPTS),\
+		$(INSTALL) -D $(@D)/util/perl/$(s) $(TARGET_DIR)/usr/share/coremark-pro/util/perl/$(s)$(sep))
+	$(Q)cp package/coremark-pro/coremark-pro.sh $(TARGET_DIR)/usr/bin/
+endef
+
+$(eval $(generic-package))
package/coremark-pro/coremark-pro.sh new file +0 -0
new file mode 100755
index 0000000000..65ad9df645

package/coremark-pro/coremark-pro.sh line 5

Quoted 5 lines
package/coremark-pro/coremark-pro.sh new file +5 -0
@@ -0,0 +1,36 @@
+#!/bin/sh
+# SPDX-License-Identifier: Apache-2.0
+
+workloads="cjpeg-rose7-preset core linear_alg-mid-100x100-sp \
+    loops-all-mid-10k-sp nnet_test parser-125k radix2-big-64k sha-test zip-test"

I think it would be better to set

workloads="@COREMARK_PRO_MARKS#@"

here, and substitute it from the .mk file. That way, changing the list has to be done only in one place.

Quoted 7 lines
package/coremark-pro/coremark-pro.sh new file +7 -0
+
+rm -rf /tmp/coremark-pro
+mkdir -p /tmp/coremark-pro
+cp /usr/share/coremark-pro/Rose256.bmp /tmp/coremark-pro
+cp /usr/share/coremark-pro/logs/*.size.log /tmp/coremark-pro
+
+cd /tmp/coremark-pro

package/coremark-pro/coremark-pro.sh

Quoted 10 lines
package/coremark-pro/coremark-pro.sh new file +10 -0
+
+for contype in single best; do
+    cat /usr/share/coremark-pro/util/perl/headings.txt >>result.log
+    for wld in $workloads; do
+        [ "$contype" = "single" ] && XCMD="-c1 -w1"
+        [ "$contype" = "best" ] && XCMD="-c$(nproc) -w$(nproc)"
+        echo "#Results for verification run started at $(date +%y%j:%H:%M:%S) XCMD=$XCMD" >$wld-$contype-result.log
+        echo "Verification run for $wld"
+        $wld $XCMD -v1 > $wld.run.log
+        LC_ALL=C perl /usr/share/coremark-pro/util/perl/results_parser.pl $wld-$contype-result.log $wld.run.log> +        echo "#Results for performance runs started at $(date +%y%j:%H:%M:%S)

XCMD=$XCMD" >>$wld-$contype-result.log

package/coremark-pro/coremark-pro.sh line 30

Quoted 7 lines
package/coremark-pro/coremark-pro.sh new file +7 -0
+        echo "Performance run for $wld"
+        for i in 1 2 3; do
+            $wld $XCMD -v0 > $wld.run.log
+            LC_ALL=C perl /usr/share/coremark-pro/util/perl/results_parser.pl $wld-$contype-result.log $wld.run.log
+        done
+        echo "#Median for final result $wld" >>$wld-$contype-result.log
+        LC_ALL=C perl /usr/share/coremark-pro/util/perl/cert_median.pl $wld-$contype-result.log $contype >>$wld-$contype-result.log

Since this script supposedly generates user-readable output, I'm not sure if
the LC_ALL=C is appropriate. Similary, the timestamps should probably use "+%X %x" as well. And maybe the other perl invocations too.

package/coremark-pro/coremark-pro.sh line 33

Quoted 3 lines
package/coremark-pro/coremark-pro.sh new file +3 -0
+        cat $wld-$contype-result.log >>result.log
+    done
+done

Shouldn't the /tmp/coremark-pro directory be cleaned up again afterwards?

None of these are major concerns, so I've applied to master (with just the
small fix in the hash file). Feel free to post improvements as follow up patches. Thanks!

Regards,
Arnout

Quoted 4 lines
package/coremark-pro/coremark-pro.sh new file +3 -0
+LC_ALL=C perl /usr/share/coremark-pro/util/perl/cert_mark.pl -i result.log -s coremarkpro > result.mark
+cat result.mark
+cd - >/dev/null
#4 lore raw

PATCH v2 2/2 package/coremark-pro: new package

Quoted 26 lines · Arnout Vandecappelle,
Quoted 11 lines · Chris Packham

CoreMark-Pro is a comprehensive, advanced processor benchmark that works with and enhances the market-proven industry-standard EEMBC CoreMark benchmark.

https://www.eembc.org/coremark-pro/

---
Changes in v2:
- Add depends on BR2_USE_MMU (thanks Matt)

[snip]

Review

Quoted 1 line
(quoted diff) +0 -0

b/package/coremark-pro/coremark-pro.hash

package/coremark-pro/coremark-pro.hash line 1

Quoted 6 lines

new file mode 100644
index 0000000000..16b121edb3

package/coremark-pro/coremark-pro.hash new file +1 -0
@@ -0,0 +1,3 @@
+#locally computed

(nitpick)

Quoted 2 lines

# Locally computed

Noted

Quoted 56 lines

package/coremark-pro/coremark-pro.hash line 2

Quoted 1 line
package/coremark-pro/coremark-pro.hash new file +1 -0
+sha256

440223554134832efec4ad220795611769ded3869fbc3ce3c59b05b7ddeb9f6d coremark-pro-1.1.2743.tar.gz

package/coremark-pro/coremark-pro.hash line 3

Quoted 1 line
package/coremark-pro/coremark-pro.hash new file +1 -0
+sha256

0d7775bd793ea71fef3594c18164a08ed2f5f66c898958d0644f7a236a536f2b LICENSE.md

Review

Quoted 1 line
(quoted diff) +0 -0

b/package/coremark-pro/coremark-pro.mk

package/coremark-pro/coremark-pro.mk

Quoted 6 lines

new file mode 100644
index 0000000000..d3e99fcdfd

package/coremark-pro/coremark-pro.mk new file +0 -0
@@ -0,0 +1,42 @@

+################################################################################

package/coremark-pro/coremark-pro.mk line 4

Quoted 4 lines
package/coremark-pro/coremark-pro.mk new file +3 -0
+#
+# CoreMark-PRO
+#

+################################################################################

package/coremark-pro/coremark-pro.mk

Quoted 3 lines
package/coremark-pro/coremark-pro.mk new file +3 -0
+
+COREMARK_PRO_VERSION = 1.1.2743
+COREMARK_PRO_SITE = $(call

github,eembc,coremark-pro,v$(COREMARK_PRO_VERSION))

package/coremark-pro/coremark-pro.mk

Quoted 6 lines
package/coremark-pro/coremark-pro.mk new file +6 -0
+COREMARK_PRO_LICENSE = Apache-2.0
+COREMARK_PRO_LICENSE_FILES = LICENSE.md
+COREMARK_PRO_DEPENDENCIES = perl
+
+ifeq ($(BR2_ENDIAN),"BIG")
+COREMARK_PRO_MAKE_OPTS += PLATFORM_DEFINES='EE_BIG_ENDIAN=1

EE_LITTLE_ENDIAN=0'

package/coremark-pro/coremark-pro.mk line 14

Quoted 2 lines
package/coremark-pro/coremark-pro.mk new file +2 -0
+else
+COREMARK_PRO_MAKE_OPTS += PLATFORM_DEFINES='EE_BIG_ENDIAN=0

EE_LITTLE_ENDIAN=1'

package/coremark-pro/coremark-pro.mk

Quoted 8 lines
package/coremark-pro/coremark-pro.mk new file +8 -0
+endif
+
+COREMARK_PRO_MAKE_OPTS += \
+     TARGET=linux$(if $(BR2_ARCH_IS_64),64) \
+     EXE=
+
+define COREMARK_PRO_BUILD_CMDS
+     $(TARGET_MAKE_ENV) $(MAKE) CC="$(TARGET_CC)" LD="$(TARGET_CC)" -C

$(@D) \

package/coremark-pro/coremark-pro.mk

Quoted 4 lines
package/coremark-pro/coremark-pro.mk new file +4 -0
+             $(COREMARK_PRO_MAKE_OPTS) build
+endef
+
+COREMARK_PRO_MARKS = cjpeg-rose7-preset core linear_alg-mid-100x100-sp

loops-all-mid-10k-sp nnet_test parser-125k radix2-big-64k sha-test zip-test

package/coremark-pro/coremark-pro.mk line 27

Quoted 1 line
package/coremark-pro/coremark-pro.mk new file +1 -0
+COREMARK_PRO_SCRIPTS = results_parser.pl cert_median.pl cert_mark.pl

headings.txt

package/coremark-pro/coremark-pro.mk

Quoted 5 lines
package/coremark-pro/coremark-pro.mk new file +5 -0
+
+define COREMARK_PRO_INSTALL_TARGET_CMDS
+     mkdir -p  $(TARGET_DIR)/usr/share/coremark-pro/logs
+     $(foreach m,$(COREMARK_PRO_MARKS),\
+             $(INSTALL) -D $(@D)/builds/linux$(if

$(BR2_ARCH_IS_64),64)/gcc$(if $(BR2_ARCH_IS_64),64)/bin/$(m) $(TARGET_DIR)/usr/bin/$(m)$(sep) \

Quoted 7 lines

package/coremark-pro/coremark-pro.mk line 33

Quoted 1 line
package/coremark-pro/coremark-pro.mk new file +1 -0
+             size $(TARGET_DIR)/usr/bin/$(m) >

$(TARGET_DIR)/usr/share/coremark-pro/logs/$(m).size.log$(sep))

Why is this size.log needed? Would be nice to have mentioned that in the
commit
message.

I _think_ it's used as part of verifying the benchmarks. Doing it this way saves having to depend on binutils for the target.

Quoted 24 lines

package/coremark-pro/coremark-pro.mk line 34

Quoted 1 line
package/coremark-pro/coremark-pro.mk new file +1 -0
+     $(INSTALL) -D $(@D)/builds/linux$(if $(BR2_ARCH_IS_64),64)/gcc$(if

$(BR2_ARCH_IS_64),64)/data/libbmp/Rose256.bmp
$(TARGET_DIR)/usr/share/coremark-pro/Rose256.bmp

package/coremark-pro/coremark-pro.mk line 36

Quoted 2 lines
package/coremark-pro/coremark-pro.mk new file +2 -0
+     $(foreach s,$(COREMARK_PRO_SCRIPTS),\
+             $(INSTALL) -D $(@D)/util/perl/$(s)

$(TARGET_DIR)/usr/share/coremark-pro/util/perl/$(s)$(sep))

Review

Quoted 5 lines
package/coremark-pro/coremark-pro.mk new file +4 -0
+     $(Q)cp package/coremark-pro/coremark-pro.sh $(TARGET_DIR)/usr/bin/
+endef
+
+$(eval $(generic-package))
(quoted diff) +0 -0

b/package/coremark-pro/coremark-pro.sh

package/coremark-pro/coremark-pro.sh line 5

Quoted 10 lines

new file mode 100755
index 0000000000..65ad9df645

package/coremark-pro/coremark-pro.sh new file +5 -0
@@ -0,0 +1,36 @@
+#!/bin/sh
+# SPDX-License-Identifier: Apache-2.0
+
+workloads="cjpeg-rose7-preset core linear_alg-mid-100x100-sp \
+    loops-all-mid-10k-sp nnet_test parser-125k radix2-big-64k sha-test

zip-test"

Quoted 8 lines

I think it would be better to set

workloads="@COREMARK_PRO_MARKS#@"

here, and substitute it from the .mk file. That way, changing the list has to be
done only in one place.

Yep agreed. For such things is it normal to have a .sh.in and "build" the actual .sh file or just sed it in place?

Quoted 26 lines
Quoted 4 lines
package/coremark-pro/coremark-pro.sh new file +4 -0
+
+rm -rf /tmp/coremark-pro
+mkdir -p /tmp/coremark-pro
+cp /usr/share/coremark-pro/Rose256.bmp /tmp/coremark-pro

package/coremark-pro/coremark-pro.sh

Quoted 10 lines
package/coremark-pro/coremark-pro.sh new file +10 -0
+cp /usr/share/coremark-pro/logs/*.size.log /tmp/coremark-pro
+
+cd /tmp/coremark-pro
+
+for contype in single best; do
+    cat /usr/share/coremark-pro/util/perl/headings.txt >>result.log
+    for wld in $workloads; do
+        [ "$contype" = "single" ] && XCMD="-c1 -w1"
+        [ "$contype" = "best" ] && XCMD="-c$(nproc) -w$(nproc)"
+        echo "#Results for verification run started at $(date

+%y%j:%H:%M:%S) XCMD=$XCMD" >$wld-$contype-result.log

package/coremark-pro/coremark-pro.sh

Quoted 3 lines
package/coremark-pro/coremark-pro.sh new file +3 -0
+        echo "Verification run for $wld"
+        $wld $XCMD -v1 > $wld.run.log
+        LC_ALL=C perl /usr/share/coremark-pro/util/perl/

results_parser.pl $wld-$contype-result.log $wld.run.log> + echo
"#Results for performance runs started at $(date +%y%j:%H:%M:%S) XCMD=$XCMD" >>$wld-$contype-result.log

package/coremark-pro/coremark-pro.sh

Quoted 4 lines
package/coremark-pro/coremark-pro.sh new file +4 -0
+        echo "Performance run for $wld"
+        for i in 1 2 3; do
+            $wld $XCMD -v0 > $wld.run.log
+            LC_ALL=C perl /usr/share/coremark-pro/util/perl/

results_parser.pl $wld-$contype-result.log $wld.run.log

Quoted 8 lines

package/coremark-pro/coremark-pro.sh

Quoted 3 lines
package/coremark-pro/coremark-pro.sh new file +3 -0
+        done
+        echo "#Median for final result $wld" >>$wld-$contype-result.log
+        LC_ALL=C perl /usr/share/coremark-pro/util/perl/cert_median.pl

$wld-$contype-result.log $contype >>$wld-$contype-result.log

Since this script supposedly generates user-readable output, I'm not sure
if
the LC_ALL=C is appropriate.

I think LC_ALL=C is appropriate as it enables comparison between boards/SoCs without subtle differences due to the current locale.

Similary, the timestamps should probably use

Quoted 1 line

"+%X %x" as well.

Yep that's reasonable.

And maybe the other perl invocations too.

Quoted 7 lines

package/coremark-pro/coremark-pro.sh line 33

Quoted 4 lines
package/coremark-pro/coremark-pro.sh new file +3 -0
+        cat $wld-$contype-result.log >>result.log
+    done
+done

Shouldn't the /tmp/coremark-pro directory be cleaned up again afterwards?

I kind of went the otherway in deleting it at the start of the script. My thought was to leave the artifacts around so they could be manually inspected or further processed.

Quoted 4 lines

None of these are major concerns, so I've applied to master (with just the
small fix in the hash file). Feel free to post improvements as follow up patches. Thanks!

Thank you. I'm still on an extended break (southern hemisphere summer) so I'll look at sending some of these updates when I'm in front of a real keyboard.

Quoted 9 lines

Regards,
Arnout

package/coremark-pro/coremark-pro.sh line 33

Quoted 1 line
package/coremark-pro/coremark-pro.sh new file +1 -0
+LC_ALL=C perl /usr/share/coremark-pro/util/perl/cert_mark.pl -i

result.log -s coremarkpro > result.mark

package/coremark-pro/coremark-pro.sh line 36

Quoted 3 lines
package/coremark-pro/coremark-pro.sh new file +2 -0
+cat result.mark
+cd - >/dev/null

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20210108/a8dd09d2/attachment.html>

#5 lore raw

PATCH v2 1/2 package/coremark: new package

In reply to Chris Packham

Chris,

Quoted 9 lines · Chris Packham

CoreMark is a simple, yet sophisticated benchmark that is designed specifically to test the functionality of a processor core. Running CoreMark produces a single-number score allowing users to make quick comparisons between processors.

https://www.eembc.org/coremark/

#6 lore raw

PATCH v2 1/2 package/coremark: new package

In reply to Chris Packham

Hi Chris,

Quoted 8 lines · Chris Packham

CoreMark is a simple, yet sophisticated benchmark that is designed specifically to test the functionality of a processor core. Running CoreMark produces a single-number score allowing users to make quick comparisons between processors.

https://www.eembc.org/coremark/

Matt tested the first iteration of this patch, so you should keep his Tested-by
tag (otherwise it gets lost...).

With that, applied to master, thanks.

Regards,
Arnout

Quoted 3 lines

---
Changes in v2:
- None

[snip]