[llvm-commits] CVS: poolalloc/test/TEST.perf.Makefile TEST.strace.Makefile
John Criswell
criswell at cs.uiuc.edu
Wed Mar 3 21:57:01 PST 2004
Changes in directory poolalloc/test:
TEST.perf.Makefile added (r1.1)
TEST.strace.Makefile added (r1.1)
---
Log message:
Makefiles for collecting strace and perfctr/perfex information on
pool allocated code.
Note that these were hacked from TEST.pavtl.Makefile and generate
statistics files were are not correct (I'll fix that at some point).
---
Diffs of the changes: (+182 -0)
Index: poolalloc/test/TEST.perf.Makefile
diff -c /dev/null poolalloc/test/TEST.perf.Makefile:1.1
*** /dev/null Wed Mar 3 21:56:06 2004
--- poolalloc/test/TEST.perf.Makefile Wed Mar 3 21:55:55 2004
***************
*** 0 ****
--- 1,101 ----
+ ##===- test/Programs/TEST.vtl.Makefile ---------------------*- Makefile -*-===##
+ #
+ # Makefile for getting performance metrics using Intel's VTune.
+ #
+ ##===----------------------------------------------------------------------===##
+
+ TESTNAME = $*
+ CURDIR := $(shell cd .; pwd)
+ PROGDIR := $(shell cd $(LEVEL)/test/Programs; pwd)/
+ RELDIR := $(subst $(PROGDIR),,$(CURDIR))
+
+ PERFEX := /home/vadve/criswell/local/Linux/bin/perfex
+
+ #
+ # Events for the AMD processors
+ #
+ AMD_EVENTS := -e0x1f430044 -e 0x00410041 -e 0x00410040
+
+ EVENTS := $(AMD_EVENTS)
+
+ #
+ # Once the results are generated, create files containing each individiual
+ # piece of performance information.
+ #
+
+ # AMD Events
+ ifeq ($(EVENTS),$(AMD_EVENTS))
+ $(PROGRAMS_TO_TEST:%=Output/$(TEST).L2cachemisses.%): \
+ Output/$(TEST).L2cachemisses.%: Output/test.$(TEST).%
+ grep "Output/$*.cbe" $< | grep "Cache Read Misses" | awk '{print $$(NF-1)}' > $@
+
+ $(PROGRAMS_TO_TEST:%=Output/$(TEST).L2cachemisses.pa.%): \
+ Output/$(TEST).L2cachemisses.pa.%: Output/test.$(TEST).pa.%
+ grep "Output/$*.poolalloc.cbe" $< | grep "Cache Read Misses" | awk '{print $$(NF-1)}' > $@
+
+ $(PROGRAMS_TO_TEST:%=Output/$(TEST).L2cacherefs.%): \
+ Output/$(TEST).L2cacherefs.%: Output/test.$(TEST).%
+ grep "Output/$*.cbe" $< | grep "Cache Read References" | awk '{print $$(NF-1)}' > $@
+
+ $(PROGRAMS_TO_TEST:%=Output/$(TEST).L2cacherefs.pa.%): \
+ Output/$(TEST).L2cacherefs.pa.%: Output/test.$(TEST).pa.%
+ grep "Output/$*.poolalloc.cbe" $< | grep "Cache Read References" | awk '{print $$(NF-1)}' > $@
+ endif
+
+ # Pentium 3 Events
+ ifeq ($(EVENTS),$(P3_EVENTS))
+ $(PROGRAMS_TO_TEST:%=Output/$(TEST).L2cachemisses.%): \
+ Output/$(TEST).L2cachemisses.%: Output/test.$(TEST).%
+ grep "Output/$*.cbe" $< | grep " L2 Cache Request Misses" | awk '{print $$(NF-1)}' > $@
+
+ $(PROGRAMS_TO_TEST:%=Output/$(TEST).L2cachemisses.pa.%): \
+ Output/$(TEST).L2cachemisses.pa.%: Output/test.$(TEST).pa.%
+ grep "Output/$*.poolalloc.cbe" $< | grep " L2 Cache Request Misses" | awk '{print $$(NF-1)}' > $@
+ endif
+
+ #
+ # Generate events for Pool Allocated CBE
+ #
+ $(PROGRAMS_TO_TEST:%=Output/test.$(TEST).pa.%): \
+ Output/test.$(TEST).pa.%: Output/%.poolalloc.cbe Output/test.$(TEST).%
+ @echo "========================================="
+ @echo "Running '$(TEST)' test on '$(TESTNAME)' program"
+ ifeq ($(RUN_OPTIONS),)
+ $(VERB) cat $(STDIN_FILENAME) | $(PERFEX) -o $@ $(EVENTS) $<
+ else
+ $(VERB) cat $(STDIN_FILENAME) | $(PERFEX) -o $@ $(EVENTS) $< $(RUN_OPTIONS)
+ endif
+
+ #
+ # Generate events for CBE
+ #
+ $(PROGRAMS_TO_TEST:%=Output/test.$(TEST).%): \
+ Output/test.$(TEST).%: Output/%.cbe
+ @echo "========================================="
+ @echo "Running '$(TEST)' test on '$(TESTNAME)' program"
+ ifeq ($(RUN_OPTIONS),)
+ $(VERB) cat $(STDIN_FILENAME) | $(PERFEX) -o $@ $(EVENTS) $<
+ else
+ $(VERB) cat $(STDIN_FILENAME) | $(PERFEX) -o $@ $(EVENTS) $< $(RUN_OPTIONS)
+ endif
+
+
+ $(PROGRAMS_TO_TEST:%=Output/%.$(TEST).report.txt): \
+ Output/%.$(TEST).report.txt: $(PROGRAMS_TO_TEST:%=Output/$(TEST).L2cachemisses.%) \
+ $(PROGRAMS_TO_TEST:%=Output/$(TEST).L2cachemisses.pa.%) \
+ $(PROGRAMS_TO_TEST:%=Output/$(TEST).L2cacherefs.%) \
+ $(PROGRAMS_TO_TEST:%=Output/$(TEST).L2cacherefs.pa.%)
+ @echo > $@
+ @echo CBE-PA-L2-Misses `cat Output/$(TEST).L2cachemisses.pa.$*`
+ @echo CBE-PA-L2-Refs `cat Output/$(TEST).L2cacherefs.pa.$*`
+ @echo CBE-L2-Misses `cat Output/$(TEST).L2cachemisses.$*`
+ @echo CBE-L2-Refs `cat Output/$(TEST).L2cacherefs.$*`
+
+
+ $(PROGRAMS_TO_TEST:%=test.$(TEST).%): \
+ test.$(TEST).%: Output/%.$(TEST).report.txt
+ @echo "---------------------------------------------------------------"
+ @echo ">>> ========= '$(RELDIR)/$*' Program"
+ @echo "---------------------------------------------------------------"
+ @cat $<
+
Index: poolalloc/test/TEST.strace.Makefile
diff -c /dev/null poolalloc/test/TEST.strace.Makefile:1.1
*** /dev/null Wed Mar 3 21:56:06 2004
--- poolalloc/test/TEST.strace.Makefile Wed Mar 3 21:55:55 2004
***************
*** 0 ****
--- 1,81 ----
+ ##===- test/Programs/TEST.vtl.Makefile ---------------------*- Makefile -*-===##
+ #
+ # Makefile for getting performance metrics using Intel's VTune.
+ #
+ ##===----------------------------------------------------------------------===##
+
+ TESTNAME = $*
+ CURDIR := $(shell cd .; pwd)
+ PROGDIR := $(shell cd $(LEVEL)/test/Programs; pwd)/
+ RELDIR := $(subst $(PROGDIR),,$(CURDIR))
+
+ STRACE := strace -c -f
+
+ #
+ # Once the results are generated, create files containing each individiual
+ # piece of performance information.
+ #
+
+ # AMD Events
+ $(PROGRAMS_TO_TEST:%=Output/$(TEST).L2cachemisses.%): \
+ Output/$(TEST).L2cachemisses.%: Output/test.$(TEST).%
+ grep "Output/$*.cbe" $< | grep "Cache Read Misses" | awk '{print $$(NF-1)}' > $@
+
+ $(PROGRAMS_TO_TEST:%=Output/$(TEST).L2cachemisses.pa.%): \
+ Output/$(TEST).L2cachemisses.pa.%: Output/test.$(TEST).pa.%
+ grep "Output/$*.poolalloc.cbe" $< | grep "Cache Read Misses" | awk '{print $$(NF-1)}' > $@
+
+ $(PROGRAMS_TO_TEST:%=Output/$(TEST).L2cacherefs.%): \
+ Output/$(TEST).L2cacherefs.%: Output/test.$(TEST).%
+ grep "Output/$*.cbe" $< | grep "Cache Read References" | awk '{print $$(NF-1)}' > $@
+
+ $(PROGRAMS_TO_TEST:%=Output/$(TEST).L2cacherefs.pa.%): \
+ Output/$(TEST).L2cacherefs.pa.%: Output/test.$(TEST).pa.%
+ grep "Output/$*.poolalloc.cbe" $< | grep "Cache Read References" | awk '{print $$(NF-1)}' > $@
+
+ #
+ # Generate events for Pool Allocated CBE
+ #
+ $(PROGRAMS_TO_TEST:%=Output/test.$(TEST).pa.%): \
+ Output/test.$(TEST).pa.%: Output/%.poolalloc.cbe Output/test.$(TEST).%
+ @echo "========================================="
+ @echo "Running '$(TEST)' test on '$(TESTNAME)' program"
+ ifeq ($(RUN_OPTIONS),)
+ $(VERB) cat $(STDIN_FILENAME) | $(STRACE) -o $@ $<
+ else
+ $(VERB) cat $(STDIN_FILENAME) | $(STRACE) -o $@ $< $(RUN_OPTIONS)
+ endif
+
+ #
+ # Generate events for CBE
+ #
+ $(PROGRAMS_TO_TEST:%=Output/test.$(TEST).%): \
+ Output/test.$(TEST).%: Output/%.cbe
+ @echo "========================================="
+ @echo "Running '$(TEST)' test on '$(TESTNAME)' program"
+ ifeq ($(RUN_OPTIONS),)
+ $(VERB) cat $(STDIN_FILENAME) | $(STRACE) -o $@ $<
+ else
+ $(VERB) cat $(STDIN_FILENAME) | $(STRACE) -o $@ $< $(RUN_OPTIONS)
+ endif
+
+
+ $(PROGRAMS_TO_TEST:%=Output/%.$(TEST).report.txt): \
+ Output/%.$(TEST).report.txt: $(PROGRAMS_TO_TEST:%=Output/$(TEST).L2cachemisses.%) \
+ $(PROGRAMS_TO_TEST:%=Output/$(TEST).L2cachemisses.pa.%) \
+ $(PROGRAMS_TO_TEST:%=Output/$(TEST).L2cacherefs.%) \
+ $(PROGRAMS_TO_TEST:%=Output/$(TEST).L2cacherefs.pa.%)
+ @echo > $@
+ @echo CBE-PA-L2-Misses `cat Output/$(TEST).L2cachemisses.pa.$*`
+ @echo CBE-PA-L2-Refs `cat Output/$(TEST).L2cacherefs.pa.$*`
+ @echo CBE-L2-Misses `cat Output/$(TEST).L2cachemisses.$*`
+ @echo CBE-L2-Refs `cat Output/$(TEST).L2cacherefs.$*`
+
+
+ $(PROGRAMS_TO_TEST:%=test.$(TEST).%): \
+ test.$(TEST).%: Output/%.$(TEST).report.txt
+ @echo "---------------------------------------------------------------"
+ @echo ">>> ========= '$(RELDIR)/$*' Program"
+ @echo "---------------------------------------------------------------"
+ @cat $<
+
More information about the llvm-commits
mailing list