From patchwork Wed Dec 22 09:16:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eelco Chaudron X-Patchwork-Id: 1572097 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=OrtnwAFA; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::133; helo=smtp2.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JJnl36JScz9sRN for ; Wed, 22 Dec 2021 20:16:47 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 4FC7940A96; Wed, 22 Dec 2021 09:16:45 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vhMSNxnBUvFH; Wed, 22 Dec 2021 09:16:44 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp2.osuosl.org (Postfix) with ESMTPS id 3418740A99; Wed, 22 Dec 2021 09:16:43 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 018B0C001E; Wed, 22 Dec 2021 09:16:43 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 65761C0012 for ; Wed, 22 Dec 2021 09:16:41 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 463E9812CA for ; Wed, 22 Dec 2021 09:16:41 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp1.osuosl.org (amavisd-new); dkim=pass (1024-bit key) header.d=redhat.com Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MYp6s1ifrvTO for ; Wed, 22 Dec 2021 09:16:40 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by smtp1.osuosl.org (Postfix) with ESMTPS id 90ACD80E42 for ; Wed, 22 Dec 2021 09:16:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1640164599; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YQQxrgceISGyi28ll+pjylQXVMz3F2kwYm3aWWDWJgA=; b=OrtnwAFAHMt5sb9a9yKri0+0WJaKdv9f83mhR9DtphwtiwqGOL8torGD8QSzuit75slidD KKFxRmvn84zdow/DCJFf9ulxfnc9UC/GhSGUHyamkUcPkDhVELd5xhmXaQZwJO+qOybuET DKH52wpVo0mMlszo+kL2jtMH6nIOo80= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-552-pxbJDHELMyONCuWLcLKNlw-1; Wed, 22 Dec 2021 04:16:37 -0500 X-MC-Unique: pxbJDHELMyONCuWLcLKNlw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1FD6E1006AA5 for ; Wed, 22 Dec 2021 09:16:37 +0000 (UTC) Received: from localhost.localdomain (unknown [10.39.194.186]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7BC1B5BD0F; Wed, 22 Dec 2021 09:16:36 +0000 (UTC) From: Eelco Chaudron To: dev@openvswitch.org Date: Wed, 22 Dec 2021 10:16:25 +0100 Message-Id: <164016456502.146460.501036453462533691.stgit@ebuild> In-Reply-To: <164016453900.146460.16964767898519268258.stgit@ebuild> References: <164016453900.146460.16964767898519268258.stgit@ebuild> User-Agent: StGit/1.1 MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=echaudro@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH v2 1/5] configure: add --enable-usdt option to enable USDT probes X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" 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 Acked-by: Paolo Valerio --- 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(