<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/tools/perf/tests/attr/base-stat, branch master</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=master</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2024-10-17T20:17:36Z</updated>
<entry>
<title>perf test: Move attr files into shell directory where they are used</title>
<updated>2024-10-17T20:17:36Z</updated>
<author>
<name>Ian Rogers</name>
<email>irogers@google.com</email>
</author>
<published>2024-10-15T00:01:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8296aa0f28c2433f213fce18bad00a97965c052f'/>
<id>urn:sha1:8296aa0f28c2433f213fce18bad00a97965c052f</id>
<content type='text'>
Now the attr tests are shell tests move the associated python and
configuration files. Update the installation build rules for the new
directories. Recycle the lib install rules for python files allowing
the explicit attr.py install line to be dropped.

Signed-off-by: Ian Rogers &lt;irogers@google.com&gt;
Tested-by: Athira Rajeev &lt;atrajeev@linux.vnet.ibm.com&gt;
Cc: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Cc: zhaimingbing &lt;zhaimingbing@cmss.chinamobile.com&gt;
Cc: Howard Chu &lt;howardchu95@gmail.com&gt;
Cc: Ze Gao &lt;zegao2021@gmail.com&gt;
Cc: Weilin Wang &lt;weilin.wang@intel.com&gt;
Cc: James Clark &lt;james.clark@linaro.org&gt;
Cc: Leo Yan &lt;leo.yan@linux.dev&gt;
Cc: Thomas Richter &lt;tmricht@linux.ibm.com&gt;
Cc: Veronika Molnarova &lt;vmolnaro@redhat.com&gt;
Link: https://lore.kernel.org/r/20241015000158.871828-4-irogers@google.com
Signed-off-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
</content>
</entry>
<entry>
<title>perf test attr: Update no event/metric expectations</title>
<updated>2023-05-19T13:36:25Z</updated>
<author>
<name>Ian Rogers</name>
<email>irogers@google.com</email>
</author>
<published>2023-05-17T22:57:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=951efb9976ce453342a86b29d7bfe9fa483c7c4d'/>
<id>urn:sha1:951efb9976ce453342a86b29d7bfe9fa483c7c4d</id>
<content type='text'>
Previously hard coded events/metrics were used, update for the use of
the TopdownL1 json metric group.

Reported-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Fixes: 94b1a603fca78388 ("perf stat: Add TopdownL1 metric as a default if present")
Reviewed-by: James Clark &lt;james.clark@arm.com&gt;
Signed-off-by: Ian Rogers &lt;irogers@google.com&gt;
Tested-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Tested-by: Kan Liang &lt;kan.liang@linux.intel.com&gt;
Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Jiri Olsa &lt;jolsa@kernel.org&gt;
Cc: Mark Rutland &lt;mark.rutland@arm.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Thomas Richter &lt;tmricht@linux.ibm.com&gt;
Link: https://lore.kernel.org/r/20230517225707.2682235-1-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf test: Fix wrong size expectation for 'Setup struct perf_event_attr'</title>
<updated>2023-04-04T12:39:55Z</updated>
<author>
<name>Thomas Richter</name>
<email>tmricht@linux.ibm.com</email>
</author>
<published>2023-03-22T09:47:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=30df88a80f32ccca5c5cdcf2710d1fb2de5e314d'/>
<id>urn:sha1:30df88a80f32ccca5c5cdcf2710d1fb2de5e314d</id>
<content type='text'>
The test case "perf test 'Setup struct perf_event_attr'" is failing.

