bogdanPricope replied on github web page: example/m4/configure.m4 line 18 @@ -7,6 +7,16 @@ AC_ARG_ENABLE([test-example], [test_example=yes]) AM_CONDITIONAL([test_example], [test x$test_example = xyes ]) +PAPI_PATH="" +code_instrumentation=no +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 ])
Comment: Ok. > bogdanPricope wrote > I am expecting to have more config time options in the future (symbols > visibility, etc.) that will affect building of generic library code. >> bogdanPricope wrote >> Don't know. I was not able to get it for my Ubuntu. You should get something >> like 'libpfm4 libpapi5.4 libpapi-dev' or newer. >> Also, you get different PAPI versions for different releases and don't know >> if they have backward compats. >> >> The Bionic Beaver (active development) papi trunk series >> 5.6.0-1 release (universe) 2018-01-26 >> The Artful Aardvark (current stable release) papi trunk series >> 5.5.1-2 release (universe) 2017-05-09 >> The Xenial Xerus (supported) papi trunk series >> 5.4.3-2 release (universe) 2016-04-19 >> The Trusty Tahr (supported) >> 5.3.0-3 release (universe) 2014-02-05 >>> bogdanPricope wrote >>> I kind of expected to have *.h in noinst_HEADERS and *.c in _SOURCES. >>>> bogdanPricope wrote >>>> No need at this point (can be done at master ->caterpillar merge time). >>>> Most likely, #390 will get into Caterpillar before this PR. >>>>> bogdanPricope wrote >>>>> Yes, '--with-papi' will be added. >>>>>> Dmitry Eremin-Solenikov(lumag) wrote: >>>>>> As we are not enabling instrumentation in generic library code, maybe >>>>>> this text should go to example/instrum/README with a note here that we >>>>>> support PAPI instrumentation? >>>>>>> Dmitry Eremin-Solenikov(lumag) wrote: >>>>>>> Isn't apt-get install libpapi-dev / yum install / etc. enough? >>>>>>>> Dmitry Eremin-Solenikov(lumag) wrote: >>>>>>>> Are these headers used by anybody else? If not, you can just add them >>>>>>>> to _SOURCES. Also there is no need to specify $(srcdir) here. >>>>>>>>> Dmitry Eremin-Solenikov(lumag) wrote: >>>>>>>>> I suggest to pick up dynamic-examples-tests PR into your branch and >>>>>>>>> then base this code on top. >>>>>>>>>> Dmitry Eremin-Solenikov(lumag) wrote: >>>>>>>>>> Could you please support bare --with-papi, so that one can use >>>>>>>>>> system-provided PAPI? >>>>>>>>>>> bogdanPricope wrote >>>>>>>>>>> In 'example/m4/configure.m4' there is this conditional: >>>>>>>>>>> AM_CONDITIONAL([CODE_INSTRUM], [test x$code_instrumentation = xyes]) >>>>>>>>>>> >>>>>>>>>>> It is defined if PAPI path is set at configure time: >>>>>>>>>>> --with-papi-path=DIR >>>>>>>>>>> We have similar arrangements for different pktios (netmap, etc) >>>>>>>>>>>> Bill Fischofer(Bill-Fischofer-Linaro) wrote: >>>>>>>>>>>> How does this get enabled/tested? >>>>>>>>>>>>> Bill Fischofer(Bill-Fischofer-Linaro) wrote: >>>>>>>>>>>>> The PAPI enable/disable status should also be configured in the >>>>>>>>>>>>> `configure` summary. https://github.com/Linaro/odp/pull/406#discussion_r164976139 updated_at 2018-01-31 08:02:27