From b2baf1155b0855429bab21b8b1e957abce8206b5 Mon Sep 17 00:00:00 2001 From: Dong Jun Woun Date: Thu, 12 Sep 2024 05:05:54 +0000 Subject: [PATCH] disable-perf-event --- src/configure | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/src/configure b/src/configure index 7b2f712ae..c6b2a4f1b 100755 --- a/src/configure +++ b/src/configure @@ -799,6 +799,7 @@ with_perf_events enable_perfevent_rdpmc with_pe_incdir enable_perf_event_uncore +enable_perf_event with_components enable_fortran ' @@ -1438,6 +1439,7 @@ Optional Features: Enable userspace rdpmc instruction on perf_event, default: yes --disable-perf-event-uncore + --disable-perf-event Disable perf_event uncore component --disable-fortran Whether to disable fortran bindings @@ -5941,10 +5943,23 @@ if test "x$mic" = "xno"; then perf_events=no fi +perf_events=yes force_perf_events=no disable_uncore=yes + +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 --with-perf_events was given. if test "${with_perf_events+set}" = set; then : withval=$with_perf_events; force_perf_events=yes @@ -5982,6 +5997,7 @@ else fi + # Check whether --enable-perf_event_uncore was given. if test "${enable_perf_event_uncore+set}" = set; then : enableval=$enable_perf_event_uncore; @@ -5989,11 +6005,12 @@ 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,11 +6051,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 @@ -6600,7 +6618,11 @@ 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 "$perf_events" = "no"; then + components="" + else + components="perf_event" + fi if test "$disable_uncore" = "no"; then components="$components perf_event_uncore" fi