diff options
author | Kartik Agaram <vc@akkartik.com> | 2019-08-14 17:20:41 -0700 |
---|---|---|
committer | Kartik Agaram <vc@akkartik.com> | 2019-08-14 18:02:17 -0700 |
commit | dc86473b80512a494cc33c9218726a8dabdd37b7 (patch) | |
tree | f34fc91a23e8996a400104a7190f533b9db372c9 | |
parent | b6c7f4816b68d693842ee43d4b1883182161b9db (diff) | |
download | mu-dc86473b80512a494cc33c9218726a8dabdd37b7.tar.gz |
5516 - record traces only when necessary
./translate now works fine for all apps on a server with 2GB RAM.
-rw-r--r-- | 012elf.cc | 3 | ||||
-rw-r--r-- | 028translate.cc | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/012elf.cc b/012elf.cc index 9bd6cbf1..7e0a4c7b 100644 --- a/012elf.cc +++ b/012elf.cc @@ -5,7 +5,8 @@ :(before "End Main") assert(argc > 1); if (is_equal(argv[1], "run")) { - START_TRACING_UNTIL_END_OF_SCOPE; + // Outside of tests, traces must be explicitly requested. + if (Trace_file.is_open()) Trace_stream = new trace_stream; trace(2, "run") << "=== Starting to run" << end(); assert(argc > 2); reset(); diff --git a/028translate.cc b/028translate.cc index d3a6a8ac..9737834e 100644 --- a/028translate.cc +++ b/028translate.cc @@ -18,7 +18,8 @@ :(before "End Main") if (is_equal(argv[1], "translate")) { - START_TRACING_UNTIL_END_OF_SCOPE; + // Outside of tests, traces must be explicitly requested. + if (Trace_file.is_open()) Trace_stream = new trace_stream; reset(); // Begin subx translate program p; |