Skip to contentSkip to conversation

commands: Add dhrystone

PATCH Applied Daniel Schultz 2 participants 2 messages Aug 3, 2015 – Aug 5, 2015

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 commands: Add dhrystone

This tool will help to measure the system performance.

Some SoCs haven't the possibility to route their clocks to the output pins. So you can use dhrystone to get a feedback about the clock speed.

---

Changes:
v1:
applied RFC suggestions:
-removed 'default n' in Kconfig
-refactored time defines with default time units -only print variable values when values are wrong -added units to printf
-the iteration parameter is now optional. The programm starts with 10000 iterations and adjust higher, when execution time is too short.
-changed variable name (microseconds -> nanoseconds) -corrected the command description
v2:
refactored globale variables
changed malloc calls

v3:
moved benchmark execution in a new function
build a wrapper around this function to adjust the iterations better

v4:
refactored adjust logic
changed functions to static

 commands/Kconfig     |   6 +
 commands/Makefile    |   1 +
 commands/dhrystone.c | 445 +++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 452 insertions(+)
 create mode 100644 commands/dhrystone.c
commands/Kconfig +6 -0
index bb6674e..30485c0 100644
@@ -2102,6 +2102,12 @@ config CMD_STATE
 	depends on STATE
 	prompt "state"
 
+config CMD_DHRYSTONE
+	bool
+	prompt "dhrystone"
+	help
+	  CPU benchmark tool
+
 # end Miscellaneous commands
 endmenu
 
commands/Makefile +1 -0
index 3698347..879caec 100644
@@ -112,3 +112,4 @@ obj-$(CONFIG_CMD_NV)		+= nv.o
 obj-$(CONFIG_CMD_DEFAULTENV)	+= defaultenv.o
 obj-$(CONFIG_CMD_STATE)		+= state.o
 obj-$(CONFIG_CMD_DHCP)		+= dhcp.o
+obj-$(CONFIG_CMD_DHRYSTONE)	+= dhrystone.o
commands/dhrystone.c new file +445 -0

445 lines not on this page · raw message

Signature · 7 lines
1.9.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
Applied
#1 lore raw
Quoted 6 lines · Daniel Schultz

This tool will help to measure the system performance.

Some SoCs haven't the possibility to route their clocks to the output pins. So you can use dhrystone to get a feedback about the clock speed.

Applied, thanks

Sascha

Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox