From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Google-Smtp-Source: AIpwx4/daN8qGzzxHipLtiOkCdf4SHZUQPRnOtQLv5ljE0bxM5BOzyR8yP0V8CCc17lfIXFvo+a3 ARC-Seal: i=1; a=rsa-sha256; t=1523981169; cv=none; d=google.com; s=arc-20160816; b=OthW31lvFZ/UYu63bEWc7mjTk+K2eeaHYPMwfmFDjrXFzVUGTMtJ+Y2SkOh7abjIqq Csx/gAuIcIVOle7ETyDE+YS/hR+FNxpz3hkvxHqJXP8oV2p+z2zOhmyEYvFJhEF0QuXH 9YOYwdRtpRK7jsE1qh0l93CGRVTYOjVuXwsnZKSgsUr8rvIQypKIqFAYfY3knyMSnxiE ZwCv0QdRFtLZErBP7FpXHYjWBZnIAl9WVdgkprE1pGAG/voT0fITy3BPi4QdrfZIgl6o 5LVCpboXoCi0Ys8TCnih9yletBtCOVt629YBxP3/sv2fwuyKA87g+6kVuGU1bBkEydcx 830w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:user-agent:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=u8Avs1cmAC92PzBhb7DcH3Mv9+3OH93mjBM5NAVL2uE=; b=p8fiaqhOKSyZoRrObj/p0X4igivjHP1nGAxUangehBBA6074d0SbNs/Zt2u+MNy0M9 7Fh5LA7dpJvQ8lkdxvwXmWVvS2SasXzTILcf9cw1Z8qQ88XiPSB6SIwWt1PjznpYlc5x yuH5O4bsZlAiy6T4xpFdADhaoQMcr/cXL7OyLRJbSgEW6YmN9JcWzFAYoyxfL4khC2sI C51Xp+Nxoypw38xQFV8XUGJFSud0HWjI8ApOqBSviaUpTa7oZdzgita12cR5EZOfWP/F 2gq5ItT7qYyy7H4pl6goLg8rVjJKsEwLT0tOKnfTeRBC/i1Tuy0gM9O8lHNJgRAhno25 Yuvw== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning gregkh@linuxfoundation.org does not designate 46.44.180.42 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning gregkh@linuxfoundation.org does not designate 46.44.180.42 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org 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.14 18/49] perf intel-pt: Fix timestamp following overflow Date: Tue, 17 Apr 2018 17:58:57 +0200 Message-Id: <20180417155715.889699143@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180417155715.032245882@linuxfoundation.org> References: <20180417155715.032245882@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-LABELS: =?utf-8?b?IlxcU2VudCI=?= X-GMAIL-THRID: =?utf-8?q?1598009762717595342?= X-GMAIL-MSGID: =?utf-8?q?1598010078903152784?= X-Mailing-List: linux-kernel@vger.kernel.org List-ID: 4.14-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 @@ -1378,6 +1378,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;