[PATCH 2/3] selftests/powerpc: Count more instructions

Michael Ellerman mpe at ellerman.id.au
Mon Jul 21 14:34:41 EST 2014


Although we expect some small discrepancies for very large counts, we
seem to be able to count up to 64G instructions without too much skew, so
do so.

Signed-off-by: Michael Ellerman <mpe at ellerman.id.au>
---
 tools/testing/selftests/powerpc/pmu/count_instructions.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tools/testing/selftests/powerpc/pmu/count_instructions.c b/tools/testing/selftests/powerpc/pmu/count_instructions.c
index 5e241e14f204..56572f0b1eb2 100644
--- a/tools/testing/selftests/powerpc/pmu/count_instructions.c
+++ b/tools/testing/selftests/powerpc/pmu/count_instructions.c
@@ -124,6 +124,12 @@ static int test_body(void)
 	/* Run for 1G instructions */
 	FAIL_IF(do_count_loop(events, 0x40000000, overhead, true));
 
+	/* Run for 16G instructions */
+	FAIL_IF(do_count_loop(events, 0x400000000, overhead, true));
+
+	/* Run for 64G instructions */
+	FAIL_IF(do_count_loop(events, 0x1000000000, overhead, true));
+
 	event_close(&events[0]);
 	event_close(&events[1]);
 
-- 
1.9.1



More information about the Linuxppc-dev mailing list