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 6CAD1A00C2; Fri, 14 Oct 2022 10:19:20 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 01ED642CBC; Fri, 14 Oct 2022 10:19:20 +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 C96C5410F2 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-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-632--3oMhv10NJSRSz_hkBb88A-1; Fri, 14 Oct 2022 04:19:17 -0400 X-MC-Unique: -3oMhv10NJSRSz_hkBb88A-1 Received: by mail-pj1-f70.google.com with SMTP id pj13-20020a17090b4f4d00b0020b0a13cba4so4953584pjb.0 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=li96zr1lxHJNSEiqjjUKMk7yiWW1dwqXarRpuSCXujbNAlXdwxngJwVg91JaqVEDsU UkFaQSa7/noz9HsqdjXuC+tBKKUV69SHBEiufxTjcLqdwQaAwaJa3izR4UzfAXAH24pN 9lvb0LN0RwRiX0RG0X0Bei11bVhosCUIKzbRkg6j7ECLdzQJ3/7KIYsomkqmcfrlQaSh +tBd0L3/1fDYeor2qnrTvixcEEIUqPaxtSJRyr1HaVu2YiErF8vssHb83PM7FFMGjv4f OoIGHwo9trzxhoWEkswmxCYjKhYSeDdkUWknBrHTznR6ywSUKp6yg1EI6QsYnYl3gyG2 lHbA== X-Gm-Message-State: ACrzQf1ZRuPTVfYpMn3nxXpLC0Ntf+m+Ut4DeZDCiDkqON9tGgjKvAYc +ZD0cDCvWc+epbKS4gBCqnT+v8bx1hmEEKR2cGKBWQmyhRjB902vc9R9CRKvN9gB6pWq2fpAv+C pp7u/H854N4ryOS0hqto= X-Received: by 2002:a17:90a:428e:b0:205:d5fe:e0b3 with SMTP id p14-20020a17090a428e00b00205d5fee0b3mr4443531pjg.33.1665735555974; 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: 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 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