100 template(ShenandoahFinalUpdateRefs) \
101 template(ShenandoahDegeneratedGC) \
102 template(Exit) \
103 template(LinuxDllLoad) \
104 template(RotateGCLog) \
105 template(WhiteBoxOperation) \
106 template(JVMCIResizeCounters) \
107 template(ClassLoaderStatsOperation) \
108 template(ClassLoaderHierarchyOperation) \
109 template(DumpHashtable) \
110 template(DumpTouchedMethods) \
111 template(PrintCompileQueue) \
112 template(PrintClassHierarchy) \
113 template(ThreadSuspend) \
114 template(ThreadsSuspendJVMTI) \
115 template(ICBufferFull) \
116 template(ScavengeMonitors) \
117 template(PrintMetadata) \
118 template(GTestExecuteAtSafepoint) \
119 template(JFROldObject) \
120
121 class VM_Operation : public StackObj {
122 public:
123 enum VMOp_Type {
124 VM_OPS_DO(VM_OP_ENUM)
125 VMOp_Terminating
126 };
127
128 private:
129 Thread* _calling_thread;
130 VM_Operation* _next;
131 VM_Operation* _prev;
132
133 // The VM operation name array
134 static const char* _names[];
135
136 public:
137 VM_Operation() : _calling_thread(NULL), _next(NULL), _prev(NULL) {}
138
139 // VM operation support (used by VM thread)
401 static void block_if_vm_exited() {
402 if (_vm_exited) {
403 wait_if_vm_exited();
404 }
405 }
406 VMOp_Type type() const { return VMOp_Exit; }
407 bool doit_prologue();
408 void doit();
409 };
410
411 class VM_PrintCompileQueue: public VM_Operation {
412 private:
413 outputStream* _out;
414
415 public:
416 VM_PrintCompileQueue(outputStream* st) : _out(st) {}
417 VMOp_Type type() const { return VMOp_PrintCompileQueue; }
418 void doit();
419 };
420
421 #if INCLUDE_SERVICES
422 class VM_PrintClassHierarchy: public VM_Operation {
423 private:
424 outputStream* _out;
425 bool _print_interfaces;
426 bool _print_subclasses;
427 char* _classname;
428
429 public:
430 VM_PrintClassHierarchy(outputStream* st, bool print_interfaces, bool print_subclasses, char* classname) :
431 _out(st), _print_interfaces(print_interfaces), _print_subclasses(print_subclasses),
432 _classname(classname) {}
433 VMOp_Type type() const { return VMOp_PrintClassHierarchy; }
434 void doit();
435 };
436 #endif // INCLUDE_SERVICES
437
438 #endif // SHARE_RUNTIME_VMOPERATIONS_HPP
|
100 template(ShenandoahFinalUpdateRefs) \
101 template(ShenandoahDegeneratedGC) \
102 template(Exit) \
103 template(LinuxDllLoad) \
104 template(RotateGCLog) \
105 template(WhiteBoxOperation) \
106 template(JVMCIResizeCounters) \
107 template(ClassLoaderStatsOperation) \
108 template(ClassLoaderHierarchyOperation) \
109 template(DumpHashtable) \
110 template(DumpTouchedMethods) \
111 template(PrintCompileQueue) \
112 template(PrintClassHierarchy) \
113 template(ThreadSuspend) \
114 template(ThreadsSuspendJVMTI) \
115 template(ICBufferFull) \
116 template(ScavengeMonitors) \
117 template(PrintMetadata) \
118 template(GTestExecuteAtSafepoint) \
119 template(JFROldObject) \
120 template(ClassPrintLayout) \
121
122 class VM_Operation : public StackObj {
123 public:
124 enum VMOp_Type {
125 VM_OPS_DO(VM_OP_ENUM)
126 VMOp_Terminating
127 };
128
129 private:
130 Thread* _calling_thread;
131 VM_Operation* _next;
132 VM_Operation* _prev;
133
134 // The VM operation name array
135 static const char* _names[];
136
137 public:
138 VM_Operation() : _calling_thread(NULL), _next(NULL), _prev(NULL) {}
139
140 // VM operation support (used by VM thread)
402 static void block_if_vm_exited() {
403 if (_vm_exited) {
404 wait_if_vm_exited();
405 }
406 }
407 VMOp_Type type() const { return VMOp_Exit; }
408 bool doit_prologue();
409 void doit();
410 };
411
412 class VM_PrintCompileQueue: public VM_Operation {
413 private:
414 outputStream* _out;
415
416 public:
417 VM_PrintCompileQueue(outputStream* st) : _out(st) {}
418 VMOp_Type type() const { return VMOp_PrintCompileQueue; }
419 void doit();
420 };
421
422 class VM_PrintClassLayout: public VM_Operation {
423 private:
424 outputStream* _out;
425 char* _class_name;
426 public:
427 VM_PrintClassLayout(outputStream* st, char* class_name): _out(st), _class_name(class_name) {}
428 VMOp_Type type() const { return VMOp_PrintClassHierarchy; }
429 void doit();
430 };
431
432 #if INCLUDE_SERVICES
433 class VM_PrintClassHierarchy: public VM_Operation {
434 private:
435 outputStream* _out;
436 bool _print_interfaces;
437 bool _print_subclasses;
438 char* _classname;
439
440 public:
441 VM_PrintClassHierarchy(outputStream* st, bool print_interfaces, bool print_subclasses, char* classname) :
442 _out(st), _print_interfaces(print_interfaces), _print_subclasses(print_subclasses),
443 _classname(classname) {}
444 VMOp_Type type() const { return VMOp_PrintClassHierarchy; }
445 void doit();
446 };
447 #endif // INCLUDE_SERVICES
448
449 #endif // SHARE_RUNTIME_VMOPERATIONS_HPP
|