linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/4] Refactor the logic for writing trace data in the file
@ 2021-11-11 15:08 Tzvetomir Stoyanov (VMware)
  2021-11-11 15:08 ` [PATCH v3 1/4] trace-cmd library: Add internal database for trace buffers Tzvetomir Stoyanov (VMware)
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Tzvetomir Stoyanov (VMware) @ 2021-11-11 15:08 UTC (permalink / raw)
  To: rostedt; +Cc: linux-trace-devel

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:
 "trace-cmd fixes and clean-ups" patch set.
 "Refactor APIs for creating output handler" patch set. 

v3 changes:
 - Bug fixes.
 - Rebased on top of the latest master.

v2 changes:
 - Fixed wrong calculations of trace page alignment.

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                  | 322 ++++++++++++------
 tracecmd/trace-listen.c                       |   2 +-
 tracecmd/trace-record.c                       |  18 +-
 5 files changed, 253 insertions(+), 118 deletions(-)

-- 
2.33.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-11-24 17:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-11 15:08 [PATCH v3 0/4] Refactor the logic for writing trace data in the file Tzvetomir Stoyanov (VMware)
2021-11-11 15:08 ` [PATCH v3 1/4] trace-cmd library: Add internal database for trace buffers Tzvetomir Stoyanov (VMware)
2021-11-11 15:08 ` [PATCH v3 2/4] trace-cmd: Use the new trace buffers API Tzvetomir Stoyanov (VMware)
2021-11-24 17:19   ` Steven Rostedt
2021-11-11 15:08 ` [PATCH v3 3/4] trace-cmd library: Helper logic to update the trace buffer offset Tzvetomir Stoyanov (VMware)
2021-11-24 17:22   ` Steven Rostedt
2021-11-11 15:08 ` [PATCH v3 4/4] trace-cmd library: Refactor the logic for writing trace data in the file Tzvetomir Stoyanov (VMware)

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).