Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4327654ioa; Wed, 27 Apr 2022 00:52:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz1MeIO7ORI33kuKNvoRR8IlQYTMQfxZQ7lc3o3ZXnAZVveLTc6UlkzdXawg5uCMrYNM09s X-Received: by 2002:a17:902:f64d:b0:151:3895:46bf with SMTP id m13-20020a170902f64d00b00151389546bfmr27899697plg.31.1651045958576; Wed, 27 Apr 2022 00:52:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651045958; cv=none; d=google.com; s=arc-20160816; b=D2ulA4QSFakg1q29UnJ/UE7Y4qFDUOPBigqrltOH9rfJiYTqQOTWOdNgH0iM3NqoPn gqyvONFwHxACrvBH+9qj0adldV7wJ/7RWokGy6sqKBD5MoI6Msm1TltjfrThO6mlbqW/ FggpOuxf+E2JBSgCTRotxKyzeCGurGXe3G6IxVvG16Z5r7GSYUHgISe9rhbxjjOZhnR/ OMjxHswDHlsbf2FW+T7YRg6ENcqTGIkyU9cJyJV5M4MhzfqJ/QeG7+4nZkWXKYVzAnOe 9Z33JJqATuKzF6Hmc+iVbOrWI5HqyKzBiX9KpTqA+13oZ+lDW8g/UvaDujEbwJtdClNM nsyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=BEy9Kp1cUbhxlXX3ZiE3lVAlqnz/6d+yepwh7M88gSY=; b=pvQg43XGlDFNsNiK3dSchoYn6LOuWmJNoJyHd12kIZKQmtRA+EeG0pkjB5F636FVFP VRw1dzEkMPq+zYfldiYfcs50D/nvOgo9mPKBsJwvEiDkvuVD3wp6EjJNPh7FeGkF7OJ2 IvRygGi0JmIjJRovnvBWwDbBE7518iNNqsriUIqRsYVm23hH7m+/43kq3vU+RSRjMe1X asz9ncImfxfyYrKZFmJV1c0DdNsB6ieUYjw2588iLyWfMOK/umv5K+0wiygXe1a++gPW UXKxgK0jEz6txkpJQZJolEWhU1Jh8cX+yx/b8BErnnbzMfnBzlnlrXkiOvl9H/Kk0Ij/ xhlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ayPLPbVF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id rm4-20020a17090b3ec400b001da0b254615si2742719pjb.119.2022.04.27.00.52.24; Wed, 27 Apr 2022 00:52:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ayPLPbVF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347134AbiDZJOB (ORCPT + 99 others); Tue, 26 Apr 2022 05:14:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347667AbiDZIvu (ORCPT ); Tue, 26 Apr 2022 04:51:50 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 452CC13FB8; Tue, 26 Apr 2022 01:40:45 -0700 (PDT) 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 ams.source.kernel.org (Postfix) with ESMTPS id D5362B81D1B; Tue, 26 Apr 2022 08:40:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1FB03C385B0; Tue, 26 Apr 2022 08:40:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1650962436; bh=ZECTkgl81n78hZ7uxN4JX8xL/27fYo6cIxZg+Du304Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ayPLPbVF0pCMlmpa666CXXaqybDsg3DX6C+uwjLUO1E/HT4VtAYA8tf6AS42gWt74 nrhum6OAeOI1nY1vnYUHDTchDEKfdZxtKWhsO6r1fFGNS8OEl1RIqFKsGTttJLQ0Lk c+2q1qh8GZEpypv+KL5jXsSZgqvU1/GuVep1QLws= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Leo Yan , Adrian Hunter , Alexander Shishkin , German Gomez , Ingo Molnar , James Clark , Jiri Olsa , Mark Rutland , Namhyung Kim , Peter Zijlstra , Arnaldo Carvalho de Melo , Sasha Levin Subject: [PATCH 5.15 097/124] perf script: Always allow field data_src for auxtrace Date: Tue, 26 Apr 2022 10:21:38 +0200 Message-Id: <20220426081750.057351677@linuxfoundation.org> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220426081747.286685339@linuxfoundation.org> References: <20220426081747.286685339@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Leo Yan [ Upstream commit c6d8df01064333dcf140eda996abdb60a60e24b3 ] If use command 'perf script -F,+data_src' to dump memory samples with Arm SPE trace data, it reports error: # perf script -F,+data_src Samples for 'dummy:u' event do not have DATA_SRC attribute set. Cannot print 'data_src' field. This is because the 'dummy:u' event is absent DATA_SRC bit in its sample type, so if a file contains AUX area tracing data then always allow field 'data_src' to be selected as an option for perf script. Fixes: e55ed3423c1bb29f ("perf arm-spe: Synthesize memory event") Signed-off-by: Leo Yan Cc: Adrian Hunter Cc: Alexander Shishkin Cc: German Gomez Cc: Ingo Molnar Cc: James Clark Cc: Jiri Olsa Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20220417114837.839896-1-leo.yan@linaro.org Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Sasha Levin --- tools/perf/builtin-script.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index 18b56256bb6f..cb3d81adf5ca 100644 --- a/tools/perf/builtin-script.c +++ b/tools/perf/builtin-script.c @@ -455,7 +455,7 @@ static int evsel__check_attr(struct evsel *evsel, struct perf_session *session) return -EINVAL; if (PRINT_FIELD(DATA_SRC) && - evsel__check_stype(evsel, PERF_SAMPLE_DATA_SRC, "DATA_SRC", PERF_OUTPUT_DATA_SRC)) + evsel__do_check_stype(evsel, PERF_SAMPLE_DATA_SRC, "DATA_SRC", PERF_OUTPUT_DATA_SRC, allow_user_set)) return -EINVAL; if (PRINT_FIELD(WEIGHT) && -- 2.35.1