From patchwork Tue Apr 12 06:31:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 12810170 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9C916C433F5 for ; Tue, 12 Apr 2022 07:06:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; 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=h6tYvnbeOR1iqWG0P0nMHa6QJWE+KL9Og8TEnyIRb2Y=; b=yVj4sQUxAHpxDy /8c69+Bgk+NV2Ca65J/gKBDeXz9QFw/PfyB6O3q716k0ZR/KKa4N9/qUtzeENzXcBmaCFsMdPkWzO YWOaGSmmuCLC7b9iQKVJzQx1hByQze3e1JWaNu0Q1ehYfmM4wsS1l1hGMmyfTvt07bZuRUwECeTzj 13JNUiSpA8jai5g0p+mBLhrGU6ZpQka0jcBt9dmarqvYFkyCK0XOnGTRqbpORCjETI2A9r1hagL47 DktjlZrDf/sRPGZLK/vm/V0o+uKAsUczKdZhnkQTdhW94uhg4ozqZRp1P8HfFDkxND2C4HgNjpOrz XeTGJs6Z18i+zbjtascg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1neAaX-00C3Lo-BJ; Tue, 12 Apr 2022 07:05:21 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1neAaT-00C3L0-Oo for linux-arm-kernel@lists.infradead.org; Tue, 12 Apr 2022 07:05:19 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 58C72615B6; Tue, 12 Apr 2022 07:05:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3C77BC385A6; Tue, 12 Apr 2022 07:05:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649747116; bh=48IJ3esSaUzBji8rEvxkx01bcGDqcGgwVzYB+0ZPDAg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hsGP4Pr6ftXxisuyN02/4hzwXCq5IisKZqp26X27Dgpt6Mll6CY17x8EEPLg0ermV KjoWaO4MY4YHXtcGVE7bQ7oFVnlmv1Syo+IJD5w37xuLECmkx/x/iQraceGSEedoay kvlLLKNDvb2CLGXLnvhQRREtgtSPWYE7/CjvKt3o= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, James Clark , Leo Yan , Namhyung Kim , Alexander Shishkin , German Gomez , Jiri Olsa , John Garry , linux-arm-kernel@lists.infradead.org, Mark Rutland , Mathieu Poirier , Ravi Bangoria , Will Deacon , Arnaldo Carvalho de Melo , Sasha Levin Subject: [PATCH 5.16 209/285] perf: arm-spe: Fix perf report --mem-mode Date: Tue, 12 Apr 2022 08:31:06 +0200 Message-Id: <20220412062949.691397574@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220412062943.670770901@linuxfoundation.org> References: <20220412062943.670770901@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220412_000517_920347_F9C2EAFB X-CRM114-Status: GOOD ( 17.71 ) 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 From: James Clark [ Upstream commit ffab487052054162b3b6c9c6005777ec6cfcea05 ] Since commit bb30acae4c4dacfa ("perf report: Bail out --mem-mode if mem info is not available") "perf mem report" and "perf report --mem-mode" don't allow opening the file unless one of the events has PERF_SAMPLE_DATA_SRC set. SPE doesn't have this set even though synthetic memory data is generated after it is decoded. Fix this issue by setting DATA_SRC on SPE events. This has no effect on the data collected because the SPE driver doesn't do anything with that flag and doesn't generate samples. Fixes: bb30acae4c4dacfa ("perf report: Bail out --mem-mode if mem info is not available") Signed-off-by: James Clark Tested-by: Leo Yan Acked-by: Namhyung Kim Cc: Alexander Shishkin Cc: German Gomez Cc: Jiri Olsa Cc: John Garry Cc: Leo Yan Cc: linux-arm-kernel@lists.infradead.org Cc: Mark Rutland Cc: Mathieu Poirier Cc: Ravi Bangoria Cc: Will Deacon Link: https://lore.kernel.org/r/20220408144056.1955535-1-james.clark@arm.com Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin --- tools/perf/arch/arm64/util/arm-spe.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/perf/arch/arm64/util/arm-spe.c b/tools/perf/arch/arm64/util/arm-spe.c index 2100d46ccf5e..bb4ab99afa7f 100644 --- a/tools/perf/arch/arm64/util/arm-spe.c +++ b/tools/perf/arch/arm64/util/arm-spe.c @@ -239,6 +239,12 @@ static int arm_spe_recording_options(struct auxtrace_record *itr, arm_spe_set_timestamp(itr, arm_spe_evsel); } + /* + * Set this only so that perf report knows that SPE generates memory info. It has no effect + * on the opening of the event or the SPE data produced. + */ + evsel__set_sample_bit(arm_spe_evsel, DATA_SRC); + /* Add dummy event to keep tracking */ err = parse_events(evlist, "dummy:u", NULL); if (err)