[llvm-commits] CVS: poolalloc/test/TEST.cputrack.Makefile

John Criswell criswell at cs.uiuc.edu
Fri Nov 12 12:09:00 PST 2004



Changes in directory poolalloc/test:

TEST.cputrack.Makefile updated: 1.7 -> 1.8

---
Log message:

Re-did Solaris cache measurements, basing it off of the perfctr changes
Chris made to TEST.perf.Makefile.


---
Diffs of the changes:  (+128 -51)

Index: poolalloc/test/TEST.cputrack.Makefile
diff -u poolalloc/test/TEST.cputrack.Makefile:1.7 poolalloc/test/TEST.cputrack.Makefile:1.8
--- poolalloc/test/TEST.cputrack.Makefile:1.7	Fri Nov  5 12:08:50 2004
+++ poolalloc/test/TEST.cputrack.Makefile	Fri Nov 12 14:08:19 2004
@@ -9,13 +9,18 @@
 PROGDIR := $(shell cd $(LLVM_SRC_ROOT)/projects/llvm-test; pwd)/
 RELDIR  := $(subst $(PROGDIR),,$(CURDIR))
 
-
 #
-# Solaris cputrack command that will sample the counters every 500 ticks.
-# All programs must complete in under 500 ticks (500 seconds by default),
-# and the counters must not wrap around
+# The Solaris cputrack command samples the performance counters every x number
+# of ticks (by default, I believe one tick == 1 second).
+#
+# Use the cputrack command and set the interval to the maximum amount of time
+# that the program is allowed to run.
+#
+# Care must be taken to ensure that the counters do not wrap around.  So
+# far, I don't believe this has happened, as that would require over
+# 4 billion events per execution.
 #
-CPUTRACK       := cputrack -T 500
+CPUTRACK       := cputrack -T $(RUNTIMELIMIT)
 
 #
 # Events for the Ultrasparc IIIi processor.
@@ -38,68 +43,138 @@
 EVENTS_TLB     := -c pic0=EC_rd_miss,pic1=DTLB_miss
 EVENTS_WC      := -c pic0=Cycle_cnt,pic1=WC_miss
 
-#
-# Once the results are generated, create files containing each individiual
-# piece of performance information.
-#
+############################################################################
+# Rules for running the tests
+############################################################################
+
+ifndef PROGRAMS_HAVE_CUSTOM_RUN_RULES
 
 #
 # Generate events for Pool Allocated CBE
 #
-$(PROGRAMS_TO_TEST:%=Output/test.$(TEST).pa.%): \
-Output/test.$(TEST).pa.%: Output/%.poolalloc.cbe Output/test.$(TEST).%
+$(PROGRAMS_TO_TEST:%=Output/$(TEST).pa.%.dcrd): \
+Output/$(TEST).pa.%.dcrd: Output/%.poolalloc.cbe
 	@echo "========================================="
 	@echo "Running '$(TEST)' test on '$(TESTNAME)' program"
-ifeq ($(RUN_OPTIONS),)
-	$(VERB) cat $(STDIN_FILENAME) | $(CPUTRACK) $(EVENTS_DC_RD)   -o $@.dcrd $<
-	$(VERB) cat $(STDIN_FILENAME) | $(CPUTRACK) $(EVENTS_EC_MISS) -o $@.ec $<
-	$(VERB) cat $(STDIN_FILENAME) | $(CPUTRACK) $(EVENTS_WC)      -o $@.wc $<
-else
-	$(VERB) cat $(STDIN_FILENAME) | $(CPUTRACK) $(EVENTS_DC_RD)   -o $@.dcrd $< $(RUN_OPTIONS)
-	$(VERB) cat $(STDIN_FILENAME) | $(CPUTRACK) $(EVENTS_EC_MISS) -o $@.ec $< $(RUN_OPTIONS)
-	$(VERB) cat $(STDIN_FILENAME) | $(CPUTRACK) $(EVENTS_WC)      -o $@.wc $< $(RUN_OPTIONS)
-endif
-	$(VERB) cat $@.dcrd | tail -1 | awk '{print $$4}' > $@.dcrd.total
-	$(VERB) cat $@.dcrd | tail -1 | awk '{print $$5}' > $@.dcrd.misses
-	$(VERB) cat $@.ec   | tail -1 | awk '{print $$4}' > $@.ec.rdmiss
-	$(VERB) cat $@.ec   | tail -1 | awk '{print $$5}' > $@.ec.allmiss
-	$(VERB) cat $@.wc   | tail -1 | awk '{print $$5}' > $@.wc.miss
+	$(VERB) $(CPUTRACK) $(EVENTS_DC_RD)   -o $@ $< $(RUN_OPTIONS) < $(STDIN_FILENAME) > /dev/null 2>&1
+
+
+$(PROGRAMS_TO_TEST:%=Output/$(TEST).pa.%.ec): \
+Output/$(TEST).pa.%.ec: Output/%.poolalloc.cbe
+	@echo "========================================="
+	@echo "Running '$(TEST)' test on '$(TESTNAME)' program"
+	$(VERB) $(CPUTRACK) $(EVENTS_EC_MISS) -o $@ $< $(RUN_OPTIONS) < $(STDIN_FILENAME) > /dev/null 2>&1
+
+$(PROGRAMS_TO_TEST:%=Output/$(TEST).pa.%.wc): \
+Output/$(TEST).pa.%.wc: Output/%.poolalloc.cbe
+	@echo "========================================="
+	@echo "Running '$(TEST)' test on '$(TESTNAME)' program"
+	$(VERB) $(CPUTRACK) $(EVENTS_WC)      -o $@ $< $(RUN_OPTIONS) < $(STDIN_FILENAME) > /dev/null 2>&1
 
 #
 # Generate events for CBE
 #
