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 B739DA0547; Wed, 12 Oct 2022 11:42:04 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6B30542D6E; Wed, 12 Oct 2022 11:42:04 +0200 (CEST) Received: from mail-qk1-f172.google.com (mail-qk1-f172.google.com [209.85.222.172]) by mails.dpdk.org (Postfix) with ESMTP id 2045042B6D for ; Wed, 12 Oct 2022 11:42:03 +0200 (CEST) Received: by mail-qk1-f172.google.com with SMTP id z30so10082552qkz.13 for ; Wed, 12 Oct 2022 02:42:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=1C2JImWRnNC5zonxHtsx0p/pwTa6kHIEhUvgZpceA5A=; b=hQ//t26/O4AEwHroVNva/t6ZqKnUCYy3/mjRAj5FH9/FeQxoClRbil8ubRazo0hEL2 LQ8qMeW0elZ/F1d15k8dgDxmVkGHDKgRD1Rs4B32B2jzHltkbeLy1rM+4G2ybbtGsB7P 2VOlI2kPsQ/LXO8lw5TjEO4SiawV9tsHvc1o7sxUMWIlrxap/4q3EV3639vzRr2ZD+LX QS+cmAG+A0ygpOwixbukHlAtZGktC4F1KnYPH2LRcqMeRgMsqoaULsrCMpuZz3ymQ/o6 rDNeSyX5gPyd3vmEDEfaRHLKH2wLB2ZL/A3ESbAyLyF/Mb62z5GxCF0HaW2F5LFivzBn Xwvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=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=1C2JImWRnNC5zonxHtsx0p/pwTa6kHIEhUvgZpceA5A=; b=2YHzDVXoLw4TdZLB3XRRe/+rXyVqkys0FGJ4xX/98ZjNOGbsqZwVYBoi4Trw3VXs7E 0T5NB4mndjECKh6U2SR5UWoVhiVkJIFRQkSqu1gcEnxCKpN2oyCJedPnZorytyasNQCe I2LTTo5O6OLZXX8IFg8QqaRxm8QbQkSe9bgOG35NVnZ8kTcdWsFjXppqFERAoaxZGzDC Tw4fhpeQhckdMCFFlFWVokAyRrWQRQ4FULBpYpO1D60o7Xq8gZBE8Z10pp8XdaVs/23u z6DcNbSLUeNx0W9FihgDDsMibM7ino3yZSgnSgNdDqEiWC45rub6xurubZMpB4a3SgQC BKPg== X-Gm-Message-State: ACrzQf1McoviVLDJuHA6IKjZ8MhyRgfWcaDECapAhsLPCf0hD/fp0Krp VnDOlTu/8rk1UCWXNyufjkpnHNQUeLAVMo2uf78= X-Google-Smtp-Source: AMsMyM7hquyzOeZCeX8pfFincz/jNTGBv4kdvJ8+nszDQPcp5Kj/8UtF9y6+zCqV92lbl6iwmWp9J5JNB67+NsAlAis= X-Received: by 2002:a37:4454:0:b0:6e7:9bd0:bf53 with SMTP id r81-20020a374454000000b006e79bd0bf53mr19039001qka.616.1665567722509; Wed, 12 Oct 2022 02:42:02 -0700 (PDT) MIME-Version: 1.0 References: <20220921120359.2201131-1-david.marchand@redhat.com> <20220921120359.2201131-8-david.marchand@redhat.com> In-Reply-To: From: Jerin Jacob Date: Wed, 12 Oct 2022 15:11:36 +0530 Message-ID: Subject: Re: [PATCH 7/8] trace: remove limitation on trace point name To: David Marchand Cc: dev@dpdk.org, Jerin Jacob , Sunil Kumar Kori Content-Type: text/plain; charset="UTF-8" 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 Wed, Oct 12, 2022 at 1:18 PM David Marchand wrote: > > On Tue, Oct 11, 2022 at 4:49 PM Jerin Jacob wrote: > > > > On Wed, Sep 21, 2022 at 5:35 PM David Marchand > > wrote: > > > > > > The name of a trace point is provided as a constant string via the > > > RTE_TRACE_POINT_REGISTER macro. > > > We can rely on the constant string in the binary and simply point at it. > > > > I am not sure about this. If we compile with -Os (optimized for space) > > compiler may decide to use stack instead of rodata. > > If so, we will have segfaults with specific compiler or compiler build options. > > Thoughts? > > Good point. > > We need an explicit storage for the string. > What do you think of: This is OK. > @@ -20,9 +20,10 @@ RTE_DECLARE_PER_LCORE(volatile int, trace_point_sz); > > #define RTE_TRACE_POINT_REGISTER(trace, name) \ > rte_trace_point_t __attribute__((section("__rte_trace_point"))) __##trace; \ > +static const char __##trace##_name[] = RTE_STR(name); \ > RTE_INIT(trace##_init) \ > { \ > - __rte_trace_point_register(&__##trace, RTE_STR(name), \ > + __rte_trace_point_register(&__##trace, __##trace##_name, \ > (void (*)(void)) trace); \ > } > > > > -- > David Marchand >