equal
deleted
inserted
replaced
39 #define VM_OP_ENUM(type) VMOp_##type, |
39 #define VM_OP_ENUM(type) VMOp_##type, |
40 |
40 |
41 // Note: When new VM_XXX comes up, add 'XXX' to the template table. |
41 // Note: When new VM_XXX comes up, add 'XXX' to the template table. |
42 #define VM_OPS_DO(template) \ |
42 #define VM_OPS_DO(template) \ |
43 template(None) \ |
43 template(None) \ |
|
44 template(Cleanup) \ |
44 template(ThreadStop) \ |
45 template(ThreadStop) \ |
45 template(ThreadDump) \ |
46 template(ThreadDump) \ |
46 template(PrintThreads) \ |
47 template(PrintThreads) \ |
47 template(FindDeadlocks) \ |
48 template(FindDeadlocks) \ |
48 template(ClearICs) \ |
49 template(ClearICs) \ |
211 |
212 |
212 static const char* mode_to_string(Mode mode); |
213 static const char* mode_to_string(Mode mode); |
213 |
214 |
214 // Debugging |
215 // Debugging |
215 virtual void print_on_error(outputStream* st) const; |
216 virtual void print_on_error(outputStream* st) const; |
216 const char* name() const { return _names[type()]; } |
217 virtual const char* name() const { return _names[type()]; } |
217 static const char* name(int type) { |
218 static const char* name(int type) { |
218 assert(type >= 0 && type < VMOp_Terminating, "invalid VM operation type"); |
219 assert(type >= 0 && type < VMOp_Terminating, "invalid VM operation type"); |
219 return _names[type]; |
220 return _names[type]; |
220 } |
221 } |
221 #ifndef PRODUCT |
222 #ifndef PRODUCT |
222 void print_on(outputStream* st) const { print_on_error(st); } |
223 void print_on(outputStream* st) const { print_on_error(st); } |
223 #endif |
224 #endif |
|
225 }; |
|
226 |
|
227 class VM_None: public VM_Operation { |
|
228 const char* _reason; |
|
229 public: |
|
230 VM_None(const char* reason) : _reason(reason) {} |
|
231 const char* name() const { return _reason; } |
|
232 VMOp_Type type() const { return VMOp_None; } |
|
233 void doit() {}; |
|
234 }; |
|
235 |
|
236 class VM_Cleanup: public VM_Operation { |
|
237 public: |
|
238 VMOp_Type type() const { return VMOp_Cleanup; } |
|
239 void doit() {}; |
224 }; |
240 }; |
225 |
241 |
226 class VM_ThreadStop: public VM_Operation { |
242 class VM_ThreadStop: public VM_Operation { |
227 private: |
243 private: |
228 oop _thread; // The Thread that the Throwable is thrown against |
244 oop _thread; // The Thread that the Throwable is thrown against |