From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id AC81245A03; Tue, 24 Sep 2024 17:42:00 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 77E244028E; Tue, 24 Sep 2024 17:42:00 +0200 (CEST) Received: from mail-qt1-f180.google.com (mail-qt1-f180.google.com [209.85.160.180]) by mails.dpdk.org (Postfix) with ESMTP id 1F18E40274 for ; Tue, 24 Sep 2024 17:41:59 +0200 (CEST) Received: by mail-qt1-f180.google.com with SMTP id d75a77b69052e-4581ee65b46so48119291cf.3 for ; Tue, 24 Sep 2024 08:41:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727192518; x=1727797318; darn=dpdk.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=1BziMadGtWwXIt4MvA5FeqQhPMwCtR/EA8SpXZddk8Y=; b=mUg8bvxLW0Kw7zY+ibg6wSMKj6ZKKvDRMnaPRL7sfodDh7oEIIqiEwseOdrM55ySry gWgFn2ylwDV1Qxd8hfQCdYbsD4jzFaa/5t7sFi0HiM+cmj3FNP5cAddMvlG/xQH8sDAV FQ9WmitmhfktGUY6JNF8I9Dn0CPKQO5ShVxDDe8zFDITZT0OP02UhIs/w7rv6phgrDX0 L0qIPm6rg8lnTsAAxExLUmRnDH2xtG+Qfcj+8Cdq0jCOKLqNzBV/hR3a5hQz2ANP3Kb9 JG5//ClxSbFrR77/qc4zt7NoOvA8ueTCBCMf7C52VxPPnaRmaTu5/54hw+k1dTZEXzJ/ TTKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727192518; x=1727797318; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1BziMadGtWwXIt4MvA5FeqQhPMwCtR/EA8SpXZddk8Y=; b=rPilifI9ntkBL4/+YvR2g46HWJEwdxODtjG9qQlzo/BqAl/chL6RWJzRhGXm99dWEc Z1ZxWV/G6wOiCHnqffR8/SJE8mn8omTwKj4Th2o6i+0iPG5Ez6dbSGbURGTtP4J8H1db 48a+yk5cjRbraPQQ1LIfrk8mhT3fXAlRK+Nchooh6xfJE1K6ymX18tkBrdr18jDN7gVK POwlt1DupOkpJVcuzePapcIXf683P1Z+/scfmwu5Flf7fnMGMfHX3HaZzxoUFQRXl5YV gypZpADhA/morwBV+t9mGPnFFzvTzgEwsKOwEwtE6R2YYN0zzVGStyT3dChFrm2Y5ULK wO0w== X-Forwarded-Encrypted: i=1; AJvYcCV3z0/wtaHH6xFrIGmFICdENAuxpjUUkAe1WxJPO4YcZznwqGs0qxq3ErG6AktuaE8wRpA=@dpdk.org X-Gm-Message-State: AOJu0YzNha+hx9EVHKYGcVPw+/AdYu1N7yvPzwYbKyGj02e8m/hQVdp3 6GQHOMq4zZndHk9B9wOqYKiVsa5iJnzklIgtZVkDsef2e8hsasm+eWojcHU/Oo1mmXNVKFxQoP+ B/jVGejPmm/WySoxmofVicRZ6cb4= X-Google-Smtp-Source: AGHT+IHz3yAEpA1nK2p2u0cC+0PTsNszDUWwkD3LdytYEHeu22r/6pGeourbwPnk1QyqHRKSMgS6SMxIr9/J+7XniI8= X-Received: by 2002:a05:622a:1828:b0:45b:c1f:3c18 with SMTP id d75a77b69052e-45b20585517mr234248591cf.60.1727192518231; Tue, 24 Sep 2024 08:41:58 -0700 (PDT) MIME-Version: 1.0 References: <20240918085551.231015-1-mb@smartsharesystems.com> <20240924133957.1505113-1-mb@smartsharesystems.com> In-Reply-To: <20240924133957.1505113-1-mb@smartsharesystems.com> From: Jerin Jacob Date: Tue, 24 Sep 2024 21:11:31 +0530 Message-ID: Subject: Re: [PATCH v4] eal: add build-time option to omit trace To: =?UTF-8?Q?Morten_Br=C3=B8rup?= Cc: Jerin Jacob , Sunil Kumar Kori , dev@dpdk.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Tue, Sep 24, 2024 at 7:10=E2=80=AFPM Morten Br=C3=B8rup wrote: > > Some applications want to omit the trace feature. > Either to reduce the memory footprint, to reduce the exposed attack > surface, or for other reasons. > > This patch adds an option in rte_config.h to include or omit trace in the > build. Trace is included by default. > > Omitting trace works by omitting all trace points. > For API and ABI compatibility, the trace feature itself remains. > > Signed-off-by: Morten Br=C3=B8rup > --- > v4: > * Added check for generic trace enabled when registering trace points, in > RTE_INIT. (Jerin Jacob) > * Test application uses function instead of macro to check if generic > trace is enabled. (Jerin Jacob) > * Performance test application uses function to check if generic trace is > enabled. > v3: > * Simpler version with much fewer ifdefs. (Jerin Jacob) > v2: > * Added/modified macros required for building applications with trace > omitted. > > +/** > + * @internal Since it is used in app/test. Can we remove it as internal and make symbol as rte_trace_point_is_enabled > + * > + * Test if the tracepoint compile-time option is enabled. > + * > + * @return > + * true if tracepoint enabled, false otherwise. > + */ > +__rte_experimental > +static __rte_always_inline bool > +__rte_trace_point_generic_is_enabled(void) Do we need to keep _generic_ Rest looks good to me.