All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Tzvetomir Stoyanov (VMware)" <tz.stoyanov@gmail.com>
To: rostedt@goodmis.org
Cc: linux-trace-devel@vger.kernel.org
Subject: [PATCH 0/4] Refactor the logic for writing trace data in the file
Date: Fri,  8 Oct 2021 07:15:10 +0300	[thread overview]
Message-ID: <20211008041514.974537-1-tz.stoyanov@gmail.com> (raw)

When a trace buffer data are written in the trace file, the buffer
option in the file metadata is updated with the file offset of the
tracing data. Hide this logic into the trace-cmd library.
Added new APIs:
 tracecmd_add_buffer_info()
 tracecmd_write_buffer_info()
Changed APIs:
 tracecmd_append_buffer_cpu_data()
Removed APIs:
 tracecmd_add_buffer_option()

Refactored the internal logic of tracecmd_write_cpu_data() API to be
suitable for upcoming trace file format changes and data compression.
The size and the offset of the trace data is saved in the file right
after the data is written. The old logic calculates the size and offset
in advance, but when the trace data is compressed it is hard to use
that approach.

This patch-set depends on "[PATCH 00/10] Refactor APIs for creating output handler",
should be applied on top of it:
 https://lore.kernel.org/linux-trace-devel/20211008041321.973755-1-tz.stoyanov@gmail.com/

Tzvetomir Stoyanov (VMware) (4):
  trace-cmd library: Add internal database for trace buffers
  trace-cmd: Use the new trace buffers API
  trace-cmd library: Helper logic to update the trace buffer offset
  trace-cmd library: Refactor the logic for writing trace data in the
    file

 .../include/private/trace-cmd-private.h       |  10 +-
 lib/trace-cmd/include/trace-cmd-local.h       |  19 ++
 lib/trace-cmd/trace-output.c                  | 319 ++++++++++++------
 tracecmd/trace-listen.c                       |   2 +-
 tracecmd/trace-record.c                       |  18 +-
 5 files changed, 250 insertions(+), 118 deletions(-)

-- 
2.31.1


             reply	other threads:[~2021-10-08  4:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-08  4:15 Tzvetomir Stoyanov (VMware) [this message]
2021-10-08  4:15 ` [PATCH 1/4] trace-cmd library: Add internal database for trace buffers Tzvetomir Stoyanov (VMware)
2021-10-08  4:15 ` [PATCH 2/4] trace-cmd: Use the new trace buffers API Tzvetomir Stoyanov (VMware)
2021-10-08  4:15 ` [PATCH 3/4] trace-cmd library: Helper logic to update the trace buffer offset Tzvetomir Stoyanov (VMware)
2021-10-08  4:15 ` [PATCH 4/4] trace-cmd library: Refactor the logic for writing trace data in the file Tzvetomir Stoyanov (VMware)

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=20211008041514.974537-1-tz.stoyanov@gmail.com \
    --to=tz.stoyanov@gmail.com \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.