@@ -129,6 +129,12 @@ AC_ARG_WITH([bdb],
129
129
[ use_bdb=$withval] ,
130
130
[ use_bdb=auto] )
131
131
132
+ AC_ARG_ENABLE ( [ ebpf] ,
133
+ [ AS_HELP_STRING ( [ --enable-ebpf] ,
134
+ [ enable eBPF tracing (default is yes if sys/sdt.h is found)] ) ] ,
135
+ [ use_ebpf=$enableval] ,
136
+ [ use_ebpf=yes] )
137
+
132
138
AC_ARG_WITH ( [ miniupnpc] ,
133
139
[ AS_HELP_STRING ( [ --with-miniupnpc] ,
134
140
[ enable UPNP (default is yes if libminiupnpc is found)] ) ] ,
@@ -1256,6 +1262,16 @@ if test x$enable_wallet != xno; then
1256
1262
fi
1257
1263
fi
1258
1264
1265
+ if test x$use_ebpf != xno; then
1266
+ AC_CHECK_HEADER ( [ sys/sdt.h] , [ have_sdt=yes] , [ have_sdt=no] )
1267
+ else
1268
+ have_sdt=no
1269
+ fi
1270
+
1271
+ if test x$have_sdt = xyes; then
1272
+ AC_DEFINE ( [ ENABLE_TRACING] , [ 1] , [ Define to 1 to enable eBPF user static defined tracepoints] )
1273
+ fi
1274
+
1259
1275
dnl Check for libminiupnpc (optional)
1260
1276
if test x$use_upnp != xno; then
1261
1277
AC_CHECK_HEADERS (
@@ -1610,6 +1626,7 @@ AM_CONDITIONAL([TARGET_WINDOWS], [test x$TARGET_OS = xwindows])
1610
1626
AM_CONDITIONAL([ ENABLE_WALLET] ,[ test x$enable_wallet = xyes] )
1611
1627
AM_CONDITIONAL([ USE_SQLITE] , [ test "x$use_sqlite" = "xyes"] )
1612
1628
AM_CONDITIONAL([ USE_BDB] , [ test "x$use_bdb" = "xyes"] )
1629
+ AM_CONDITIONAL([ ENABLE_TRACING] ,[ test x$have_sdt = xyes] )
1613
1630
AM_CONDITIONAL([ ENABLE_TESTS] ,[ test x$BUILD_TEST = xyes] )
1614
1631
AM_CONDITIONAL([ ENABLE_FUZZ] ,[ test x$enable_fuzz = xyes] )
1615
1632
AM_CONDITIONAL([ ENABLE_QT] ,[ test x$bitcoin_enable_qt = xyes] )
1768
1785
echo " with bench = $use_bench"
1769
1786
echo " with upnp = $use_upnp"
1770
1787
echo " use asm = $use_asm"
1788
+ echo " ebpf tracing = $have_sdt"
1771
1789
echo " sanitizers = $use_sanitizers"
1772
1790
echo " debug enabled = $enable_debug"
1773
1791
echo " gprof enabled = $enable_gprof"
0 commit comments