From patchwork Tue Apr 12 06:30:22 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: 12810148 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 164E3C433FE for ; Tue, 12 Apr 2022 06:40:16 +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=GciURm7LDn1euO9zSoQQKUrqVROFD+0WnpSuHIMucvQ=; b=E9I4dPfbR8IqbS Q6PmUUdf6rkJY9tdzjefalAvNcPTPl2yrpWr+YnbNL11xpwmZ+lX+ds/csFiXLJMrnbCOQUUJRUU4 mER5A/m7zVVS0FZQu916IMhGQBMEMO2OH7FHOVxFRLk/Q1ar+t+hsT0KfNku676Ksf5FydLlNKIyq dpDYfynt6MSQ84cuayuyTSGWXe7GgbBaQQbjgjVCzciS7cLQIPSC2eWvAspHuBxZ+gz+H/iaKPV4i T5FTOr76embN+x7yslOBYy0LbfDuzg1IOM5SdfQNPjk9mz2eUKV5kCfpg60cOnoeesBAV5UwWB8lg rml3m2vRWh3zCBnCvuPA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1neAB5-00BuoM-EQ; Tue, 12 Apr 2022 06:39:03 +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 1neAB2-00BulS-1b for linux-arm-kernel@lists.infradead.org; Tue, 12 Apr 2022 06:39:01 +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 DF25761902; Tue, 12 Apr 2022 06:38:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 312E6C385A6; Tue, 12 Apr 2022 06:38:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649745538; bh=F+acL3xa1EfkY2fawv6oA63W8PIk67kvrjKFqX9XmFQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=J3jyCSIP0KrCjaronRYhFpUQj7SofD1BdfmqC5DtwJvxEf7Kv9Mdfduem8RPBbTbA MAjv4stkHA6ilAfVmH5gWHd/z8DbeWbvFc3oNgSwCYkdaa1pN5yCtK9zbAfOIGsn47 w+iKKaxThAHzxZCVRdzfXVEu6pRW26WMKWNi9iI4= 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.10 131/171] perf: arm-spe: Fix perf report --mem-mode Date: Tue, 12 Apr 2022 08:30:22 +0200 Message-Id: <20220412062931.675777785@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220412062927.870347203@linuxfoundation.org> References: <20220412062927.870347203@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-20220411_233900_239059_9064E778 X-CRM114-Status: GOOD ( 17.67 ) 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 e3593063b3d1..37765e2bd9dd 100644 --- a/tools/perf/arch/arm64/util/arm-spe.c +++ b/tools/perf/arch/arm64/util/arm-spe.c @@ -124,6 +124,12 @@ static int arm_spe_recording_options(struct auxtrace_record *itr, evsel__set_sample_bit(arm_spe_evsel, TIME); evsel__set_sample_bit(arm_spe_evsel, TID); + /* + * 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)