From patchwork Tue Jan 23 13:12:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaldo Carvalho de Melo X-Patchwork-Id: 125512 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp1748552ljf; Tue, 23 Jan 2018 05:13:26 -0800 (PST) X-Google-Smtp-Source: AH8x227sSxpo6mQPxMrxoWloPJ5xkvD/LjDDlebeH7BGL/JBPt3AIdm54ujgWRwaEs/SQg0x69Zu X-Received: by 10.99.112.75 with SMTP id a11mr9228015pgn.47.1516713206444; Tue, 23 Jan 2018 05:13:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516713206; cv=none; d=google.com; s=arc-20160816; b=Q9hmUM+1PeC5hm8njAPJbL5E7i99xtO8lOU3GJeUvvPUtpRbWafRJ0YlIiWyXV8jpI ISo5/31mAGGAeqhNDtsqBm4A/GC3m1+nXVP11Pn/NgYQl2Pgf5xcRy7+DgnxAiNpvFx5 WrD86f9uaf31gLgG4YZmtqpEfZX8ThFGt+0/PReMbuy5kNvWBswenJDEMBkR730WUK3s 8MWtwX7V1cQJtApCV0IHiqiQZdDicPOfV2fOJu5mIrbMD4A41SxhTDu5XPG5gPNJIMvA ZCrVdMcTLuuuQ1bVbagBWvz0RyUfkUqMvmIVhS5EIoI3BO8ttfva3XDN/JpfpK5bd7u+ kFQQ== 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:dmarc-filter:arc-authentication-results; bh=RHz08YguDscFMKA6s+AixOeUkCLEFpsLuo24XYMx6KE=; b=WskUJVidCyfGkbrdaPaD1Ps6JNtFFBRB8DJGyqmXWB0ZPsHpNIBQBBUVPGRkTIwTF5 OCe99Q8ecTC+RKXvaV3TE4ymo8L3I8/JHdk8X55HYgd5+dQsdJqOK/ZCMSVosSt0Abkw illMP+yvXRsdpw86rOYsJCiERzQlX4GUr0PRdF71UysdzBEJOLMoVmYaLM79cUCBQbr9 v0UKJvf/hveE7p3WurbDJSASRyxI5h9l2VwMOvpuMigpIt5JEN3Vo0iwQYECzjEPLR4B X/2/Hg5BAJ1YsHEUSPDJO+0bm0zQUS0ip3HsKT7ZzXgUkCLnOGBH21DNPpd6Pul0ztV1 HE2w== 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 c3-v6si4699121plr.495.2018.01.23.05.13.26; Tue, 23 Jan 2018 05:13:26 -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 S1752090AbeAWNNX (ORCPT + 28 others); Tue, 23 Jan 2018 08:13:23 -0500 Received: from mail.kernel.org ([198.145.29.99]:46774 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752072AbeAWNNU (ORCPT ); Tue, 23 Jan 2018 08:13:20 -0500 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 1F031217A1; Tue, 23 Jan 2018 13:13:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1F031217A1 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=acme@kernel.org From: Arnaldo Carvalho de Melo To: Ingo Molnar Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Mathieu Poirier , Alexander Shishkin , Peter Zijlstra , Arnaldo Carvalho de Melo Subject: [PATCH 08/43] perf report: Fix regression when decoding intel_pt traces Date: Tue, 23 Jan 2018 10:12:16 -0300 Message-Id: <20180123131251.28197-9-acme@kernel.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180123131251.28197-1-acme@kernel.org> References: <20180123131251.28197-1-acme@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mathieu Poirier Commit (93d10af26bb7 perf tools: Optimize sample parsing for ordered events) breaks intelPT trace decoding by invariably returning an error if the event type isn't a PERF_SAMPLE_TIME. With this patch the timestamp is initialised and processing is allowed to continue if the error returned by function perf_evlist__parse_sample_timestamp() is not a fault. Signed-off-by: Mathieu Poirier Acked-by: Adrian Hunter Acked-by: Jiri Olsa Cc: Alexander Shishkin Cc: Peter Zijlstra Fixes: 93d10af26bb7 ("perf tools: Optimize sample parsing for ordered events") Link: http://lkml.kernel.org/r/1515616312-27645-1-git-send-email-mathieu.poirier@linaro.org Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/session.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.14.3 diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index 8d0fa2f8da16..c71ced7db152 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c @@ -1508,10 +1508,10 @@ static s64 perf_session__process_event(struct perf_session *session, return perf_session__process_user_event(session, event, file_offset); if (tool->ordered_events) { - u64 timestamp; + u64 timestamp = -1ULL; ret = perf_evlist__parse_sample_timestamp(evlist, event, ×tamp); - if (ret) + if (ret && ret != -1) return ret; ret = perf_session__queue_event(session, event, timestamp, file_offset);