diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-02-14 12:57:13 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-02-22 20:23:23 -0500 |
commit | ccda068f96138734eb40e9202ea9562566b43c12 (patch) | |
tree | d6fa1166be894e33fdc49ab4f2c6d97c8a9ff090 /tools/perf | |
parent | 75be989a7a18e9666efd92b846ee48bed79e8086 (diff) |
perf session: Remove perf_session from warn_errors signature
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-pxxm1liohog3d6i826x8sud8@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/util/session.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index 06ef1c35a65a..34dd749dc390 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c | |||
@@ -1125,47 +1125,47 @@ static struct thread *perf_session__register_idle_thread(struct perf_session *se | |||
1125 | return thread; | 1125 | return thread; |
1126 | } | 1126 | } |
1127 | 1127 | ||
1128 | static void perf_session__warn_about_errors(const struct perf_session *session, | 1128 | static void perf_tool__warn_about_errors(const struct perf_tool *tool, |
1129 | const struct perf_tool *tool) | 1129 | const struct events_stats *stats) |
1130 | { | 1130 | { |
1131 | if (tool->lost == perf_event__process_lost && | 1131 | if (tool->lost == perf_event__process_lost && |
1132 | session->evlist->stats.nr_events[PERF_RECORD_LOST] != 0) { | 1132 | stats->nr_events[PERF_RECORD_LOST] != 0) { |
1133 | ui__warning("Processed %d events and lost %d chunks!\n\n" | 1133 | ui__warning("Processed %d events and lost %d chunks!\n\n" |
1134 | "Check IO/CPU overload!\n\n", | 1134 | "Check IO/CPU overload!\n\n", |
1135 | session->evlist->stats.nr_events[0], | 1135 | stats->nr_events[0], |
1136 | session->evlist->stats.nr_events[PERF_RECORD_LOST]); | 1136 | stats->nr_events[PERF_RECORD_LOST]); |
1137 | } | 1137 | } |
1138 | 1138 | ||
1139 | if (session->evlist->stats.nr_unknown_events != 0) { | 1139 | if (stats->nr_unknown_events != 0) { |
1140 | ui__warning("Found %u unknown events!\n\n" | 1140 | ui__warning("Found %u unknown events!\n\n" |
1141 | "Is this an older tool processing a perf.data " | 1141 | "Is this an older tool processing a perf.data " |
1142 | "file generated by a more recent tool?\n\n" | 1142 | "file generated by a more recent tool?\n\n" |
1143 | "If that is not the case, consider " | 1143 | "If that is not the case, consider " |
1144 | "reporting to linux-kernel@vger.kernel.org.\n\n", | 1144 | "reporting to linux-kernel@vger.kernel.org.\n\n", |
1145 | session->evlist->stats.nr_unknown_events); | 1145 | stats->nr_unknown_events); |
1146 | } | 1146 | } |
1147 | 1147 | ||
1148 | if (session->evlist->stats.nr_unknown_id != 0) { | 1148 | if (stats->nr_unknown_id != 0) { |
1149 | ui__warning("%u samples with id not present in the header\n", | 1149 | ui__warning("%u samples with id not present in the header\n", |
1150 | session->evlist->stats.nr_unknown_id); | 1150 | stats->nr_unknown_id); |
1151 | } | 1151 | } |
1152 | 1152 | ||
1153 | if (session->evlist->stats.nr_invalid_chains != 0) { | 1153 | if (stats->nr_invalid_chains != 0) { |
1154 | ui__warning("Found invalid callchains!\n\n" | 1154 | ui__warning("Found invalid callchains!\n\n" |
1155 | "%u out of %u events were discarded for this reason.\n\n" | 1155 | "%u out of %u events were discarded for this reason.\n\n" |
1156 | "Consider reporting to linux-kernel@vger.kernel.org.\n\n", | 1156 | "Consider reporting to linux-kernel@vger.kernel.org.\n\n", |
1157 | session->evlist->stats.nr_invalid_chains, | 1157 | stats->nr_invalid_chains, |
1158 | session->evlist->stats.nr_events[PERF_RECORD_SAMPLE]); | 1158 | stats->nr_events[PERF_RECORD_SAMPLE]); |
1159 | } | 1159 | } |
1160 | 1160 | ||
1161 | if (session->evlist->stats.nr_unprocessable_samples != 0) { | 1161 | if (stats->nr_unprocessable_samples != 0) { |
1162 | ui__warning("%u unprocessable samples recorded.\n" | 1162 | ui__warning("%u unprocessable samples recorded.\n" |
1163 | "Do you have a KVM guest running and not using 'perf kvm'?\n", | 1163 | "Do you have a KVM guest running and not using 'perf kvm'?\n", |
1164 | session->evlist->stats.nr_unprocessable_samples); | 1164 | stats->nr_unprocessable_samples); |
1165 | } | 1165 | } |
1166 | 1166 | ||
1167 | if (session->evlist->stats.nr_unordered_events != 0) | 1167 | if (stats->nr_unordered_events != 0) |
1168 | ui__warning("%u out of order events recorded.\n", session->evlist->stats.nr_unordered_events); | 1168 | ui__warning("%u out of order events recorded.\n", stats->nr_unordered_events); |
1169 | } | 1169 | } |
1170 | 1170 | ||
1171 | volatile int session_done; | 1171 | volatile int session_done; |
@@ -1255,7 +1255,7 @@ done: | |||
1255 | err = ordered_events__flush(session, tool, OE_FLUSH__FINAL); | 1255 | err = ordered_events__flush(session, tool, OE_FLUSH__FINAL); |
1256 | out_err: | 1256 | out_err: |
1257 | free(buf); | 1257 | free(buf); |
1258 | perf_session__warn_about_errors(session, tool); | 1258 | perf_tool__warn_about_errors(tool, &session->evlist->stats); |
1259 | ordered_events__free(&session->ordered_events); | 1259 | ordered_events__free(&session->ordered_events); |
1260 | return err; | 1260 | return err; |
1261 | } | 1261 | } |
@@ -1400,7 +1400,7 @@ out: | |||
1400 | err = ordered_events__flush(session, tool, OE_FLUSH__FINAL); | 1400 | err = ordered_events__flush(session, tool, OE_FLUSH__FINAL); |
1401 | out_err: | 1401 | out_err: |
1402 | ui_progress__finish(); | 1402 | ui_progress__finish(); |
1403 | perf_session__warn_about_errors(session, tool); | 1403 | perf_tool__warn_about_errors(tool, &session->evlist->stats); |
1404 | ordered_events__free(&session->ordered_events); | 1404 | ordered_events__free(&session->ordered_events); |
1405 | session->one_mmap = false; | 1405 | session->one_mmap = false; |
1406 | return err; | 1406 | return err; |