about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--020run.cc4
-rw-r--r--026call.cc6
-rw-r--r--028call_return.cc2
-rw-r--r--030container.cc4
-rw-r--r--031merge.cc4
-rw-r--r--032array.cc4
-rw-r--r--033exclusive_container.cc10
-rw-r--r--034address.cc14
-rw-r--r--035lookup.cc4
-rw-r--r--036refcount.cc8
-rw-r--r--037abandon.cc10
-rw-r--r--038new_text.cc8
-rw-r--r--043space.cc4
-rw-r--r--050scenario.cc6
-rw-r--r--053recipe_header.cc8
-rw-r--r--054static_dispatch.cc2
-rw-r--r--055shape_shifting_container.cc2
-rw-r--r--069hash.cc4
-rw-r--r--073scheduler.cc2
-rw-r--r--074wait.cc6
-rw-r--r--076continuation.cc2
-rw-r--r--085scenario_console.cc14
-rw-r--r--089scenario_filesystem.cc18
23 files changed, 73 insertions, 73 deletions
diff --git a/020run.cc b/020run.cc
index d1bc77f4..0da9fba7 100644
--- a/020run.cc
+++ b/020run.cc
@@ -295,7 +295,7 @@ vector<double> read_memory(reagent/*copy*/ x) {
   int size = size_of(x);
   for (int offset = 0;  offset < size;  ++offset) {
     double val = get_or_insert(Memory, x.value+offset);
-    trace(9999, "mem") << "location " << x.value+offset << " is " << no_scientific(val) << end();
+    trace("mem") << "location " << x.value+offset << " is " << no_scientific(val) << end();
     result.push_back(val);
   }
   return result;
@@ -322,7 +322,7 @@ void write_memory(reagent/*copy*/ x, const vector<double>& data) {
   // End write_memory(x) Special-cases
   for (int offset = 0;  offset < SIZE(data);  ++offset) {
     assert(x.value+offset > 0);
-    trace(9999, "mem") << "storing " << no_scientific(data.at(offset)) << " in location " << x.value+offset << end();
+    trace("mem") << "storing " << no_scientific(data.at(offset)) << " in location " << x.value+offset << end();
     put(Memory, x.value+offset, data.at(offset));
   }
 }
diff --git a/026call.cc b/026call.cc
index 6b7a14f7..d718a9ce 100644
--- a/026call.cc
+++ b/026call.cc
@@ -60,7 +60,7 @@ struct routine {
 routine::routine(recipe_ordinal r) {
   if (Trace_stream) {
     ++Trace_stream->callstack_depth;
-    trace(9999, "trace") << "new routine; incrementing callstack depth to " << Trace_stream->callstack_depth << end();
+    trace("trace") << "new routine; incrementing callstack depth to " << Trace_stream->callstack_depth << end();
     assert(Trace_stream->callstack_depth < 9000);  // 9998-101 plus cushion
   }
   calls.push_front(call(r));
@@ -143,7 +143,7 @@ default: {
     // not a primitive; look up the book of recipes
     if (Trace_stream) {
       ++Trace_stream->callstack_depth;
-      trace(9999, "trace") << "incrementing callstack depth to " << Trace_stream->callstack_depth << end();
+      trace("trace") << "incrementing callstack depth to " << Trace_stream->callstack_depth << end();
       assert(Trace_stream->callstack_depth < 9000);  // 9998-101 plus cushion
     }
     const call& caller_frame = current_call();
@@ -193,7 +193,7 @@ const vector<instruction>& routine::steps() const {
 while (current_step_index() >= SIZE(Current_routine->steps())) {
   // Falling Through End Of Recipe
   if (Trace_stream) {
-    trace(9999, "trace") << "fall-through: exiting " << current_recipe_name() << "; decrementing callstack depth from " << Trace_stream->callstack_depth << end();
+    trace("trace") << "fall-through: exiting " << current_recipe_name() << "; decrementing callstack depth from " << Trace_stream->callstack_depth << end();
     --Trace_stream->callstack_depth;
     assert(Trace_stream->callstack_depth >= 0);
   }
diff --git a/028call_return.cc b/028call_return.cc
index d77e1fa7..b9a1189c 100644
--- a/028call_return.cc
+++ b/028call_return.cc
@@ -37,7 +37,7 @@ case RETURN: {
 case RETURN: {
   // Begin Return
   if (Trace_stream) {
-    trace(9999, "trace") << current_instruction().name << ": decrementing callstack depth from " << Trace_stream->callstack_depth << end();
+    trace("trace") << current_instruction().name << ": decrementing callstack depth from " << Trace_stream->callstack_depth << end();
     --Trace_stream->callstack_depth;
     if (Trace_stream->callstack_depth < 0) {
       Current_routine->calls.clear();
diff --git a/030container.cc b/030container.cc
index 23901b3f..d29976ea 100644
--- a/030container.cc
+++ b/030container.cc
@@ -576,7 +576,7 @@ case PUT: {
   // Write Memory in PUT in Run
   write_products = false;
   for (int i = 0;  i < SIZE(ingredients.at(2));  ++i) {
-    trace(9999, "mem") << "storing " << no_scientific(ingredients.at(2).at(i)) << " in location " << address+i << end();
+    trace("mem") << "storing " << no_scientific(ingredients.at(2).at(i)) << " in location " << address+i << end();
     put(Memory, address+i, ingredients.at(2).at(i));
   }
   break;
@@ -672,7 +672,7 @@ void insert_container(const string& command, kind_of_type kind, istream& in) {
       || get(Type_ordinal, name) == 0) {
     put(Type_ordinal, name, Next_type_ordinal++);
   }
-  trace(9999, "parse") << "type number: " << get(Type_ordinal, name) << end();
+  trace("parse") << "type number: " << get(Type_ordinal, name) << end();
   skip_bracket(in, "'"+command+"' must begin with '['");
   type_info& info = get_or_insert(Type, get(Type_ordinal, name));
   if (info.Num_calls_to_transform_all_at_first_definition == -1) {
diff --git a/031merge.cc b/031merge.cc
index 4e4e4e34..c56579a5 100644
--- a/031merge.cc
+++ b/031merge.cc
@@ -145,7 +145,7 @@ void check_merge_call(const vector<reagent>& ingredients, const reagent& product
   state.data.push(merge_check_point(product, 0));
   while (true) {
     assert(!state.data.empty());
-    trace(9999, "transform") << ingredient_index << " vs " << SIZE(ingredients) << end();
+    trace("transform") << ingredient_index << " vs " << SIZE(ingredients) << end();
     if (ingredient_index >= SIZE(ingredients)) {
       raise << maybe(caller.name) << "too few ingredients in '" << to_original_string(inst) << "'\n" << end();
       return;
@@ -161,7 +161,7 @@ void check_merge_call(const vector<reagent>& ingredients, const reagent& product
         if (state.data.top().container_element_index == 0 && types_coercible(container, inst.ingredients.at(ingredient_index)))
           return;
         const reagent& expected_ingredient = element_type(container.type, state.data.top().container_element_index);
-        trace(9999, "transform") << "checking container " << to_string(container) << " || " << to_string(expected_ingredient) << " vs ingredient " << ingredient_index << end();
+        trace("transform") << "checking container " << to_string(container) << " || " << to_string(expected_ingredient) << " vs ingredient " << ingredient_index << end();
         // if the current element is the ingredient we expect, move on to the next element/ingredient
         if (types_coercible(expected_ingredient, ingredients.at(ingredient_index))) {
           ++ingredient_index;
diff --git a/032array.cc b/032array.cc
index a22e4588..bc933aad 100644
--- a/032array.cc
+++ b/032array.cc
@@ -57,7 +57,7 @@ case CREATE_ARRAY: {
     array_length_from_type = array_length_from_type->left;
   int array_length = to_integer(array_length_from_type->name);
   // initialize array length, so that size_of will work
-  trace(9999, "mem") << "storing " << array_length << " in location " << base_address << end();
+  trace("mem") << "storing " << array_length << " in location " << base_address << end();
   put(Memory, base_address, array_length);  // in array elements
   int size = size_of(product);  // in locations
   trace(9998, "run") << "creating array of size " << size << end();
@@ -561,7 +561,7 @@ case PUT_INDEX: {
   vector<double> value = read_memory(current_instruction().ingredients.at(2));
   // Write Memory in PUT_INDEX in Run
   for (int i = 0;  i < SIZE(value);  ++i) {
-    trace(9999, "mem") << "storing " << no_scientific(value.at(i)) << " in location " << address+i << end();
+    trace("mem") << "storing " << no_scientific(value.at(i)) << " in location " << address+i << end();
     put(Memory, address+i, value.at(i));
   }
   break;
diff --git a/033exclusive_container.cc b/033exclusive_container.cc
index 86dc1c8a..29a524c9 100644
--- a/033exclusive_container.cc
+++ b/033exclusive_container.cc
@@ -163,19 +163,19 @@ case MAYBE_CONVERT: {
   write_products = false;
   if (tag == static_cast<int>(get_or_insert(Memory, base_address))) {
     const reagent& variant = variant_type(base, tag);
-    trace(9999, "mem") << "storing 1 in location " << status.value << end();
+    trace("mem") << "storing 1 in location " << status.value << end();
     put(Memory, status.value, 1);
     if (!is_dummy(product)) {
       // Write Memory in Successful MAYBE_CONVERT in Run
       for (int i = 0;  i < size_of(variant);  ++i) {
         double val = get_or_insert(Memory, base_address+/*skip tag*/1+i);
-        trace(9999, "mem") << "storing " << no_scientific(val) << " in location " << product.value+i << end();
+        trace("mem") << "storing " << no_scientific(val) << " in location " << product.value+i << end();
         put(Memory, product.value+i, val);
       }
     }
   }
   else {
-    trace(9999, "mem") << "storing 0 in location " << status.value << end();
+    trace("mem") << "storing 0 in location " << status.value << end();
     put(Memory, status.value, 0);
   }
   break;
@@ -318,7 +318,7 @@ $error: 0
 :(before "End check_merge_call Special-cases")
 case EXCLUSIVE_CONTAINER: {
   assert(state.data.top().container_element_index == 0);
-  trace(9999, "transform") << "checking exclusive container " << to_string(container) << " vs ingredient " << ingredient_index << end();
+  trace("transform") << "checking exclusive container " << to_string(container) << " vs ingredient " << ingredient_index << end();
   // easy case: exact match
   if (types_strictly_match(container, inst.ingredients.at(ingredient_index)))
     return;
@@ -333,7 +333,7 @@ case EXCLUSIVE_CONTAINER: {
     return;
   }
   const reagent& variant = variant_type(container, ingredient.value);
-  trace(9999, "transform") << "tag: " << ingredient.value << end();
+  trace("transform") << "tag: " << ingredient.value << end();
   // replace union with its variant
   state.data.pop();
   state.data.push(merge_check_point(variant, 0));
diff --git a/034address.cc b/034address.cc
index 6e33279c..217562a3 100644
--- a/034address.cc
+++ b/034address.cc
@@ -302,7 +302,7 @@ int alloc, alloc_max;
 alloc = Memory_allocated_until;
 Memory_allocated_until += Initial_memory_per_routine;
 alloc_max = Memory_allocated_until;
-trace(9999, "new") << "routine allocated memory from " << alloc << " to " << alloc_max << end();
+trace("new") << "routine allocated memory from " << alloc << " to " << alloc_max << end();
 
 :(before "End Primitive Recipe Declarations")
 ALLOCATE,
@@ -314,13 +314,13 @@ case ALLOCATE: {
   int size = ingredients.at(0).at(0);
   if (SIZE(ingredients) > 1) {
     // array allocation
-    trace(9999, "mem") << "array length is " << ingredients.at(1).at(0) << end();
+    trace("mem") << "array length is " << ingredients.at(1).at(0) << end();
     size = /*space for length*/1 + size*ingredients.at(1).at(0);
   }
   int result = allocate(size);
   if (SIZE(current_instruction().ingredients) > 1) {
     // initialize array length
-    trace(9999, "mem") << "storing " << ingredients.at(1).at(0) << " in location " << result+/*skip refcount*/1 << end();
+    trace("mem") << "storing " << ingredients.at(1).at(0) << " in location " << result+/*skip refcount*/1 << end();
     put(Memory, result+/*skip refcount*/1, ingredients.at(1).at(0));
   }
   products.resize(1);
@@ -331,7 +331,7 @@ case ALLOCATE: {
 int allocate(int size) {
   // include space for refcount
   ++size;
-  trace(9999, "mem") << "allocating size " << size << end();
+  trace("mem") << "allocating size " << size << end();
 //?   Total_alloc += size;
 //?   ++Num_alloc;
   // Allocate Special-cases
@@ -339,10 +339,10 @@ int allocate(int size) {
   // really crappy at the moment
   ensure_space(size);
   const int result = Current_routine->alloc;
-  trace(9999, "mem") << "new alloc: " << result << end();
+  trace("mem") << "new alloc: " << result << end();
   // initialize allocated space
   for (int address = result;  address < result+size;  ++address) {
-    trace(9999, "mem") << "storing 0 in location " << address << end();
+    trace("mem") << "storing 0 in location " << address << end();
     put(Memory, address, 0);
   }
   Current_routine->alloc += size;
@@ -376,7 +376,7 @@ void ensure_space(int size) {
     Current_routine->alloc = Memory_allocated_until;
     Memory_allocated_until += Initial_memory_per_routine;
     Current_routine->alloc_max = Memory_allocated_until;
-    trace(9999, "new") << "routine allocated memory from " << Current_routine->alloc << " to " << Current_routine->alloc_max << end();
+    trace("new") << "routine allocated memory from " << Current_routine->alloc << " to " << Current_routine->alloc_max << end();
   }
 }
 
diff --git a/035lookup.cc b/035lookup.cc
index a0cb8fb2..343d7900 100644
--- a/035lookup.cc
+++ b/035lookup.cc
@@ -99,11 +99,11 @@ void lookup_memory(reagent& x) {
 
 void lookup_memory_core(reagent& x, bool check_for_null) {
   if (x.value == 0) return;
-  trace(9999, "mem") << "location " << x.value << " is " << no_scientific(get_or_insert(Memory, x.value)) << end();
+  trace("mem") << "location " << x.value << " is " << no_scientific(get_or_insert(Memory, x.value)) << end();
   x.set_value(get_or_insert(Memory, x.value));
   drop_from_type(x, "address");
   if (x.value) {
-    trace(9999, "mem") << "skipping refcount at " << x.value << end();
+    trace("mem") << "skipping refcount at " << x.value << end();
     x.set_value(x.value+1);  // skip refcount
   }
   else if (check_for_null) {
diff --git a/036refcount.cc b/036refcount.cc
index 1f31bcbb..ab5618aa 100644
--- a/036refcount.cc
+++ b/036refcount.cc
@@ -52,7 +52,7 @@ void increment_refcount(int new_address) {
   if (new_address == 0) return;
   ++Total_refcount_updates;
   int new_refcount = get_or_insert(Memory, new_address);
-  trace(9999, "mem") << "incrementing refcount of " << new_address << ": " << new_refcount << " -> " << new_refcount+1 << end();
+  trace("mem") << "incrementing refcount of " << new_address << ": " << new_refcount << " -> " << new_refcount+1 << end();
   put(Memory, new_address, new_refcount+1);
 }
 
@@ -70,7 +70,7 @@ void decrement_refcount(int old_address, const type_tree* payload_type, int payl
   if (old_address == 0) return;
   ++Total_refcount_updates;
   int old_refcount = get_or_insert(Memory, old_address);
-  trace(9999, "mem") << "decrementing refcount of " << old_address << ": " << old_refcount << " -> " << old_refcount-1 << end();
+  trace("mem") << "decrementing refcount of " << old_address << ": " << old_refcount << " -> " << old_refcount-1 << end();
   --old_refcount;
   put(Memory, old_address, old_refcount);
   if (old_refcount < 0) {
@@ -719,12 +719,12 @@ if (is_mu_container(canonized_x) || is_mu_exclusive_container(canonized_x)) {
 
 :(before "End Decrement Refcounts(canonized_x)")
 if (is_mu_container(canonized_x) || is_mu_exclusive_container(canonized_x)) {
-  trace(9999, "mem") << "need to read old value of '" << to_string(canonized_x) << "' to figure out what refcounts to decrement" << end();
+  trace("mem") << "need to read old value of '" << to_string(canonized_x) << "' to figure out what refcounts to decrement" << end();
   // read from canonized_x but without canonizing again
   reagent/*copy*/ tmp = canonized_x;
   tmp.properties.push_back(pair<string, string_tree*>("raw", NULL));
   vector<double> data = read_memory(tmp);
-  trace(9999, "mem") << "done reading old value of '" << to_string(canonized_x) << "'" << end();
+  trace("mem") << "done reading old value of '" << to_string(canonized_x) << "'" << end();
   const container_metadata& metadata = get(Container_metadata, canonized_x.type);
   for (map<set<tag_condition_info>, set<address_element_info> >::const_iterator p = metadata.address.begin();  p != metadata.address.end();  ++p) {
     if (!all_match(data, p->first)) continue;
diff --git a/037abandon.cc b/037abandon.cc
index 1f9e7c06..4a1517c5 100644
--- a/037abandon.cc
+++ b/037abandon.cc
@@ -15,7 +15,7 @@ def main [
 
 :(before "End Decrement Refcount(old_address, payload_type, payload_size)")
 if (old_refcount == 0) {
-  trace(9999, "mem") << "automatically abandoning " << old_address << end();
+  trace("mem") << "automatically abandoning " << old_address << end();
   abandon(old_address, payload_type, payload_size);
 }
 
@@ -26,7 +26,7 @@ map<int, int> free_list;
 
 :(code)
 void abandon(int address, const type_tree* payload_type, int payload_size) {
-  trace(9999, "abandon") << "updating refcounts inside " << address << ": " << to_string(payload_type) << end();
+  trace("abandon") << "updating refcounts inside " << address << ": " << to_string(payload_type) << end();
 //?   Total_free += size;
 //?   ++Num_free;
 //?   cerr << "abandon: " << size << '\n';
@@ -52,16 +52,16 @@ void abandon(int address, const type_tree* payload_type, int payload_size) {
   for (int curr = address;  curr < address+payload_size;  ++curr)
     put(Memory, curr, 0);
   // append existing free list to address
-  trace(9999, "abandon") << "saving " << address << " in free-list of size " << payload_size << end();
+  trace("abandon") << "saving " << address << " in free-list of size " << payload_size << end();
   put(Memory, address, get_or_insert(Current_routine->free_list, payload_size));
   put(Current_routine->free_list, payload_size, address);
 }
 
 :(after "Allocate Special-cases")
 if (get_or_insert(Current_routine->free_list, size)) {
-  trace(9999, "abandon") << "picking up space from free-list of size " << size << end();
+  trace("abandon") << "picking up space from free-list of size " << size << end();
   int result = get_or_insert(Current_routine->free_list, size);
-  trace(9999, "mem") << "new alloc from free list: " << result << end();
+  trace("mem") << "new alloc from free list: " << result << end();
   put(Current_routine->free_list, size, get_or_insert(Memory, result));
   put(Memory, result, 0);
   for (int curr = result;  curr < result+size;  ++curr) {
diff --git a/038new_text.cc b/038new_text.cc
index ab1c8874..ea73dac6 100644
--- a/038new_text.cc
+++ b/038new_text.cc
@@ -30,7 +30,7 @@ if (inst.name == "new" && !inst.ingredients.empty() && is_literal_text(inst.ingr
   if (is_literal_text(current_instruction().ingredients.at(0))) {
     products.resize(1);
     products.at(0).push_back(new_mu_text(current_instruction().ingredients.at(0).name));
-    trace(9999, "mem") << "new string alloc: " << products.at(0).at(0) << end();
+    trace("mem") << "new string alloc: " << products.at(0).at(0) << end();
     break;
   }
 
@@ -41,10 +41,10 @@ int new_mu_text(const string& contents) {
 //?   Total_alloc += string_length+1;
 //?   ++Num_alloc;
   int result = allocate(string_length+/*array length*/1);
-  trace(9999, "mem") << "storing string refcount 0 in location " << result << end();
+  trace("mem") << "storing string refcount 0 in location " << result << end();
   put(Memory, result, 0);
   int curr_address = result+/*skip refcount*/1;
-  trace(9999, "mem") << "storing string length " << string_length << " in location " << curr_address << end();
+  trace("mem") << "storing string length " << string_length << " in location " << curr_address << end();
   put(Memory, curr_address, string_length);
   ++curr_address;  // skip length
   int curr = 0;
@@ -53,7 +53,7 @@ int new_mu_text(const string& contents) {
     uint32_t curr_character;
     assert(curr < SIZE(contents));
     tb_utf8_char_to_unicode(&curr_character, &raw_contents[curr]);
-    trace(9999, "mem") << "storing string character " << curr_character << " in location " << curr_address << end();
+    trace("mem") << "storing string character " << curr_character << " in location " << curr_address << end();
     put(Memory, curr_address, curr_character);
     curr += tb_utf8_char_length(raw_contents[curr]);
     ++curr_address;
diff --git a/043space.cc b/043space.cc
index 93ea1a74..c34cf5b0 100644
--- a/043space.cc
+++ b/043space.cc
@@ -293,7 +293,7 @@ def main [
 :(before "Reclaim Space(space_address, space_recipe_ordinal, space_recipe)")
 if (get_or_insert(Memory, space_address) <= 1) {
   set<string> reclaimed_locals;
-  trace(9999, "mem") << "trying to reclaim locals" << end();
+  trace("mem") << "trying to reclaim locals" << end();
   // update any refcounts for variables in the space -- in the context of the space
   call_stack calls_stash = save_call_stack(space_address, space_recipe_ordinal);
   Current_routine->calls.swap(calls_stash);
@@ -308,7 +308,7 @@ if (get_or_insert(Memory, space_address) <= 1) {
       if (has_property(product, "lookup")) continue;
       if (has_property(product, "raw")) continue;  // tests often want to check such locations after they run
       // End Checks For Reclaiming Locals
-      trace(9999, "mem") << "trying to reclaim local " << product.original_string << end();
+      trace("mem") << "trying to reclaim local " << product.original_string << end();
       canonize(product);
       decrement_any_refcounts(product);
     }
diff --git a/050scenario.cc b/050scenario.cc
index 13f24d78..15ac93d5 100644
--- a/050scenario.cc
+++ b/050scenario.cc
@@ -431,7 +431,7 @@ void check_memory(const string& s) {
     double value = to_double(rhs);
     if (contains_key(locations_checked, address))
       raise << maybe(current_recipe_name()) << "duplicate expectation for location '" << address << "'\n" << end();
-    trace(9999, "run") << "checking location " << address << end();
+    trace("run") << "checking location " << address << end();
     if (get_or_insert(Memory, address) != value) {
       if (!Hide_errors) cerr << '\n';
       raise << "F - " << maybe(current_recipe_name()) << "expected location '" << address << "' to contain " << no_scientific(value) << " but saw " << no_scientific(get_or_insert(Memory, address)) << '\n' << end();
@@ -477,7 +477,7 @@ void check_type(const string& lhs, istream& in) {
 }
 
 void check_mu_text(int start, const string& literal) {
-  trace(9999, "run") << "checking text length at " << start << end();
+  trace("run") << "checking text length at " << start << end();
   int array_length = static_cast<int>(get_or_insert(Memory, start));
   if (array_length != SIZE(literal)) {
     if (!Hide_errors) cerr << '\n';
@@ -487,7 +487,7 @@ void check_mu_text(int start, const string& literal) {
   }
   int curr = start+1;  // now skip length
   for (int i = 0;  i < SIZE(literal);  ++i) {
-    trace(9999, "run") << "checking location " << curr+i << end();
+    trace("run") << "checking location " << curr+i << end();
     if (get_or_insert(Memory, curr+i) != literal.at(i)) {
       if (!Hide_errors) cerr << '\n';
       raise << "F - " << maybe(current_recipe_name()) << "expected location " << (curr+i) << " to contain " << literal.at(i) << " but saw " << no_scientific(get_or_insert(Memory, curr+i)) << '\n' << end();
diff --git a/053recipe_header.cc b/053recipe_header.cc
index 781e0107..16f30917 100644
--- a/053recipe_header.cc
+++ b/053recipe_header.cc
@@ -24,7 +24,7 @@ has_header = false;
 
 :(before "End Recipe Refinements")
 if (in.peek() != '[') {
-  trace(9999, "parse") << "recipe has a header; parsing" << end();
+  trace("parse") << "recipe has a header; parsing" << end();
   load_recipe_header(in, result);
 }
 
@@ -42,7 +42,7 @@ void load_recipe_header(istream& in, recipe& result) {
       raise << "recipe " << result.name << " should say '->' and not '<-'\n" << end();
     if (s == "->") break;
     result.ingredients.push_back(reagent(s));
-    trace(9999, "parse") << "header ingredient: " << result.ingredients.back().original_string << end();
+    trace("parse") << "header ingredient: " << result.ingredients.back().original_string << end();
     skip_whitespace_but_not_newline(in);
   }
   while (has_data(in) && in.peek() != '[' && in.peek() != '\n') {
@@ -53,7 +53,7 @@ void load_recipe_header(istream& in, recipe& result) {
       return;
     }
     result.products.push_back(reagent(s));
-    trace(9999, "parse") << "header product: " << result.products.back().original_string << end();
+    trace("parse") << "header product: " << result.products.back().original_string << end();
     skip_whitespace_but_not_newline(in);
   }
   // End Load Recipe Header(result)
@@ -149,7 +149,7 @@ if (!result.has_header) {
   }
 }
 if (result.has_header) {
-  trace(9999, "parse") << "recipe " << result.name << " has a header" << end();
+  trace("parse") << "recipe " << result.name << " has a header" << end();
 }
 
 //: Support type abbreviations in headers.
diff --git a/054static_dispatch.cc b/054static_dispatch.cc
index 0af3ddeb..69dc30bd 100644
--- a/054static_dispatch.cc
+++ b/054static_dispatch.cc
@@ -41,7 +41,7 @@ if (result.name != "main" && contains_key(Recipe_ordinal, result.name)) {
       put(Recipe_ordinal, new_name, Next_recipe_ordinal++);
       get_or_insert(Recipe_variants, result.name).push_back(get(Recipe_ordinal, new_name));
     }
-    trace(9999, "load") << "switching " << result.name << " to " << new_name << end();
+    trace("load") << "switching " << result.name << " to " << new_name << end();
     result.name = new_name;
     result.is_autogenerated = true;
   }
diff --git a/055shape_shifting_container.cc b/055shape_shifting_container.cc
index 702f2842..10c44155 100644
--- a/055shape_shifting_container.cc
+++ b/055shape_shifting_container.cc
@@ -144,7 +144,7 @@ if (!info.type_ingredient_names.empty()) continue;
 
 :(before "End container Name Refinements")
 if (name.find(':') != string::npos) {
-  trace(9999, "parse") << "container has type ingredients; parsing" << end();
+  trace("parse") << "container has type ingredients; parsing" << end();
   if (!read_type_ingredients(name, command)) {
     // error; skip rest of the container definition and continue
     slurp_balanced_bracket(in);
diff --git a/069hash.cc b/069hash.cc
index 51925e3d..75781ec6 100644
--- a/069hash.cc
+++ b/069hash.cc
@@ -55,10 +55,10 @@ size_t hash_mu_scalar(size_t h, const reagent& r) {
 
 size_t hash_mu_address(size_t h, reagent& r) {
   if (r.value == 0) return 0;
-  trace(9999, "mem") << "location " << r.value << " is " << no_scientific(get_or_insert(Memory, r.value)) << end();
+  trace("mem") << "location " << r.value << " is " << no_scientific(get_or_insert(Memory, r.value)) << end();
   r.set_value(get_or_insert(Memory, r.value));
   if (r.value != 0) {
-    trace(9999, "mem") << "skipping refcount at " << r.value << end();
+    trace("mem") << "skipping refcount at " << r.value << end();
     r.set_value(r.value+1);  // skip refcount
   }
   drop_from_type(r, "address");
diff --git a/073scheduler.cc b/073scheduler.cc
index d9ebef51..a8af8853 100644
--- a/073scheduler.cc
+++ b/073scheduler.cc
@@ -535,7 +535,7 @@ DISCONTINUED,
 :(before "End Scheduler State Transitions")
 if (Current_routine->limit >= 0) {
   if (Current_routine->limit <= Scheduling_interval) {
-    trace(9999, "schedule") << "discontinuing routine " << Current_routine->id << end();
+    trace("schedule") << "discontinuing routine " << Current_routine->id << end();
     Current_routine->state = DISCONTINUED;
     Current_routine->limit = 0;
   }
diff --git a/074wait.cc b/074wait.cc
index b52f3273..cf8df58c 100644
--- a/074wait.cc
+++ b/074wait.cc
@@ -132,7 +132,7 @@ for (int i = 0;  i < SIZE(Routines);  ++i) {
   if (Routines.at(i)->state != WAITING) continue;
   int loc = Routines.at(i)->waiting_on_location;
   if (loc && get_or_insert(Memory, loc) == 0) {
-    trace(9999, "schedule") << "waking up routine " << Routines.at(i)->id << end();
+    trace("schedule") << "waking up routine " << Routines.at(i)->id << end();
     put(Memory, loc, 1);
     Routines.at(i)->state = RUNNING;
     Routines.at(i)->waiting_on_location = 0;
@@ -360,7 +360,7 @@ for (int i = 0;  i < SIZE(Routines);  ++i) {
     const routine* waitee = Routines.at(j);
     if (waitee->id == id && waitee->state != RUNNING && waitee->state != WAITING) {
       // routine is COMPLETED or DISCONTINUED
-      trace(9999, "schedule") << "waking up routine " << waiter->id << end();
+      trace("schedule") << "waking up routine " << waiter->id << end();
       waiter->state = RUNNING;
       waiter->waiting_on_routine = 0;
     }
@@ -520,7 +520,7 @@ for (int i = 0;  i < SIZE(Routines);  ++i) {
     const routine* waitee = Routines.at(j);
     if (waitee->id != id) continue;
     if (waitee->state != RUNNING || waitee->blocked) {
-      trace(9999, "schedule") << "waking up routine " << waiter->id << " because routine " << waitee->id << " is blocked" << end();
+      trace("schedule") << "waking up routine " << waiter->id << " because routine " << waitee->id << " is blocked" << end();
       waiter->state = RUNNING;
       waiter->waiting_on_routine_to_block = 0;
     }
diff --git a/076continuation.cc b/076continuation.cc
index 4cfeddd5..20f56f19 100644
--- a/076continuation.cc
+++ b/076continuation.cc
@@ -204,7 +204,7 @@ if (current_instruction().ingredients.at(0).type->atom
     int space_address = Current_routine->calls.front().default_space;
     if (space_address != 0) {
       int refcount = get_or_insert(Memory, space_address);
-      trace(9999, "mem") << "incrementing refcount of " << space_address << ": " << refcount << " -> " << refcount+1 << end();
+      trace("mem") << "incrementing refcount of " << space_address << ": " << refcount << " -> " << refcount+1 << end();
       put(Memory, space_address, refcount+1);
     }
   }
diff --git a/085scenario_console.cc b/085scenario_console.cc
index 496769ab..e7a8c39a 100644
--- a/085scenario_console.cc
+++ b/085scenario_console.cc
@@ -66,7 +66,7 @@ case ASSUME_CONSOLE: {
   for (int i = 0;  i < SIZE(r.steps);  ++i) {
     const instruction& inst = r.steps.at(i);
     if (inst.name == "left-click") {
-      trace(9999, "mem") << "storing 'left-click' event starting at " << Current_routine->alloc << end();
+      trace("mem") << "storing 'left-click' event starting at " << Current_routine->alloc << end();
       put(Memory, curr_address, /*tag for 'touch-event' variant of 'event' exclusive-container*/2);
       put(Memory, curr_address+/*skip tag*/1+/*offset of 'type' in 'mouse-event'*/0, TB_KEY_MOUSE_LEFT);
       put(Memory, curr_address+/*skip tag*/1+/*offset of 'row' in 'mouse-event'*/1, to_integer(inst.ingredients.at(0).name));
@@ -74,7 +74,7 @@ case ASSUME_CONSOLE: {
       curr_address += size_of_event();
     }
     else if (inst.name == "press") {
-      trace(9999, "mem") << "storing 'press' event starting at " << curr_address << end();
+      trace("mem") << "storing 'press' event starting at " << curr_address << end();
       string key = inst.ingredients.at(0).name;
       if (is_integer(key))
         put(Memory, curr_address+1, to_integer(key));
@@ -95,18 +95,18 @@ case ASSUME_CONSOLE: {
     else {
       // keyboard input
       assert(inst.name == "type");
-      trace(9999, "mem") << "storing 'type' event starting at " << curr_address << end();
+      trace("mem") << "storing 'type' event starting at " << curr_address << end();
       const string& contents = inst.ingredients.at(0).name;
       const char* raw_contents = contents.c_str();
       int num_keyboard_events = unicode_length(contents);
       int curr = 0;
       for (int i = 0;  i < num_keyboard_events;  ++i) {
-        trace(9999, "mem") << "storing 'text' tag at " << curr_address << end();
+        trace("mem") << "storing 'text' tag at " << curr_address << end();
         put(Memory, curr_address, /*tag for 'text' variant of 'event' exclusive-container*/0);
         uint32_t curr_character;
         assert(curr < SIZE(contents));
         tb_utf8_char_to_unicode(&curr_character, &raw_contents[curr]);
-        trace(9999, "mem") << "storing character " << curr_character << " at " << curr_address+/*skip exclusive container tag*/1 << end();
+        trace("mem") << "storing character " << curr_character << " at " << curr_address+/*skip exclusive container tag*/1 << end();
         put(Memory, curr_address+/*skip exclusive container tag*/1, curr_character);
         curr += tb_utf8_char_length(raw_contents[curr]);
         curr_address += size_of_event();
@@ -116,9 +116,9 @@ case ASSUME_CONSOLE: {
   assert(curr_address == event_data_address+size);
   // wrap the array of events in a console object
   int console_address = allocate(size_of_console());
-  trace(9999, "mem") << "storing console in " << console_address << end();
+  trace("mem") << "storing console in " << console_address << end();
   put(Memory, CONSOLE, console_address);
-  trace(9999, "mem") << "storing console data in " << console_address+/*skip refcount*/1+/*offset of 'data' in container 'events'*/1 << end();
+  trace("mem") << "storing console data in " << console_address+/*skip refcount*/1+/*offset of 'data' in container 'events'*/1 << end();
   put(Memory, console_address+/*skip refcount*/1+/*offset of 'data' in container 'events'*/1, event_data_address);
   // increment refcount for event data
   put(Memory, event_data_address, 1);
diff --git a/089scenario_filesystem.cc b/089scenario_filesystem.cc
index 1e64baec..fa0946bf 100644
--- a/089scenario_filesystem.cc
+++ b/089scenario_filesystem.cc
@@ -207,31 +207,31 @@ void construct_resources_object(const map<string, string>& contents) {
   int curr = resources_data_address + /*skip refcount and length*/2;
   for (map<string, string>::const_iterator p = contents.begin();  p != contents.end();  ++p) {
     put(Memory, curr, new_mu_text(p->first));
-    trace(9999, "mem") << "storing file name " << get(Memory, curr) << " in location " << curr << end();
+    trace("mem") << "storing file name " << get(Memory, curr) << " in location " << curr << end();
     put(Memory, get(Memory, curr), 1);
-    trace(9999, "mem") << "storing refcount 1 in location " << get(Memory, curr) << end();
+    trace("mem") << "storing refcount 1 in location " << get(Memory, curr) << end();
     ++curr;
     put(Memory, curr, new_mu_text(p->second));
-    trace(9999, "mem") << "storing file contents " << get(Memory, curr) << " in location " << curr << end();
+    trace("mem") << "storing file contents " << get(Memory, curr) << " in location " << curr << end();
     put(Memory, get(Memory, curr), 1);
-    trace(9999, "mem") << "storing refcount 1 in location " << get(Memory, curr) << end();
+    trace("mem") << "storing refcount 1 in location " << get(Memory, curr) << end();
     ++curr;
   }
   curr = resources_data_address+/*skip refcount*/1;
   put(Memory, curr, SIZE(contents));  // size of array
-  trace(9999, "mem") << "storing resources size " << get(Memory, curr) << " in location " << curr << end();
+  trace("mem") << "storing resources size " << get(Memory, curr) << " in location " << curr << end();
   put(Memory, resources_data_address, 1);  // initialize refcount
-  trace(9999, "mem") << "storing refcount 1 in location " << resources_data_address << end();
+  trace("mem") << "storing refcount 1 in location " << resources_data_address << end();
   // wrap the resources data in a 'resources' object
   int resources_address = allocate(size_of_resources());
   curr = resources_address+/*skip refcount*/1+/*offset of 'data' element*/1;
   put(Memory, curr, resources_data_address);
-  trace(9999, "mem") << "storing resources data address " << resources_data_address << " in location " << curr << end();
+  trace("mem") << "storing resources data address " << resources_data_address << " in location " << curr << end();
   put(Memory, resources_address, 1);  // initialize refcount
-  trace(9999, "mem") << "storing refcount 1 in location " << resources_address << end();
+  trace("mem") << "storing refcount 1 in location " << resources_address << end();
   // save in product
   put(Memory, RESOURCES, resources_address);
-  trace(9999, "mem") << "storing resources address " << resources_address << " in location " << RESOURCES << end();
+  trace("mem") << "storing resources address " << resources_address << " in location " << RESOURCES << end();
 }
 
 int size_of_resources() {