40 #include "runtime/thread.inline.hpp" |
40 #include "runtime/thread.inline.hpp" |
41 #include "runtime/vm_operations.hpp" |
41 #include "runtime/vm_operations.hpp" |
42 #include "services/threadService.hpp" |
42 #include "services/threadService.hpp" |
43 #include "trace/tracing.hpp" |
43 #include "trace/tracing.hpp" |
44 |
44 |
45 PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC |
|
46 |
|
47 #define VM_OP_NAME_INITIALIZE(name) #name, |
45 #define VM_OP_NAME_INITIALIZE(name) #name, |
48 |
46 |
49 const char* VM_Operation::_names[VM_Operation::VMOp_Terminating] = \ |
47 const char* VM_Operation::_names[VM_Operation::VMOp_Terminating] = \ |
50 { VM_OPS_DO(VM_OP_NAME_INITIALIZE) }; |
48 { VM_OPS_DO(VM_OP_NAME_INITIALIZE) }; |
51 |
49 |
77 default : return "unknown"; |
75 default : return "unknown"; |
78 } |
76 } |
79 } |
77 } |
80 // Called by fatal error handler. |
78 // Called by fatal error handler. |
81 void VM_Operation::print_on_error(outputStream* st) const { |
79 void VM_Operation::print_on_error(outputStream* st) const { |
82 st->print("VM_Operation (" PTR_FORMAT "): ", this); |
80 st->print("VM_Operation (" PTR_FORMAT "): ", p2i(this)); |
83 st->print("%s", name()); |
81 st->print("%s", name()); |
84 |
82 |
85 const char* mode = mode_to_string(evaluation_mode()); |
83 const char* mode = mode_to_string(evaluation_mode()); |
86 st->print(", mode: %s", mode); |
84 st->print(", mode: %s", mode); |
87 |
85 |
88 if (calling_thread()) { |
86 if (calling_thread()) { |
89 st->print(", requested by thread " PTR_FORMAT, calling_thread()); |
87 st->print(", requested by thread " PTR_FORMAT, p2i(calling_thread())); |
90 } |
88 } |
91 } |
89 } |
92 |
90 |
93 void VM_ThreadStop::doit() { |
91 void VM_ThreadStop::doit() { |
94 assert(SafepointSynchronize::is_at_safepoint(), "must be at a safepoint"); |
92 assert(SafepointSynchronize::is_at_safepoint(), "must be at a safepoint"); |