Received: by 10.192.165.148 with SMTP id m20csp2473583imm; Sun, 22 Apr 2018 07:47:11 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/GGGgsgdERh93r7O7yxU9q28BzQrvTC6tk2dShfoANXnry8xMcL9zOb3LV/Qx1KWFlxNUt X-Received: by 10.98.23.134 with SMTP id 128mr16717280pfx.120.1524408431174; Sun, 22 Apr 2018 07:47:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524408431; cv=none; d=google.com; s=arc-20160816; b=zKmAwFihUjaNhEcPVYXS1rqYRTrOnMCsxsmi84j2e8xRBJkMjCPMxExz3z+Vs6eGzO 52dgGaKS4nd+eAWfUnr2ChtzSFqbETovLGRy60FniwmRgvzeZXV6Mmcob/EV4AP8dL70 DpeTUHkEWKy/q7bTBQCvqqMmkfLw00C83yWzwDEiO8SGp9wgVLo/QAYbluaF5ZmtBSmJ KpDTzX5S7F93QYOOQTCniLJLSbJ3Rw5SlmjJ0ofgPoIE1yCBuxBEii1o1r5WePjUaULf zF+hs0H3w/MypfNUIVCj1wqXEwSr1yk39LJoc8z49DdyxfgPQY+eE+w3/GF7br7ih77g PKTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=jTC6wFm7mfGnNR1XvlSVBAQzdRc96srVggMOVyV8d0Y=; b=K0hInqlcjxCWZNCrGmncwtZK13XeIbRAytx/CfIvVpJmN5W+yS5kbJ63estqUaWQy5 JzYZ4NYlxofxUDvPlOcdF8pjMNjOeUwlie9ZpHMsCA/iC4/yptKGMsXA0fA485vZT3aR DGbbhV9PxSe1iM5hAfYYmXqsWw4E7Mp5dEjCTRlrlsTa4VjZ3FF0TwYYyL+vsjEqWQWH u+KYeVLH+H7hFh4SH9AfSxM99V5B5AFRiGWV1nJ7uz7F/4NI7Zp1TuI2rZIHML8QrNAz 6XF09WlmE3o+KQvrsQp6xdFExTeZEMYcSyDqL4XjPnjvxbjSmHDXjY0nhjFyzxRQOKSE aynQ== 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 b62si3439934pgc.505.2018.04.22.07.46.57; Sun, 22 Apr 2018 07:47:11 -0700 (PDT) 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 S1757262AbeDVOps (ORCPT + 99 others); Sun, 22 Apr 2018 10:45:48 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:57632 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932309AbeDVOQm (ORCPT ); Sun, 22 Apr 2018 10:16:42 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 4C3944A5; Sun, 22 Apr 2018 14:16:41 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Adrian Hunter , Jiri Olsa , Arnaldo Carvalho de Melo Subject: [PATCH 4.4 06/97] perf intel-pt: Fix timestamp following overflow Date: Sun, 22 Apr 2018 15:52:44 +0200 Message-Id: <20180422135304.986067529@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180422135304.577223025@linuxfoundation.org> References: <20180422135304.577223025@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Adrian Hunter commit 91d29b288aed3406caf7c454bf2b898c96cfd177 upstream. timestamp_insn_cnt is used to estimate the timestamp based on the number of instructions since the last known timestamp. If the estimate is not accurate enough decoding might not be correctly synchronized with side-band events causing more trace errors. However there are always timestamps following an overflow, so the estimate is not needed and can indeed result in more errors. Suppress the estimate by setting timestamp_insn_cnt to zero. Signed-off-by: Adrian Hunter Cc: Jiri Olsa Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/1520431349-30689-5-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Greg Kroah-Hartman --- tools/perf/util/intel-pt-decoder/intel-pt-decoder.c | 1 + 1 file changed, 1 insertion(+) --- a/tools/perf/util/intel-pt-decoder/intel-pt-decoder.c +++ b/tools/perf/util/intel-pt-decoder/intel-pt-decoder.c @@ -1270,6 +1270,7 @@ static int intel_pt_overflow(struct inte intel_pt_clear_tx_flags(decoder); decoder->have_tma = false; decoder->cbr = 0; + decoder->timestamp_insn_cnt = 0; decoder->pkt_state = INTEL_PT_STATE_ERR_RESYNC; decoder->overflow = true; return -EOVERFLOW;