[rtems commit] benchmarks: Add benchmark templates

Sebastian Huber sebh at rtems.org
Wed Mar 29 06:12:33 UTC 2017


Module:    rtems
Branch:    master
Commit:    002768254683ffe4a6614fe35254cf9dab88c6d0
Changeset: http://git.rtems.org/rtems/commit/?id=002768254683ffe4a6614fe35254cf9dab88c6d0

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Tue Mar 28 13:11:22 2017 +0200

benchmarks: Add benchmark templates

Update #2958.

---

 testsuites/benchmarks/Makefile.am             |  9 +++++
 testsuites/benchmarks/configure.ac            | 29 ++++++++++++++++
 testsuites/benchmarks/dhrystone/Makefile.am   | 19 +++++++++++
 testsuites/benchmarks/dhrystone/dhrystone.doc | 11 ++++++
 testsuites/benchmarks/dhrystone/dhrystone.scn |  0
 testsuites/benchmarks/dhrystone/init.c        | 48 +++++++++++++++++++++++++++
 testsuites/benchmarks/linpack/Makefile.am     | 19 +++++++++++
 testsuites/benchmarks/linpack/init.c          | 48 +++++++++++++++++++++++++++
 testsuites/benchmarks/linpack/linpack.doc     | 11 ++++++
 testsuites/benchmarks/linpack/linpack.scn     |  0
 testsuites/benchmarks/whetstone/Makefile.am   | 19 +++++++++++
 testsuites/benchmarks/whetstone/init.c        | 48 +++++++++++++++++++++++++++
 testsuites/benchmarks/whetstone/whetstone.doc | 11 ++++++
 testsuites/benchmarks/whetstone/whetstone.scn |  0
 testsuites/configure.ac                       |  2 +-
 15 files changed, 273 insertions(+), 1 deletion(-)

