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

John Criswell criswell at cs.uiuc.edu
Wed Nov 3 08:34:36 PST 2004



Changes in directory poolalloc/test:

TEST.cputrack.report added (r1.1)
Makefile updated: 1.22 -> 1.23
TEST.cputrack.Makefile updated: 1.4 -> 1.5

---
Log message:

Initial addition of creating report tables of the cputrack cache results.
It seems a little unstable, though.


---
Diffs of the changes:  (+102 -6)

Index: poolalloc/test/TEST.cputrack.report
diff -c /dev/null poolalloc/test/TEST.cputrack.report:1.1
*** /dev/null	Wed Nov  3 10:34:36 2004
--- poolalloc/test/TEST.cputrack.report	Wed Nov  3 10:34:25 2004
***************
*** 0 ****
--- 1,88 ----
+ ##=== TEST.poolalloc.report - Report description for poolalloc -*- perl -*-===##
+ #
+ # This file defines a report to be generated for the pool allocator tests.
+ #
+ ##===----------------------------------------------------------------------===##
+ 
+ # Sort by program name
+ $SortCol = 0;
+ $TrimRepeatedPrefix = 1;
+ 
+ sub Ratio {
+   my ($Cols, $Col) = @_;
+   if ($Cols->[$Col-1] ne "*" and $Cols->[$Col-4] ne "*" and
+       $Cols->[$Col-1] != "0") {
+     return sprintf "%1.3f", $Cols->[$Col-4]/$Cols->[$Col-1];
+   } else {
+     return "n/a";
+   }
+ }
+ 
+ sub Sum {
+   my ($Cols, $Col) = @_;
+   if ($Cols->[$Col-1] ne "*" and $Cols->[$Col-2] ne "*") {
+     return sprintf "%1.3f", $Cols->[$Col-2]+$Cols->[$Col-1];
+   } else {
+     return "n/a";
+   }
+ }
+ 
+ 
+ sub FormatTime {
+   my $Time = shift;
+   if ($Time =~ m/([0-9]+)[m:]([0-9.]+)/) {
+     $Time = sprintf("%7.3f", $1*60.0+$2);
+   }
+   return $Time;
+ }
+ 
+ @LatexColumns = (2, 3, 4, 5, 6, 7);
+ 
+ my $OLDEN     = 'MultiSource/Benchmarks/Olden';
+ my $FREEBENCH = 'MultiSource/Benchmarks/FreeBench';
+ my $PTRDIST   = 'MultiSource/Benchmarks/Ptrdist';
+ 
+ @LatexRowMapOrder = (
+                      "$OLDEN/bh/bh"           => 'bh',
+                      "$OLDEN/bisort/bisort"   => 'bisort',
+                      "$OLDEN/em3d/em3d"       => 'em3d',
+                      "$OLDEN/health/health"   => 'health',
+                      "$OLDEN/mst/mst"         => 'mst',
+                      "$OLDEN/perimeter/perimeter" => 'perimeter',
+                      "$OLDEN/power/power"     => 'power',
+                      "$OLDEN/treeadd/treeadd" => 'treeadd',
+                      "$OLDEN/tsp/tsp"         => 'tsp',
+                      "$OLDEN/voronoi/voronoi" => 'voronoi',
+                      '-' => '-',
+                      "$FREEBENCH/analyzer/analyzer"     => 'analyzer',
+ #                     "$FREEBENCH/distray/distray"       => 'distray',
+ #                     "$FREEBENCH/fourinarow/fourinarow" => 'fourinarow',
+ #                     "$FREEBENCH/mason/mason"           => 'mason',
+                      "$FREEBENCH/neural/neural"         => 'neural',
+                      "$FREEBENCH/pcompress2/pcompress2" => 'pcompress2',
+                      "$FREEBENCH/pifft/pifft"           => 'pifft',
+                      '-' => '-',
+                      "$PTRDIST/anagram/anagram"       => 'anagram',
+                      "$PTRDIST/bc/bc"                 => 'bc',
+                      "$PTRDIST/ft/ft"                 => 'ft',
+                      "$PTRDIST/ks/ks"                 => 'ks',
+                      "$PTRDIST/yacr2/yacr2"           => 'yacr2',
+                   );
+ 
+ 
+ # These are the columns for the report.  The first entry is the header for the
+ # column, the second is the regex to use to match the value.  Empty list create
+ # seperators, and closures may be put in for custom processing.
+ (
+ # Name
+  ["Name:" , '\'([^\']+)\' Program'],
+  [],
+ # Times
+  ["NormalL1DataRead",    'CBE-L1-Data-Reads: ([0-9]+)'],
+  ["NormalL1DataMiss",    'CBE-L1-Data-Misses: ([0-9]+)'],
+ 
+  ["PoolAllocL1DataRead",    'CBE-PA-L1-Data-Reads: ([0-9]+)'],
+  ["PoolAllocL1DataMiss",    'CBE-PA-L1-Data-Misses: ([0-9]+)'],
+  []
+ );
+ 


