From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754471AbcDFHHS (ORCPT ); Wed, 6 Apr 2016 03:07:18 -0400 Received: from terminus.zytor.com ([198.137.202.10]:57786 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751187AbcDFHHQ (ORCPT ); Wed, 6 Apr 2016 03:07:16 -0400 Date: Wed, 6 Apr 2016 00:06:46 -0700 From: tip-bot for Arnaldo Carvalho de Melo Message-ID: Cc: mingo@kernel.org, acme@redhat.com, tglx@linutronix.de, hpa@zytor.com, linux-kernel@vger.kernel.org, adrian.hunter@intel.com, wangnan0@huawei.com, jolsa@kernel.org, dsahern@gmail.com, namhyung@kernel.org Reply-To: mingo@kernel.org, acme@redhat.com, hpa@zytor.com, tglx@linutronix.de, linux-kernel@vger.kernel.org, adrian.hunter@intel.com, jolsa@kernel.org, wangnan0@huawei.com, namhyung@kernel.org, dsahern@gmail.com To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf trace: Do not process PERF_RECORD_LOST twice Git-Commit-ID: 3ed5ca2efff70e9f589087c2013789572901112d 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: 3ed5ca2efff70e9f589087c2013789572901112d Gitweb: http://git.kernel.org/tip/3ed5ca2efff70e9f589087c2013789572901112d Author: Arnaldo Carvalho de Melo AuthorDate: Wed, 30 Mar 2016 16:51:17 -0300 Committer: Arnaldo Carvalho de Melo CommitDate: Thu, 31 Mar 2016 10:42:22 -0300 perf trace: Do not process PERF_RECORD_LOST twice We catch this record to provide a visual indication that events are getting lost, then call the default method to allow extra logging shared with the other tools to take place. This extra logging was done twice because we were continuing to the "default" clause where machine__process_event() will end up calling machine__process_lost_event() again, fix it. Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-wus2zlhw3qo24ye84ewu4aqw@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/builtin-trace.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c index 93ac724..6485576 100644 --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c @@ -1618,6 +1618,7 @@ static int trace__process_event(struct trace *trace, struct machine *machine, color_fprintf(trace->output, PERF_COLOR_RED, "LOST %" PRIu64 " events!\n", event->lost.lost); ret = machine__process_lost_event(machine, event, sample); + break; default: ret = machine__process_event(machine, event, sample); break;