From patchwork Sat Apr 3 07:23:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 12181823 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 98D86C433B4 for ; Sat, 3 Apr 2021 07:26:07 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1437261208 for ; Sat, 3 Apr 2021 07:26:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1437261208 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Z+idO36ezSdZTd4oESUluroGC+jKPon7dwC7lC1+Coo=; b=erKZvV/XDoYYNV/lKGzNysuhp Z9YT1lwspr33gIX9Qp7oHw30JlKXrENyyRJ1bHQPwN5Ca276zhRJdCFJNWyWpYRK3f7QNz4KE5sMf X4LU/SOIFcKmn/RFoRxFJkZO3o8tURBq9wCzPGt/xKja5E9t7iO8gZAI1EgkUp5BKcB/N05EQCdYd wn9zxabSIfwGRV6+8IQqyJTUxgv8/1cJBpxQ3Q3CvS2km4wfFYwSsVj4UU3NVn9znlch2bO1b5Hsc SOtewpyW8bLyG9qdZhvVPmuVm5Z6OiWEbQgNRce9ial0RyCSrFjhDubRg/nOf7Gy+kYRIBjnKRtOi XzNB4ja/Q==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lSaeL-00EPUv-3S; Sat, 03 Apr 2021 07:24:53 +0000 Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lSadm-00EPLc-7X for linux-arm-kernel@lists.infradead.org; Sat, 03 Apr 2021 07:24:19 +0000 Received: by mail-pj1-x1030.google.com with SMTP id ha17so3660489pjb.2 for ; Sat, 03 Apr 2021 00:24:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=aVowY+HNEZ8f93+BvCcRoQEWjKnoEyL6nLVoSj85YSs=; b=zykFXQxAT+PKo/kXZ9htIc0/A1fsc4wSNY9pbf6pjVPeVe5MWZZsO5bDF9mcJrdi1M PmSqf33YsrXg1tflyKbwASByUguVQAM0bGx19HYaRLLMbErBWMqR/LmTyfBxp1Ig6pW1 V+avYKDZ6ngh3aY6LHFnAJEt+AfsJhTtoqsFF0icCIOURfb6dKHnD63RH0Oml6hBxEXt VSv3VbspWOybX8gQALM04jqZjaOXim19w2GeTulnE/TfZ3Or3DPi5XmiHXCbQX5ZNNJn 8Ffgob4rtNAj7Ztb21ZW3rN0M4SNOZe/sQS8xfDxFR92ZXIJxnKkdjxyEEKAxj/vfYAS Rsfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=aVowY+HNEZ8f93+BvCcRoQEWjKnoEyL6nLVoSj85YSs=; b=Kpx40xunsKVnAmNqfkv6/0QmPdG+7nWqZwjumPSACvW8nqBLVYhALh7Vuy/Ucv62FV 1ZlFhlLLDdCXW5d+suAbNCWM3Ozjdq+Oij4EZcns7tnAUzWL48uvLtzeq/KqrwjaDg8+ xOQ3W9efFQCLAkmz6jp/Ohbh6qbtqLDRf2uV26iZ1pDb45Dj9oh/Ys7QelCnDBYW2eCU RvHcheStqs6VFeBNiK6EWJCVOyr0ahFeI6A2sXcQXI4eQ15SVuaDTQcmZoT+pgUnMx85 WbaXw+pBHJRfQGQBa96p2vSWTL2wH9wCjgEfqiuGHubnpkMJUV2AeYoWzhaBjQxYC1D3 pnMA== X-Gm-Message-State: AOAM532d/CGkosB4+B6lIdlye6rw/BQhntQWU7ZwWtIEcJtCEcLPeskp HPfdHVjNyRs4tLjZYvLmWGNTnw== X-Google-Smtp-Source: ABdhPJyVnlDCnwIailYc6VsRqgA2w6L9Bvz+1fyAPM3K6Ahop+AkYQU9VEAIbebVHqvGcvNCiH/wqg== X-Received: by 2002:a17:902:a610:b029:e6:5eda:c39e with SMTP id u16-20020a170902a610b02900e65edac39emr15965751plq.11.1617434656797; Sat, 03 Apr 2021 00:24:16 -0700 (PDT) Received: from localhost ([116.206.101.232]) by smtp.gmail.com with ESMTPSA id o9sm357972pjr.43.2021.04.03.00.24.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Apr 2021 00:24:16 -0700 (PDT) From: Leo Yan To: Arnaldo Carvalho de Melo , John Garry , Will Deacon , Mathieu Poirier , James Clark , Al Grant , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Adrian Hunter , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Leo Yan Subject: [PATCH v2 7/7] perf arm-spe: Don't wait for PERF_RECORD_EXIT event Date: Sat, 3 Apr 2021 15:23:46 +0800 Message-Id: <20210403072346.30430-8-leo.yan@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210403072346.30430-1-leo.yan@linaro.org> References: <20210403072346.30430-1-leo.yan@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210403_082418_308471_E177E890 X-CRM114-Status: GOOD ( 14.42 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org When decode Arm SPE trace, it waits for PERF_RECORD_EXIT event (the last perf event) for processing trace data, which is needless and even might cause logic error, e.g. it might fail to correlate perf events with Arm SPE events correctly. So this patch removes the condition checking for PERF_RECORD_EXIT event. Signed-off-by: Leo Yan --- tools/perf/util/arm-spe.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tools/perf/util/arm-spe.c b/tools/perf/util/arm-spe.c index 99a394c366e0..17dcad99912a 100644 --- a/tools/perf/util/arm-spe.c +++ b/tools/perf/util/arm-spe.c @@ -717,11 +717,7 @@ static int arm_spe_process_event(struct perf_session *session, sample->time); } } else if (timestamp) { - if (event->header.type == PERF_RECORD_EXIT) { - err = arm_spe_process_queues(spe, timestamp); - if (err) - return err; - } + err = arm_spe_process_queues(spe, timestamp); } return err;