diff options
| author | Michael Ellerman <michael@ellerman.id.au> | 2013-08-06 03:42:37 -0400 |
|---|---|---|
| committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-08-14 00:57:10 -0400 |
| commit | cb96143defbd5516c351595d56b608ed915b525e (patch) | |
| tree | 427dc6a4231f1c3b1ed9f7a327676223487d2b07 /tools/testing/selftests/powerpc/pmu/Makefile | |
| parent | 2fae0d7ced53ef2e7b4d87d84986ec3ff7cf798f (diff) | |
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>
Diffstat (limited to 'tools/testing/selftests/powerpc/pmu/Makefile')
| -rw-r--r-- | tools/testing/selftests/powerpc/pmu/Makefile | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tools/testing/selftests/powerpc/pmu/Makefile b/tools/testing/selftests/powerpc/pmu/Makefile new file mode 100644 index 000000000000..7216f0091655 --- /dev/null +++ b/tools/testing/selftests/powerpc/pmu/Makefile | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | noarg: | ||
| 2 | $(MAKE) -C ../ | ||
| 3 | |||
| 4 | PROGS := count_instructions | ||
| 5 | EXTRA_SOURCES := ../harness.c event.c | ||
| 6 | |||
| 7 | all: $(PROGS) | ||
| 8 | |||
| 9 | $(PROGS): $(EXTRA_SOURCES) | ||
| 10 | |||
| 11 | # loop.S can only be built 64-bit | ||
| 12 | count_instructions: loop.S count_instructions.c $(EXTRA_SOURCES) | ||
| 13 | $(CC) $(CFLAGS) -m64 -o $@ $^ | ||
| 14 | |||
| 15 | run_tests: all | ||
| 16 | @-for PROG in $(PROGS); do \ | ||
| 17 | ./$$PROG; \ | ||
| 18 | done; | ||
| 19 | |||
| 20 | clean: | ||
| 21 | rm -f $(PROGS) loop.o | ||
| 22 | |||
| 23 | .PHONY: all run_tests clean | ||
