[llvm-commits] [test-suite] r162240 - in /test-suite/trunk: MultiSource/Makefile.multisrc TEST.nightly.Makefile TEST.nightly.report TEST.simple.Makefile TEST.simple.report tools/timeit.c

David Blaikie dblaikie at gmail.com
Mon Aug 20 15:40:06 PDT 2012


Author: dblaikie
Date: Mon Aug 20 17:40:06 2012
New Revision: 162240

URL: http://llvm.org/viewvc/llvm-project?rev=162240&view=rev
Log:
Bubble up more of the timing data from each test.

This allows each report to choose which timing statistic(s) to include, rather
than having that decision made at a lower level.

This change is paired with a change to the LNT. Apologies for any hiccups
(failing LNT runs) from bots that pickup one change without the other.

Reviewed by Daniel Dunbar.

Modified:
    test-suite/trunk/MultiSource/Makefile.multisrc
    test-suite/trunk/TEST.nightly.Makefile
    test-suite/trunk/TEST.nightly.report
    test-suite/trunk/TEST.simple.Makefile
    test-suite/trunk/TEST.simple.report
    test-suite/trunk/tools/timeit.c

Modified: test-suite/trunk/MultiSource/Makefile.multisrc
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Makefile.multisrc?rev=162240&r1=162239&r2=162240&view=diff
==============================================================================
--- test-suite/trunk/MultiSource/Makefile.multisrc (original)
+++ test-suite/trunk/MultiSource/Makefile.multisrc Mon Aug 20 17:40:06 2012
@@ -84,10 +84,11 @@
 
 Output/%.simple: $(NLObjects) $(GeneratedTestInputs)
 	@-cat $(NLObjects:%=%.compile.time) | awk -- '\
-BEGIN     { sum = 0.0; }\
-/^program/   { sum += $$2; }\
-!/^program/  { print; }\
-END       { printf("program %f\n", sum); }' > $@.compile.time
+BEGIN   { real = 0.0; user = 0.0; sys = 0.0; }\
+/^real/ { real += $$2; }\
+/^user/ { user += $$2; }\
+/^sys/ { sys += $$2; }\
+END { printf("real %f\nuser %f\nsys %f\n", real, user, sys); }' > $@.compile.time
 	-$(LD_ENV_OVERRIDES) $(LCXX) -o $@ $(NLObjects) $(LDFLAGS) $(CFLAGS) $(TARGET_FLAGS)
 
 Output/%.native: $(NObjects) $(GeneratedTestInputs)

Modified: test-suite/trunk/TEST.nightly.Makefile
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/TEST.nightly.Makefile?rev=162240&r1=162239&r2=162240&view=diff
==============================================================================
--- test-suite/trunk/TEST.nightly.Makefile (original)
+++ test-suite/trunk/TEST.nightly.Makefile Mon Aug 20 17:40:06 2012
@@ -50,7 +50,7 @@
 Output/%.nightly.nat.report.txt: Output/%.out-nat
 	@echo > $@
 	@printf "TEST-RESULT-nat-time: " >> $@
-	-grep "^program" Output/$*.out-nat.time >> $@
+	-grep "^user" Output/$*.out-nat.time >> $@
 
 # LLC tests
 $(PROGRAMS_TO_TEST:%=Output/%.nightly.llc.report.txt): \
@@ -62,7 +62,7 @@
 	  printf "TEST-RESULT-llc: " >> $@;\
 	  grep "Total Execution Time" Output/$*.llc.s.info | tail -n 1 >> $@;\
 	  printf "TEST-RESULT-llc-time: " >> $@;\
-	  grep "^program" Output/$*.out-llc.time >> $@;\
+	  grep "^user" Output/$*.out-llc.time >> $@;\
 	  echo >> $@;\
 	else  \
 	  echo "TEST-FAIL: llc $(RELDIR)/$*" >> $@;\
@@ -78,7 +78,7 @@
 	  printf "TEST-RESULT-llc-beta: " >> $@;\
 	  grep "Total Execution Time" Output/$*.llc-beta.s.info | tail -n 1 >> $@;\
 	  printf "TEST-RESULT-llc-beta-time: " >> $@;\
-	  grep "^program" Output/$*.out-llc-beta.time >> $@;\
+	  grep "^user" Output/$*.out-llc-beta.time >> $@;\
 	  echo >> $@;\
 	else  \
 	  echo "TEST-FAIL: llc-beta $(RELDIR)/$*" >> $@;\
@@ -94,7 +94,7 @@
 	  printf "TEST-RESULT-opt-beta: " >> $@;\
 	  grep "Total Execution Time" Output/$*.opt-beta.s.info | tail -n 1 >> $@;\
 	  printf "TEST-RESULT-opt-beta-time: " >> $@;\
-	  grep "^program" Output/$*.out-opt-beta.time >> $@;\
+	  grep "^user" Output/$*.out-opt-beta.time >> $@;\
 	  echo >> $@;\
 	else  \
 	  echo "TEST-FAIL: opt-beta $(RELDIR)/$*" >> $@;\
@@ -108,7 +108,7 @@
 	  head -n 100 Output/$*.exe-jit >> $@; \
 	  echo "TEST-PASS: jit $(RELDIR)/$*" >> $@;\
 	  printf "TEST-RESULT-jit-time: " >> $@;\
-	  grep "^program" Output/$*.out-jit.time >> $@;\
+	  grep "^user" Output/$*.out-jit.time >> $@;\
 	  echo >> $@;\
 	  printf "TEST-RESULT-jit-comptime: " >> $@;\
 	  grep "Total Execution Time" Output/$*.out-jit.info | tail -n 1 >> $@;\

