From 4eb0c58b7d5c97a822e76c9070bc45e9b09a7c9e Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Sat, 11 Jul 2009 19:28:00 +0200 Subject: PR3523 was fixed, enable -t cache test case. * testsuite/systemtap.base/cache.exp: Enable -t tests. --- testsuite/systemtap.base/cache.exp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'testsuite/systemtap.base') diff --git a/testsuite/systemtap.base/cache.exp b/testsuite/systemtap.base/cache.exp index b10a4f28..5c5c1441 100644 --- a/testsuite/systemtap.base/cache.exp +++ b/testsuite/systemtap.base/cache.exp @@ -99,9 +99,8 @@ stap_compile MERGE1 [F_UNCACHED_COMPILE] $basic_script1 -b -M stap_compile MERGE2 [F_CACHED_COMPILE] $basic_script1 -b -M # Using '-t' (benchmark timing) should change the hash -# These two tests will fail until PR3523 is fixed. -#stap_compile TIMING1 [F_UNCACHED_COMPILE] $basic_script1 -t -#stap_compile TIMING2 [F_CACHED_COMPILE] $basic_script1 -t +stap_compile TIMING1 [F_UNCACHED_COMPILE] $basic_script1 -t +stap_compile TIMING2 [F_CACHED_COMPILE] $basic_script1 -t # Changing the runtime directory should change the hash set new_runtime [exec pwd]/.cache_test_runtime -- cgit From 5a5732e52738b4f00995e705a170230c106885b6 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Sat, 11 Jul 2009 19:59:42 +0200 Subject: Add -O[0123s] gcc optimization flags for gcc pass 4 speedup. * session.h (struct systemtap_session): Add gcc_flags string field. * main.cxx (usage): Document -O[0123s]. (main): Default gcc_flags to -O0. Add O:: to getopt_long. Handle case 'O' to set gcc_flags. * buildrun.cxx (compile_pass): Add gcc_flags to EXTRA_CFLAGS. * stap1.in: Add -O[0123s] documentation. * testsuite/systemtap.base/cache.exp: Add tests for -O[0123s]. --- testsuite/systemtap.base/cache.exp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'testsuite/systemtap.base') diff --git a/testsuite/systemtap.base/cache.exp b/testsuite/systemtap.base/cache.exp index 5c5c1441..e70f3334 100644 --- a/testsuite/systemtap.base/cache.exp +++ b/testsuite/systemtap.base/cache.exp @@ -102,6 +102,21 @@ stap_compile MERGE2 [F_CACHED_COMPILE] $basic_script1 -b -M stap_compile TIMING1 [F_UNCACHED_COMPILE] $basic_script1 -t stap_compile TIMING2 [F_CACHED_COMPILE] $basic_script1 -t +# Using '-O[0123s]' (C compile optimizations) should change the hash +# unless they are the same +stap_compile OPTO [F_UNCACHED_COMPILE] $basic_script1 -O +# -O0 is the default, so will have been cached by BASIC1 +stap_compile OPTZERO [F_CACHED_COMPILE] $basic_script1 -O0 +# -O is an alias for -O1, so already cached +stap_compile OPTONE [F_CACHED_COMPILE] $basic_script1 -O1 +stap_compile OPTTWO [F_UNCACHED_COMPILE] $basic_script1 -O2 +stap_compile OPTTHREE [F_UNCACHED_COMPILE] $basic_script1 -O3 +stap_compile OPTSMALL [F_UNCACHED_COMPILE] $basic_script1 -Os +# Bad -O argument should be rejected +stap_compile OPTBAD [F_UNCACHED_NO_COMPILE] $basic_script1 -OX + +stap_compile TIMING2 [F_CACHED_COMPILE] $basic_script1 -t + # Changing the runtime directory should change the hash set new_runtime [exec pwd]/.cache_test_runtime exec /bin/rm -f $new_runtime -- cgit