-$(PROGRAMS_TO_TEST:%=Output/test.$(TEST).%): \
-Output/test.$(TEST).%: Output/%.cbe
+$(PROGRAMS_TO_TEST:%=Output/$(TEST).%.dcrd): \
+Output/$(TEST).%.dcrd: Output/%.nonpa.cbe
+	@echo "========================================="
+	@echo "Running '$(TEST)' test on '$(TESTNAME)' program"
+	$(VERB) $(CPUTRACK) $(EVENTS_DC_RD)   -o $@ $< $(RUN_OPTIONS) < $(STDIN_FILENAME) > /dev/null 2>&1
+
+$(PROGRAMS_TO_TEST:%=Output/$(TEST).%.ec): \
+Output/$(TEST).%.ec: Output/%.nonpa.cbe
 	@echo "========================================="
 	@echo "Running '$(TEST)' test on '$(TESTNAME)' program"
-ifeq ($(RUN_OPTIONS),)
-	$(VERB) cat $(STDIN_FILENAME) | $(CPUTRACK) $(EVENTS_DC_RD) -o $@.dcrd $<
-	$(VERB) cat $(STDIN_FILENAME) | $(CPUTRACK) $(EVENTS_EC_MISS) -o $@.ec $<
-	$(VERB) cat $(STDIN_FILENAME) | $(CPUTRACK) $(EVENTS_WC)      -o $@.wc $<
+	$(VERB) $(CPUTRACK) $(EVENTS_EC_MISS) -o $@ $< $(RUN_OPTIONS) < $(STDIN_FILENAME) > /dev/null 2>&1
+
+$(PROGRAMS_TO_TEST:%=Output/$(TEST).%.wc): \
+Output/$(TEST).%.wc: Output/%.nonpa.cbe
+	@echo "========================================="
+	@echo "Running '$(TEST)' test on '$(TESTNAME)' program"
+	$(VERB) $(CPUTRACK) $(EVENTS_WC)      -o $@ $< $(RUN_OPTIONS) < $(STDIN_FILENAME) > /dev/null 2>&1
+
 else
