Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3332138imu; Sun, 11 Nov 2018 12:33:33 -0800 (PST) X-Google-Smtp-Source: AJdET5cDKTzDjtV2T/UQZ4F+hzevCGPbM97TUt5I5Fj8GkjJMho5ontvdnHH7SJqJY921HWhIiD+ X-Received: by 2002:a63:f959:: with SMTP id q25mr6089667pgk.315.1541968413643; Sun, 11 Nov 2018 12:33:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541968413; cv=none; d=google.com; s=arc-20160816; b=jCOU2GZ9cb/7HaLjxk84haowVtOxShUZILqVmJDiHvSdDZpvvsfPzj/jzjyAsvrBQO OkDkMCuP1PgORsFrdLb1X+5m04UFKTpeHVSonVdbTt2o6CQo3RlYdxupJJtHlRhsb88z VeQMPIQ20Zc+SvR7ynwZvUuxCg1AI0APb3a7KGuHxbRY1h4brNpPzyvgGjMD8orb0PvU 6rzCGyMznJSPBsIr+JLdWPXiJuUvCn0qdAl7pTzP/zgSJo+gsqNIVKKUtMyFgR8V/s+e 1XbnWjKlDnpGIhnb0hftHqcSvEuBmoYN/dyOIXNwDqCIn5rIesUeKPe8jk2jeT1l+VeO vwsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition; bh=3q1lSzzxaWF5SqRMFDNogpLJLyBve2JeTQhh4IOFHXo=; b=0Kdcq3atty2NuvtDHZMN8eqVJTCpf5FAYgl8s7EFJVXGOxq2HyKIApNwuBfslcNC+s qWUpu0oMu1ac1E4rxZ+R//6blpqaF32UGr7V9+QwAfqEBM3BI8jHNYdj3NXrWhxZ3Yky 7AyQOgEbKTuVz9gPMSBHzci/g2IZ35gtURRRL+Xf1rD9qcNMtyNMCP/Qq1n4vjv3axuy GTJDPT/l1KW5xSOnnkWOf+y5yy26LCMZSmKC8u39y9Y/4S7u/c8DWr/JSodAqjq/CpBV N9Y23lO9iCs3QtRxR4f91pvCrySc29ReZLnvt5DsvXsd10kU+5GQcNGJOHpwElqTjYBD R0gw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o1-v6si14762606plk.304.2018.11.11.12.33.18; Sun, 11 Nov 2018 12:33:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730393AbeKLFsS (ORCPT + 99 others); Mon, 12 Nov 2018 00:48:18 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:50270 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730349AbeKLFsS (ORCPT ); Mon, 12 Nov 2018 00:48:18 -0500 Received: from [192.168.4.242] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gLvse-0000lM-3X; Sun, 11 Nov 2018 19:58:48 +0000 Received: from ben by deadeye with local (Exim 4.91) (envelope-from ) id 1gLvsb-0001to-0D; Sun, 11 Nov 2018 19:58:45 +0000 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Adrian Hunter" , "Wang Nan" , "Namhyung Kim" , "Arnaldo Carvalho de Melo" , "David Ahern" , "Jiri Olsa" Date: Sun, 11 Nov 2018 19:49:05 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 364/366] perf trace: Do not process PERF_RECORD_LOST twice In-Reply-To: X-SA-Exim-Connect-IP: 192.168.4.242 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.61-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Arnaldo Carvalho de Melo commit 3ed5ca2efff70e9f589087c2013789572901112d upstream. 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 Signed-off-by: Ben Hutchings --- tools/perf/builtin-trace.c | 1 + 1 file changed, 1 insertion(+) --- a/tools/perf/builtin-trace.c +++ b/tools/perf/builtin-trace.c @@ -1359,6 +1359,7 @@ static int trace__process_event(struct t 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;