diff --git a/testsuites/benchmarks/Makefile.am b/testsuites/benchmarks/Makefile.am
new file mode 100644
index 0000000..3d95ecd
--- /dev/null
+++ b/testsuites/benchmarks/Makefile.am
@@ -0,0 +1,9 @@
+ACLOCAL_AMFLAGS = -I ../aclocal
+
+SUBDIRS =
+SUBDIRS += linpack
+SUBDIRS += whetstone
+SUBDIRS += dhrystone
+
+include $(top_srcdir)/../automake/subdirs.am
+include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/benchmarks/configure.ac b/testsuites/benchmarks/configure.ac
new file mode 100644
index 0000000..18af749
--- /dev/null
+++ b/testsuites/benchmarks/configure.ac
@@ -0,0 +1,29 @@
+## Process this file with autoconf to produce a configure script.
+
+AC_PREREQ([2.69])
+AC_INIT([rtems-c-src-tests-benchmarks],[_RTEMS_VERSION],[https://devel.rtems.org/newticket])
+AC_CONFIG_HEADER([config.h])
+RTEMS_TOP([../..],[..])
+
+RTEMS_CANONICAL_TARGET_CPU
+
+AM_INIT_AUTOMAKE([no-define foreign 1.12.2])
+AM_MAINTAINER_MODE
+
+RTEMS_ENV_RTEMSBSP
+
+RTEMS_PROJECT_ROOT
+
+RTEMS_PROG_CC_FOR_TARGET
+
+RTEMS_CANONICALIZE_TOOLS
+
+RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
+
+# Explicitly list all Makefiles here
+AC_CONFIG_FILES([Makefile
+linpack/Makefile
+whetstone/Makefile
+dhrystone/Makefile
+])
+AC_OUTPUT
diff --git a/testsuites/benchmarks/dhrystone/Makefile.am b/testsuites/benchmarks/dhrystone/Makefile.am
new file mode 100644
index 0000000..0354012
--- /dev/null
+++ b/testsuites/benchmarks/dhrystone/Makefile.am
@@ -0,0 +1,19 @@
+rtems_tests_PROGRAMS = dhrystone
+dhrystone_SOURCES = init.c
+
+dist_rtems_tests_DATA = dhrystone.scn dhrystone.doc
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP at .cfg
+include $(top_srcdir)/../automake/compile.am
+include $(top_srcdir)/../automake/leaf.am
+
+AM_CPPFLAGS += -I$(top_srcdir)/../support/include
+
+LINK_OBJS = $(dhrystone_OBJECTS)
+LINK_LIBS = $(dhrystone_LDLIBS)
+
+dhrystone$(EXEEXT): $(dhrystone_OBJECTS) $(dhrystone_DEPENDENCIES)
+	@rm -f dhrystone$(EXEEXT)
+	$(make-exe)
+
+include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/benchmarks/dhrystone/dhrystone.doc b/testsuites/benchmarks/dhrystone/dhrystone.doc
new file mode 100644
index 0000000..aac6f23
--- /dev/null
+++ b/testsuites/benchmarks/dhrystone/dhrystone.doc
@@ -0,0 +1,11 @@
+This file describes the directives and concepts tested by this test set.
+
+test set name: dhrystone
+
+directives:
+
+  TBD
+
+concepts:
+
+  TBD
diff --git a/testsuites/benchmarks/dhrystone/dhrystone.scn b/testsuites/benchmarks/dhrystone/dhrystone.scn
new file mode 100644
index 0000000..e69de29
diff --git a/testsuites/benchmarks/dhrystone/init.c b/testsuites/benchmarks/dhrystone/init.c
new file mode 100644
index 0000000..6e339d4
--- /dev/null
+++ b/testsuites/benchmarks/dhrystone/init.c
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2017 embedded brains GmbH.  All rights reserved.
+ *
+ *  embedded brains GmbH
+ *  Dornierstr. 4
+ *  82178 Puchheim
+ *  Germany
+ *  <rtems at embedded-brains.de>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tmacros.h"
+
+const char rtems_test_name[] = "DHRYSTONE";
+
+static void test(void)
+{
+}
+
+static void Init(rtems_task_argument arg)
+{
+  TEST_BEGIN();
+
+  test();
+
+  TEST_END();
+  rtems_test_exit(0);
+}
+
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+
+#define CONFIGURE_MAXIMUM_TASKS 1
+
+#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
+
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#define CONFIGURE_INIT
+
+#include <rtems/confdefs.h>
diff --git a/testsuites/benchmarks/linpack/Makefile.am b/testsuites/benchmarks/linpack/Makefile.am
new file mode 100644
index 0000000..d947cd6
--- /dev/null
+++ b/testsuites/benchmarks/linpack/Makefile.am
@@ -0,0 +1,19 @@
+rtems_tests_PROGRAMS = linpack
+linpack_SOURCES = init.c
+
+dist_rtems_tests_DATA = linpack.scn linpack.doc
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP at .cfg
+include $(top_srcdir)/../automake/compile.am
+include $(top_srcdir)/../automake/leaf.am
+
+AM_CPPFLAGS += -I$(top_srcdir)/../support/include
+
+LINK_OBJS = $(linpack_OBJECTS)
+LINK_LIBS = $(linpack_LDLIBS)
+
+linpack$(EXEEXT): $(linpack_OBJECTS) $(linpack_DEPENDENCIES)
+	@rm -f linpack$(EXEEXT)
+	$(make-exe)
+
+include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/benchmarks/linpack/init.c b/testsuites/benchmarks/linpack/init.c
new file mode 100644
index 0000000..8b67e52
--- /dev/null
+++ b/testsuites/benchmarks/linpack/init.c
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2017 embedded brains GmbH.  All rights reserved.
+ *
+ *  embedded brains GmbH
+ *  Dornierstr. 4
+ *  82178 Puchheim
+ *  Germany
+ *  <rtems at embedded-brains.de>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tmacros.h"
+
+const char rtems_test_name[] = "LINPACK";
+
+static void test(void)
+{
+}
+
+static void Init(rtems_task_argument arg)
+{
+  TEST_BEGIN();
+
+  test();
+
+  TEST_END();
+  rtems_test_exit(0);
+}
+
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+
+#define CONFIGURE_MAXIMUM_TASKS 1
+
+#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
+
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#define CONFIGURE_INIT
+
+#include <rtems/confdefs.h>
diff --git a/testsuites/benchmarks/linpack/linpack.doc b/testsuites/benchmarks/linpack/linpack.doc
new file mode 100644
index 0000000..af38058
--- /dev/null
+++ b/testsuites/benchmarks/linpack/linpack.doc
@@ -0,0 +1,11 @@
+This file describes the directives and concepts tested by this test set.
+
+test set name: linpack
+
+directives:
+
+  TBD
+
+concepts:
+
+  TBD
diff --git a/testsuites/benchmarks/linpack/linpack.scn b/testsuites/benchmarks/linpack/linpack.scn
new file mode 100644
index 0000000..e69de29
diff --git a/testsuites/benchmarks/whetstone/Makefile.am b/testsuites/benchmarks/whetstone/Makefile.am
new file mode 100644
index 0000000..6146952
--- /dev/null
+++ b/testsuites/benchmarks/whetstone/Makefile.am
@@ -0,0 +1,19 @@
+rtems_tests_PROGRAMS = whetstone
+whetstone_SOURCES = init.c
+
+dist_rtems_tests_DATA = whetstone.scn whetstone.doc
+
+include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP at .cfg
+include $(top_srcdir)/../automake/compile.am
+include $(top_srcdir)/../automake/leaf.am
+
+AM_CPPFLAGS += -I$(top_srcdir)/../support/include
+
+LINK_OBJS = $(whetstone_OBJECTS)
+LINK_LIBS = $(whetstone_LDLIBS)
+
+whetstone$(EXEEXT): $(whetstone_OBJECTS) $(whetstone_DEPENDENCIES)
+	@rm -f whetstone$(EXEEXT)
+	$(make-exe)
+
+include $(top_srcdir)/../automake/local.am
diff --git a/testsuites/benchmarks/whetstone/init.c b/testsuites/benchmarks/whetstone/init.c
new file mode 100644
index 0000000..075facc
--- /dev/null
+++ b/testsuites/benchmarks/whetstone/init.c
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2017 embedded brains GmbH.  All rights reserved.
+ *
+ *  embedded brains GmbH
+ *  Dornierstr. 4
+ *  82178 Puchheim
+ *  Germany
+ *  <rtems at embedded-brains.de>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "tmacros.h"
+
+const char rtems_test_name[] = "WHETSTONE";
+
+static void test(void)
+{
+}
+
+static void Init(rtems_task_argument arg)
+{
+  TEST_BEGIN();
+
+  test();
+
+  TEST_END();
+  rtems_test_exit(0);
+}
+
+#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
+#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
+
+#define CONFIGURE_MAXIMUM_TASKS 1
+
+#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
+
+#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
+
+#define CONFIGURE_INIT
+
+#include <rtems/confdefs.h>
diff --git a/testsuites/benchmarks/whetstone/whetstone.doc b/testsuites/benchmarks/whetstone/whetstone.doc
new file mode 100644
index 0000000..b6c3383
--- /dev/null
+++ b/testsuites/benchmarks/whetstone/whetstone.doc
@@ -0,0 +1,11 @@
+This file describes the directives and concepts tested by this test set.
+
+test set name: whetstone
+
+directives:
+
+  TBD
+
+concepts:
+
+  TBD
diff --git a/testsuites/benchmarks/whetstone/whetstone.scn b/testsuites/benchmarks/whetstone/whetstone.scn
new file mode 100644
index 0000000..e69de29
diff --git a/testsuites/configure.ac b/testsuites/configure.ac
index 086f636..ab8aab8e 100644
--- a/testsuites/configure.ac
+++ b/testsuites/configure.ac
@@ -45,7 +45,7 @@ if test "$enable_tests" = "yes"; then
     AC_CONFIG_SUBDIRS(smptests)
   fi
   # Now do performance tests
-  AC_CONFIG_SUBDIRS(tmtests psxtmtests rhealstone)
+  AC_CONFIG_SUBDIRS(tmtests psxtmtests benchmarks rhealstone)
 fi
 
 # Explicitly list all Makefiles here




More information about the vc mailing list