On s390 this output is observed:

 # ./perf test -Fvvvv 17
 17: Setup struct perf_event_attr                                    :
 --- start ---
 running './tests/attr/test-stat-C0'
 Using CPUID IBM,8561,703,T01,3.6,002f
 .....
 Event event:base-stat
      fd = 1
      group_fd = -1
      flags = 0|8
      cpu = *
      type = 0
      size = 128     &lt;&lt;&lt;--- wrong, specified in file base-stat
      config = 0
      sample_period = 0
      sample_type = 65536
      ...
 'PERF_TEST_ATTR=/tmp/tmpgw574wvg ./perf stat -o \
	/tmp/tmpgw574wvg/perf.data -e cycles -C 0 kill &gt;/dev/null \
	2&gt;&amp;1 ret '1', expected '1'
  loading result events
    Event event-0-0-4
      fd = 4
      group_fd = -1
      cpu = 0
      pid = -1
      flags = 8
      type = 0
      size = 136     &lt;&lt;&lt;--- actual size used in system call
      .....
  compare
    matching [event-0-0-4]
      to [event:base-stat]
      [cpu] 0 *
      [flags] 8 0|8
      [type] 0 0
      [size] 136 128
    -&gt;FAIL
    match: [event-0-0-4] matches []
  expected size=136, got 128
  FAILED './tests/attr/test-stat-C0' - match failure

This mismatch is caused by
commit 09519ec3b19e ("perf: Add perf_event_attr::config3")
which enlarges the structure perf_event_attr by 8 bytes.

Fix this by adjusting the expected value of size.

Output after:
 # ./perf test -Fvvvv 17
 17: Setup struct perf_event_attr                                    :
 --- start ---
 running './tests/attr/test-stat-C0'
 Using CPUID IBM,8561,703,T01,3.6,002f
 ...
  matched
  compare
    matching [event-0-0-4]
      to [event:base-stat]
      [cpu] 0 *
      [flags] 8 0|8
      [type] 0 0
      [size] 136 136
      ....
   -&gt;OK
   match: [event-0-0-4] matches ['event:base-stat']
 matched

Fixes: 09519ec3b19e4144 ("perf: Add perf_event_attr::config3")
Signed-off-by: Thomas Richter &lt;tmricht@linux.ibm.com&gt;
Acked-by: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Heiko Carstens &lt;hca@linux.ibm.com&gt;
Cc: Rob Herring &lt;robh@kernel.org&gt;
Cc: Sumanth Korikkar &lt;sumanthk@linux.ibm.com&gt;
Cc: Sven Schnelle &lt;svens@linux.ibm.com&gt;
Cc: Vasily Gorbik &lt;gor@linux.ibm.com&gt;
Cc: Will Deacon &lt;will@kernel.org&gt;
Link: https://lore.kernel.org/r/20230322094731.1768281-1-tmricht@linux.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>tools headers UAPI: Sync perf_event.h with the kernel sources</title>
<updated>2021-05-10T12:01:01Z</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
<email>acme@redhat.com</email>
</author>
<published>2021-05-09T13:29:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=71d7924b3e8acaca6a3b0fc3261170031ada3b70'/>
<id>urn:sha1:71d7924b3e8acaca6a3b0fc3261170031ada3b70</id>
<content type='text'>
To pick up the changes in:

  2b26f0aa004995f4 ("perf: Support only inheriting events if cloned with CLONE_THREAD")
  2e498d0a74e5b88a ("perf: Add support for event removal on exec")
  547b60988e631f74 ("perf: aux: Add flags for the buffer format")
  55bcf6ef314ae8ba ("perf: Extend PERF_TYPE_HARDWARE and PERF_TYPE_HW_CACHE")
  7dde51767ca5339e ("perf: aux: Add CoreSight PMU buffer formats")
  97ba62b278674293 ("perf: Add support for SIGTRAP on perf events")
  d0d1dd628527c77d ("perf core: Add PERF_COUNT_SW_CGROUP_SWITCHES event")

Also change the expected sizeof(struct perf_event_attr) from 120 to 128 due to
fields being added for the SIGTRAP changes.

Addressing this perf build warning:

  Warning: Kernel ABI header at 'tools/include/uapi/linux/perf_event.h' differs from latest version at 'include/uapi/linux/perf_event.h'
  diff -u tools/include/uapi/linux/perf_event.h include/uapi/linux/perf_event.h

