selftests: Add test of PMU instruction counting on powerpc
authorMichael Ellerman <michael@ellerman.id.au>
Tue, 6 Aug 2013 07:42:37 +0000 (17:42 +1000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 14 Aug 2013 04:57:10 +0000 (14:57 +1000)
commitcb96143defbd5516c351595d56b608ed915b525e
tree427dc6a4231f1c3b1ed9f7a327676223487d2b07
parent2fae0d7ced53ef2e7b4d87d84986ec3ff7cf798f
selftests: Add test of PMU instruction counting on powerpc

This commit adds a test of instruction counting using the PMU on powerpc.

Although the bulk of the code is architecture agnostic, the code needs to
run a precisely sized loop which is implemented in assembler.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
tools/testing/selftests/powerpc/Makefile
tools/testing/selftests/powerpc/pmu/Makefile [new file with mode: 0644]
tools/testing/selftests/powerpc/pmu/count_instructions.c [new file with mode: 0644]
tools/testing/selftests/powerpc/pmu/event.c [new file with mode: 0644]
tools/testing/selftests/powerpc/pmu/event.h [new file with mode: 0644]
tools/testing/selftests/powerpc/pmu/loop.S [new file with mode: 0644]