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 70BD7A0548 for ; Wed, 12 Oct 2022 11:57:28 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6B6A443003; Wed, 12 Oct 2022 11:57:28 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 8452342D6E 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=1665568645; 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=ADKb1USNDGBsnWo8MmQai9lk3K1k8mxt+6OAEZqbm8jljsF8XtkXi6KsEivFuH+ZiN1JPU pw9vDo3oIgn6rOn9I/WySiB7s80Y8K2q719zMvacNEam7OfdsBQswDUZyYoCbcSzVP4eDk opS6RLUiuoND9A2VAPNexpaGhdclMTs= Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-30-SflVG5Y_N_2qi43TTuAbkg-1; Wed, 12 Oct 2022 05:57:24 -0400 X-MC-Unique: SflVG5Y_N_2qi43TTuAbkg-1 Received: by mail-pj1-f70.google.com with SMTP id gz13-20020a17090b0ecd00b0020d67a4e6e5so2472072pjb.3 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=BOVx98zTlIDeQsK6WP0eY8FcGY9kV5AfCB+NgEQf5QMYq0x0CF/JNaX36ZnGShMeuQ OIEmgOUu4fFIadkm7wGuDaLb6A/ZvoNR1U5odV1jN990Uvho1XvZWv/JhjQ7DpquoZgS x6SyH7898eqHRCOnzJPLhEWVW2IGPueTqoiSkboM7uclOpnD+BipLeR3r+d2ys0CDNkT D7ty88vQ4XpD9ZMIZZ38NzS86fDjajFOK4U/MpYnc9mGeFfsgWpkIb+GTUni9ZvAFPvX CUUuNtJ/s9FoSxqkxyh2XSXS+DUiMYtiqhl6xv7/UArLV+cj5WTVUX+jcLT8fS4k060E N+yw== X-Gm-Message-State: ACrzQf3X7Wf2rtALHYmac/YfFLOVJsdhP8xX4hs7cVHTDL5gdGJ3ajs9 ygXoAtr8Dw0cuk8cJ2SKZJ5p0jBEPjLLbHF2HbEricrbl2ZvXEa/1vY12oomwz0Kbw3gc8PwHkZ qM7vqv9HIfYX9qZa+mHchnh4= X-Received: by 2002:a63:8341:0:b0:46a:cf98:493f with SMTP id h62-20020a638341000000b0046acf98493fmr1220711pge.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: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-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