[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAM9d7cjT_eAA4tqDPHTZQYYn7UemJqPbKUUkc8ceyvuQhfD-dw@mail.gmail.com>
Date: Wed, 7 Sep 2022 10:40:04 -0700
From: Namhyung Kim <namhyung@...nel.org>
To: Adrian Hunter <adrian.hunter@...el.com>
Cc: Arnaldo Carvalho de Melo <acme@...nel.org>,
Jiri Olsa <jolsa@...nel.org>, Ingo Molnar <mingo@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
LKML <linux-kernel@...r.kernel.org>,
Ian Rogers <irogers@...gle.com>,
linux-perf-users <linux-perf-users@...r.kernel.org>
Subject: Re: [PATCH 2/6] perf test: Use a test program in perf record tests
On Wed, Sep 7, 2022 at 6:24 AM Adrian Hunter <adrian.hunter@...el.com> wrote:
>
> On 7/09/22 16:16, Adrian Hunter wrote:
> > On 7/09/22 09:46, Namhyung Kim wrote:
> >> if ! perf record -o - --intr-regs=di,r8,dx,cx -e cpu/br_inst_retired.near_call/p \
> >> - -c 1000 --per-thread true 2> /dev/null \
> >> + -c 1000 --per-thread ${testopt} ${testprog} 2> /dev/null \
> >> | perf script -F ip,sym,iregs -i - 2> /dev/null \
> >
> > With the kernel patch:
> >
> > https://lore.kernel.org/lkml/20220711180706.3418612-1-kan.liang@linux.intel.com/
> >
> > I get:
> >
> > Samples for 'dummy:HG' event do not have IREGS attribute set. Cannot print 'iregs' field.
>
> We seem to need:
Yeah, I think we have a discussion already.
Thanks,
Namhyung
>
> diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
> index 13580a9c50b8d..959291903936a 100644
> --- a/tools/perf/builtin-script.c
> +++ b/tools/perf/builtin-script.c
> @@ -411,7 +411,7 @@ static int evsel__do_check_stype(struct evsel *evsel, u64 sample_type, const cha
> int type = output_type(attr->type);
> const char *evname;
>
> - if (attr->sample_type & sample_type)
> + if (evsel__is_dummy_event(evsel) || attr->sample_type & sample_type)
> return 0;
>
> if (output[type].user_set_fields & field) {
> diff --git a/tools/perf/tests/shell/record.sh b/tools/perf/tests/shell/record.sh
Powered by blists - more mailing lists