diff options
-rw-r--r-- | Documentation/trace-cmd-report.txt | 3 | ||||
-rw-r--r-- | trace-cmd.c | 5 | ||||
-rw-r--r-- | trace-local.h | 2 | ||||
-rw-r--r-- | trace-read.c | 5 |
4 files changed, 14 insertions, 1 deletions
diff --git a/Documentation/trace-cmd-report.txt b/Documentation/trace-cmd-report.txt index aa033f5..028f2ca 100644 --- a/Documentation/trace-cmd-report.txt +++ b/Documentation/trace-cmd-report.txt | |||
@@ -134,6 +134,9 @@ OPTIONS | |||
134 | this option will report the latency between the time the task was first | 134 | this option will report the latency between the time the task was first |
135 | woken, and the time it was scheduled in. | 135 | woken, and the time it was scheduled in. |
136 | 136 | ||
137 | *-q*:: | ||
138 | Quiet non critical warnings. | ||
139 | |||
137 | EXAMPLES | 140 | EXAMPLES |
138 | -------- | 141 | -------- |
139 | 142 | ||
diff --git a/trace-cmd.c b/trace-cmd.c index e85b550..e022dde 100644 --- a/trace-cmd.c +++ b/trace-cmd.c | |||
@@ -52,6 +52,8 @@ | |||
52 | 52 | ||
53 | #define UDP_MAX_PACKET (65536 - 20) | 53 | #define UDP_MAX_PACKET (65536 - 20) |
54 | 54 | ||
55 | int silence_warnings; | ||
56 | |||
55 | static int use_tcp; | 57 | static int use_tcp; |
56 | 58 | ||
57 | static unsigned int page_size; | 59 | static unsigned int page_size; |
@@ -209,6 +211,9 @@ void warning(char *fmt, ...) | |||
209 | { | 211 | { |
210 | va_list ap; | 212 | va_list ap; |
211 | 213 | ||
214 | if (silence_warnings) | ||
215 | return; | ||
216 | |||
212 | if (errno) | 217 | if (errno) |
213 | perror("trace-cmd"); | 218 | perror("trace-cmd"); |
214 | errno = 0; | 219 | errno = 0; |
diff --git a/trace-local.h b/trace-local.h index 4e44238..2c3d702 100644 --- a/trace-local.h +++ b/trace-local.h | |||
@@ -30,6 +30,8 @@ typedef unsigned long long u64; | |||
30 | 30 | ||
31 | void usage(char **argv); | 31 | void usage(char **argv); |
32 | 32 | ||
33 | extern int silence_warnings; | ||
34 | |||
33 | struct tracecmd_input *read_trace_header(void); | 35 | struct tracecmd_input *read_trace_header(void); |
34 | int read_trace_files(void); | 36 | int read_trace_files(void); |
35 | 37 | ||
diff --git a/trace-read.c b/trace-read.c index ca6661e..2ec5e57 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:v", | 579 | c = getopt_long (argc-1, argv+1, "+hi:fepPlEwF:vq", |
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 'q': | ||
620 | silence_warnings = 1; | ||
621 | break; | ||
619 | case 0: | 622 | case 0: |
620 | switch(option_index) { | 623 | switch(option_index) { |
621 | case 0: | 624 | case 0: |