Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp1220369imm; Tue, 5 Jun 2018 10:53:55 -0700 (PDT) X-Google-Smtp-Source: ADUXVKI7IBVZ6tG5d5MNs9+ZJK1pDwvptBXaRCtNvnQSeXDjUGj34HLIQnL0fNhYBr10/vXfaU61 X-Received: by 2002:a17:902:9344:: with SMTP id g4-v6mr27874880plp.10.1528221235417; Tue, 05 Jun 2018 10:53:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528221235; cv=none; d=google.com; s=arc-20160816; b=YRjA980KUO8NYVxVGh6x3QN/vCGYkzZ/r+np/6vcvRoae/g6Xcf069OKqqM7mlkJqg 8aifJh+8nmAv1NjX0WEAuWBkb3vJ/7mmurt2fxaZild0Xp67wUzSt9s3a+ZmQkElf+ah rDAm+kU89NOrcAw+G/NFjrfNBHhp/v+/5LGpsU4Y9J1ohiVepqocHXTgRFMrhzEEXKTL QlR+8dkQxV66GF4evSB9qkJefSMDfAI+dC9ECmLdVr7tmanI/7fv+nO+wwfB743Oh9Ov BC5ETstDusNnlhLHiLm+DsIb61ZuOOoZXL8a4saOwgNNOovZuW2qnZwg6Q7aW0q/4LKq bUiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=mv4bPr3nfMkoJhSyjqnlf3lWeHlwKKowQV3Fsu5HaGA=; b=bwslhHC1YJrYAkNJw9EzsThbMT/Rj64vtPbzB2n04odEEMc/RoyEWBlNBNSdWpi+0D MZwwgzlkNMqLoXi3Phsbu5JoBzvscQga5RL3HP+Mmxxja4EMZJSOewxpAJNP3wn5Pmra QlbAn+agZVe6Z9StRcqUgznEGP9a90mH1SkfBFIUCFynPc9xjS3mUZp6Ezvt++caWqPU Ixi/Jrl0bBPzQb2ClKV7GoQMU7ZRPup88Yn3DRABf3fPE5FwZwgNpOavxgMH7ycZ9jek DeCGSnFpwSNNBjCn97PSw77T1qEhYMxTqT24gfgfOZQETYviK2zfrQSJ9S+fltmDEQdR nFAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=UF6j2owJ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u19-v6si49323816pfn.241.2018.06.05.10.53.41; Tue, 05 Jun 2018 10:53:55 -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; dkim=pass header.i=@kernel.org header.s=default header.b=UF6j2owJ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753153AbeFERw6 (ORCPT + 99 others); Tue, 5 Jun 2018 13:52:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:46802 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753103AbeFERww (ORCPT ); Tue, 5 Jun 2018 13:52:52 -0400 Received: from jouet.infradead.org (unknown [179.97.41.186]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3DC7C2077B; Tue, 5 Jun 2018 17:52:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1528221172; bh=62C/5K/yyhiYOQufmigQpv91arKZntyD//ehvMqVEyo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UF6j2owJaeNCm5KtdLijzAMv8wUR5cU5V6yEj3PlzNU6IzX3pGhkPI/qM51lWk1p1 jFA36nM5ocsWPNcKpO+8LkO6w/63ymKGtBvQfZ7EBrIUmCYu+5JaRk9Rg0whLm5eRo rHOq+2/tSmukKQXlODF+k3mgjCTp/CNSHlMk2xZM= From: Arnaldo Carvalho de Melo To: Ingo Molnar Cc: Clark Williams , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Adrian Hunter , stable@vger.kernel.org, Arnaldo Carvalho de Melo Subject: [PATCH 45/46] perf intel-pt: Fix MTC timing after overflow Date: Tue, 5 Jun 2018 14:50:29 -0300 Message-Id: <20180605175030.32549-46-acme@kernel.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180605175030.32549-1-acme@kernel.org> References: <20180605175030.32549-1-acme@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Adrian Hunter On some platforms, overflows will clear before MTC wraparound, and there is no following TSC/TMA packet. In that case the previous TMA is valid. Since there will be a valid TMA either way, stop setting 'have_tma' to false upon overflow. Signed-off-by: Adrian Hunter Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/1527762225-26024-4-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/intel-pt-decoder/intel-pt-decoder.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/perf/util/intel-pt-decoder/intel-pt-decoder.c b/tools/perf/util/intel-pt-decoder/intel-pt-decoder.c index e5eb91777383..881d7c5e5e2a 100644 --- a/tools/perf/util/intel-pt-decoder/intel-pt-decoder.c +++ b/tools/perf/util/intel-pt-decoder/intel-pt-decoder.c @@ -1376,7 +1376,6 @@ static int intel_pt_overflow(struct intel_pt_decoder *decoder) { intel_pt_log("ERROR: Buffer overflow\n"); 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; -- 2.14.3