83 template(GetStackTrace) \
84 template(GetMultipleStackTraces) \
85 template(GetAllStackTraces) \
86 template(GetThreadListStackTraces) \
87 template(GetFrameCount) \
88 template(GetFrameLocation) \
89 template(ChangeBreakpoints) \
90 template(GetOrSetLocal) \
91 template(GetCurrentLocation) \
92 template(EnterInterpOnlyMode) \
93 template(ChangeSingleStep) \
94 template(HeapWalkOperation) \
95 template(HeapIterateOperation) \
96 template(ReportJavaOutOfMemory) \
97 template(JFRCheckpoint) \
98 template(Exit) \
99 template(LinuxDllLoad) \
100 template(RotateGCLog) \
101 template(WhiteBoxOperation) \
102 template(ClassLoaderStatsOperation) \
103 template(PrintCompileQueue) \
104 template(PrintCodeList) \
105 template(PrintCodeCache) \
106
107 class VM_Operation: public CHeapObj<mtInternal> {
108 public:
109 enum Mode {
110 _safepoint, // blocking, safepoint, vm_op C-heap allocated
111 _no_safepoint, // blocking, no safepoint, vm_op C-Heap allocated
112 _concurrent, // non-blocking, no safepoint, vm_op C-Heap allocated
113 _async_safepoint // non-blocking, safepoint, vm_op C-Heap allocated
114 };
115
116 enum VMOp_Type {
117 VM_OPS_DO(VM_OP_ENUM)
118 VMOp_Terminating
119 };
120
121 private:
122 Thread* _calling_thread;
235 };
236
237 // dummy vm op, evaluated just to force a safepoint
238 class VM_ForceAsyncSafepoint: public VM_Operation {
239 public:
240 VM_ForceAsyncSafepoint() {}
241 void doit() {}
242 VMOp_Type type() const { return VMOp_ForceAsyncSafepoint; }
243 Mode evaluation_mode() const { return _async_safepoint; }
244 bool is_cheap_allocated() const { return true; }
245 };
246
247 class VM_Deoptimize: public VM_Operation {
248 public:
249 VM_Deoptimize() {}
250 VMOp_Type type() const { return VMOp_Deoptimize; }
251 void doit();
252 bool allow_nested_vm_operations() const { return true; }
253 };
254
255
256 // Deopt helper that can deoptimize frames in threads other than the
257 // current thread. Only used through Deoptimization::deoptimize_frame.
258 class VM_DeoptimizeFrame: public VM_Operation {
259 friend class Deoptimization;
260
261 private:
262 JavaThread* _thread;
263 intptr_t* _id;
264 VM_DeoptimizeFrame(JavaThread* thread, intptr_t* id);
265
266 public:
267 VMOp_Type type() const { return VMOp_DeoptimizeFrame; }
268 void doit();
269 bool allow_nested_vm_operations() const { return true; }
270 };
271
272 #ifndef PRODUCT
273 class VM_DeoptimizeAll: public VM_Operation {
274 private:
|
83 template(GetStackTrace) \
84 template(GetMultipleStackTraces) \
85 template(GetAllStackTraces) \
86 template(GetThreadListStackTraces) \
87 template(GetFrameCount) \
88 template(GetFrameLocation) \
89 template(ChangeBreakpoints) \
90 template(GetOrSetLocal) \
91 template(GetCurrentLocation) \
92 template(EnterInterpOnlyMode) \
93 template(ChangeSingleStep) \
94 template(HeapWalkOperation) \
95 template(HeapIterateOperation) \
96 template(ReportJavaOutOfMemory) \
97 template(JFRCheckpoint) \
98 template(Exit) \
99 template(LinuxDllLoad) \
100 template(RotateGCLog) \
101 template(WhiteBoxOperation) \
102 template(ClassLoaderStatsOperation) \
103 template(MarkActiveNMethods) \
104 template(PrintCompileQueue) \
105 template(PrintCodeList) \
106 template(PrintCodeCache) \
107
108 class VM_Operation: public CHeapObj<mtInternal> {
109 public:
110 enum Mode {
111 _safepoint, // blocking, safepoint, vm_op C-heap allocated
112 _no_safepoint, // blocking, no safepoint, vm_op C-Heap allocated
113 _concurrent, // non-blocking, no safepoint, vm_op C-Heap allocated
114 _async_safepoint // non-blocking, safepoint, vm_op C-Heap allocated
115 };
116
117 enum VMOp_Type {
118 VM_OPS_DO(VM_OP_ENUM)
119 VMOp_Terminating
120 };
121
122 private:
123 Thread* _calling_thread;
236 };
237
238 // dummy vm op, evaluated just to force a safepoint
239 class VM_ForceAsyncSafepoint: public VM_Operation {
240 public:
241 VM_ForceAsyncSafepoint() {}
242 void doit() {}
243 VMOp_Type type() const { return VMOp_ForceAsyncSafepoint; }
244 Mode evaluation_mode() const { return _async_safepoint; }
245 bool is_cheap_allocated() const { return true; }
246 };
247
248 class VM_Deoptimize: public VM_Operation {
249 public:
250 VM_Deoptimize() {}
251 VMOp_Type type() const { return VMOp_Deoptimize; }
252 void doit();
253 bool allow_nested_vm_operations() const { return true; }
254 };
255
256 class VM_MarkActiveNMethods: public VM_Operation {
257 public:
258 VM_MarkActiveNMethods() {}
259 VMOp_Type type() const { return VMOp_MarkActiveNMethods; }
260 void doit();
261 bool allow_nested_vm_operations() const { return true; }
262 };
263
264 // Deopt helper that can deoptimize frames in threads other than the
265 // current thread. Only used through Deoptimization::deoptimize_frame.
266 class VM_DeoptimizeFrame: public VM_Operation {
267 friend class Deoptimization;
268
269 private:
270 JavaThread* _thread;
271 intptr_t* _id;
272 VM_DeoptimizeFrame(JavaThread* thread, intptr_t* id);
273
274 public:
275 VMOp_Type type() const { return VMOp_DeoptimizeFrame; }
276 void doit();
277 bool allow_nested_vm_operations() const { return true; }
278 };
279
280 #ifndef PRODUCT
281 class VM_DeoptimizeAll: public VM_Operation {
282 private:
|