Modified: test-suite/trunk/TEST.nightly.report
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/TEST.nightly.report?rev=162240&r1=162239&r2=162240&view=diff
==============================================================================
--- test-suite/trunk/TEST.nightly.report (original)
+++ test-suite/trunk/TEST.nightly.report Mon Aug 20 17:40:06 2012
@@ -67,10 +67,10 @@
  ["LLC-BETA compile" , "TEST-RESULT-llc-beta: .*$WallTimeRE"],
  ["JIT codegen" , "TEST-RESULT-jit-comptime: .*$WallTimeRE"],
  [],
- ["GCC"      , 'TEST-RESULT-nat-time: program\s*([.0-9m:]+)', \&FormatTime],
- ["LLC"      , 'TEST-RESULT-llc-time: program\s*([.0-9m:]+)', \&FormatTime],
- ["LLC-BETA" , 'TEST-RESULT-llc-beta-time: program\s*([.0-9m:]+)',\&FormatTime],
- ["JIT"      , 'TEST-RESULT-jit-time: program\s*([.0-9m:]+)', \&FormatTime],
+ ["GCC"      , 'TEST-RESULT-nat-time: user\s*([.0-9m:]+)', \&FormatTime],
+ ["LLC"      , 'TEST-RESULT-llc-time: user\s*([.0-9m:]+)', \&FormatTime],
+ ["LLC-BETA" , 'TEST-RESULT-llc-beta-time: user\s*([.0-9m:]+)',\&FormatTime],
+ ["JIT"      , 'TEST-RESULT-jit-time: user\s*([.0-9m:]+)', \&FormatTime],
  [],
  ["GCC/LLC"  , \&GCCLLCRatio],
  ["GCC/LLC-BETA"  , \&GCCLLC_BETARatio],

Modified: test-suite/trunk/TEST.simple.Makefile
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/TEST.simple.Makefile?rev=162240&r1=162239&r2=162240&view=diff
==============================================================================
--- test-suite/trunk/TEST.simple.Makefile (original)
+++ test-suite/trunk/TEST.simple.Makefile Mon Aug 20 17:40:06 2012
@@ -28,7 +28,9 @@
 	  echo "TEST-FAIL: compile $(RELDIR)/$*" >> $@; \
 	fi
 	@-printf "TEST-RESULT-compile-time: " >> $@
-	@-grep "^program" Output/$*.simple.compile.time >> $@
+	@-grep "^user" Output/$*.simple.compile.time >> $@
+	@-printf "TEST-RESULT-compile-real-time: " >> $@
+	@-grep "^real" Output/$*.simple.compile.time >> $@
 
 $(PROGRAMS_TO_TEST:%=Output/%.simple.exec.report.txt): \
 Output/%.simple.exec.report.txt: Output/%.exe-simple
@@ -49,7 +51,9 @@
 	  echo "TEST-FAIL: exec $(RELDIR)/$*" >> $@;\
 	fi
 	@-printf "TEST-RESULT-exec-time: " >> $@
-	@-grep "^program" Output/$*.out-simple.time >> $@
+	@-grep "^user" Output/$*.out-simple.time >> $@
+	@-printf "TEST-RESULT-exec-real-time: " >> $@
+	@-grep "^real" Output/$*.out-simple.time >> $@
 	if test -f Output/$*.extra-results.txt; then \
 	  $(PROGDIR)/ParseMultipleResults $(RELDIR)/$* Output/$*.extra-results.txt >> $@; \
 	fi

Modified: test-suite/trunk/TEST.simple.report
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/TEST.simple.report?rev=162240&r1=162239&r2=162240&view=diff
==============================================================================
--- test-suite/trunk/TEST.simple.report (original)
+++ test-suite/trunk/TEST.simple.report Mon Aug 20 17:40:06 2012
@@ -24,7 +24,9 @@
  ["Program"  , '\'([^\']+)\' Program'],
  [],
  ["CC"       , 'TEST-RESULT-compile-success: (pass|fail|xfail)'],
- ["CC_Time"  , 'TEST-RESULT-compile-time: program\s*([.0-9m:]+)', \&FormatTime],
+ ["CC_Time"  , 'TEST-RESULT-compile-time: user\s*([.0-9m:]+)', \&FormatTime],
+ ["CC_Real_Time", 'TEST-RESULT-compile-real-time: real\s*([.0-9m:]+)', \&FormatTime],
  ["Exec"     , 'TEST-RESULT-exec-success: (pass|fail|xfail)'],
- ["Exec_Time", 'TEST-RESULT-exec-time: program\s*([.0-9m:]+)', \&FormatTime],
+ ["Exec_Time", 'TEST-RESULT-exec-time: user\s*([.0-9m:]+)', \&FormatTime],
+ ["Exec_Real_Time", 'TEST-RESULT-exec-real-time: real\s*([.0-9m:]+)', \&FormatTime],
 );

Modified: test-suite/trunk/tools/timeit.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/tools/timeit.c?rev=162240&r1=162239&r2=162240&view=diff
==============================================================================
--- test-suite/trunk/tools/timeit.c (original)
+++ test-suite/trunk/tools/timeit.c Mon Aug 20 17:40:06 2012
@@ -211,7 +211,6 @@
     fprintf(fp, "%-10s %.4f\n", "real", real_time);
     fprintf(fp, "%-10s %.4f\n", "user", user_time);
     fprintf(fp, "%-10s %.4f\n", "sys", sys_time);
-    fprintf(fp, "program %.6f\n", user_time);
     fclose(fp);
   }
 





More information about the llvm-commits mailing list