From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Namhyung Kim <namhyung@kernel.org>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Martin KaFai Lau <kafai@fb.com>, Song Liu <songliubraving@fb.com>,
Yonghong Song <yhs@fb.com>, Andrii Nakryiko <andriin@fb.com>,
John Fastabend <john.fastabend@gmail.com>,
KP Singh <kpsingh@chromium.org>,
Adrian Hunter <adrian.hunter@intel.com>,
Andi Kleen <ak@linux.intel.com>,
Athira Rajeev <atrajeev@linux.vnet.ibm.com>,
LKML <linux-kernel@vger.kernel.org>,
Networking <netdev@vger.kernel.org>, bpf <bpf@vger.kernel.org>,
Stephane Eranian <eranian@google.com>
Subject: Re: [PATCH v2 2/5] perf record: Prevent override of attr->sample_period for libpfm4 events
Date: Fri, 4 Sep 2020 15:51:06 -0300 [thread overview]
Message-ID: <20200904185106.GB3752059@kernel.org> (raw)
In-Reply-To: <20200904185013.GA3752059@kernel.org>
Em Fri, Sep 04, 2020 at 03:50:13PM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Fri, Sep 04, 2020 at 03:48:03PM -0300, Arnaldo Carvalho de Melo escreveu:
> > Em Fri, Sep 04, 2020 at 09:22:10AM -0700, Ian Rogers escreveu:
> > > On Fri, Sep 4, 2020 at 9:03 AM Jiri Olsa <jolsa@redhat.com> wrote:
> > > > On Thu, Sep 03, 2020 at 10:41:14PM -0700, Ian Rogers wrote:
> > > > > On Wed, Jul 29, 2020 at 4:24 PM Ian Rogers <irogers@google.com> wrote:
> > > > > > On Tue, Jul 28, 2020 at 9:10 AM Jiri Olsa <jolsa@redhat.com> wrote:
> > > > > > > On Tue, Jul 28, 2020 at 05:59:46PM +0200, Jiri Olsa wrote:
> > > > > > > > On Tue, Jul 28, 2020 at 01:57:31AM -0700, Ian Rogers wrote:
> > > > > > > [jolsa@krava perf]$ sudo ./perf test 17 -v
> > > > > > > 17: Setup struct perf_event_attr :
> >
> > > > > > > running './tests/attr/test-record-C0'
> > > > > > > expected sample_period=4000, got 3000
> > > > > > > FAILED './tests/attr/test-record-C0' - match failure
> >
> > > > > > I'm not able to reproduce this. Do you have a build configuration or
> > > > > > something else to look at? The test doesn't seem obviously connected
> > > > > > with this patch.
> >
> > > > > Jiri, any update? Thanks,
> >
> > > > sorry, I rebased and ran it again and it passes for me now,
> > > > so it got fixed along the way
> >
> > > No worries, thanks for the update! It'd be nice to land this and the
> > > other libpfm fixes.
> >
> > I applied it and it generated this regression:
> >
> > FAILED '/home/acme/libexec/perf-core/tests/attr/test-record-pfm-period' - match failure
> >
> > I'll look at the other patches that are pending in this regard to see
> > what needs to be squashed so that we don't break bisect.
>
> So, more context:
>
> running '/home/acme/libexec/perf-core/tests/attr/test-record-pfm-period'
> expected exclude_hv=0, got 1
> FAILED '/home/acme/libexec/perf-core/tests/attr/test-record-pfm-period' - match failure
> test child finished with -1
> ---- end ----
> Setup struct perf_event_attr: FAILED!
> [root@five ~]#
>
> Ian, can you take a look at this?
Further tests I've performed:
Committer testing:
Not linking with libpfm:
# ldd ~/bin/perf | grep libpfm
#
Before:
# perf record -c 10000 -e cycles/period=12345/,instructions sleep 0.0001
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.052 MB perf.data (258 samples) ]
# perf evlist -v
cycles/period=12345/: size: 120, { sample_period, sample_freq }: 12345, sample_type: IP|TID|TIME|ID, read_format: ID, disabled: 1, inherit: 1, mmap: 1, comm: 1, enable_on_exec: 1, task: 1, sample_id_all: 1, exclude_guest: 1, mmap2: 1, comm_exec: 1, ksymbol: 1, bpf_event: 1
instructions: size: 120, config: 0x1, { sample_period, sample_freq }: 10000, sample_type: IP|TID|TIME|ID, read_format: ID, disabled: 1, inherit: 1, enable_on_exec: 1, sample_id_all: 1, exclude_guest: 1
#
After:
#
# perf record -c 10000 -e cycles/period=12345/,instructions sleep 0.0001
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.053 MB perf.data (284 samples) ]
# perf evlist -v
cycles/period=12345/: size: 120, { sample_period, sample_freq }: 12345, sample_type: IP|TID|TIME|ID, read_format: ID, disabled: 1, inherit: 1, mmap: 1, comm: 1, enable_on_exec: 1, task: 1, sample_id_all: 1, exclude_guest: 1, mmap2: 1, comm_exec: 1, ksymbol: 1, bpf_event: 1
instructions: size: 120, config: 0x1, { sample_period, sample_freq }: 10000, sample_type: IP|TID|TIME|ID, read_format: ID, disabled: 1, inherit: 1, enable_on_exec: 1, sample_id_all: 1, exclude_guest: 1
#
Linking with libpfm:
# ldd ~/bin/perf | grep libpfm
libpfm.so.4 => /lib64/libpfm.so.4 (0x00007f54c7d75000)
#
# perf record -c 10000 --pfm-events=cycles:period=77777 sleep 1
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.043 MB perf.data (141 samples) ]
# perf evlist -v
cycles:period=77777: size: 120, { sample_period, sample_freq }: 10000, sample_type: IP|TID|TIME, read_format: ID, disabled: 1, inherit: 1, exclude_hv: 1, mmap: 1, comm: 1, enable_on_exec: 1, task: 1, sample_id_all: 1, exclude_guest: 1, mmap2: 1, comm_exec: 1, ksymbol: 1, bpf_event: 1
#
After:
# perf record -c 10000 --pfm-events=cycles:period=77777 sleep 1
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.039 MB perf.data (19 samples) ]
# perf evlist -v
cycles:period=77777: size: 120, { sample_period, sample_freq }: 77777, sample_type: IP|TID|TIME, read_format: ID, disabled: 1, inherit: 1, exclude_hv: 1, mmap: 1, comm: 1, enable_on_exec: 1, task: 1, sample_id_all: 1, exclude_guest: 1, mmap2: 1, comm_exec: 1, ksymbol: 1, bpf_event: 1
#
next prev parent reply other threads:[~2020-09-04 18:51 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-28 8:57 [PATCH v2 0/5] Fixes for setting event freq/periods Ian Rogers
2020-07-28 8:57 ` [PATCH v2 1/5] perf record: Set PERF_RECORD_PERIOD if attr->freq is set Ian Rogers
2020-07-28 15:43 ` Jiri Olsa
2020-07-28 16:03 ` Arnaldo Carvalho de Melo
2020-07-29 15:11 ` Athira Rajeev
2020-07-29 18:52 ` Arnaldo Carvalho de Melo
2020-07-29 21:43 ` Ian Rogers
2020-09-04 5:39 ` Ian Rogers
2020-07-28 8:57 ` [PATCH v2 2/5] perf record: Prevent override of attr->sample_period for libpfm4 events Ian Rogers
2020-07-28 15:59 ` Jiri Olsa
2020-07-28 16:09 ` Jiri Olsa
2020-07-29 23:24 ` Ian Rogers
2020-09-04 5:41 ` Ian Rogers
2020-09-04 16:03 ` Jiri Olsa
2020-09-04 16:22 ` Ian Rogers
2020-09-04 18:48 ` Arnaldo Carvalho de Melo
2020-09-04 18:50 ` Arnaldo Carvalho de Melo
2020-09-04 18:51 ` Arnaldo Carvalho de Melo [this message]
2020-09-11 22:34 ` Ian Rogers
2020-09-12 3:02 ` Ian Rogers
2020-07-29 18:54 ` Arnaldo Carvalho de Melo
2020-07-28 8:57 ` [PATCH v2 3/5] perf test: Ensure sample_period is set " Ian Rogers
2020-07-28 12:45 ` Arnaldo Carvalho de Melo
2020-07-28 8:57 ` [PATCH v2 4/5] perf record: Don't clear event's period if set by a term Ian Rogers
2020-07-29 18:58 ` Arnaldo Carvalho de Melo
2020-08-04 10:08 ` Adrian Hunter
2020-08-04 13:33 ` Ian Rogers
2020-08-04 14:48 ` Adrian Hunter
2020-08-04 15:50 ` Ian Rogers
2020-09-04 5:43 ` Ian Rogers
2020-09-07 6:36 ` Adrian Hunter
2020-07-28 8:57 ` [PATCH v2 5/5] perf test: Leader sampling shouldn't clear sample period Ian Rogers
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=20200904185106.GB3752059@kernel.org \
--to=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=ak@linux.intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=andriin@fb.com \
--cc=ast@kernel.org \
--cc=atrajeev@linux.vnet.ibm.com \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=eranian@google.com \
--cc=irogers@google.com \
--cc=john.fastabend@gmail.com \
--cc=jolsa@redhat.com \
--cc=kafai@fb.com \
--cc=kpsingh@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=peterz@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.