diff options
author | fche <fche> | 2006-01-24 17:58:02 +0000 |
---|---|---|
committer | fche <fche> | 2006-01-24 17:58:02 +0000 |
commit | cbfbbf6996cbe3b9fe57ac2014aa7262bb6890d6 (patch) | |
tree | 89b507411bd828b12142f0962be3eb4a33c3a45d /main.cxx | |
parent | 46746514a6943520ff73b6f77d35477e2abb30ba (diff) | |
download | systemtap-steved-cbfbbf6996cbe3b9fe57ac2014aa7262bb6890d6.tar.gz systemtap-steved-cbfbbf6996cbe3b9fe57ac2014aa7262bb6890d6.tar.xz systemtap-steved-cbfbbf6996cbe3b9fe57ac2014aa7262bb6890d6.zip |
2006-01-24 Frank Ch. Eigler <fche@elastic.org>
PR 2060 etc.
* tapsets.cxx (visit_target_symbol): Tolerate failed resolution by
letting target_symbol instance pass through to optimizer and
type checker.
* elaborate.cxx (semantic_pass_optimize): New family of functions and
associated visitor classes.
(visit_for_loop): Tolerate absent init/incr clauses.
(semantic_pass): Invoke unless unoptimized (-u) option given.
* main.cxx, session.h: Add support for flag.
* staptree.cxx (visit_for_loop): Tolerate absent init/incr clauses.
(traversing_visitor::visit_arrayindex): Visit the index expressions.
(functioncall_traversing_visitor): New class.
(varuse_tracking_visitor): New class.
* staptree.h: Corresponding changes.
* parse.cxx (parse_for_loop): Represent absent init/incr expressions
with null statement pointer instead of optimized-out dummy numbers.
* stap.1.in: Document optimization.
* testsuite/{semko,transko}/*.stp: Added "-u" or other code to many
tests to check bad code without optimizer elision.
* testsuite/semok/optimize.stp: New test.
* elaborate.cxx (unresolved, invalid, mismatch): Standardize error
message wording.
* stapfuncs.5.in: Tweak print/printf docs.
* tapset/logging.stp: Remove redundant "print" auxiliary function,
since it's a translator built-in.
* testsuite/transok/five.stp: Extend test.
* translate.cxx (emit_symbol_data): Put symbol table into a separate
temporary header file, to make "-p3" output easier on the eyes.
* buildrun.cxx (compile_pass): Eliminate test-mode support throughout.
* main.cxx, session.h, translate.cxx: Ditto.
* main.cxx (main): For last-pass=2 runs, print post-optimization ASTs.
Diffstat (limited to 'main.cxx')
-rw-r--r-- | main.cxx | 24 |
1 files changed, 17 insertions, 7 deletions
@@ -60,7 +60,7 @@ usage (systemtap_session& s) << " -h show help" << endl << " -V show version" << endl << " -k keep temporary directory" << endl - // << " -t test mode" << (s.test_mode ? " [set]" : "") << endl + << " -u unoptimized translation" << (s.unoptimized ? " [set]" : "") << endl << " -g guru mode" << (s.guru_mode ? " [set]" : "") << endl << " -b bulk (relayfs) mode" << (s.bulk_mode ? " [set]" : "") << endl << " -s NUM buffer size in megabytes, instead of " @@ -120,9 +120,9 @@ main (int argc, char * const argv []) s.kernel_release = string (buf.release); s.architecture = string (buf.machine); s.verbose = false; - s.test_mode = false; s.guru_mode = false; s.bulk_mode = false; + s.unoptimized = false; s.buffer_size = 0; s.last_pass = 5; s.module_name = "stap_" + stringify(getpid()); @@ -145,7 +145,7 @@ main (int argc, char * const argv []) while (true) { - int grc = getopt (argc, argv, "hVvp:I:e:o:tR:r:m:kgc:x:D:bs:"); + int grc = getopt (argc, argv, "hVvp:I:e:o:R:r:m:kgc:x:D:bs:u"); if (grc < 0) break; switch (grc) @@ -182,10 +182,6 @@ main (int argc, char * const argv []) s.output_file = string (optarg); break; - case 't': - s.test_mode = true; - break; - case 'R': s.runtime_path = string (optarg); break; @@ -210,6 +206,10 @@ main (int argc, char * const argv []) s.bulk_mode = true; break; + case 'u': + s.unoptimized = true; + break; + case 's': s.buffer_size = atoi (optarg); if (s.buffer_size < 1 || s.buffer_size > 64) @@ -415,6 +415,11 @@ main (int argc, char * const argv []) v->printsig (cout); cout << endl; } + if (s.verbose) + { + f->body->print (cout); + cout << endl; + } } if (s.probes.size() > 0) @@ -433,6 +438,11 @@ main (int argc, char * const argv []) v->printsig (cout); cout << endl; } + if (s.verbose) + { + p->body->print (cout); + cout << endl; + } } } |