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

Steven Rostedt <[email protected]>
Newsgroups org.kernel.vger.linux-trace-devel
Message-ID <[email protected]>
From: "Steven Rostedt (VMware)" <[email protected]>

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

Signed-off-by: Steven Rostedt (VMware) <[email protected]>
---
 tracecmd/trace-show.c  | 6 ++++++
 tracecmd/trace-usage.c | 1 +
 2 files changed, 7 insertions(+)

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",
-- 
2.45.2
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.