Adrian Hunter
98dcf14d7f
perf tools: Add kernel AUX area sampling definitions
...
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 <[email protected] >
Tested-by: Arnaldo Carvalho de Melo <[email protected] >
Cc: Jiri Olsa <[email protected] >
Link: http://lore.kernel.org/lkml/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2019-11-21 10:54:20 -03:00
Jiri Olsa
b78e92e607
perf tests attr: Fix stat sample_type setup
...
>From following commit:
commit 4979d0c7d0 ("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 <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Thomas Richter <[email protected] >
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2017-07-18 23:14:21 -03:00
Jiri Olsa
5ced95b237
perf tests attr: Add 1s for exclude_kernel and task base bits
...
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 <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Thomas Richter <[email protected] >
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2017-07-18 23:14:17 -03:00
Jiri Olsa
54a50f93eb
perf tests: Fix attr tests
...
Following commit:
1a59413124 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 <[email protected] >
Signed-off-by: Jiri Olsa <[email protected] >
Cc: "H. Peter Anvin" <[email protected] >
Cc: Adrian Hunter <[email protected] >
Cc: Alexander Shishkin <[email protected] >
Cc: Borislav Petkov <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Kaixu Xia <[email protected] >
Cc: Kan Liang <[email protected] >
Cc: Linus Torvalds <[email protected] >
Cc: Mike Galbraith <[email protected] >
Cc: Paul Mackerras <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Robert Richter <[email protected] >
Cc: Stephane Eranian <[email protected] >
Cc: Thomas Gleixner <[email protected] >
Cc: Markus T Metzger <[email protected] >
Cc: Mathieu Poirier <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2015-04-08 10:49:53 -03:00
Jiri Olsa
75226c577c
perf tests: Fix attr tests size values to cope with machine state on interrupt ABI changes
...
Following change adjusted 'struct perf_event_attr', but let
the attr test's sizes untouched:
60e2364e60 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 >/dev/null 2>&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 <[email protected] >
Signed-off-by: Jiri Olsa <[email protected] >
Cc: Andi Kleen <[email protected] >
Cc: Ingo Molnar <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Stephane Eranian <[email protected] >
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2014-12-09 11:02:43 -03:00
Jiri Olsa
fb578179a5
perf tests: Update attr test with PERF_FLAG_FD_CLOEXEC flag
...
We not support PERF_FLAG_FD_CLOEXEC flag, updating attr tests
accordingly.
Cc: Arnaldo Carvalho de Melo <[email protected] >
Cc: Corey Ashford <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Ingo Molnar <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Paul Mackerras <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Jiri Olsa <[email protected] >
2014-07-18 09:09:53 +02:00
Jiri Olsa
66cd3f3a6c
perf tests: Fix exclude_guest|exclude_host checking for attr tests
...
We have a one of the event open fallback case in __perf_evsel__open
where we zero exclude_guest|exclude_host fields.
This means there's no way for attr tests to find out what's the right
value for those fields, so we need to check for both 0 and 1. Luckily we
still have other event parsing tests for those fields.
Signed-off-by: Jiri Olsa <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Ingo Molnar <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Paul Mackerras <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Stephane Eranian <[email protected] >
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2013-05-29 15:15:19 +03:00
Jiri Olsa
c21d0030cf
perf tests: Make attr script test event cpu
...
Make attr script to check for 'cpu' when testing event properties. This
will allow us to check the '-C X' option for both record and stat
commands.
Signed-off-by: Jiri Olsa <[email protected] >
Cc: Corey Ashford <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Ingo Molnar <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Oleg Nesterov <[email protected] >
Cc: Paul Mackerras <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2013-03-15 13:06:00 -03:00
Jiri Olsa
8dfec403e3
perf tests: Removing 'optional' field
...
Since we allow multiple values in event field assignment, there's no
need for 'optional' field.. old version removal leftover.
Adding some comments into attr.py script regarding the test event load.
Signed-off-by: Jiri Olsa <[email protected] >
Cc: Corey Ashford <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Ingo Molnar <[email protected] >
Cc: Paul Mackerras <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2012-11-05 14:03:59 -03:00
Jiri Olsa
45e4089bc6
perf tests: Fix attr watermark field name typo
...
Currently the 'watermark' field is coded as 'watermask'.
As the type is global through the framework and tests, the typo spawned
no error.
Signed-off-by: Jiri Olsa <[email protected] >
Cc: Corey Ashford <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Ingo Molnar <[email protected] >
Cc: Paul Mackerras <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2012-11-05 14:03:59 -03:00
Jiri Olsa
df4c6de857
perf tests: Add missing attr stat basic test
...
Adding test to validate perf_event_attr data for command:
'stat -e cycles'
Reported-by: Namhyung Kim <[email protected] >
Signed-off-by: Jiri Olsa <[email protected] >
Cc: Corey Ashford <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Ingo Molnar <[email protected] >
Cc: Paul Mackerras <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2012-11-05 14:03:59 -03:00