diff mbox series

[2/4] trace-cmd show: Add --max_latency

Message ID 20241011182752.357499-3-rostedt@goodmis.org (mailing list archive)
State Accepted
Commit 4eef18ff0466895302aadefbe09438ec752a3803
Headers show
Series trace-cmd: Various updates | expand

Commit Message

Steven Rostedt Oct. 11, 2024, 6:26 p.m. UTC
From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>

Add the --max_latency option to trace-cmd show to display the contents of
tracing_max_latency.

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
 tracecmd/trace-show.c  | 6 ++++++
 tracecmd/trace-usage.c | 1 +
 2 files changed, 7 insertions(+)
diff mbox series

Patch

diff --git a/tracecmd/trace-show.c b/tracecmd/trace-show.c
index cf70d86ca61c..c92c87990a23 100644
--- a/tracecmd/trace-show.c
+++ b/tracecmd/trace-show.c
@@ -25,6 +25,7 @@  enum {
 	OPT_tracing_on,
 	OPT_hist,
 	OPT_trigger,
+	OPT_max_latency,
 };
 
 void trace_show(int argc, char **argv)
@@ -58,6 +59,7 @@  void trace_show(int argc, char **argv)
 		{"graph_function", no_argument, NULL, OPT_graph_function},
 		{"graph_notrace", no_argument, NULL, OPT_graph_notrace},
 		{"cpumask", no_argument, NULL, OPT_cpumask},
+		{"max_latency", no_argument, NULL, OPT_max_latency},
 		{"help", no_argument, NULL, '?'},
 		{NULL, 0, NULL, 0}
 	};
@@ -151,6 +153,10 @@  void trace_show(int argc, char **argv)
 			show_instance_file(instance, "tracing_cpumask");
 			stop = 1;
 			break;
+		case OPT_max_latency:
+			show_instance_file(instance, "tracing_max_latency");
+			stop = 1;
+			break;
 		default:
 			usage(argv);
 		}
diff --git a/tracecmd/trace-usage.c b/tracecmd/trace-usage.c
index 8bbf2e3e79d6..7139016e5274 100644
--- a/tracecmd/trace-usage.c
+++ b/tracecmd/trace-usage.c
@@ -189,6 +189,7 @@  static struct usage_help usage_help[] = {
 		"          --graph_function (for set_graph_function)\n"
 		"          --graph_notrace (for set_graph_notrace)\n"
 		"          --cpumask (for tracing_cpumask)\n"
+		"          --max_latency (for tracing_max_latency)\n"
 	},
 	{
 		"reset",