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 AD1DF45DD0; Fri, 29 Nov 2024 21:39:44 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7A4EB4027D; Fri, 29 Nov 2024 21:39:44 +0100 (CET) Received: from mail-ed1-f41.google.com (mail-ed1-f41.google.com [209.85.208.41]) by mails.dpdk.org (Postfix) with ESMTP id 7616740150 for ; Fri, 29 Nov 2024 21:39:42 +0100 (CET) Received: by mail-ed1-f41.google.com with SMTP id 4fb4d7f45d1cf-5cecbddb574so2497006a12.1 for ; Fri, 29 Nov 2024 12:39:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732912782; x=1733517582; 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=wqrvHcH3N0cMkCkThyJrZBlxk4BatUVTQB7KW6P8Qho=; b=Z3s95byyF9jSRG2SvwBdl8AShLDDSVAF5newEFuXhA2AXQcamR4eVuVEe4colt4juw TRwMgkO99OAc7983JUNcTGHqMep9eFeRupa3WfgKFMwNFCqgh1pZo8owpcMClKxksMzV 7jPeVI7CsycNlTQLTLVqdg7XbMlcWBM3MIJRMoRKaktse+0wFaKy7S/dkv3/fy04vwSt dG9m0q0XISZyJnI5EtsDfoXPmR1G/t1Pcifwop/bzeNJ04jXLDT3e7UQZot6u+HqFOZo 8isshzqXC5W/E6Wf1iK/sXImHf7K6NRd9NISQC8XTLa5pX1x11DZymRlu9RKGNUm8HPk VKsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732912782; x=1733517582; 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=wqrvHcH3N0cMkCkThyJrZBlxk4BatUVTQB7KW6P8Qho=; b=ZNLCdq+HOFWnrY4ERE54E5Ej1woJAOeXSj5PVUMJ33v8qnUwSC+Q1ZyxtvrgdDAoI+ CMIc1PNTAEDXv5n8C7LIVD/1tY7PLS2YuFFcUQGdTamNKrc3Jw+htiMiPXXbPry7GYX2 VECgojNnP0QmdG885Wv7+tD5eb+xCyhudyLKAvM33YDv3zu5vqfdRbETxg3MljYCQYtn 418z0HqBcdBM3kNn508JMsVcVCwDASaySzJXCsX5wIcNLlfbvJFDCCbY/Pg3Gm2suxDx 7FMhKXHtDv3CaduuhowYpuiVW8mr0G+OKcUbki/DtZ2t7kylg9vS1jMOSM+DJIvRTQOP Lqgg== X-Gm-Message-State: AOJu0YzQK+5sg+DG/nOlczKebEpyMtYPTZPDRdt2TgaHXxC+E8a6DUSm dzl9u9bXsm2KsIQwf0pc6zklygDRuniBiDOrgWIKLDXEXQUp2v1/4Q+tKyZBMr9NqIzB3tDR+Nx lRTtSoglkMPmZWEGY752TL+y7PL8= X-Gm-Gg: ASbGncvP7l9l9JJqyb3UC9hx7pVW2K8W7eQPCHNePBHMBFFLPAdUkIdBRi3ul35IkMO 69BOSRImJdey1crHKZiFCYDJqOljyB1Gb X-Google-Smtp-Source: AGHT+IHwfHtmSuZR7dozDWFRkOPXR8G6RQqFAayXr2YRzyV1jHCCYOdPjS65vuI4SiCVT5RuVYBT98XWVAcEcY603wM= X-Received: by 2002:a17:906:328f:b0:aa1:94bb:c475 with SMTP id a640c23a62f3a-aa580f578c4mr1050417766b.24.1732912781946; Fri, 29 Nov 2024 12:39:41 -0800 (PST) MIME-Version: 1.0 References: <9370936.CDJkKcVGEf@thomas> In-Reply-To: <9370936.CDJkKcVGEf@thomas> From: Adel Belkhiri Date: Fri, 29 Nov 2024 15:39:30 -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="000000000000cb768306281332b0" 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 --000000000000cb768306281332b0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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? 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 t= o > > 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=94perhaps = 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 > > > > --000000000000cb768306281332b0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thank you for the clarification, Thomas. Indeed, the docum= entation 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 cal= lback (to save trace=C2=A0data) when the buffer is full?

On Fri, Nov 29, 2024 at 6:44=E2=80=AFAM Thomas Monjalon <thomas@monjalon.net> wrote:
28/11/2024 20:17, Adel Belkhi= ri:
> 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 applicatio= n
> executes rte_eal_cleanup(). Does this mean the target application need= s to
> explicitly support tracing by calling rte_save_trace()=E2=80=94perhaps= 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:

=C2=A0 =C2=A0 =C2=A0 =C2=A0 https://doc.dpdk.or= g/guides/prog_guide/trace_lib.html



--000000000000cb768306281332b0--