diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-10-05 22:50:58 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-10-05 22:50:58 -0700 |
commit | 164bf99fef53fe500f8f4759f5588b1cbe9323e7 (patch) | |
tree | f07e9ceed06f730b1824418f11cc0a049e0328a0 | |
parent | ec5e0d13b621ef80d30f27b7cdd6edfda34195c8 (diff) | |
download | mu-164bf99fef53fe500f8f4759f5588b1cbe9323e7.tar.gz |
2253 - start reorganizing traces
-rw-r--r-- | 003trace.cc | 4 | ||||
-rw-r--r-- | 029tools.cc | 31 |
2 files changed, 1 insertions, 34 deletions
diff --git a/003trace.cc b/003trace.cc index f2045fd6..43789954 100644 --- a/003trace.cc +++ b/003trace.cc @@ -101,7 +101,6 @@ struct trace_stream { ostringstream* curr_stream; string curr_layer; int curr_depth; - string dump_layer; set<string> collect_layers; // if not empty, ignore all absent layers ofstream null_stream; // never opens a file, so writes silently fail trace_stream() :curr_stream(NULL), curr_depth(0) {} @@ -133,8 +132,7 @@ struct trace_stream { string curr_contents = curr_stream->str(); if (curr_contents.empty()) return; past_lines.push_back(trace_line(curr_depth, trim(curr_layer), curr_contents)); // preserve indent in contents - if (curr_layer == dump_layer || curr_layer == "dump" || dump_layer == "all" || - (!Hide_warnings && curr_layer == "warn")) + if (!Hide_warnings && curr_layer == "warn") cerr << curr_layer << ": " << curr_contents << '\n'; delete curr_stream; curr_stream = NULL; diff --git a/029tools.cc b/029tools.cc index 92c29963..17dea6ef 100644 --- a/029tools.cc +++ b/029tools.cc @@ -118,37 +118,6 @@ case SHOW_WARNINGS: { } :(before "End Primitive Recipe Declarations") -_START_TRACING, -:(before "End Primitive Recipe Numbers") -Recipe_ordinal["$start-tracing"] = _START_TRACING; -:(before "End Primitive Recipe Checks") -case _START_TRACING: { - break; -} -:(before "End Primitive Recipe Implementations") -case _START_TRACING: { - if (current_instruction().ingredients.empty()) - Trace_stream->dump_layer = "all"; - else - Trace_stream->dump_layer = current_instruction().ingredients.at(0).name; - break; -} - -:(before "End Primitive Recipe Declarations") -_STOP_TRACING, -:(before "End Primitive Recipe Numbers") -Recipe_ordinal["$stop-tracing"] = _STOP_TRACING; -:(before "End Primitive Recipe Checks") -case _STOP_TRACING: { - break; -} -:(before "End Primitive Recipe Implementations") -case _STOP_TRACING: { - Trace_stream->dump_layer = ""; - break; -} - -:(before "End Primitive Recipe Declarations") _CLOSE_TRACE, :(before "End Primitive Recipe Numbers") Recipe_ordinal["$close-trace"] = _CLOSE_TRACE; |