Cc: Kan Liang &lt;kan.liang@linux.intel.com&gt;
Cc: Marco Elver &lt;elver@google.com&gt;
Cc: Mathieu Poirier &lt;mathieu.poirier@linaro.org&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Suzuki K Poulose &lt;suzuki.poulose@arm.com&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf tools: Add kernel AUX area sampling definitions</title>
<updated>2019-11-21T13:54:20Z</updated>
<author>
<name>Adrian Hunter</name>
<email>adrian.hunter@intel.com</email>
</author>
<published>2019-11-15T12:42:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=98dcf14d7f9c9482144b9015d481bf6b63bce965'/>
<id>urn:sha1:98dcf14d7f9c9482144b9015d481bf6b63bce965</id>
<content type='text'>
Add kernel AUX area sampling definitions, which brings perf_event.h into
line with the kernel version.

New sample type PERF_SAMPLE_AUX requests a sample of the AUX area
buffer.  New perf_event_attr member 'aux_sample_size' specifies the
desired size of the sample.

Also add support for parsing samples containing AUX area data i.e.
PERF_SAMPLE_AUX.

Committer notes:

I squashed the first two patches in this series to avoid breaking
automatic bisection, i.e. after applying only the original first patch
in this series we would have:

  # perf test -v parsing
  26: Sample parsing                                        :
  --- start ---
  test child forked, pid 17018
  sample format has changed, some new PERF_SAMPLE_ bit was introduced - test needs updating
  test child finished with -1
  ---- end ----
  Sample parsing: FAILED!
  #

With the two paches combined:

  # perf test parsing
  26: Sample parsing                                        : Ok
  #

Signed-off-by: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Tested-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Cc: Jiri Olsa &lt;jolsa@redhat.com&gt;
Link: http://lore.kernel.org/lkml/20191115124225.5247-3-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf tests attr: Fix stat sample_type setup</title>
<updated>2017-07-19T02:14:21Z</updated>
<author>
<name>Jiri Olsa</name>
<email>jolsa@kernel.org</email>
</author>
<published>2017-07-03T14:50:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b78e92e6071d5131f5ba6b25437d82c0fcef09de'/>
<id>urn:sha1:b78e92e6071d5131f5ba6b25437d82c0fcef09de</id>
<content type='text'>
&gt;From following commit:

  commit 4979d0c7d0c7 ("perf stat record: Add record command")

we started to assign PERF_SAMPLE_IDENTIFIER to sample_type.

Fixing the attr stat tests accordingly.

Signed-off-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
Cc: David Ahern &lt;dsahern@gmail.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Thomas Richter &lt;tmricht@linux.vnet.ibm.com&gt;
Link: http://lkml.kernel.org/r/20170703145030.12903-14-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf tests attr: Add 1s for exclude_kernel and task base bits</title>
<updated>2017-07-19T02:14:17Z</updated>
<author>
<name>Jiri Olsa</name>
<email>jolsa@kernel.org</email>
</author>
<published>2017-07-03T14:50:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5ced95b2374b0fb3c1d0367c6e8cf82d41292990'/>
<id>urn:sha1:5ced95b2374b0fb3c1d0367c6e8cf82d41292990</id>
<content type='text'>
There's an event open fallback which set exclude_kernel=1 in case use
does not have enough privileges. Adding both 0|1 for this attribute,
because we don't know what value it is.

Signed-off-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
Cc: David Ahern &lt;dsahern@gmail.com&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Thomas Richter &lt;tmricht@linux.vnet.ibm.com&gt;
Link: http://lkml.kernel.org/r/20170703145030.12903-7-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf tests: Fix attr tests</title>
<updated>2015-04-08T13:49:53Z</updated>
<author>
<name>Jiri Olsa</name>
<email>jolsa@redhat.com</email>
</author>
<published>2015-04-07T17:17:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=54a50f93eb13ab5efa7366627534e2b0f7caa8e5'/>
<id>urn:sha1:54a50f93eb13ab5efa7366627534e2b0f7caa8e5</id>
<content type='text'>
Following commit:
  1a5941312414 perf: Add wakeup watermark control to the AUX area

