summaryrefslogtreecommitdiff
path: root/tools/perf/tests/builtin-test.c
diff options
context:
space:
mode:
authorRavi Bangoria <ravi.bangoria@linux.ibm.com>2018-09-12 11:42:29 +0530
committerArnaldo Carvalho de Melo <acme@redhat.com>2018-09-18 17:21:13 -0300
commit2e85d5979e8d2866db6185de231461b21159ef6f (patch)
treee4c3b216d88b59c58b0da9f10e665a921078ba83 /tools/perf/tests/builtin-test.c
parent1627314fb54a33ebd23bd08f2e215eaed0f44712 (diff)
perf test: Add watchpoint test
We don't have a 'perf test' entry available to test the watchpoint functionality. Add a simple set of tests: - Read only watchpoint - Write only watchpoint - Read / Write watchpoint - Runtime watchpoint modification Ex.: on powerpc: $ sudo perf test 22 22: Watchpoint : 22.1: Read Only Watchpoint : Ok 22.2: Write Only Watchpoint : Ok 22.3: Read / Write Watchpoint : Ok 22.4: Modify Watchpoint : Ok Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com> Acked-by: Jiri Olsa <jolsa@kernel.org> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Hendrik Brueckner <brueckner@linux.ibm.com> Cc: Kate Stewart <kstewart@linuxfoundation.org> Cc: Kim Phillips <kim.phillips@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com> Cc: Sandipan Das <sandipan@linux.ibm.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Thomas Richter <tmricht@linux.ibm.com> Link: http://lkml.kernel.org/r/20180912061229.22832-1-ravi.bangoria@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/tests/builtin-test.c')
-rw-r--r--tools/perf/tests/builtin-test.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/perf/tests/builtin-test.c b/tools/perf/tests/builtin-test.c
index d7a5e1b9aa6f..54ca7d87236f 100644
--- a/tools/perf/tests/builtin-test.c
+++ b/tools/perf/tests/builtin-test.c
@@ -121,6 +121,15 @@ static struct test generic_tests[] = {
.is_supported = test__bp_signal_is_supported,
},
{
+ .desc = "Watchpoint",
+ .func = test__wp,
+ .subtest = {
+ .skip_if_fail = false,
+ .get_nr = test__wp_subtest_get_nr,
+ .get_desc = test__wp_subtest_get_desc,
+ },
+ },
+ {
.desc = "Number of exit events of a simple workload",
.func = test__task_exit,
},