All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Refactor the logic for writing trace data in the file
@ 2021-10-08  4:15 Tzvetomir Stoyanov (VMware)
  2021-10-08  4:15 ` [PATCH 1/4] trace-cmd library: Add internal database for trace buffers Tzvetomir Stoyanov (VMware)
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Tzvetomir Stoyanov (VMware) @ 2021-10-08  4:15 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 "[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


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

end of thread, other threads:[~2021-10-08  4:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-08  4:15 [PATCH 0/4] Refactor the logic for writing trace data in the file Tzvetomir Stoyanov (VMware)
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)

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.