From patchwork Wed May 19 07:19:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 12266475 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=-17.1 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 B8785C433B4 for ; Wed, 19 May 2021 07:22:58 +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 475FB61244 for ; Wed, 19 May 2021 07:22:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 475FB61244 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=IpcHRi166p70tdk7mg1l7HpYdg2uc/hhvqoe2u5vwAU=; b=M49q6QJapTBZt1FPYhvt3wnTf PohH8liO9xOZVPLkTrPVSvhfcqN/QUwu97kGZjHtuoScuw12Ns3MXlJLDjdRZXXozaMA9Kn2vDev8 g8bAITK3FnpS9gsB3IvACAG676R4IgSL+JlLzJ/uuf/6Pfj6RUCeBaQQStQd+rfDkcJL6IbuOXkJb mxYdiFjQIg97R4wqIi07Jl/EyhS1BBljGLHNFd145F/kKUz83Tgpex9N1a9FnbTiB54wzrOZZYgnY V369P5ND8p6CRTgakQcdKQIj1fLLwqoEPgDuQ0YkR4Xr6f6cercqqPbSNuyQxW2SAZvAKzAovQbIa 2H9uydnoA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1ljGVj-0038nB-HZ; Wed, 19 May 2021 07:20:55 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1ljGUy-0038c4-L0 for linux-arm-kernel@desiato.infradead.org; Wed, 19 May 2021 07:20:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=Chi1IofC1LVT5Y+rvN1rFC7UBLdb7aCrIZYrC4aASeE=; b=I02mNjjguw9QfYvdA0Wj846P73 kirwKWx1/U8CJlqtziuXs7fuTjt/K8Kya068Q0p8dJA4r4BO0QrjvQQrW/HsgcTibNG1ZW7sxmcR4 MEXiOdp8oHyfeMbLfwzyWeDM3x3M6zSZ+AIpQvp7OmHWkR/+ILGPR+qAGqeg7L/BmYvEZHhVYT3Pu Z+FTJDCsKqDNfpd2aH9W4Rq+7ROFMOYvpe5pqwQ92ihaowT7ZOuZ1tGiscdpdl9QRRgFPFbRpz/1p AiPIeCtQr74spdk1M+usHDrCMQE3hzpMxXC7DEBi4FgMfYEnedmYurM3+aVbWaGGD/Kp9Vg9scp3G dC3WlR/Q==; Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1ljGUv-00FDKj-GN for linux-arm-kernel@lists.infradead.org; Wed, 19 May 2021 07:20:07 +0000 Received: by mail-pf1-x432.google.com with SMTP id 22so8884224pfv.11 for ; Wed, 19 May 2021 00:20:05 -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=Chi1IofC1LVT5Y+rvN1rFC7UBLdb7aCrIZYrC4aASeE=; b=yddoojxF7uDWUZxGOObcD+IlaNc0Vem+McpvUNJ2n8STiIA4foAtRSyH8S9KUwPZoL 1gUIlCXqAMOix/+Y7tC0ugzNucy0olkHIEBWFGXlw+Gl5Q7NiR4BuEmpjJYXixc6BjWX 5EhXx6M4e+0i16NhYRfgN1IxfjFwZL9KZyUpVqE9/Zk4btLAPhZ7/C/87x3MwhznE4jX +1uZgRKHYei6bbA+TZZs5FQJ7fguXPlmy5XeiDhy6BLEXMcG3/Z5EAshSElmYfDpFqed mXj5BwK86pxLbJGCUcvexKME+VMwvAuoCtrA7uiYy2a6xCs5s3Hxzm0701ZniCICa7BF /qug== 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=Chi1IofC1LVT5Y+rvN1rFC7UBLdb7aCrIZYrC4aASeE=; b=lVcQt/q2hzMA0CutNl2iVYXvw/Nzx7OEncVT4CqaAB2ysLduRk8jB7WOV2kuFyh1Gq fKewFbws79VzCjHmDu0smm1/u269d5oTLUX+B8RxD+Msy3NsKkHaJ0zk4j7JWk1iLQTO U4lXKaY3WmgeNXXng1RF1dKpRHsmvIB2/siESCTahw66xb2GzQrCr66P1vvP1kGiQL7m m6xOQJGx0DJOZlxjC4xLW9og2noh6y8yWcjz59crrE+21X4oPoCrSqIiAQWMMDa1k+q7 JghuGtaWDVld7QESU7Fl88kMbtS+cD+FTzrKnJ5yhlMdnctH4qfcIev49t1RI5LD/rGY NAqg== X-Gm-Message-State: AOAM5337H8y8IU7+9JJvQbAh41sd32hAzBdDg83bpcYARpZE0iP3d/A5 ZQ14/sESHcNqk8ZCxEUPSLCxtA== X-Google-Smtp-Source: ABdhPJyTH2gc1bFlj5R2BhX7fJGAX8sT+U1KvjUgM9c8MPmMkLckOB8aCI0UxWShd2iT49crzw0oyA== X-Received: by 2002:a63:4648:: with SMTP id v8mr9458082pgk.34.1621408804623; Wed, 19 May 2021 00:20:04 -0700 (PDT) Received: from localhost ([103.207.71.35]) by smtp.gmail.com with ESMTPSA id y14sm12448747pgl.21.2021.05.19.00.20.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 May 2021 00:20:04 -0700 (PDT) From: Leo Yan To: Arnaldo Carvalho de Melo , James Clark , John Garry , Will Deacon , Mathieu Poirier , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Dave Martin , Al Grant , linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Leo Yan Subject: [PATCH v5 5/5] perf arm-spe: Don't wait for PERF_RECORD_EXIT event Date: Wed, 19 May 2021 15:19:39 +0800 Message-Id: <20210519071939.1598923-6-leo.yan@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210519071939.1598923-1-leo.yan@linaro.org> References: <20210519071939.1598923-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-20210519_002005_550994_FC36C2A3 X-CRM114-Status: GOOD ( 15.13 ) 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 Reviewed-by: James Clark Tested-by: James Clark --- 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 5c5b438584c4..58b7069c5a5f 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;