linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: German Gomez <german.gomez@arm.com>
Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>,
	Martin KaFai Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
	Yonghong Song <yhs@fb.com>,
	John Fastabend <john.fastabend@gmail.com>,
	KP Singh <kpsingh@kernel.org>, James Clark <james.clark@arm.com>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Alexandre Truong <alexandre.truong@arm.com>,
	netdev@vger.kernel.org, bpf@vger.kernel.org, irogers@google.com
Subject: Re: [PATCH] perf test: update arm64 perf_event_attr tests for --call-graph
Date: Wed, 16 Feb 2022 10:36:49 -0300	[thread overview]
Message-ID: <Ygz98VJyz418jv55@kernel.org> (raw)
In-Reply-To: <622a42bd-69da-0df4-bbf3-7d21de77c73b@arm.com>

Em Wed, Feb 16, 2022 at 01:17:56PM +0000, German Gomez escreveu:
> Hi,
> 
> Friendly ping on this perf-test fix for arm64

> I will include some quick test notes:

Thanks, adding it to the cset, applying.

- Arnaldo

> Before:
 
> $ ./perf test 17 -v
> 17: Setup struct perf_event_attr
> [...]
> running './tests/attr/test-record-graph-default'
> expected sample_type=295, got 4391
> expected sample_regs_user=0, got 1073741824
> FAILED './tests/attr/test-record-graph-default' - match failure
> test child finished with -1
> ---- end ----
> 
> After:
> 
> [...]
> running './tests/attr/test-record-graph-default-aarch64'
> test limitation 'aarch64'
> running './tests/attr/test-record-graph-fp-aarch64'
> test limitation 'aarch64'
> running './tests/attr/test-record-graph-default'
> test limitation '!aarch64'
> excluded architecture list ['aarch64']
> skipped [aarch64] './tests/attr/test-record-graph-default'
> running './tests/attr/test-record-graph-fp'
> test limitation '!aarch64'
> excluded architecture list ['aarch64']
> skipped [aarch64] './tests/attr/test-record-graph-fp'
> [...]
> 
> Thanks,
> German
> 
> On 25/01/2022 10:44, German Gomez wrote:
> > The struct perf_event_attr is initialised differently in Arm64 when
> > recording in call-graph fp mode, so update the relevant tests, and add
> > two extra arm64-only tests.
> >
> > Fixes: 7248e308a575 ("perf tools: Record ARM64 LR register automatically")
> > Signed-off-by: German Gomez <german.gomez@arm.com>
> > ---
> >  tools/perf/tests/attr/README                            | 2 ++
> >  tools/perf/tests/attr/test-record-graph-default         | 2 ++
> >  tools/perf/tests/attr/test-record-graph-default-aarch64 | 9 +++++++++
> >  tools/perf/tests/attr/test-record-graph-fp              | 2 ++
> >  tools/perf/tests/attr/test-record-graph-fp-aarch64      | 9 +++++++++
> >  5 files changed, 24 insertions(+)
> >  create mode 100644 tools/perf/tests/attr/test-record-graph-default-aarch64
> >  create mode 100644 tools/perf/tests/attr/test-record-graph-fp-aarch64
> >
> > diff --git a/tools/perf/tests/attr/README b/tools/perf/tests/attr/README
> > index a36f49fb4dbe..1116fc6bf2ac 100644
> > --- a/tools/perf/tests/attr/README
> > +++ b/tools/perf/tests/attr/README
> > @@ -45,8 +45,10 @@ Following tests are defined (with perf commands):
> >    perf record -d kill                           (test-record-data)
> >    perf record -F 100 kill                       (test-record-freq)
> >    perf record -g kill                           (test-record-graph-default)
> > +  perf record -g kill                           (test-record-graph-default-aarch64)
> >    perf record --call-graph dwarf kill		(test-record-graph-dwarf)
> >    perf record --call-graph fp kill              (test-record-graph-fp)
> > +  perf record --call-graph fp kill              (test-record-graph-fp-aarch64)
> >    perf record --group -e cycles,instructions kill (test-record-group)
> >    perf record -e '{cycles,instructions}' kill   (test-record-group1)
> >    perf record -e '{cycles/period=1/,instructions/period=2/}:S' kill (test-record-group2)
> > diff --git a/tools/perf/tests/attr/test-record-graph-default b/tools/perf/tests/attr/test-record-graph-default
> > index 5d8234d50845..f0a18b4ea4f5 100644
> > --- a/tools/perf/tests/attr/test-record-graph-default
> > +++ b/tools/perf/tests/attr/test-record-graph-default
> > @@ -2,6 +2,8 @@
> >  command = record
> >  args    = --no-bpf-event -g kill >/dev/null 2>&1
> >  ret     = 1
> > +# arm64 enables registers in the default mode (fp)
> > +arch    = !aarch64
> >  
> >  [event:base-record]
> >  sample_type=295
> > diff --git a/tools/perf/tests/attr/test-record-graph-default-aarch64 b/tools/perf/tests/attr/test-record-graph-default-aarch64
> > new file mode 100644
> > index 000000000000..e98d62efb6f7
> > --- /dev/null
> > +++ b/tools/perf/tests/attr/test-record-graph-default-aarch64
> > @@ -0,0 +1,9 @@
> > +[config]
> > +command = record
> > +args    = --no-bpf-event -g kill >/dev/null 2>&1
> > +ret     = 1
> > +arch    = aarch64
> > +
> > +[event:base-record]
> > +sample_type=4391
> > +sample_regs_user=1073741824
> > diff --git a/tools/perf/tests/attr/test-record-graph-fp b/tools/perf/tests/attr/test-record-graph-fp
> > index 5630521c0b0f..a6e60e839205 100644
> > --- a/tools/perf/tests/attr/test-record-graph-fp
> > +++ b/tools/perf/tests/attr/test-record-graph-fp
> > @@ -2,6 +2,8 @@
> >  command = record
> >  args    = --no-bpf-event --call-graph fp kill >/dev/null 2>&1
> >  ret     = 1
> > +# arm64 enables registers in fp mode
> > +arch    = !aarch64
> >  
> >  [event:base-record]
> >  sample_type=295
> > diff --git a/tools/perf/tests/attr/test-record-graph-fp-aarch64 b/tools/perf/tests/attr/test-record-graph-fp-aarch64
> > new file mode 100644
> > index 000000000000..cbeea9971285
> > --- /dev/null
> > +++ b/tools/perf/tests/attr/test-record-graph-fp-aarch64
> > @@ -0,0 +1,9 @@
> > +[config]
> > +command = record
> > +args    = --no-bpf-event --call-graph fp kill >/dev/null 2>&1
> > +ret     = 1
> > +arch    = aarch64
> > +
> > +[event:base-record]
> > +sample_type=4391
> > +sample_regs_user=1073741824

-- 

- Arnaldo

      reply	other threads:[~2022-02-16 13:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-25 10:44 [PATCH] perf test: update arm64 perf_event_attr tests for --call-graph German Gomez
2022-02-16 13:17 ` German Gomez
2022-02-16 13:36   ` 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=Ygz98VJyz418jv55@kernel.org \
    --to=acme@kernel.org \
    --cc=acme@redhat.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=alexandre.truong@arm.com \
    --cc=bpf@vger.kernel.org \
    --cc=german.gomez@arm.com \
    --cc=irogers@google.com \
    --cc=james.clark@arm.com \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@redhat.com \
    --cc=kafai@fb.com \
    --cc=kpsingh@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=namhyung@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=songliubraving@fb.com \
    --cc=yhs@fb.com \
    /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).