Index: poolalloc/test/Makefile
diff -u poolalloc/test/Makefile:1.22 poolalloc/test/Makefile:1.23
--- poolalloc/test/Makefile:1.22	Tue Nov  2 13:21:48 2004
+++ poolalloc/test/Makefile	Wed Nov  3 10:34:25 2004
@@ -163,6 +163,6 @@
 cputrack::
 	(cd $(LLVM_OBJ_ROOT)/projects/llvm-test/$(SUBDIR); \
                PROJECT_DIR=$(BUILD_OBJ_ROOT) $(MAKE) -j1 TEST=cputrack \
-                   test)
+                   report)
 	@printf "\a"; sleep 1; printf "\a"; sleep 1; printf "\a"
 


Index: poolalloc/test/TEST.cputrack.Makefile
diff -u poolalloc/test/TEST.cputrack.Makefile:1.4 poolalloc/test/TEST.cputrack.Makefile:1.5
--- poolalloc/test/TEST.cputrack.Makefile:1.4	Tue Nov  2 15:48:44 2004
+++ poolalloc/test/TEST.cputrack.Makefile	Wed Nov  3 10:34:25 2004
@@ -51,10 +51,12 @@
 	@echo "========================================="
 	@echo "Running '$(TEST)' test on '$(TESTNAME)' program"
 ifeq ($(RUN_OPTIONS),)
-	$(VERB) cat $(STDIN_FILENAME) | $(CPUTRACK) $(EVENTS_DC_RD) -o $@ $<
+	$(VERB) cat $(STDIN_FILENAME) | $(CPUTRACK) $(EVENTS_DC_RD) -o $@.dcrd $<
 else
-	$(VERB) cat $(STDIN_FILENAME) | $(CPUTRACK) $(EVENTS_DC_RD) -o $@ $< $(RUN_OPTIONS)
+	$(VERB) cat $(STDIN_FILENAME) | $(CPUTRACK) $(EVENTS_DC_RD) -o $@.dcrd $< $(RUN_OPTIONS)
 endif
+	$(VERB) cat $@.dcrd | tail -1 | awk '{print $$4}' > $@.dcrd.total
+	$(VERB) cat $@.dcrd | tail -1 | awk '{print $$5}' > $@.dcrd.misses
 
 #
 # Generate events for CBE
@@ -64,14 +66,20 @@
 	@echo "========================================="
 	@echo "Running '$(TEST)' test on '$(TESTNAME)' program"
 ifeq ($(RUN_OPTIONS),)
-	$(VERB) cat $(STDIN_FILENAME) | $(CPUTRACK) $(EVENTS_DC_RD) -o $@ $<
+	$(VERB) cat $(STDIN_FILENAME) | $(CPUTRACK) $(EVENTS_DC_RD) -o $@.dcrd $<
 else
-	$(VERB) cat $(STDIN_FILENAME) | $(CPUTRACK) $(EVENTS_DC_RD) -o $@ $< $(RUN_OPTIONS)
+	$(VERB) cat $(STDIN_FILENAME) | $(CPUTRACK) $(EVENTS_DC_RD) -o $@.dcrd $< $(RUN_OPTIONS)
 endif
+	$(VERB) cat $@.dcrd | tail -1 | awk '{print $$4}' > $@.dcrd.total
+	$(VERB) cat $@.dcrd | tail -1 | awk '{print $$5}' > $@.dcrd.misses
 
 $(PROGRAMS_TO_TEST:%=Output/%.$(TEST).report.txt): \
 Output/%.$(TEST).report.txt: Output/test.$(TEST).pa.% Output/test.$(TEST).%
-	touch $@
+	@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` >> $@
+	@touch $@
 
 $(PROGRAMS_TO_TEST:%=test.$(TEST).%): \
 test.$(TEST).%: Output/%.$(TEST).report.txt





More information about the llvm-commits mailing list