Skip to content

Commit

Permalink
configure | run_test.sh : Disable perf_event and perf_event_uncore
Browse files Browse the repository at this point in the history
configure file retrack
  • Loading branch information
Dong Jun Woun committed Sep 17, 2024
1 parent afeb059 commit 9a13e0a
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 28 deletions.
71 changes: 49 additions & 22 deletions src/configure
Original file line number Diff line number Diff line change
Expand Up @@ -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
'
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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`
Expand Down
17 changes: 11 additions & 6 deletions src/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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'|' -)
Expand Down

0 comments on commit 9a13e0a

Please sign in to comment.