linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Leo Yan <leo.yan@linaro.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
	James Clark <james.clark@arm.com>,
	German Gomez <german.gomez@arm.com>,
	linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf script: Always allow field 'data_src' for auxtrace
Date: Mon, 18 Apr 2022 11:45:18 -0300	[thread overview]
Message-ID: <Yl15fnAwfu3pDg2d@kernel.org> (raw)
In-Reply-To: <20220417114837.839896-1-leo.yan@linaro.org>

Em Sun, Apr 17, 2022 at 07:48:37PM +0800, Leo Yan escreveu:
> 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.

Thanks, applied to perf/urgent.

- Arnaldo

 
> Fixes: e55ed3423c1b ("perf arm-spe: Synthesize memory event")
> Signed-off-by: Leo Yan <leo.yan@linaro.org>
> ---
>  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 a2f117936188..cf5eab5431b4 100644
> --- a/tools/perf/builtin-script.c
> +++ b/tools/perf/builtin-script.c
> @@ -461,7 +461,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.25.1

-- 

- Arnaldo

      reply	other threads:[~2022-04-18 15:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-17 11:48 [PATCH] perf script: Always allow field 'data_src' for auxtrace Leo Yan
2022-04-18 14:45 ` Arnaldo Carvalho de Melo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Yl15fnAwfu3pDg2d@kernel.org \
    --to=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=german.gomez@arm.com \
    --cc=james.clark@arm.com \
    --cc=jolsa@kernel.org \
    --cc=leo.yan@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).