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 94EA6A0547; Wed, 12 Oct 2022 11:57:27 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8520842D6E; Wed, 12 Oct 2022 11:57:27 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 7569542B6D for ; Wed, 12 Oct 2022 11:57:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665568646; 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: in-reply-to:in-reply-to:references:references; bh=r2o6Mwl5lSluaUxoCrHY0zgiuLF8vbnRBCJ0vTnZZXM=; b=CZFsQn5YPe8pOeqtMyKXp0Qap/2d8eMCog2KeZFJ3YOlPX44cHnLIxukn7p0IZToltTYRC uNyTLObvPWKi22gEon0R+fr+Vkd7xSiE1J2HEuW1ZUOIQyu79v59MkXjp4Yhn9e6jlyhjq GKemUtudyU0XNBZamQ6VxfqeKYMasKk= Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-591-W9UyFU7cNyeUDI0ut2kMMg-1; Wed, 12 Oct 2022 05:57:24 -0400 X-MC-Unique: W9UyFU7cNyeUDI0ut2kMMg-1 Received: by mail-pl1-f200.google.com with SMTP id c10-20020a170902d48a00b001825736b382so5380538plg.15 for ; Wed, 12 Oct 2022 02:57:24 -0700 (PDT) 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=r2o6Mwl5lSluaUxoCrHY0zgiuLF8vbnRBCJ0vTnZZXM=; b=rk25VStA+8axV1Jsb7/AETDi/mvsWHKIFDdhh8DU3AG95soL/cC7TICtnH0WkGWv+0 mb/+y7afVkXzA1Pj/cIYE2XMae3sgAdL87Rcm4Dr4arQ6Hx32kg4u+Y8+en/ZE/NZv/O 9UBsNEwXms1HLa3UixysX+i8L6sKAR5kQ+fFLW1v/SRPb1vDF9KYQfwqES3lkFui2zba caETqJaNcBXnM9cIK05K2F+wy9Vxh970PCG7wJE87gasE0nh6p5/aMUPYeW7zC3E/KAo 58uYpLz53e5vPTRCLV1zeY62+K8rhjt25GfGRd+oXby/EGukgjio4mF5kg+GDRJVbQ2E G6XA== X-Gm-Message-State: ACrzQf3oRZBvfH6fx0bSE2icMNwbduoh/Vqu1H49CQ5Xflhje+affDX2 qxIVnYPCY1Xhu33pqb1DkEwCitcwakpn6U+9TMxldQJxQv5ZwIXuiG5S0cD4CItLUOZ8PM8isJx s0jUfKD1xeXtbCTDL7+o= X-Received: by 2002:a63:8341:0:b0:46a:cf98:493f with SMTP id h62-20020a638341000000b0046acf98493fmr1220709pge.120.1665568643874; Wed, 12 Oct 2022 02:57:23 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5/yXwwIPkdbxtVEjue2vYXbSGxyx0FGpO2P6LG0nw3XAlS2C6+3nSJN7PV8HxHmiz0kDRtZJDY9UGHD0BHPiQ= X-Received: by 2002:a63:8341:0:b0:46a:cf98:493f with SMTP id h62-20020a638341000000b0046acf98493fmr1220697pge.120.1665568643617; Wed, 12 Oct 2022 02:57:23 -0700 (PDT) MIME-Version: 1.0 References: <20220921120359.2201131-1-david.marchand@redhat.com> <20221004094418.196544-1-david.marchand@redhat.com> <20221004094418.196544-6-david.marchand@redhat.com> In-Reply-To: From: David Marchand Date: Wed, 12 Oct 2022 11:57:12 +0200 Message-ID: Subject: Re: [EXT] [PATCH v2 5/9] trace: fix dynamically enabling trace points To: Sunil Kumar Kori Cc: "dev@dpdk.org" , "skori@mavell.com" , Jerin Jacob Kollanukkaran , "stable@dpdk.org" X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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 11:24 AM Sunil Kumar Kori wrote: > > diff --git a/lib/eal/common/eal_common_trace_utils.c > > b/lib/eal/common/eal_common_trace_utils.c > > index 2b55dbec65..7bf1c05e12 100644 > > --- a/lib/eal/common/eal_common_trace_utils.c > > +++ b/lib/eal/common/eal_common_trace_utils.c > > @@ -314,14 +314,18 @@ trace_dir_default_path_get(char *dir_path) > > return 0; > > } > > > > -int > > +static int > > trace_mkdir(void) > > { > > struct trace *trace = trace_obj_get(); > > char session[TRACE_DIR_STR_LEN]; > > + static bool already_done; > > char *dir_path; > > int rc; > > > > + if (already_done) > > + return 0; > > + > > As trace_mkdir() call is being moved to rte_trace_save() so there won't be another context which will be invoking trace_mkdir(). > So is this logic still needed here ? I have in mind a case where an application calls rte_trace_save() multiple times. -- David Marchand