[v1,1/7] example: add basic papi configuration option

Message ID 1517493607-30535-2-git-send-email-odpbot@yandex.ru
State New
Headers show
Series
  • Code instrumentation with PAPI library
Related show

Commit Message

Github ODP bot Feb. 1, 2018, 2 p.m.
From: Bogdan Pricope <bogdan.pricope@linaro.org>


Add configuration options to enable code instrumentation and set
PAPI installation folder.

Signed-off-by: Bogdan Pricope <bogdan.pricope@linaro.org>

---
/** Email created from pull request 443 (bogdanPricope:master_benchmark_pr)
 ** https://github.com/Linaro/odp/pull/443
 ** Patch: https://github.com/Linaro/odp/pull/443.patch
 ** Base sha: b95ccd3db6eeb7358a877541747e06354429acdd
 ** Merge commit sha: a7eb054a87f5e31ccdca856470dd8e2ce0dcdd1b
 **/
 configure.ac            |  1 +
 example/m4/configure.m4 | 16 ++++++++++++++++
 2 files changed, 17 insertions(+)

Patch

diff --git a/configure.ac b/configure.ac
index 6d76bead8..97d906678 100644
--- a/configure.ac
+++ b/configure.ac
@@ -417,4 +417,5 @@  AC_MSG_RESULT([
 	test_helper:		${test_helper}
 	test_example:		${test_example}
 	user_guides:		${user_guides}
+	code instrumentation:   ${code_instrumentation}
 ])
diff --git a/example/m4/configure.m4 b/example/m4/configure.m4
index 1ce0cb11d..64a51e401 100644
--- a/example/m4/configure.m4
+++ b/example/m4/configure.m4
@@ -7,6 +7,22 @@  AC_ARG_ENABLE([test-example],
     [test_example=yes])
 AM_CONDITIONAL([test_example], [test x$test_example = xyes ])
 
+code_instrumentation=no
+AC_ARG_ENABLE([code-instrum],
+    [  --enable-code-instrum   enable code instrumentation support],
+    [if test x$enableval = xyes; then
+        code_instrumentation=yes
+    fi])
+
+PAPI_PATH=""
+AC_ARG_WITH([papi-path],
+AS_HELP_STRING([--with-papi-path=DIR   path to papi install directory]),
+    [PAPI_PATH="$withval"
+    code_instrumentation=yes],[])
+
+AC_SUBST([PAPI_PATH])
+AM_CONDITIONAL([CODE_INSTRUM], [test x$code_instrumentation = xyes ])
+
 AC_CONFIG_FILES([example/classifier/Makefile
 		 example/generator/Makefile
 		 example/hello/Makefile