Skip to contentSkip to conversation

perf test: S390 does not support watchpoints in test 22

PATCH Applied Thomas Richter 4 participants 5 messages Sep 28, 2018 – Oct 9, 2018 perf events

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 perf test: S390 does not support watchpoints in test 22

S390 does not support the perf_event_open system call for attribute type PERF_TYPE_BREAKPOINT. This results in test failure for test 22:

[root@s8360046 perf]# ./perf test 22

22: Watchpoint                                :
22.1: Read Only Watchpoint                    : FAILED!
22.2: Write Only Watchpoint                   : FAILED!
22.3: Read / Write Watchpoint                 : FAILED!
22.4: Modify Watchpoint                       : FAILED!

[root@s8360046 perf]#

Add s390 support to avoid these tests being executed on s390 platform:

[root@s8360046 perf]# ./perf test 22
[root@s8360046 perf]# ./perf test -v 22
22: Watchpoint : Disabled
[root@s8360046 perf]#

---
 tools/perf/tests/builtin-test.c |  1 +
 tools/perf/tests/tests.h        |  1 +
 tools/perf/tests/wp.c           | 12 ++++++++++++
 3 files changed, 14 insertions(+)
tools/perf/tests/builtin-test.c +1 -0
index 54ca7d87236f..12c09e0ece71 100644
@@ -123,6 +123,7 @@ static struct test generic_tests[] = {
 	{
 		.desc = "Watchpoint",
 		.func = test__wp,
+		.is_supported = test__wp_is_supported,
 		.subtest = {
 			.skip_if_fail	= false,
 			.get_nr		= test__wp_subtest_get_nr,
tools/perf/tests/tests.h +1 -0
index 8e26a4148f30..b82f55fcc294 100644
@@ -109,6 +109,7 @@ int test__unit_number__scnprint(struct test *test, int subtest);
 int test__mem2node(struct test *t, int subtest);
 
 bool test__bp_signal_is_supported(void);
+bool test__wp_is_supported(void);
 
 #if defined(__arm__) || defined(__aarch64__)
 #ifdef HAVE_DWARF_UNWIND_SUPPORT
tools/perf/tests/wp.c +12 -0
index 017a99317f94..f89e6806557b 100644
@@ -227,3 +227,15 @@ int test__wp(struct test *test __maybe_unused, int i)
 
 	return !wp_testcase_table[i].target_func() ? TEST_OK : TEST_FAIL;
 }
+
+/* The s390 so far does not have support for
+ * instruction breakpoint using the perf_event_open() system call.
+ */
+bool test__wp_is_supported(void)
+{
+#if defined(__s390x__)
+	return false;
+#else
+	return true;
+#endif
+}
Signature · 1 line
2.17.0
Acked-by on v3 1/1
#1 lore raw
Quoted 15 lines · Thomas Richter

S390 does not support the perf_event_open system call for attribute type PERF_TYPE_BREAKPOINT. This results in test failure for test 22:

[root@s8360046 perf]# ./perf test 22

22: Watchpoint                                :
22.1: Read Only Watchpoint                    : FAILED!
22.2: Write Only Watchpoint                   : FAILED!
22.3: Read / Write Watchpoint                 : FAILED!
22.4: Modify Watchpoint                       : FAILED!

[root@s8360046 perf]#

Add s390 support to avoid these tests being executed on s390 platform:

Quoted 6 lines

[root@s8360046 perf]# ./perf test 22
[root@s8360046 perf]# ./perf test -v 22
22: Watchpoint : Disabled
[root@s8360046 perf]#

Thanks,
Ravi

maintainer Applied
#2 lore raw

Em Fri, Sep 28, 2018 at 04:43:06PM +0530, Ravi Bangoria escreveu:

Quoted 18 lines · Thomas Richter
Quoted 15 lines

S390 does not support the perf_event_open system call for attribute type PERF_TYPE_BREAKPOINT. This results in test failure for test 22:

[root@s8360046 perf]# ./perf test 22

22: Watchpoint                                :
22.1: Read Only Watchpoint                    : FAILED!
22.2: Write Only Watchpoint                   : FAILED!
22.3: Read / Write Watchpoint                 : FAILED!
22.4: Modify Watchpoint                       : FAILED!

[root@s8360046 perf]#

Add s390 support to avoid these tests being executed on s390 platform:

Quoted 8 lines
Quoted 6 lines

[root@s8360046 perf]# ./perf test 22
[root@s8360046 perf]# ./perf test -v 22
22: Watchpoint : Disabled
[root@s8360046 perf]#

Thanks, applied.

- Arnaldo

#3 lore raw
In reply to Ravi Bangoria

Em Fri, Sep 28, 2018 at 04:43:06PM +0530, Ravi Bangoria escreveu:

Quoted 16 lines · Thomas Richter
Quoted 14 lines

S390 does not support the perf_event_open system call for attribute type PERF_TYPE_BREAKPOINT. This results in test failure for test 22:

[root@s8360046 perf]# ./perf test 22

22: Watchpoint                                :
22.1: Read Only Watchpoint                    : FAILED!
22.2: Write Only Watchpoint                   : FAILED!
22.3: Read / Write Watchpoint                 : FAILED!
22.4: Modify Watchpoint                       : FAILED!

[root@s8360046 perf]#

Add s390 support to avoid these tests being executed on s390 platform:

Quoted 8 lines
Quoted 6 lines

[root@s8360046 perf]# ./perf test 22
[root@s8360046 perf]# ./perf test -v 22
22: Watchpoint : Disabled
[root@s8360046 perf]#

Thanks, applying.

Just one nit, in cases like this I think a Reviewed-by tag fits better than a Acked-by, as per Documentation/process/submitting-patches.rst:

--------------

Reviewed-by:, instead, indicates that the patch has been reviewed and found acceptable according to the Reviewer's Statement:

Reviewer's statement of oversight
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

By offering my Reviewed-by: tag, I state that:

(a) I have carried out a technical review of this patch to evaluate its appropriateness and readiness for inclusion into the mainline kernel.

(b) Any problems, concerns, or questions relating to the patch have been communicated back to the submitter. I am satisfied with the submitter's response to my comments.

(c) While there may be things that could be improved with this submission, I believe that it is, at this time, (1) a worthwhile modification to the kernel, and (2) free of known issues which would argue against its inclusion.

(d) While I have reviewed the patch and believe it to be sound, I do not (unless explicitly stated elsewhere) make any warranties or guarantees that it will achieve its stated purpose or function properly in any given situation.

A Reviewed-by tag is a statement of opinion that the patch is an appropriate modification of the kernel without any remaining serious technical issues. Any interested reviewer (who has done the work) can offer a Reviewed-by tag for a patch. This tag serves to give credit to reviewers and to inform maintainers of the degree of review which has been done on the patch. Reviewed-by: tags, when supplied by reviewers known to understand the subject area and to perform thorough reviews, will normally increase the likelihood of your patch getting into the kernel.

----------

While an Acked-by conveys just some quick look was performed, and in this case you did what Reviewed-by signifies, I think.

I'm tentatively converting this Acked-by to a Reviewed-by, please let me know if you disagree,

Thanks a lot!

- Arnaldo

#4 lore raw
In reply to Thomas Richter
perf test: S390 does not support watchpoints in test 22
Commit-ID:  0e24147d69c9357b1ccb54a9bc028eb9a9f9ed1a
Gitweb:     https://git.kernel.org/tip/0e24147d69c9357b1ccb54a9bc028eb9a9f9ed1a
Author:     Thomas Richter <[email protected]>
AuthorDate: Fri, 28 Sep 2018 12:53:35 +0200
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Mon, 8 Oct 2018 14:23:44 -0300

perf test: S390 does not support watchpoints in test 22

S390 does not support the perf_event_open system call for attribute type PERF_TYPE_BREAKPOINT. This results in test failure for test 22:

[root@s8360046 perf]# ./perf test 22

  22: Watchpoint                                :
  22.1: Read Only Watchpoint                    : FAILED!
  22.2: Write Only Watchpoint                   : FAILED!
  22.3: Read / Write Watchpoint                 : FAILED!
  22.4: Modify Watchpoint                       : FAILED!

[root@s8360046 perf]#

Add s390 support to avoid these tests being executed on s390 platform:

[root@s8360046 perf]# ./perf test 22
[root@s8360046 perf]# ./perf test -v 22
22: Watchpoint : Disabled
[root@s8360046 perf]#

---
 tools/perf/tests/builtin-test.c |  1 +
 tools/perf/tests/tests.h        |  1 +
 tools/perf/tests/wp.c           | 12 ++++++++++++
 3 files changed, 14 insertions(+)
tools/perf/tests/builtin-test.c +1 -0
index 54ca7d87236f..12c09e0ece71 100644
@@ -123,6 +123,7 @@ static struct test generic_tests[] = {
 	{
 		.desc = "Watchpoint",
 		.func = test__wp,
+		.is_supported = test__wp_is_supported,
 		.subtest = {
 			.skip_if_fail	= false,
 			.get_nr		= test__wp_subtest_get_nr,
tools/perf/tests/tests.h +1 -0
index 8e26a4148f30..b82f55fcc294 100644
@@ -109,6 +109,7 @@ int test__unit_number__scnprint(struct test *test, int subtest);
 int test__mem2node(struct test *t, int subtest);
 
 bool test__bp_signal_is_supported(void);
+bool test__wp_is_supported(void);
 
 #if defined(__arm__) || defined(__aarch64__)
 #ifdef HAVE_DWARF_UNWIND_SUPPORT
tools/perf/tests/wp.c +12 -0
index 017a99317f94..f89e6806557b 100644
@@ -227,3 +227,15 @@ int test__wp(struct test *test __maybe_unused, int i)
 
 	return !wp_testcase_table[i].target_func() ? TEST_OK : TEST_FAIL;
 }
+
+/* The s390 so far does not have support for
+ * instruction breakpoint using the perf_event_open() system call.
+ */
+bool test__wp_is_supported(void)
+{
+#if defined(__s390x__)
+	return false;
+#else
+	return true;
+#endif
+}