diff options
author | Sebastian Andrzej Siewior <sebastian@breakpoint.cc> | 2022-12-10 21:36:58 +0100 |
---|---|---|
committer | Steven Rostedt (Google) <rostedt@goodmis.org> | 2022-12-10 21:08:33 -0500 |
commit | b492b1c1f7426183d461d49d643fb9662da7cdeb (patch) | |
tree | 6ee22c6a4f70063ea82e6d459b40919dca9a4ae6 | |
parent | 2610bdcde43a63e3a9b2afb2ededab1183acf5fe (diff) | |
download | trace-cmd-b492b1c1f7426183d461d49d643fb9662da7cdeb.tar.gz |
trace-cmd: Let subcommand "convert" automatically if possible.
Let the convert subcommand compress automatically if the file format
allows it and the user did not specify it.
This already the case the record command.
Link: https://lore.kernel.org/linux-trace-devel/Y5Tt6p0ONpuDVIS2@breakpoint.cc
Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
-rw-r--r-- | Documentation/trace-cmd/trace-cmd-convert.1.txt | 3 | ||||
-rw-r--r-- | tracecmd/trace-convert.c | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/Documentation/trace-cmd/trace-cmd-convert.1.txt b/Documentation/trace-cmd/trace-cmd-convert.1.txt index 7c13cf3d..21f580d6 100644 --- a/Documentation/trace-cmd/trace-cmd-convert.1.txt +++ b/Documentation/trace-cmd/trace-cmd-convert.1.txt @@ -13,7 +13,8 @@ DESCRIPTION ----------- The trace-cmd(1) convert command converts trace file. It reads the input file and copies the data into an output file. The output file may be in different format, depending on the command line -arguments. +arguments. The default output is in version 7 and compressed (if +compiled with compression support). OPTIONS ------- diff --git a/tracecmd/trace-convert.c b/tracecmd/trace-convert.c index 88935dc7..e72a3526 100644 --- a/tracecmd/trace-convert.c +++ b/tracecmd/trace-convert.c @@ -104,6 +104,8 @@ void trace_convert(int argc, char **argv) input_file = DEFAULT_INPUT_FILE; if (!output_file) usage(argv); + if (file_version >= FILE_VERSION_COMPRESSION && !compression) + compression = "any"; convert_file(input_file, output_file, file_version, compression); } |