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 D99A5A00C2 for ; Fri, 14 Oct 2022 10:19:19 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D42C0410F2; Fri, 14 Oct 2022 10:19:19 +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 AD941410F1 for ; Fri, 14 Oct 2022 10:19:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665735558; 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=garKfPtsPFWZStgWeaiYIECiNl8/yYRrRMXtsHdjasA=; b=hGzzvEkB7ZFxh70Y0D2/wnmxLXFCz4TxPJkrG9hyOG82sOWq0ZxGj4xHe2mshEYKDg3CXH LFyJyxWU5UaolSejI+ld+w2N6uuE52qsYWc3mrYGmhr8BIxkN/aoN+LLJAp9mMw0jMr244 Z0XyZEkUd/nRKvMdEKtp/WWpadHZo2I= Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-578-Hx5oOViPNZqAPg9W_2triA-1; Fri, 14 Oct 2022 04:19:16 -0400 X-MC-Unique: Hx5oOViPNZqAPg9W_2triA-1 Received: by mail-pj1-f71.google.com with SMTP id y7-20020a17090a134700b0020b1347568bso2290095pjf.7 for ; Fri, 14 Oct 2022 01:19:16 -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=garKfPtsPFWZStgWeaiYIECiNl8/yYRrRMXtsHdjasA=; b=4O8yF3BKoihcqhjZurGzK3kGXJCSeuZcoCVL37TB4qvZSJX0yc/3HCTiWIliqvOG3L CZArcPNxGaS8tf/FL1u07p1VMTtgop+4y5dQWZScDjBWYbtDTVPSKyb92Bd9hftdQmkh MGYtSQAFGvQaHuW+UafarTLF2IeCWTxlwKVZvjZWLQiNHFG/vwZYxu/1LM9jyiQzzFgG GdZS5ktjX/OuLUF0IQs/aoxoGdvglw2xIoqeZOEjqHLL+qNPYhpWW6J0tfhCSFqC3PKr rFzKVc0aaUnb3DHZ/TNW/uKUMzP6uHtGuFaMbVKsCx5zA8ABPsQ8mfOoy6qYGiCcwkBh SLsA== X-Gm-Message-State: ACrzQf1F1GsFm3yrxtH4WxU+8ZYblgmZfaj66xnyoNlWNBNY+OiEteq5 WPQy/YIstxIL9cTO1o7hocT8Bg5Iei8KPb51svbu0WChcKSfitGKAMGmTV5eTKoceoCin4yGiw3 zDjBHfz42DfMk6w+BvThhZSo= X-Received: by 2002:a17:90a:428e:b0:205:d5fe:e0b3 with SMTP id p14-20020a17090a428e00b00205d5fee0b3mr4443525pjg.33.1665735555960; Fri, 14 Oct 2022 01:19:15 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7RoATsjJTf/FG1zmGjRYubB7hjL1oeQCm1Yzi2tE5jUZgGcEvJqJPAD/P88mZgsJlyrSCq8TZi8tuxYX+VTzw= X-Received: by 2002:a17:90a:428e:b0:205:d5fe:e0b3 with SMTP id p14-20020a17090a428e00b00205d5fee0b3mr4443499pjg.33.1665735555688; Fri, 14 Oct 2022 01:19:15 -0700 (PDT) MIME-Version: 1.0 References: <20220921120359.2201131-1-david.marchand@redhat.com> <20221012123112.2951802-1-david.marchand@redhat.com> <20221012123112.2951802-6-david.marchand@redhat.com> In-Reply-To: From: David Marchand Date: Fri, 14 Oct 2022 10:19:04 +0200 Message-ID: Subject: Re: [EXT] [PATCH v3 5/9] trace: fix dynamically enabling trace points To: Jerin Jacob Cc: Harman Kalra , Jerin Jacob Kollanukkaran , Sunil Kumar Kori , "dev@dpdk.org" , "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 Fri, Oct 14, 2022 at 6:27 AM Jerin Jacob wrote: > > On Fri, Oct 14, 2022 at 12:41 AM David Marchand > wrote: > > > > On Thu, Oct 13, 2022 at 7:07 PM Harman Kalra wrote: > > > > > > > > With the whole traces fixes series applied first, then the new "trace: > > > > take live traces via telemetry" patch applied, I can't reproduce your issue. > > > > > > > > > > > > > > Yes, you replicated the same scenario what I tried. > > > Sorry, I realized that actually it's not an issue, traces generated after /trace/save are getting > > > appended but in the same file (timestamped on /trace/save) on rte_eal_cleanup(). > > > > > > I assumed that trace dir generated with a timestamp will include all the trace points emitted > > > before that timestamp. But in the above scenario same trace dir includes trace points emitted > > > after this timestamp. I think this is bit confusing. Shall we add a logic where if already_done is > > > set, rename the original trace dir to latest timestamp? > > > > Afaiu, the behavior before this series was the same. > > An application calling rte_trace_save() would always save to a single directory. > > One thing that changed though is that the directory is timestamped > > with the time of the first call to rte_trace_save. > > Before the seriesn the timestamp was based on the time when the trace > > subsystem was initialised. > > > > > > We can go with what you describe (which makes sense to me). > > But I'd like to get a ack from traces maintainers before looking into it. > > IMO, We can remove "already_done" logic, whenever, rte_trace_save() > called, it creates > the directory of that timestamp and copies the trace buffers. Since we > have "overwrite" and "discard" > modes, it is better to not add "already_done" dogic in rte_trace_save(). Well, it's a bit more difficult than just removing already_done. Before my changes, the timestamp was decided and the directory created once and for all at init. On the other hand, every trace_mkdir() call resulted in a trace_dir_update() call. --> /trace/save {"/trace/save": {"Status": "OK", "Path": "/home/dmarchan/dpdk-traces/rte-2022-10-14-AM-08-39-37"}} --> /trace/save {"/trace/save": {"Status": "OK", "Path": "/home/dmarchan/dpdk-traces/rte-2022-10-14-AM-08-39-37rte-2022-10-14-AM-08-39-38"}} I prototyped a change (which deserves a separate patch). Testing it, there is still one corner case when calling rte_trace_save() twice in the same minute: --> /trace/save {"/trace/save": {"Status": "OK", "Path": "/home/dmarchan/dpdk-traces/rte-2022-10-14-AM-10-11-19"}} --> /trace/save {"/trace/save": {"Status": "KO", "Path": "/home/dmarchan/dpdk-traces/rte-2022-10-14-AM-10-11-19"}} EAL: Trace dir: /home/dmarchan/dpdk-traces/rte-2022-10-14-AM-10-11-19 EAL: trace_mkdir():321 mkdir /home/dmarchan/dpdk-traces/rte-2022-10-14-AM-10-11-19 failed [File exists] What do you suggest for this? -- David Marchand