Message ID | 20200912025655.1337192-1-irogers@google.com |
---|---|
Headers | show |
Series | Fixes for setting event freq/periods | expand |
On Fri, Sep 11, 2020 at 07:56:51PM -0700, Ian Rogers wrote: > Some fixes that address issues for regular and pfm4 events with 2 > additional perf_event_attr tests. Various authors, David Sharp isn't > currently at Google. > > v3. moved a loop into a helper following Adrian Hunter's suggestion. > v2. corrects the commit message following Athira Rajeev's suggestion. > > David Sharp (1): > perf record: Set PERF_RECORD_PERIOD if attr->freq is set. > > Ian Rogers (2): > perf record: Don't clear event's period if set by a term > perf test: Leader sampling shouldn't clear sample period > > Stephane Eranian (1): > perf record: Prevent override of attr->sample_period for libpfm4 > events Acked-by: Jiri Olsa <jolsa@redhat.com> thanks, jirka > > tools/perf/tests/attr/README | 1 + > tools/perf/tests/attr/test-record-group2 | 29 ++++++++++++++++++++ > tools/perf/util/evsel.c | 10 ++++--- > tools/perf/util/record.c | 34 ++++++++++++++++++------ > 4 files changed, 63 insertions(+), 11 deletions(-) > create mode 100644 tools/perf/tests/attr/test-record-group2 > > -- > 2.28.0.618.gf4bc123cb7-goog >
Em Fri, Sep 11, 2020 at 07:56:55PM -0700, Ian Rogers escreveu: > Add test that a sibling with leader sampling doesn't have its period > cleared. Thanks, applied and collected Jiri's Acks for [34]/4 and Adrian's for 3/4. - Arnaldo > Signed-off-by: Ian Rogers <irogers@google.com> > --- > tools/perf/tests/attr/README | 1 + > tools/perf/tests/attr/test-record-group2 | 29 ++++++++++++++++++++++++ > 2 files changed, 30 insertions(+) > create mode 100644 tools/perf/tests/attr/test-record-group2 > > diff --git a/tools/perf/tests/attr/README b/tools/perf/tests/attr/README > index 6cd408108595..a36f49fb4dbe 100644 > --- a/tools/perf/tests/attr/README > +++ b/tools/perf/tests/attr/README > @@ -49,6 +49,7 @@ Following tests are defined (with perf commands): > perf record --call-graph fp kill (test-record-graph-fp) > 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) > perf record -D kill (test-record-no-delay) > perf record -i kill (test-record-no-inherit) > perf record -n kill (test-record-no-samples) > diff --git a/tools/perf/tests/attr/test-record-group2 b/tools/perf/tests/attr/test-record-group2 > new file mode 100644 > index 000000000000..6b9f8d182ce1 > --- /dev/null > +++ b/tools/perf/tests/attr/test-record-group2 > @@ -0,0 +1,29 @@ > +[config] > +command = record > +args = --no-bpf-event -e '{cycles/period=1234000/,instructions/period=6789000/}:S' kill >/dev/null 2>&1 > +ret = 1 > + > +[event-1:base-record] > +fd=1 > +group_fd=-1 > +config=0|1 > +sample_period=1234000 > +sample_type=87 > +read_format=12 > +inherit=0 > +freq=0 > + > +[event-2:base-record] > +fd=2 > +group_fd=1 > +config=0|1 > +sample_period=6789000 > +sample_type=87 > +read_format=12 > +disabled=0 > +inherit=0 > +mmap=0 > +comm=0 > +freq=0 > +enable_on_exec=0 > +task=0 > -- > 2.28.0.618.gf4bc123cb7-goog >