Message ID | 164016456502.146460.501036453462533691.stgit@ebuild |
---|---|
State | Accepted |
Headers | show |
Series | adding USDT points to OVS | expand |
Context | Check | Description |
---|---|---|
ovsrobot/apply-robot | success | apply and check: success |
ovsrobot/github-robot-_Build_and_Test | success | github build: passed |
Hi Eelco, I didn't notice the subject says "--enable-usdt" instead of --enable-usdt-probes. TBF, I'm ok with it (it's pretty obvious what the option is :) Maybe you can keep that in mind if you end up respinning for other reasons. Acked-by: Paolo Valerio <pvalerio@redhat.com> Eelco Chaudron <echaudro@redhat.com> writes: > Allow inclusion of User Statically Defined Trace (USDT) probes > in the OVS binaries using the --enable-usdt-probes option to the > ./configure script. > > Signed-off-by: Eelco Chaudron <echaudro@redhat.com> > --- > v2: > - Fixed option name in the commit message > - Fixed help string (added space) > > configure.ac | 1 + > m4/openvswitch.m4 | 28 ++++++++++++++++++++++++++++ > 2 files changed, 29 insertions(+) > > diff --git a/configure.ac b/configure.ac > index eaa9bf7ee..3e72e28bf 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -88,6 +88,7 @@ OVS_CHECK_WIN32 > OVS_CHECK_VISUAL_STUDIO_DDK > OVS_CHECK_COVERAGE > OVS_CHECK_NDEBUG > +OVS_CHECK_USDT > OVS_CHECK_NETLINK > OVS_CHECK_OPENSSL > OVS_CHECK_LIBCAPNG > diff --git a/m4/openvswitch.m4 b/m4/openvswitch.m4 > index 772825a71..4c3bace6e 100644 > --- a/m4/openvswitch.m4 > +++ b/m4/openvswitch.m4 > @@ -60,6 +60,34 @@ AC_DEFUN([OVS_CHECK_NDEBUG], > [ndebug=false]) > AM_CONDITIONAL([NDEBUG], [test x$ndebug = xtrue])]) > > +dnl Checks for --enable-usdt-probes and defines HAVE_USDT if it is specified. > +AC_DEFUN([OVS_CHECK_USDT], [ > + AC_ARG_ENABLE( > + [usdt-probes], > + [AC_HELP_STRING([--enable-usdt-probes], > + [Enable User Statically Defined Tracing (USDT) probes])], > + [case "${enableval}" in > + (yes) usdt=true ;; > + (no) usdt=false ;; > + (*) AC_MSG_ERROR([bad value ${enableval} for --enable-usdt-probes]) ;; > + esac], > + [usdt=false]) > + > + AC_MSG_CHECKING([whether USDT probes are enabled]) > + if test "$usdt" != true; then > + AC_MSG_RESULT([no]) > + else > + AC_MSG_RESULT([yes]) > + > + AC_CHECK_HEADER([sys/sdt.h], [], > + [AC_MSG_ERROR([unable to find sys/sdt.h needed for USDT support])]) > + > + AC_DEFINE([HAVE_USDT_PROBES], [1], > + [Define to 1 if USDT probes are enabled.]) > + fi > + AM_CONDITIONAL([HAVE_USDT_PROBES], [test $usdt = true]) > +]) > + > dnl Checks for MSVC x64 compiler. > AC_DEFUN([OVS_CHECK_WIN64], > [AC_CACHE_CHECK(
diff --git a/configure.ac b/configure.ac index eaa9bf7ee..3e72e28bf 100644 --- a/configure.ac +++ b/configure.ac @@ -88,6 +88,7 @@ OVS_CHECK_WIN32 OVS_CHECK_VISUAL_STUDIO_DDK OVS_CHECK_COVERAGE OVS_CHECK_NDEBUG +OVS_CHECK_USDT OVS_CHECK_NETLINK OVS_CHECK_OPENSSL OVS_CHECK_LIBCAPNG diff --git a/m4/openvswitch.m4 b/m4/openvswitch.m4 index 772825a71..4c3bace6e 100644 --- a/m4/openvswitch.m4 +++ b/m4/openvswitch.m4 @@ -60,6 +60,34 @@ AC_DEFUN([OVS_CHECK_NDEBUG], [ndebug=false]) AM_CONDITIONAL([NDEBUG], [test x$ndebug = xtrue])]) +dnl Checks for --enable-usdt-probes and defines HAVE_USDT if it is specified. +AC_DEFUN([OVS_CHECK_USDT], [ + AC_ARG_ENABLE( + [usdt-probes], + [AC_HELP_STRING([--enable-usdt-probes], + [Enable User Statically Defined Tracing (USDT) probes])], + [case "${enableval}" in + (yes) usdt=true ;; + (no) usdt=false ;; + (*) AC_MSG_ERROR([bad value ${enableval} for --enable-usdt-probes]) ;; + esac], + [usdt=false]) + + AC_MSG_CHECKING([whether USDT probes are enabled]) + if test "$usdt" != true; then + AC_MSG_RESULT([no]) + else + AC_MSG_RESULT([yes]) + + AC_CHECK_HEADER([sys/sdt.h], [], + [AC_MSG_ERROR([unable to find sys/sdt.h needed for USDT support])]) + + AC_DEFINE([HAVE_USDT_PROBES], [1], + [Define to 1 if USDT probes are enabled.]) + fi + AM_CONDITIONAL([HAVE_USDT_PROBES], [test $usdt = true]) +]) + dnl Checks for MSVC x64 compiler. AC_DEFUN([OVS_CHECK_WIN64], [AC_CACHE_CHECK(
Allow inclusion of User Statically Defined Trace (USDT) probes in the OVS binaries using the --enable-usdt-probes option to the ./configure script. Signed-off-by: Eelco Chaudron <echaudro@redhat.com> --- v2: - Fixed option name in the commit message - Fixed help string (added space) configure.ac | 1 + m4/openvswitch.m4 | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+)