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 4E7F445DD1; Fri, 29 Nov 2024 22:24:48 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3DA704027D; Fri, 29 Nov 2024 22:24:48 +0100 (CET) Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com [209.85.167.49]) by mails.dpdk.org (Postfix) with ESMTP id 7410D40150 for ; Fri, 29 Nov 2024 22:24:46 +0100 (CET) Received: by mail-lf1-f49.google.com with SMTP id 2adb3069b0e04-53df6322ea7so4245027e87.0 for ; Fri, 29 Nov 2024 13:24:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732915486; x=1733520286; darn=dpdk.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=OIxHeBGwQ86wX/cI/GO7PnZB7aJnYoRf3cw0kiHBT8Y=; b=Xx13EWuczdoSWsVE4D0bLx0fbd1VJokb70V3YokQ1QMYSdHbfcL/yMnVbUSxLpAXNG REOxJRwSkFAufgQRqnB6HXsQYbXn/Y8KkAVmeGvYQ/1w+uU/W1KM4cWeW7bjM3bF3TvW LFI2OljdZaOCTfpx8ErM0p72FsN1kvsrG6TLhOEBlGYAoUg2Ct1VyeSp9gP9ehHqrTbO m92vj+61bSl12CMHsUftMkFeRJyvoyKQlx91i0Y++vyhxXm/QMJhzJVelGWdom7uhL+S UCGwqoMFSc/AP2Q5aBOuSfsVOJQuiUz/07mpIpxMvC3+4dVsLDpQtleQ4zQyK6v1q2XM gQmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732915486; x=1733520286; 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=OIxHeBGwQ86wX/cI/GO7PnZB7aJnYoRf3cw0kiHBT8Y=; b=fb+uEM7ebMVaPP51OBzK8xgIXrjnZkKguwkgy1JwJw1nL25oTp77yKbEfEwt6mBCI1 H+4wARBZ8w+SQLt8diJaGa/+eIlBvZ7zlAPkycvJ1/LVWnI1G/cEbA0+T5ZW76wC1Afo DaHwZHc9tXz60eHVdpEBLksUvfoBvvapftmx+GOPQZiEwfDXAi/k6JWXj5NcIhecvG3S 1BRzOk94KSO2j5unZ9iKI8Anvtnww+2h1JW4ZW8tRTidGVwgHE7bMWZeDeKaPK6Zba7W uhG4H5sM30s5iNBVHLS8ONtZUbZQ1Ad8LQPten0HRbXHZbGC4LA/425ozUPtlnmuFnra 507w== X-Gm-Message-State: AOJu0YzmFO7h3DYw34IOY9x2CxOFC0KjivFHpOaJENp4EXzhMvcG0SBp RZGDTy1HWInVLFQ71bqppD14ioHNB3WT9ny5FeUuujXG9MpbaTFI1mkcy8n2MmrTmnBRvCb/cNo FwSDSgcXMye0WF3F9oYfuhXA0MMA= X-Gm-Gg: ASbGncsXFLRxRiB2W+GtOkZlcC7TG61GLPlyDVaROfD4WZBYZH4uTqynCUztf/aNaPa jaxuUTjJZgLHA1ryfLz1sQFrSJ0Zwo24= X-Google-Smtp-Source: AGHT+IHpUcGGIRzCMVC8F5QzUoiDakR8PzzR6+NZo1cyINQsJzy+dF2gBIa8UzNvZ+dNznn0E2Gy4MkXa/flCoZRTJM= X-Received: by 2002:a05:6512:3c8e:b0:53d:a2cb:1350 with SMTP id 2adb3069b0e04-53df00cf6cbmr11839170e87.17.1732915485581; Fri, 29 Nov 2024 13:24:45 -0800 (PST) MIME-Version: 1.0 References: <9370936.CDJkKcVGEf@thomas> <1953300.taCxCBeP46@thomas> In-Reply-To: <1953300.taCxCBeP46@thomas> From: Adel Belkhiri Date: Fri, 29 Nov 2024 16:24:34 -0500 Message-ID: Subject: Re: When the trace buffers are saved to disk? To: Thomas Monjalon Cc: dev@dpdk.org, jerinj@marvell.com, skori@marvell.com Content-Type: multipart/alternative; boundary="000000000000f1af01062813d346" 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 --000000000000f1af01062813d346 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thank you for your answer. On Fri, Nov 29, 2024 at 4:23=E2=80=AFPM Thomas Monjalon wrote: > 29/11/2024 21:39, Adel Belkhiri: > > Thank you for the clarification, Thomas. Indeed, the documentation for > the > > trace library is kind of limited. If you don't mind, I have another > > question: Would it be useful to have an API to register a callback (to > save > > trace data) when the buffer is full? > > I suppose yes, the problem being which thread is running file writing. > > I leave it to the maintainers of the trace library. > > > > On Fri, Nov 29, 2024 at 6:44=E2=80=AFAM Thomas Monjalon > wrote: > > > 28/11/2024 20:17, Adel Belkhiri: > > > > Hi all, > > > > > > > > Recently, while tracing applications from the apps and examples > > > > directories, I became confused about when the trace buffer is > written to > > > > disk. Is the trace data saved only when rte_save_trace() is called, > or > > > does > > > > > > It is rte_trace_save() > > > > > > > it also automatically save when the buffer becomes full? > > > > > > No, DPDK is not doing such thing without user agreement. > > > > > > > From my understanding, rte_save_trace() is invoked when the > application > > > > executes rte_eal_cleanup(). Does this mean the target application > needs > > > to > > > > explicitly support tracing by calling rte_save_trace()=E2=80=94perh= aps at > regular > > > > intervals=E2=80=94to dump the trace buffer to disk? Otherwise, will= we only > get a > > > > fragment of the trace saved during rte_eal_cleanup() execution? > > > > > > Yes you get it right. > > > > > > > Thank you for clarifying this point. > > > > > > Thanks for asking. > > > > > > If you think the doc below is not clear enough, > > > do not hesitate to submit a patch to make the doc better: > > > > > > https://doc.dpdk.org/guides/prog_guide/trace_lib.html > > > > --000000000000f1af01062813d346 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thank you for your answer.

