Changeset ebcc940
- Timestamp:
- Feb 28, 2019, 4:13:15 PM (6 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, persistent-indexer, pthread-emulation, qualifiedEnum
- Children:
- 351c519
- Parents:
- be30a90
- Location:
- src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/CompilationState.cc
rbe30a90 rebcc940 38 38 codegenp = false, 39 39 prettycodegenp = false, 40 linemarks = false; 40 linemarks = false, 41 stats_heap = false, 42 stats_counters = false; 41 43 42 44 // Local Variables: // -
src/CompilationState.h
rbe30a90 rebcc940 39 39 codegenp, 40 40 prettycodegenp, 41 linemarks; 41 linemarks, 42 stats_heap, 43 stats_counters; 42 44 43 45 // is the compiler building prelude or libcfa? -
src/main.cc
rbe30a90 rebcc940 378 378 deleteAll( translationUnit ); 379 379 if(!libcfap && !treep) { 380 Stats::Counters::print();381 Stats::Heap::print();380 if(stats_counters) Stats::Counters::print(); 381 if(stats_heap) Stats::Heap::print(); 382 382 } 383 383 … … 386 386 387 387 void parse_cmdline( int argc, char * argv[], const char *& filename ) { 388 enum { Ast, Bbox, Bresolver, CtorInitFix, DeclStats, Expr, ExprAlt, Grammar, LibCFA, Linemarks, Nolinemarks, Nopreamble, Parse, PreludeDir, Prototypes, Resolver, ResolvProto, S ymbol, Tree, TupleExpansion, Validate,};388 enum { Ast, Bbox, Bresolver, CtorInitFix, DeclStats, Expr, ExprAlt, Grammar, LibCFA, Linemarks, Nolinemarks, Nopreamble, Parse, PreludeDir, Prototypes, Resolver, ResolvProto, Stats, Symbol, Tree, TupleExpansion, Validate}; 389 389 390 390 static struct option long_opts[] = { … … 406 406 { "resolver", no_argument, 0, Resolver }, 407 407 { "resolv-proto", no_argument, 0, ResolvProto }, 408 { "stats", required_argument, 0, Stats }, 408 409 { "symbol", no_argument, 0, Symbol }, 409 410 { "tree", no_argument, 0, Tree }, … … 493 494 case 'R': // dump resolv-proto instance 494 495 resolvprotop = true; 496 break; 497 case Stats: 498 { 499 std::stringstream ss(optarg); 500 while(ss.good()) { 501 std::string substr; 502 getline( ss, substr, ',' ); 503 if(substr == "counters") { 504 stats_counters = true; 505 } else if(substr == "heap") { 506 stats_heap = true; 507 } else if(substr == "none") { 508 stats_counters = false; 509 stats_heap = false; 510 } else { 511 std::cerr << "Ignoring unknown statistic " << substr << std::endl; 512 } 513 } 514 515 } 495 516 break; 496 517 case Symbol:
Note: See TracChangeset
for help on using the changeset viewer.