Skip to content

Commit

Permalink
Label Threads, Fibers, & MachineThreads in VM backtrace.
Browse files Browse the repository at this point in the history
  • Loading branch information
brixen committed Jun 20, 2016
1 parent 50a8915 commit 3d2adf1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions machine/memory/managed.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,17 @@ namespace memory {
}
}

const char* kind_name() const {
switch(kind_) {
case eThread:
return "Thread";
case eFiber:
return "Fiber";
case eSystem:
return "MachineThread";
}
}

Kind kind() const {
return kind_;
}
Expand Down
2 changes: 1 addition & 1 deletion machine/signal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ namespace rubinius {

while(frame) {
if(first) {
logger::fatal("--- Thread %d backtrace ---", vm->thread_id());
logger::fatal("--- %s %d backtrace ---", vm->kind_name(), vm->thread_id());
first = false;
}

Expand Down

0 comments on commit 3d2adf1

Please sign in to comment.