From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933499AbbI2Ind (ORCPT ); Tue, 29 Sep 2015 04:43:33 -0400 Received: from terminus.zytor.com ([198.137.202.10]:37760 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933928AbbI2InZ (ORCPT ); Tue, 29 Sep 2015 04:43:25 -0400 Date: Tue, 29 Sep 2015 01:43:14 -0700 From: tip-bot for Adrian Hunter Message-ID: Cc: acme@redhat.com, tglx@linutronix.de, linux-kernel@vger.kernel.org, adrian.hunter@intel.com, jolsa@redhat.com, mingo@kernel.org, hpa@zytor.com Reply-To: jolsa@redhat.com, mingo@kernel.org, hpa@zytor.com, adrian.hunter@intel.com, tglx@linutronix.de, linux-kernel@vger.kernel.org, acme@redhat.com In-Reply-To: <1443186956-18718-7-git-send-email-adrian.hunter@intel.com> References: <1443186956-18718-7-git-send-email-adrian.hunter@intel.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf session: Warn when AUX data has been lost Git-Commit-ID: a38f48e300f9dac30a9b2d2ce958c8dbd7def351 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: a38f48e300f9dac30a9b2d2ce958c8dbd7def351 Gitweb: http://git.kernel.org/tip/a38f48e300f9dac30a9b2d2ce958c8dbd7def351 Author: Adrian Hunter AuthorDate: Fri, 25 Sep 2015 16:15:37 +0300 Committer: Arnaldo Carvalho de Melo CommitDate: Mon, 28 Sep 2015 16:51:33 -0300 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 Cc: Jiri Olsa Link: http://lkml.kernel.org/r/1443186956-18718-7-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/event.h | 1 + tools/perf/util/session.c | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index be5cbc7..a0dbcbd 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h @@ -257,6 +257,7 @@ struct events_stats { u64 total_non_filtered_period; u64 total_lost; u64 total_lost_samples; + u64 total_aux_lost; u64 total_invalid_chains; u32 nr_events[PERF_RECORD_HEADER_MAX]; u32 nr_non_filtered_samples; diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index f5e0000..15c84ca 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c @@ -1101,6 +1101,9 @@ static int machines__deliver_event(struct machines *machines, case PERF_RECORD_UNTHROTTLE: return tool->unthrottle(tool, event, sample, machine); case PERF_RECORD_AUX: + if (tool->aux == perf_event__process_aux && + (event->aux.flags & PERF_AUX_FLAG_TRUNCATED)) + evlist->stats.total_aux_lost += 1; return tool->aux(tool, event, sample, machine); case PERF_RECORD_ITRACE_START: return tool->itrace_start(tool, event, sample, machine); @@ -1346,6 +1349,13 @@ static void perf_session__warn_about_errors(const struct perf_session *session) } } + if (session->tool->aux == perf_event__process_aux && + stats->total_aux_lost != 0) { + ui__warning("AUX data lost %" PRIu64 " times out of %u!\n\n", + stats->total_aux_lost, + stats->nr_events[PERF_RECORD_AUX]); + } + if (stats->nr_unknown_events != 0) { ui__warning("Found %u unknown events!\n\n" "Is this an older tool processing a perf.data "