On Fri, Nov 29, 2024 at 4:23=E2=80=AFPM= Thomas Monjalon <thomas@monjalon= .net> wrote:
29/11/2024 21:39, Adel Belkhi= ri:
> Thank you for the clarification, Thomas. Indeed, the documentation for= the
> trace library is kind of limited. If you don't mind, I have anothe= r
> question: Would it be useful to have an API to register a callback (to= save
> trace data) when the buffer is full?

I suppose yes, the problem being which thread is running file writing.

I leave it to the maintainers of the trace library.


> On Fri, Nov 29, 2024 at 6:44=E2=80=AFAM Thomas Monjalon <thomas@monjalon.net> = wrote:
> > 28/11/2024 20:17, Adel Belkhiri:
> > > Hi all,
> > >
> > > Recently, while tracing applications from the apps and examp= les
> > > directories, I became confused about when the trace buffer i= s written to
> > > disk. Is the trace data saved only when rte_save_trace() is = called, or
> > does
> >
> > It is rte_trace_save()
> >
> > > it also automatically save when the buffer becomes full?
> >
> > No, DPDK is not doing such thing without user agreement.
> >
> > > From my understanding, rte_save_trace() is invoked when the = application
> > > executes rte_eal_cleanup(). Does this mean the target applic= ation needs
> > to
> > > explicitly support tracing by calling rte_save_trace()=E2=80= =94perhaps at regular
> > > intervals=E2=80=94to dump the trace buffer to disk? Otherwis= e, will we only get a
> > > fragment of the trace saved during rte_eal_cleanup() executi= on?
> >
> > Yes you get it right.
> >
> > > Thank you for clarifying this point.
> >
> > Thanks for asking.
> >
> > If you think the doc below is not clear enough,
> > do not hesitate to submit a patch to make the doc better:
> >
> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0http= s://doc.dpdk.org/guides/prog_guide/trace_lib.html



--000000000000f1af01062813d346--