-	$(VERB) cat $(STDIN_FILENAME) | $(CPUTRACK) $(EVENTS_DC_RD) -o $@.dcrd $< $(RUN_OPTIONS)
-	$(VERB) cat $(STDIN_FILENAME) | $(CPUTRACK) $(EVENTS_EC_MISS) -o $@.ec $< $(RUN_OPTIONS)
-	$(VERB) cat $(STDIN_FILENAME) | $(CPUTRACK) $(EVENTS_WC)      -o $@.wc $< $(RUN_OPTIONS)
+
+# This rule runs the generated executable, generating timing information, for
+# SPEC
+$(PROGRAMS_TO_TEST:%=Output/$(TEST).pa.%.dcrd): \
+Output/$(TEST).pa.%.dcrd: Output/%.poolalloc.cbe
+	-$(SPEC_SANDBOX) poolalloccbe-$(RUN_TYPE) $@.out $(REF_IN_DIR) \
+             $(RUNSAFELY) $(STDIN_FILENAME) $(STDOUT_FILENAME) \
+                  $(CPUTRACK) $(EVENTS_DC_RD)   -o $(BUILD_OBJ_DIR)/$@ $(BUILD_OBJ_DIR)/$< $(RUN_OPTIONS)
+
+
+$(PROGRAMS_TO_TEST:%=Output/$(TEST).pa.%.ec): \
+Output/$(TEST).pa.%.ec: Output/%.poolalloc.cbe
+	-$(SPEC_SANDBOX) poolalloccbe-$(RUN_TYPE) $@.out $(REF_IN_DIR) \
+             $(RUNSAFELY) $(STDIN_FILENAME) $(STDOUT_FILENAME) \
+                  $(CPUTRACK) $(EVENTS_EC_MISS) -o $(BUILD_OBJ_DIR)/$@ $(BUILD_OBJ_DIR)/$< $(RUN_OPTIONS)
+
+$(PROGRAMS_TO_TEST:%=Output/$(TEST).pa.%.wc): \
+Output/$(TEST).pa.%.wc: Output/%.poolalloc.cbe
+	-$(SPEC_SANDBOX) poolalloccbe-$(RUN_TYPE) $@.out $(REF_IN_DIR) \
+             $(RUNSAFELY) $(STDIN_FILENAME) $(STDOUT_FILENAME) \
+                  $(CPUTRACK) $(EVENTS_WC)      -o $(BUILD_OBJ_DIR)/$@ $(BUILD_OBJ_DIR)/$< $(RUN_OPTIONS)
+
+# This rule runs the generated executable, generating timing information, for
+# SPEC
+$(PROGRAMS_TO_TEST:%=Output/$(TEST).%.dcrd): \
+Output/$(TEST).%.dcrd: Output/%.nonpa.cbe
+	-$(SPEC_SANDBOX) nonpacbe-$(RUN_TYPE) $@.out $(REF_IN_DIR) \
+             $(RUNSAFELY) $(STDIN_FILENAME) $(STDOUT_FILENAME) \
+                  $(CPUTRACK) $(EVENTS_DC_RD)   -o $(BUILD_OBJ_DIR)/$@ $(BUILD_OBJ_DIR)/$< $(RUN_OPTIONS)
+
+$(PROGRAMS_TO_TEST:%=Output/$(TEST).%.ec): \
+Output/$(TEST).%.ec: Output/%.nonpa.cbe
+	-$(SPEC_SANDBOX) nonpacbe-$(RUN_TYPE) $@.out $(REF_IN_DIR) \
+             $(RUNSAFELY) $(STDIN_FILENAME) $(STDOUT_FILENAME) \
+                  $(CPUTRACK) $(EVENTS_EC_MISS) -o $(BUILD_OBJ_DIR)/$@ $(BUILD_OBJ_DIR)/$< $(RUN_OPTIONS)
+
+$(PROGRAMS_TO_TEST:%=Output/$(TEST).%.wc): \
+Output/$(TEST).%.wc: Output/%.nonpa.cbe
+	-$(SPEC_SANDBOX) nonpacbe-$(RUN_TYPE) $@.out $(REF_IN_DIR) \
+             $(RUNSAFELY) $(STDIN_FILENAME) $(STDOUT_FILENAME) \
+                  $(CPUTRACK) $(EVENTS_WC)      -o $(BUILD_OBJ_DIR)/$@ $(BUILD_OBJ_DIR)/$< $(RUN_OPTIONS)
 endif
-	$(VERB) cat $@.dcrd | tail -1 | awk '{print $$4}' > $@.dcrd.total
-	$(VERB) cat $@.dcrd | tail -1 | awk '{print $$5}' > $@.dcrd.misses
-	$(VERB) cat $@.ec   | tail -1 | awk '{print $$4}' > $@.ec.rdmiss
-	$(VERB) cat $@.ec   | tail -1 | awk '{print $$5}' > $@.ec.allmiss
-	$(VERB) cat $@.wc   | tail -1 | awk '{print $$5}' > $@.wc.miss
 
+############################################################################
+# Report Targets
+############################################################################
 $(PROGRAMS_TO_TEST:%=Output/%.$(TEST).report.txt): \
