DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Mattias Rönnblom" <hofors@lysator.liu.se>
To: "dev@dpdk.org" <dev@dpdk.org>
Cc: "Svante Järvstråt" <svante.jarvstrat@ericsson.com>
Subject: DPDK trace "by reference"
Date: Fri, 28 Feb 2025 10:01:38 +0100	[thread overview]
Message-ID: <a3f7283e-6a3d-42ce-abf1-cd5101593a3e@lysator.liu.se> (raw)

Hi.

At the point of a DPDK app crash, or some other abnormal event, you may 
want to save the trace buffer, especially if a complete core file is too 
large to fit on the disk.

This would be straight-forward to implement on top of DPDK trace.

However, you may also want to save data which is referred to 
by-reference in the traces, like for example mbuf pointers. The reason 
for not have the data by-value may be that it would be too expensive for 
always-on type trace points.

How could one go about solving the latter case with DPDK trace?

Decoding CTF and de-referencing the appropriate data (e.g., in the 
signal handler) seems technically possible, but very complicated without 
"framework" (i.e., DPDK trace) support. Then you would also need to 
regenerate CTF (including new meta data), but now with the by-reference 
fields as by-value fields.

Ideally, as far as I see, one would like the app to mark a certain field 
as a pointer to X bytes of data, which could potentially be dereferenced 
at a point of a crash.

Obviously, mbufs can be recycled and other buffers may change state 
compared to what they were during at the time of the trace entry being 
created. Nevertheless, such data, although inaccurate/best effort, may 
be worth a lot in a postmortem debugging scenario.

You could have something on the side of DPDK trace, which maintained the 
buffers and pointers and could be dereferenced/copied around at the 
point of the "abnormal event", but I'm curious if there is a solution 
where you rely fully on an extended version of DPDK tracing.

/M

                 reply	other threads:[~2025-02-28  9:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a3f7283e-6a3d-42ce-abf1-cd5101593a3e@lysator.liu.se \
    --to=hofors@lysator.liu.se \
    --cc=dev@dpdk.org \
    --cc=svante.jarvstrat@ericsson.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).