History

Enable logging from exec for specific components. Remove trailing newlines from all existing logging calls.

arr committed 9 years ago

Commit dd0789c1 parent 3098fb816 files · +185 −112Browse files

Showing the changes to src/vm/thread.cpp (1 of 16 files). Show all

Unified · Split

src/vm/thread.cpp+5−5
@@ -34,7 +34,7 @@ namespace · 33 unmodified lines
34 debug::log_msg(34 debug::log_msg(
35 debug::component_trace_t::addressing,35 debug::component_trace_t::addressing,
36 debug::log_level_t::debug,36 debug::log_level_t::debug,
37 "decode: registers: %d (%#" PRIxPTR " %#" PRIxPTR " %#" PRIxPTR ")\n",37 "decode: registers: %d (%#" PRIxPTR " %#" PRIxPTR " %#" PRIxPTR ")",
38 inst.opcode,38 inst.opcode,
39 reg.src,39 reg.src,
40 reg.mid,40 reg.mid,
@@ -127,7 +127,7 @@ vm_thread_t::vm_thread_t( · 86 unmodified lines
127 // Pushing the initial frame sets the FP register127 // Pushing the initial frame sets the FP register
128 _registers.stack.push_frame();128 _registers.stack.push_frame();
129 129
130 debug::log_msg(debug::component_trace_t::thread, debug::log_level_t::debug, "init: vm thread: %d %d\n", _thread_id, _parent_thread_id);130 debug::log_msg(debug::component_trace_t::thread, debug::log_level_t::debug, "init: vm thread: %d %d", _thread_id, _parent_thread_id);
131}131}
132 132
133vm_thread_t::vm_thread_t(133vm_thread_t::vm_thread_t(
@@ -157,13 +157,13 @@ vm_thread_t::vm_thread_t( · 23 unmodified lines
157 current_frame->copy_frame_contents(initial_frame);157 current_frame->copy_frame_contents(initial_frame);
158 158
159 if (debug::is_component_tracing_enabled<debug::component_trace_t::thread>())159 if (debug::is_component_tracing_enabled<debug::component_trace_t::thread>())
160 debug::log_msg(debug::component_trace_t::thread, debug::log_level_t::debug, "init: vm thread: %d %d\n", _thread_id, _parent_thread_id);160 debug::log_msg(debug::component_trace_t::thread, debug::log_level_t::debug, "init: vm thread: %d %d", _thread_id, _parent_thread_id);
161}161}
162 162
163vm_thread_t::~vm_thread_t()163vm_thread_t::~vm_thread_t()
164{164{
165 if (debug::is_component_tracing_enabled<debug::component_trace_t::thread>())165 if (debug::is_component_tracing_enabled<debug::component_trace_t::thread>())
166 debug::log_msg(debug::component_trace_t::thread, debug::log_level_t::debug, "destroy: vm thread: %d %d\n", _thread_id, _parent_thread_id);166 debug::log_msg(debug::component_trace_t::thread, debug::log_level_t::debug, "destroy: vm thread: %d %d", _thread_id, _parent_thread_id);
167 167
168 free_memory(_error_message);168 free_memory(_error_message);
169 debug::assign_debug_pointer(&_error_message);169 debug::assign_debug_pointer(&_error_message);
@@ -267,7 +267,7 @@ vm_thread_state_t vm_thread_t::execute(vm_t &vm, const uint32_t quanta) · 97 unmodified lines
267 debug::log_msg(267 debug::log_msg(
268 debug::component_trace_t::thread,268 debug::component_trace_t::thread,
269 debug::log_level_t::debug,269 debug::log_level_t::debug,
270 "status: vm thread: execute: %d %d %d %d\n",270 "status: vm thread: execute: %d %d %d %d",
271 _thread_id,271 _thread_id,
272 (quanta - _registers.current_thread_quanta),272 (quanta - _registers.current_thread_quanta),
273 quanta,273 quanta,