diff options
author | Jiri Olsa <jolsa@kernel.org> | 2018-03-12 09:45:48 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2018-03-13 10:23:37 -0400 |
commit | 032db28e5fa3594dfa3df585c54d8b612657f537 (patch) | |
tree | c06c3c6a0b83ab43954fca3217a723f98fbb47a6 /tools/perf/tests/builtin-test.c | |
parent | 5f970521d3279d99adcdebf329631e36cb9f0deb (diff) |
perf tests: Add breakpoint accounting/modify test
Adding test that:
- detects the number of watch/break-points,
skip test if any is missing
- detects PERF_EVENT_IOC_MODIFY_ATTRIBUTES ioctl,
skip test if it's missing
- detects if watchpoints and breakpoints share
same slots
- create all possible watchpoints on cpu 0
- change one of it to breakpoint
- in case wp and bp do not share slots,
we create another watchpoint to ensure
the slot accounting is correct
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Hari Bathini <hbathini@linux.vnet.ibm.com>
Cc: Jin Yao <yao.jin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Kan Liang <kan.liang@intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Milind Chabbi <chabbi.milind@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Oleg Nesterov <onestero@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Will Deacon <will.deacon@arm.com>
Link: http://lkml.kernel.org/r/20180312134548.31532-9-jolsa@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/tests/builtin-test.c')
-rw-r--r-- | tools/perf/tests/builtin-test.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/tests/builtin-test.c b/tools/perf/tests/builtin-test.c index fafa014240cd..38bf109ce106 100644 --- a/tools/perf/tests/builtin-test.c +++ b/tools/perf/tests/builtin-test.c | |||
@@ -116,6 +116,10 @@ static struct test generic_tests[] = { | |||
116 | .is_supported = test__bp_signal_is_supported, | 116 | .is_supported = test__bp_signal_is_supported, |
117 | }, | 117 | }, |
118 | { | 118 | { |
119 | .desc = "Breakpoint accounting", | ||
120 | .func = test__bp_accounting, | ||
121 | }, | ||
122 | { | ||
119 | .desc = "Number of exit events of a simple workload", | 123 | .desc = "Number of exit events of a simple workload", |
120 | .func = test__task_exit, | 124 | .func = test__task_exit, |
121 | }, | 125 | }, |