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>
23 lines
391 B
Makefile
23 lines
391 B
Makefile
noarg:
|
|
$(MAKE) -C ../
|
|
|
|
PROGS := count_instructions
|
|
EXTRA_SOURCES := ../harness.c event.c
|
|
|
|
all: $(PROGS)
|
|
|
|
$(PROGS): $(EXTRA_SOURCES)
|
|
|
|
# loop.S can only be built 64-bit
|
|
count_instructions: loop.S count_instructions.c $(EXTRA_SOURCES)
|
|
$(CC) $(CFLAGS) -m64 -o $@ $^
|
|
|
|
run_tests: all
|
|
@-for PROG in $(PROGS); do \
|
|
./$$PROG; \
|
|
done;
|
|
|
|
clean:
|
|
rm -f $(PROGS) loop.o
|
|
|
|
.PHONY: all run_tests clean
|