Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf session: Warn when AUX data has been lost

By default 'perf record' will postprocess the perf.data file to
determine build-ids. When that happens, the number of lost perf events
is displayed.

Make that also happen for AUX events.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/r/1443186956-18718-7-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Adrian Hunter and committed by
Arnaldo Carvalho de Melo
a38f48e3 83e19860

+11
+1
tools/perf/util/event.h
··· 257 257 u64 total_non_filtered_period; 258 258 u64 total_lost; 259 259 u64 total_lost_samples; 260 + u64 total_aux_lost; 260 261 u64 total_invalid_chains; 261 262 u32 nr_events[PERF_RECORD_HEADER_MAX]; 262 263 u32 nr_non_filtered_samples;
+10
tools/perf/util/session.c
··· 1101 1101 case PERF_RECORD_UNTHROTTLE: 1102 1102 return tool->unthrottle(tool, event, sample, machine); 1103 1103 case PERF_RECORD_AUX: 1104 + if (tool->aux == perf_event__process_aux && 1105 + (event->aux.flags & PERF_AUX_FLAG_TRUNCATED)) 1106 + evlist->stats.total_aux_lost += 1; 1104 1107 return tool->aux(tool, event, sample, machine); 1105 1108 case PERF_RECORD_ITRACE_START: 1106 1109 return tool->itrace_start(tool, event, sample, machine); ··· 1347 1344 stats->nr_events[PERF_RECORD_SAMPLE] + stats->total_lost_samples, 1348 1345 drop_rate * 100.0); 1349 1346 } 1347 + } 1348 + 1349 + if (session->tool->aux == perf_event__process_aux && 1350 + stats->total_aux_lost != 0) { 1351 + ui__warning("AUX data lost %" PRIu64 " times out of %u!\n\n", 1352 + stats->total_aux_lost, 1353 + stats->nr_events[PERF_RECORD_AUX]); 1350 1354 } 1351 1355 1352 1356 if (stats->nr_unknown_events != 0) {