From c442a5ad806b6cccbb3ec4c5744b14b0c1f31a01 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Mon, 25 Feb 2019 00:17:46 -0800 Subject: 4987 - support `browse_trace` tool in SubX I've extracted it into a separate binary, independent of my Mu prototype. I also cleaned up my tracing layer to be a little nicer. Major improvements: - Realized that incremental tracing really ought to be the default. And to minimize printing traces to screen. - Finally figured out how to combine layers and call stack frames in a single dimension of depth. The answer: optimize for the experience of `browse_trace`. Instructions occupy a range of depths based on their call stack frame, and minor details of an instruction lie one level deeper in each case. Other than that, I spent some time adjusting levels everywhere to make `browse_trace` useful. --- 062convert_ingredients_to_text.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to '062convert_ingredients_to_text.cc') diff --git a/062convert_ingredients_to_text.cc b/062convert_ingredients_to_text.cc index d3d3291a..8739f47b 100644 --- a/062convert_ingredients_to_text.cc +++ b/062convert_ingredients_to_text.cc @@ -59,7 +59,7 @@ Transform.push_back(convert_ingredients_to_text); // idempotent :(code) void convert_ingredients_to_text(const recipe_ordinal r) { recipe& caller = get(Recipe, r); - trace(9991, "transform") << "--- convert some ingredients to text in recipe " << caller.name << end(); + trace(101, "transform") << "--- convert some ingredients to text in recipe " << caller.name << end(); // in recipes without named locations, 'stash' is still not extensible if (contains_numeric_locations(caller)) return; convert_ingredients_to_text(caller); @@ -100,7 +100,7 @@ void convert_ingredients_to_text(recipe& caller) { } } } - trace(9993, "transform") << to_string(inst) << end(); + trace(103, "transform") << to_string(inst) << end(); new_instructions.push_back(inst); } caller.steps.swap(new_instructions); @@ -125,7 +125,7 @@ void convert_ingredient_to_text(reagent& r, vector& out, const stri def.ingredients.push_back(r); } def.products.push_back(reagent(tmp_var)); - trace(9993, "transform") << to_string(def) << end(); + trace(103, "transform") << to_string(def) << end(); out.push_back(def); r.clear(); // reclaim old memory r = reagent(tmp_var); -- cgit 1.4.1-2-gfad0