-Output/%.$(TEST).report.txt: Output/test.$(TEST).pa.% Output/test.$(TEST).%
-	@printf "CBE-PA-L1-Data-Reads: %d\n" `cat Output/test.$(TEST).pa.$*.dcrd.total` > $@
-	@printf "CBE-PA-L1-Data-Misses: %d\n" `cat Output/test.$(TEST).pa.$*.dcrd.misses` >> $@
-	@printf "CBE-L1-Data-Reads: %d\n" `cat Output/test.$(TEST).$*.dcrd.total` >> $@
-	@printf "CBE-L1-Data-Misses: %d\n" `cat Output/test.$(TEST).$*.dcrd.misses` >> $@
-	@printf "CBE-PA-L2-Data-Read-Misses: %d\n" `cat Output/test.$(TEST).pa.$*.ec.rdmiss` >> $@
-	@printf "CBE-PA-L2-Data-Misses: %d\n" `cat Output/test.$(TEST).pa.$*.ec.allmiss` >> $@
-	@printf "CBE-L2-Data-Read-Misses: %d\n" `cat Output/test.$(TEST).$*.ec.rdmiss` >> $@
-	@printf "CBE-L2-Data-Misses: %d\n" `cat Output/test.$(TEST).$*.ec.allmiss` >> $@
-	@printf "CBE-PA-WriteCache-Misses: %d\n" `cat Output/test.$(TEST).pa.$*.wc.miss` >> $@
-	@printf "CBE-WriteCache-Misses: %d\n" `cat Output/test.$(TEST).$*.wc.miss` >> $@
-	@touch $@
+Output/%.$(TEST).report.txt: \
+                     $(PROGRAMS_TO_TEST:%=Output/$(TEST).%.dcrd)     \
+                     $(PROGRAMS_TO_TEST:%=Output/$(TEST).pa.%.dcrd)     \
+                     $(PROGRAMS_TO_TEST:%=Output/$(TEST).%.wc)     \
+                     $(PROGRAMS_TO_TEST:%=Output/$(TEST).pa.%.wc)     \
+                     $(PROGRAMS_TO_TEST:%=Output/$(TEST).%.ec)     \
+                     $(PROGRAMS_TO_TEST:%=Output/$(TEST).pa.%.ec)     \
+	                   $(PROGRAMS_TO_TEST:%=Output/%.poolalloc.out-cbe.time) \
+                     $(PROGRAMS_TO_TEST:%=Output/%.nonpa.out-cbe.time)
+	@echo "Program:" $* > $@
+	@echo "-------------------------------------------------------------" >> $@
+	@printf "CBE-PA-L1-Data-Reads: " >> $@
+	@cat  Output/$(TEST).pa.$*.dcrd | tail -1 | awk '{print $$4}' >> $@
+	@printf "CBE-PA-L1-Data-Misses: " >> $@
+	@cat  Output/$(TEST).pa.$*.dcrd | tail -1 | awk '{print $$5}' >> $@
+	@printf "CBE-L1-Data-Reads: " >> $@
+	@cat  Output/$(TEST).$*.dcrd | tail -1 | awk '{print $$4}' >> $@
+	@printf "CBE-L1-Data-Misses: " >> $@
+	@cat  Output/$(TEST).$*.dcrd | tail -1 | awk '{print $$5}' >> $@
+	@printf "CBE-PA-WCache-Misses: " >> $@
+	@cat  Output/$(TEST).pa.$*.wc | tail -1 | awk '{print $$5}' >> $@
+	@printf "CBE-WCache-Misses: " >> $@
+	@cat  Output/$(TEST).$*.wc | tail -1 | awk '{print $$5}' >> $@
+	@printf "CBE-PA-L2-Data-Read-Misses: " >> $@
+	@cat  Output/$(TEST).pa.$*.ec | tail -1 | awk '{print $$4}' >> $@
+	@printf "CBE-PA-L2-Data-Misses: " >> $@
+	@cat  Output/$(TEST).pa.$*.ec | tail -1 | awk '{print $$5}' >> $@
+	@printf "CBE-L2-Data-Read-Misses: " >> $@
+	@cat  Output/$(TEST).$*.ec | tail -1 | awk '{print $$4}' >> $@
+	@printf "CBE-L2-Data-Misses: " >> $@
+	@cat  Output/$(TEST).$*.ec | tail -1 | awk '{print $$5}' >> $@
+	@printf "CBE-RUN-TIME: " >> $@
+	@grep "^program" Output/$*.nonpa.out-cbe.time >> $@
+	@printf "CBE-PA-RUN-TIME: " >> $@
+	@grep "^program" Output/$*.poolalloc.out-cbe.time >> $@
 
 $(PROGRAMS_TO_TEST:%=test.$(TEST).%): \
 test.$(TEST).%: Output/%.$(TEST).report.txt
@@ -108,3 +183,5 @@
 	@echo "---------------------------------------------------------------"
 	@cat $<
 
+REPORT_DEPENDENCIES := $(PROGRAMS_TO_TEST:%=Output/%.poolalloc.out-cbe.time) \
+                       $(PROGRAMS_TO_TEST:%=Output/%.nonpa.out-cbe.time)





More information about the llvm-commits mailing list