diff options
| author | Steven Rostedt <srostedt@redhat.com> | 2010-03-19 10:29:42 -0400 |
|---|---|---|
| committer | Steven Rostedt <rostedt@goodmis.org> | 2010-03-19 10:29:42 -0400 |
| commit | f087e1f3f66c6ba1f68c47da6b73acafc48381a6 (patch) | |
| tree | 44afac444ec1b7490bfe97b4afc17b47ab94c27a | |
| parent | 69a8ffd17f592b627e774dbf4c89d196560af169 (diff) | |
trace-cmd: Only show plugins that are loaded when -V is used
The output of the plugins being loaded, while useful, are quite
annoying. Make it default off and add an option to display them.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
| -rw-r--r-- | Documentation/trace-cmd-report.txt | 3 | ||||
| -rw-r--r-- | trace-cmd.c | 6 | ||||
| -rw-r--r-- | trace-local.h | 1 | ||||
| -rw-r--r-- | trace-read.c | 5 |
4 files changed, 12 insertions, 3 deletions
diff --git a/Documentation/trace-cmd-report.txt b/Documentation/trace-cmd-report.txt index f3f6e88..c753bc5 100644 --- a/Documentation/trace-cmd-report.txt +++ b/Documentation/trace-cmd-report.txt | |||
| @@ -109,6 +109,9 @@ OPTIONS | |||
| 109 | Will not display any sched_switch events that have a prev_state of 0. | 109 | Will not display any sched_switch events that have a prev_state of 0. |
| 110 | Removing the *-v* will only print out those events. | 110 | Removing the *-v* will only print out those events. |
| 111 | 111 | ||
| 112 | *-V*:: | ||
| 113 | Show the plugins that are loaded. | ||
| 114 | |||
| 112 | *-l*:: | 115 | *-l*:: |
| 113 | This adds a "latency output" format. Information about interrupts being | 116 | This adds a "latency output" format. Information about interrupts being |
| 114 | disabled, soft irq being disabled, the "need_resched" flag being set, | 117 | disabled, soft irq being disabled, the "need_resched" flag being set, |
diff --git a/trace-cmd.c b/trace-cmd.c index 8889d29..153efce 100644 --- a/trace-cmd.c +++ b/trace-cmd.c | |||
| @@ -53,6 +53,7 @@ | |||
| 53 | #define UDP_MAX_PACKET (65536 - 20) | 53 | #define UDP_MAX_PACKET (65536 - 20) |
| 54 | 54 | ||
| 55 | int silence_warnings; | 55 | int silence_warnings; |
| 56 | int show_status; | ||
| 56 | 57 | ||
| 57 | static int use_tcp; | 58 | static int use_tcp; |
| 58 | 59 | ||
| @@ -230,7 +231,7 @@ void pr_stat(char *fmt, ...) | |||
| 230 | { | 231 | { |
| 231 | va_list ap; | 232 | va_list ap; |
| 232 | 233 | ||
| 233 | if (silence_warnings) | 234 | if (!show_status) |
| 234 | return; | 235 | return; |
| 235 | 236 | ||
| 236 | va_start(ap, fmt); | 237 | va_start(ap, fmt); |
| @@ -1334,7 +1335,7 @@ void usage(char **argv) | |||
| 1334 | " Used in conjunction with start\n" | 1335 | " Used in conjunction with start\n" |
| 1335 | " -b change the kernel buffer size (in kilobytes per CPU)\n" | 1336 | " -b change the kernel buffer size (in kilobytes per CPU)\n" |
| 1336 | "\n" | 1337 | "\n" |
| 1337 | " %s report [-i file] [--cpu cpu] [-e][-f][-l][-P][-E][-F filter][-v]\n" | 1338 | " %s report [-i file] [--cpu cpu] [-e][-f][-l][-P][-E][-F filter][-v][-V]\n" |
| 1338 | " -i input file [default trace.dat]\n" | 1339 | " -i input file [default trace.dat]\n" |
| 1339 | " -e show file endianess\n" | 1340 | " -e show file endianess\n" |
| 1340 | " -f show function list\n" | 1341 | " -f show function list\n" |
| @@ -1342,6 +1343,7 @@ void usage(char **argv) | |||
| 1342 | " -E show event files stored\n" | 1343 | " -E show event files stored\n" |
| 1343 | " -F filter to filter output on\n" | 1344 | " -F filter to filter output on\n" |
| 1344 | " -v will negate all -F after it (Not show matches)\n" | 1345 | " -v will negate all -F after it (Not show matches)\n" |
| 1346 | " -V verbose (shows plugins being loaded)\n" | ||
| 1345 | " -w show wakeup latencies\n" | 1347 | " -w show wakeup latencies\n" |
| 1346 | " -l show latency format (default with latency tracers)\n" | 1348 | " -l show latency format (default with latency tracers)\n" |
| 1347 | "\n" | 1349 | "\n" |
diff --git a/trace-local.h b/trace-local.h index 2c3d702..60b8b5e 100644 --- a/trace-local.h +++ b/trace-local.h | |||
| @@ -31,6 +31,7 @@ typedef unsigned long long u64; | |||
| 31 | void usage(char **argv); | 31 | void usage(char **argv); |
| 32 | 32 | ||
| 33 | extern int silence_warnings; | 33 | extern int silence_warnings; |
| 34 | extern int show_status; | ||
| 34 | 35 | ||
| 35 | struct tracecmd_input *read_trace_header(void); | 36 | struct tracecmd_input *read_trace_header(void); |
| 36 | int read_trace_files(void); | 37 | int read_trace_files(void); |
diff --git a/trace-read.c b/trace-read.c index 2ec5e57..d4b4b7a 100644 --- a/trace-read.c +++ b/trace-read.c | |||
| @@ -576,7 +576,7 @@ void trace_report (int argc, char **argv) | |||
| 576 | {NULL, 0, NULL, 0} | 576 | {NULL, 0, NULL, 0} |
| 577 | }; | 577 | }; |
| 578 | 578 | ||
| 579 | c = getopt_long (argc-1, argv+1, "+hi:fepPlEwF:vq", | 579 | c = getopt_long (argc-1, argv+1, "+hi:fepPlEwF:Vvq", |
| 580 | long_options, &option_index); | 580 | long_options, &option_index); |
| 581 | if (c == -1) | 581 | if (c == -1) |
| 582 | break; | 582 | break; |
| @@ -616,6 +616,9 @@ void trace_report (int argc, char **argv) | |||
| 616 | die("Only 1 -v can be used"); | 616 | die("Only 1 -v can be used"); |
| 617 | neg = 1; | 617 | neg = 1; |
| 618 | break; | 618 | break; |
| 619 | case 'V': | ||
| 620 | show_status = 1; | ||
| 621 | break; | ||
| 619 | case 'q': | 622 | case 'q': |
| 620 | silence_warnings = 1; | 623 | silence_warnings = 1; |
| 621 | break; | 624 | break; |
