Skip to content

trace-cmd: Fixes for trace-cmd restore

Steven Rostedt linux-trace-devel 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest9 patches 0 repliesNew
  2. v18 patches 9 repliesSuperseded

Changes in v2 from the cover letter

- Have tracecmd_read_headers() pass in the state to stop at. It can also be called multiple times and it will continue where it left off.

- tracecmd_copy_headers() now takes a start and end state, to allow it to be called more than once (and uses tracecmd_read_headers() ability to be called more than once and restart where it left off)

- tracecmd_get_file_state() returns an enum and not long.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9trace-cmd restore: Fix to add saved cmdlines after calling tracecmd_create_init_file_override()tracecmd/trace-restore.c+2 -00 replies
2/9trace-cmd: Move tracecmd_write_cmdlines() out of tracecmd_append_cpu_data()lib/trace-cmd/trace-output.c tracecmd/trace-record.c tracecmd/trace-split.c+10 -70 replies
3/9trace-cmd: Move the output state updates into the functions that change the statelib/trace-cmd/trace-output.c+65 -320 replies
4/9trace-cmd: Move the input state updates into the functions that change the statelib/trace-cmd/trace-input.c+15 -60 replies
5/9trace-cmd input: Validate the input handle when copying from itlib/trace-cmd/trace-input.c+24 -00 replies
6/9trace-cmd: Have tracecmd_read_headers() specify the state to read up tolib/trace-cmd/include/private/trace-cmd-private.h lib/trace-cmd/trace-input.c lib/trace-cmd/trace-output.c +5 more+76 -140 replies
7/9trace-cmd: Have tracecmd_get_file_state() return the enumlib/trace-cmd/include/private/trace-cmd-private.h lib/trace-cmd/trace-input.c+2 -20 replies
8/9trace-cmd input: Add validation updates to the copy of a handlelib/trace-cmd/trace-input.c+29 -190 replies
9/9trace-cmd: Have tracecmd_copy_headers() have a start and stop statelib/trace-cmd/include/private/trace-cmd-private.h lib/trace-cmd/trace-input.c lib/trace-cmd/trace-output.c+92 -250 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH 0/9 v2] trace-cmd: Fixes for trace-cmd restore

The trace-cmd restore has been broken for some time. This series fixes it.

Changes since v1:

- Have tracecmd_read_headers() pass in the state to stop at. It can also be called multiple times and it will continue where it left off.

- tracecmd_copy_headers() now takes a start and end state, to allow it to be called more than once (and uses tracecmd_read_headers() ability to be called more than once and restart where it left off)

- tracecmd_get_file_state() returns an enum and not long.

Steven Rostedt (VMware) (9):
trace-cmd restore: Fix to add saved cmdlines after calling tracecmd_create_init_file_override()
trace-cmd: Move tracecmd_write_cmdlines() out of tracecmd_append_cpu_data()
trace-cmd: Move the output state updates into the functions that change the state
trace-cmd: Move the input state updates into the functions that change the state trace-cmd input: Validate the input handle when copying from it
trace-cmd: Have tracecmd_read_headers() specify the state to read up to
trace-cmd: Have tracecmd_get_file_state() return the enum
trace-cmd input: Add validation updates to the copy of a handle
trace-cmd: Have tracecmd_copy_headers() have a start and stop state

----

 lib/trace-cmd/include/private/trace-cmd-private.h |  13 +-
 lib/trace-cmd/trace-input.c                       | 229 +++++++++++++++++++---
 lib/trace-cmd/trace-output.c                      | 113 +++++++----
 tracecmd/trace-hist.c                             |   2 +-
 tracecmd/trace-mem.c                              |   2 +-
 tracecmd/trace-read.c                             |   2 +-
 tracecmd/trace-record.c                           |   3 +
 tracecmd/trace-restore.c                          |   4 +-
 tracecmd/trace-split.c                            |   4 +
 tracecmd/trace-stream.c                           |   2 +-
 10 files changed, 292 insertions(+), 82 deletions(-)