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. --- 073scheduler.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '073scheduler.cc') diff --git a/073scheduler.cc b/073scheduler.cc index aa22bcfb..4270ecb1 100644 --- a/073scheduler.cc +++ b/073scheduler.cc @@ -69,7 +69,7 @@ void run(routine* rr) { skip_to_next_routine(); assert(Current_routine); assert(Current_routine->state == RUNNING); - trace(9990, "schedule") << current_routine_label() << end(); + trace(100, "schedule") << current_routine_label() << end(); run_current_routine(); // Scheduler State Transitions if (Current_routine->completed()) @@ -465,7 +465,7 @@ DISCONTINUED, :(before "End Scheduler State Transitions") if (Current_routine->limit >= 0) { if (Current_routine->limit <= Scheduling_interval) { - trace("schedule") << "discontinuing routine " << Current_routine->id << end(); + trace(100, "schedule") << "discontinuing routine " << Current_routine->id << end(); Current_routine->state = DISCONTINUED; Current_routine->limit = 0; } -- cgit 1.4.1-2-gfad0