diff --git a/src/configure b/src/configure index 7b2f712ae..7771dfbd9 100755 --- a/src/configure +++ b/src/configure @@ -799,6 +799,8 @@ with_perf_events enable_perfevent_rdpmc with_pe_incdir enable_perf_event_uncore +enable_perf_event +enable_cpu with_components enable_fortran ' @@ -1437,8 +1439,9 @@ Optional Features: --enable-perfevent-rdpmc Enable userspace rdpmc instruction on perf_event, default: yes - --disable-perf-event-uncore - Disable perf_event uncore component + --disable-perf-event-uncore Disable perf_event_uncore component + --disable-perf-event Disable perf_event component + --disable-cpu Disable perf_event and perf_event_uncore component --disable-fortran Whether to disable fortran bindings Optional Packages: @@ -5941,10 +5944,41 @@ if test "x$mic" = "xno"; then perf_events=no fi +perf_events=yes force_perf_events=no -disable_uncore=yes +perf_events_uncore=yes +# Check whether --enable-cpu was given. +if test "${enable_cpu+set}" = set; then + enableval=$enable_cpu; +fi + +if test "x$enable_cpu" = "xno"; then + perf_events="no" + force_perf_events="no" + perf_events_uncore="no" +fi + +# Check whether --enable-perf_event was given. +if test "${enable_perf_event+set}" = set; then + enableval=$enable_perf_event; +fi + +if test "x$enable_perf_event" = "xno"; then + perf_events="no" + force_perf_events="no" +fi + +# Check whether --enable-perf_event_uncore was given. +if test "${enable_perf_event_uncore+set}" = set; then + enableval=$enable_perf_event_uncore; +fi + +if test "x$enable_perf_event_uncore" = "xno"; then + perf_events_uncore="no" +fi + # Check whether --with-perf_events was given. if test "${with_perf_events+set}" = set; then : withval=$with_perf_events; force_perf_events=yes @@ -5981,19 +6015,6 @@ else pe_incdir=$pfm_incdir/perfmon fi - -# Check whether --enable-perf_event_uncore was given. -if test "${enable_perf_event_uncore+set}" = set; then : - enableval=$enable_perf_event_uncore; -fi - - -if test "x$enable_perf_event_uncore" != "xno"; then : - - disable_uncore=no - -fi - # Check for perf_event.h if test "$force_perf_events" = "yes"; then perf_events="yes" @@ -6034,12 +6055,12 @@ fi eval ac_res=\$$as_ac_File { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } -if eval test \"x\$"$as_ac_File"\" = x"yes"; then : +if eval test \"x\$"$as_ac_File"\" = x"yes" && [ "$perf_events" != "no" ]; then perf_events="yes" fi -fi + fi fi if test "$perf_events" = "yes"; then @@ -6600,11 +6621,18 @@ elif test "$MAKEVER" = "linux-generic"; then elif test "$MAKEVER" = "linux-pe"; then FILENAME=Rules.pfm4_pe CPUCOMPONENT_NAME=perf_event - components="perf_event" - if test "$disable_uncore" = "no"; then + if test "$perf_events" = "no"; then + components="$components" + else + components="$components perf_event" + fi + + if test "$perf_events_uncore" = "no"; then + components="$components" + else components="$components perf_event_uncore" fi - + elif test "$MAKEVER" = "nec-nec"; then FILENAME=Rules.perfnec CPUCOMPONENT_NAME=perfnec @@ -6792,7 +6820,6 @@ fi # always enable sysdetect components="$components sysdetect" - PAPI_NUM_COMP=0 for comp in $components; do idx=`echo "$comp" | sed -n "s/\/.*//p" | wc -c` diff --git a/src/run_tests.sh b/src/run_tests.sh index 3d20f5198..ec5b0cfc9 100755 --- a/src/run_tests.sh +++ b/src/run_tests.sh @@ -38,12 +38,17 @@ if [ "x$VALGRIND" != "x" ]; then VALGRIND="valgrind --leak-check=full"; fi -VTESTS=`find validation_tests/* -prune -perm -u+x -type f ! -name "*.[c|h]"`; -#CTESTS=`find ctests -maxdepth 1 -perm -u+x -type f`; -CTESTS=`find ctests/* -prune -perm -u+x -type f ! -name "*.[c|h]"`; -FTESTS=`find ftests -perm -u+x -type f ! -name "*.[c|h|F]"`; - - +# Check for active 'perf_event' component +PERF_EVENT_ACTIVE=$(utils/papi_component_avail | awk '/Active components:/{flag=1; next} flag' | grep "perf_event") + +if [ "$PERF_EVENT_ACTIVE" == "perf_event" ]; then + VTESTS=`find validation_tests/* -prune -perm -u+x -type f ! -name "*.[c|h]"`; + CTESTS=`find ctests/* -prune -perm -u+x -type f ! -name "*.[c|h]"`; + #CTESTS=`find ctests -maxdepth 1 -perm -u+x -type f`; + FTESTS=`find ftests -perm -u+x -type f ! -name "*.[c|h|F]"`; +else + EXCLUDE="$EXCLUDE $VTESTS $CTESTS $FTESTS"; +fi # List of active components ACTIVE_COMPONENTS_PATTERN=$(utils/papi_component_avail | awk '/Active components:/{flag=1; next} flag' | grep "Name:" | sed 's/Name: //' | awk '{print $1}' | paste -sd'|' -)