diff options
author | Mark Wielaard <mjw@redhat.com> | 2009-07-11 19:59:42 +0200 |
---|---|---|
committer | Mark Wielaard <mjw@redhat.com> | 2009-07-11 19:59:42 +0200 |
commit | 5a5732e52738b4f00995e705a170230c106885b6 (patch) | |
tree | a694f978686400505c10df4f8020027a25218db1 /testsuite/systemtap.base | |
parent | 4eb0c58b7d5c97a822e76c9070bc45e9b09a7c9e (diff) | |
download | systemtap-steved-5a5732e52738b4f00995e705a170230c106885b6.tar.gz systemtap-steved-5a5732e52738b4f00995e705a170230c106885b6.tar.xz systemtap-steved-5a5732e52738b4f00995e705a170230c106885b6.zip |
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].
Diffstat (limited to 'testsuite/systemtap.base')
-rw-r--r-- | testsuite/systemtap.base/cache.exp | 15 |
1 files changed, 15 insertions, 0 deletions
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 |