enlarged perf_event_attr, but did not updated attr tests.

Reported-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Signed-off-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
Cc: "H. Peter Anvin" &lt;hpa@zytor.com&gt;
Cc: Adrian Hunter &lt;adrian.hunter@intel.com&gt;
Cc: Alexander Shishkin &lt;alexander.shishkin@linux.intel.com&gt;
Cc: Borislav Petkov &lt;bp@alien8.de&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Kaixu Xia &lt;kaixu.xia@linaro.org&gt;
Cc: Kan Liang &lt;kan.liang@intel.com&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Mike Galbraith &lt;efault@gmx.de&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Robert Richter &lt;rric@kernel.org&gt;
Cc: Stephane Eranian &lt;eranian@google.com&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Markus T Metzger &lt;markus.t.metzger@intel.com&gt;
Cc: Mathieu Poirier &lt;mathieu.poirier@linaro.org&gt;
Link: http://lkml.kernel.org/n/20150407171715.GA22603@krava.redhat.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf tests: Fix attr tests size values to cope with machine state on interrupt ABI changes</title>
<updated>2014-12-09T14:02:43Z</updated>
<author>
<name>Jiri Olsa</name>
<email>jolsa@redhat.com</email>
</author>
<published>2014-12-09T13:53:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=75226c577c8869ae1449cf92d781edda0177f1cf'/>
<id>urn:sha1:75226c577c8869ae1449cf92d781edda0177f1cf</id>
<content type='text'>
Following change adjusted 'struct perf_event_attr', but let
the attr test's sizes untouched:
  60e2364e60e8 perf: Add ability to sample machine state on interrupt

  [jolsa@krava perf]$ ./perf test attr -vv
  --- start ---
  test child forked, pid 9719
  running './tests/attr/test-stat-group1'
    'PERF_TEST_ATTR=/tmp/tmp4drvul ./perf stat -o /tmp/tmp4drvul/perf.data -e '{cycles,instructions}' kill &gt;/dev/null 2&gt;&amp;1' ret 1
  expected size=96, got 104
  FAILED './tests/attr/test-stat-group1' - match failure

Adjusting test size values for attr test.

Reported-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Signed-off-by: Jiri Olsa &lt;jolsa@redhat.com&gt;
Cc: Andi Kleen &lt;ak@linux.intel.com&gt;
Cc: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Stephane Eranian &lt;eranian@google.com&gt;
Link: http://lkml.kernel.org/r/20141209135301.GC6784@krava.brq.redhat.com
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
</content>
</entry>
<entry>
<title>perf tests: Update attr test with PERF_FLAG_FD_CLOEXEC flag</title>
<updated>2014-07-18T07:09:53Z</updated>
<author>
<name>Jiri Olsa</name>
<email>jolsa@kernel.org</email>
</author>
<published>2014-07-14T06:50:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fb578179a54553716afb0666a4d8c194acd313ba'/>
<id>urn:sha1:fb578179a54553716afb0666a4d8c194acd313ba</id>
<content type='text'>
We not support PERF_FLAG_FD_CLOEXEC flag, updating attr tests
accordingly.

Cc: Arnaldo Carvalho de Melo &lt;acme@kernel.org&gt;
Cc: Corey Ashford &lt;cjashfor@linux.vnet.ibm.com&gt;
Cc: David Ahern &lt;dsahern@gmail.com&gt;
Cc: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
Cc: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Namhyung Kim &lt;namhyung@kernel.org&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Link: http://lkml.kernel.org/n/tip-2mgzn5p9u74drmdmxo5unar0@git.kernel.org
Signed-off-by: Jiri Olsa &lt;jolsa@kernel.org&gt;
</content>
</entry>
</feed>
