diff options
author | Jiri Olsa <jolsa@kernel.org> | 2018-01-07 11:03:54 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-01-10 10:00:55 -0500 |
commit | 075ca1ebb25e798e4072a1e3a482b829bb51afb2 (patch) | |
tree | 395cf718afa2ebeef7331f534f59d4f8921d51b1 /tools | |
parent | 3d7c27b6dbca4c90e7d921b45c2240e7c3cb92a2 (diff) |
perf tools: Make the tool's warning messages optional
I want to display the pure events status coming in the next patch and
the tool's warnings are superfluous in the output. Making it optional,
enabled by default.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20180107160356.28203-11-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/util/session.c | 6 | ||||
-rw-r--r-- | tools/perf/util/tool.h | 1 |
2 files changed, 5 insertions, 2 deletions
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index 54e30f1bcbd7..8d0fa2f8da16 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c | |||
@@ -1773,7 +1773,8 @@ done: | |||
1773 | err = perf_session__flush_thread_stacks(session); | 1773 | err = perf_session__flush_thread_stacks(session); |
1774 | out_err: | 1774 | out_err: |
1775 | free(buf); | 1775 | free(buf); |
1776 | perf_session__warn_about_errors(session); | 1776 | if (!tool->no_warn) |
1777 | perf_session__warn_about_errors(session); | ||
1777 | ordered_events__free(&session->ordered_events); | 1778 | ordered_events__free(&session->ordered_events); |
1778 | auxtrace__free_events(session); | 1779 | auxtrace__free_events(session); |
1779 | return err; | 1780 | return err; |
@@ -1929,7 +1930,8 @@ out: | |||
1929 | err = perf_session__flush_thread_stacks(session); | 1930 | err = perf_session__flush_thread_stacks(session); |
1930 | out_err: | 1931 | out_err: |
1931 | ui_progress__finish(); | 1932 | ui_progress__finish(); |
1932 | perf_session__warn_about_errors(session); | 1933 | if (!tool->no_warn) |
1934 | perf_session__warn_about_errors(session); | ||
1933 | /* | 1935 | /* |
1934 | * We may switching perf.data output, make ordered_events | 1936 | * We may switching perf.data output, make ordered_events |
1935 | * reusable. | 1937 | * reusable. |
diff --git a/tools/perf/util/tool.h b/tools/perf/util/tool.h index 2532b558099b..183c91453522 100644 --- a/tools/perf/util/tool.h +++ b/tools/perf/util/tool.h | |||
@@ -76,6 +76,7 @@ struct perf_tool { | |||
76 | bool ordered_events; | 76 | bool ordered_events; |
77 | bool ordering_requires_timestamps; | 77 | bool ordering_requires_timestamps; |
78 | bool namespace_events; | 78 | bool namespace_events; |
79 | bool no_warn; | ||
79 | enum show_feature_header show_feat_hdr; | 80 | enum show_feature_header show_feat_hdr; |
80 | }; | 81 | }; |
81 | 82 | ||