From: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
To: linux-trace-devel@vger.kernel.org
Subject: [PATCH] trace-cmd: Let subcommand "convert" automatically if possible.
Date: Sat, 10 Dec 2022 21:36:58 +0100 [thread overview]
Message-ID: <Y5Tt6p0ONpuDVIS2@breakpoint.cc> (raw)
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.
Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc
---
Documentation/trace-cmd/trace-cmd-convert.1.txt | 3 ++-
tracecmd/trace-convert.c | 2 ++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/Documentation/trace-cmd/trace-cmd-convert.1.txt b/Documentation/trace-cmd/trace-cmd-convert.1.txt
index 7c13cf3dcd625..21f580d6e1b6c 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 88935dc7b0a4c..e72a352685f42 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);
}
--
2.38.1
next reply other threads:[~2022-12-10 20:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-10 20:36 Sebastian Andrzej Siewior [this message]
2022-12-11 2:09 ` [PATCH] trace-cmd: Let subcommand "convert" automatically if possible Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y5Tt6p0ONpuDVIS2@breakpoint.cc \
--to=sebastian@breakpoint.cc \
--cc=linux-trace-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).