From 032db28e5fa3594dfa3df585c54d8b612657f537 Mon Sep 17 00:00:00 2001 From: Jiri Olsa Date: Mon, 12 Mar 2018 14:45:48 +0100 Subject: 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 Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Frederic Weisbecker Cc: Hari Bathini Cc: Jin Yao Cc: Jiri Olsa Cc: Kan Liang Cc: Linus Torvalds Cc: Michael Ellerman Cc: Milind Chabbi Cc: Namhyung Kim Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Sukadev Bhattiprolu Cc: Thomas Gleixner Cc: Will Deacon Link: http://lkml.kernel.org/r/20180312134548.31532-9-jolsa@kernel.org Signed-off-by: Ingo Molnar --- tools/perf/tests/builtin-test.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tools/perf/tests/builtin-test.c') 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 @@ -115,6 +115,10 @@ static struct test generic_tests[] = { .func = test__bp_signal_overflow, .is_supported = test__bp_signal_is_supported, }, + { + .desc = "Breakpoint accounting", + .func = test__bp_accounting, + }, { .desc = "Number of exit events of a simple workload", .func = test__task_exit, -- cgit v1.2.3