mbox series

[v3,00/21] trace-cmd fixes and clean-ups

Message ID 20210914131232.3964615-1-tz.stoyanov@gmail.com (mailing list archive)
Headers show
Series trace-cmd fixes and clean-ups | expand

Message

Tzvetomir Stoyanov (VMware) Sept. 14, 2021, 1:12 p.m. UTC
Various trace-cmd application and library fixes, clean-ups and internal
refactoring, needed for trace file version 7 and compression changes.

This patch-set supersedes "[v2,00/87] Trace file version 7":
   https://lore.kernel.org/linux-trace-devel/20210729050959.12263-1-tz.stoyanov@gmail.com/

v3 changes:
 - fixed issues of split and convert commands with some corner cases
v2 changes:
 - more cleanups, forgotten in the first version

Tzvetomir Stoyanov (VMware) (21):
  trace-cmd library: Read option id with correct endian
  trace-cmd report: Fix typos in error messages
  trace-cmd library: Fix version string memory leak
  trace-cmd library: Fixed a memory leak on input handler close
  trace-cmd library: Do not pass guests list to a buffer instance
  trace-cmd library: Set long size to the input tep handler when it is
    read from the file
  trace-cmd library: Do not use local variables when reading CPU stat
    option
  trace-cmd library: Reuse within the library the function that checks
    file state.
  trace-cmd library: Fix possible memory leak in read_ftrace_files()
  trace-cmd library: Fix possible memory leak in read_event_files()
  trace-cmd library: Fix possible memory leak in read_proc_kallsyms()
  trace-cmd library: Fix possible memory leak in read_ftrace_printk()
  trace-cmd library: Fix possible memory leak in
    read_and_parse_cmdlines()
  trace-cmd library: Set input handler default values in allocation
    function
  trace-cmd library: Track maximum CPUs count in input handler
  trace-cmd report: Close input file handlers on exit
  trace-cmd report: Do not print empty buffer name
  trace-cmd library: Set correct CPU to the record, retrieved with
    tracecmd_peek_data
  trace-cmd library: Refactor APIs for creating output handler
  trace-cmd library: Refactor the logic for writing trace data in the
    file
  trace-cmd report: Init the top trace instance earlier

 .../include/private/trace-cmd-private.h       |  35 +-
 lib/trace-cmd/include/trace-cmd-local.h       |  19 +
 lib/trace-cmd/trace-input.c                   | 211 +++--
 lib/trace-cmd/trace-output.c                  | 779 +++++++++++-------
 lib/trace-cmd/trace-util.c                    |  28 +
 tracecmd/trace-listen.c                       |   2 +-
 tracecmd/trace-read.c                         |  21 +-
 tracecmd/trace-record.c                       |  73 +-
 tracecmd/trace-restore.c                      |  32 +-
 9 files changed, 783 insertions(+), 417 deletions(-)

Comments

Steven Rostedt Oct. 5, 2021, 1 a.m. UTC | #1
On Tue, 14 Sep 2021 16:12:11 +0300
"Tzvetomir Stoyanov (VMware)" <tz.stoyanov@gmail.com> wrote:

> Various trace-cmd application and library fixes, clean-ups and internal
> refactoring, needed for trace file version 7 and compression changes.
> 
> This patch-set supersedes "[v2,00/87] Trace file version 7":
>    https://lore.kernel.org/linux-trace-devel/20210729050959.12263-1-tz.stoyanov@gmail.com/
> 
> v3 changes:
>  - fixed issues of split and convert commands with some corner cases
> v2 changes:
>  - more cleanups, forgotten in the first version
> 
> Tzvetomir Stoyanov (VMware) (21):

I accepted all the patches but:

>   trace-cmd library: Do not use local variables when reading CPU stat
>     option
>   trace-cmd library: Fix possible memory leak in read_ftrace_files()
>   trace-cmd library: Fix possible memory leak in read_event_files()
>   trace-cmd library: Fix possible memory leak in read_proc_kallsyms()
>   trace-cmd library: Fix possible memory leak in read_ftrace_printk()
>   trace-cmd library: Fix possible memory leak in
>     read_and_parse_cmdlines()
>   trace-cmd library: Track maximum CPUs count in input handler
>   trace-cmd library: Refactor APIs for creating output handler
>   trace-cmd library: Refactor the logic for writing trace data in the
>     file

I'm going to run a quick test on them, and then push them upstream.

-- Steve