110 template(ShenandoahFinalUpdateRefs) \
111 template(ShenandoahDegeneratedGC) \
112 template(Exit) \
113 template(LinuxDllLoad) \
114 template(RotateGCLog) \
115 template(WhiteBoxOperation) \
116 template(JVMCIResizeCounters) \
117 template(ClassLoaderStatsOperation) \
118 template(ClassLoaderHierarchyOperation) \
119 template(DumpHashtable) \
120 template(DumpTouchedMethods) \
121 template(MarkActiveNMethods) \
122 template(PrintCompileQueue) \
123 template(PrintClassHierarchy) \
124 template(ThreadSuspend) \
125 template(ThreadsSuspendJVMTI) \
126 template(ICBufferFull) \
127 template(ScavengeMonitors) \
128 template(PrintMetadata) \
129 template(GTestExecuteAtSafepoint) \
130 template(VTBufferStats) \
131
132 class VM_Operation: public CHeapObj<mtInternal> {
133 public:
134 enum Mode {
135 _safepoint, // blocking, safepoint, vm_op C-heap allocated
136 _no_safepoint, // blocking, no safepoint, vm_op C-Heap allocated
137 _concurrent, // non-blocking, no safepoint, vm_op C-Heap allocated
138 _async_safepoint // non-blocking, safepoint, vm_op C-Heap allocated
139 };
140
141 enum VMOp_Type {
142 VM_OPS_DO(VM_OP_ENUM)
143 VMOp_Terminating
144 };
145
146 private:
147 Thread* _calling_thread;
148 ThreadPriority _priority;
149 long _timestamp;
150 VM_Operation* _next;
488 static void block_if_vm_exited() {
489 if (_vm_exited) {
490 wait_if_vm_exited();
491 }
492 }
493 VMOp_Type type() const { return VMOp_Exit; }
494 void doit();
495 };
496
497 class VM_PrintCompileQueue: public VM_Operation {
498 private:
499 outputStream* _out;
500
501 public:
502 VM_PrintCompileQueue(outputStream* st) : _out(st) {}
503 VMOp_Type type() const { return VMOp_PrintCompileQueue; }
504 Mode evaluation_mode() const { return _safepoint; }
505 void doit();
506 };
507
508 #if INCLUDE_SERVICES
509 class VM_PrintClassHierarchy: public VM_Operation {
510 private:
511 outputStream* _out;
512 bool _print_interfaces;
513 bool _print_subclasses;
514 char* _classname;
515
516 public:
517 VM_PrintClassHierarchy(outputStream* st, bool print_interfaces, bool print_subclasses, char* classname) :
518 _out(st), _print_interfaces(print_interfaces), _print_subclasses(print_subclasses),
519 _classname(classname) {}
520 VMOp_Type type() const { return VMOp_PrintClassHierarchy; }
521 void doit();
522 };
523 #endif // INCLUDE_SERVICES
524
525 #endif // SHARE_RUNTIME_VMOPERATIONS_HPP
|
110 template(ShenandoahFinalUpdateRefs) \
111 template(ShenandoahDegeneratedGC) \
112 template(Exit) \
113 template(LinuxDllLoad) \
114 template(RotateGCLog) \
115 template(WhiteBoxOperation) \
116 template(JVMCIResizeCounters) \
117 template(ClassLoaderStatsOperation) \
118 template(ClassLoaderHierarchyOperation) \
119 template(DumpHashtable) \
120 template(DumpTouchedMethods) \
121 template(MarkActiveNMethods) \
122 template(PrintCompileQueue) \
123 template(PrintClassHierarchy) \
124 template(ThreadSuspend) \
125 template(ThreadsSuspendJVMTI) \
126 template(ICBufferFull) \
127 template(ScavengeMonitors) \
128 template(PrintMetadata) \
129 template(GTestExecuteAtSafepoint) \
130 template(ClassPrintLayout) \
131
132 class VM_Operation: public CHeapObj<mtInternal> {
133 public:
134 enum Mode {
135 _safepoint, // blocking, safepoint, vm_op C-heap allocated
136 _no_safepoint, // blocking, no safepoint, vm_op C-Heap allocated
137 _concurrent, // non-blocking, no safepoint, vm_op C-Heap allocated
138 _async_safepoint // non-blocking, safepoint, vm_op C-Heap allocated
139 };
140
141 enum VMOp_Type {
142 VM_OPS_DO(VM_OP_ENUM)
143 VMOp_Terminating
144 };
145
146 private:
147 Thread* _calling_thread;
148 ThreadPriority _priority;
149 long _timestamp;
150 VM_Operation* _next;
488 static void block_if_vm_exited() {
489 if (_vm_exited) {
490 wait_if_vm_exited();
491 }
492 }
493 VMOp_Type type() const { return VMOp_Exit; }
494 void doit();
495 };
496
497 class VM_PrintCompileQueue: public VM_Operation {
498 private:
499 outputStream* _out;
500
501 public:
502 VM_PrintCompileQueue(outputStream* st) : _out(st) {}
503 VMOp_Type type() const { return VMOp_PrintCompileQueue; }
504 Mode evaluation_mode() const { return _safepoint; }
505 void doit();
506 };
507
508 class VM_PrintClassLayout: public VM_Operation {
509 private:
510 outputStream* _out;
511 char* _class_name;
512 public:
513 VM_PrintClassLayout(outputStream* st, char* class_name): _out(st), _class_name(class_name) {}
514 VMOp_Type type() const { return VMOp_PrintClassHierarchy; }
515 void doit();
516 };
517
518 #if INCLUDE_SERVICES
519 class VM_PrintClassHierarchy: public VM_Operation {
520 private:
521 outputStream* _out;
522 bool _print_interfaces;
523 bool _print_subclasses;
524 char* _classname;
525
526 public:
527 VM_PrintClassHierarchy(outputStream* st, bool print_interfaces, bool print_subclasses, char* classname) :
528 _out(st), _print_interfaces(print_interfaces), _print_subclasses(print_subclasses),
529 _classname(classname) {}
530 VMOp_Type type() const { return VMOp_PrintClassHierarchy; }
531 void doit();
532 };
533 #endif // INCLUDE_SERVICES
534
535 #endif // SHARE_RUNTIME_VMOPERATIONS_HPP
|