8149789: SIGSEGV in CompileTask::print
Print tasks from active compile threads requires safepoint Reviewed-by: kvn
This commit is contained in:
parent
e09bb29c2d
commit
607365df56
@ -469,7 +469,6 @@ CompileQueue* CompileBroker::compile_queue(int comp_level) {
|
||||
void CompileBroker::print_compile_queues(outputStream* st) {
|
||||
st->print_cr("Current compiles: ");
|
||||
MutexLocker locker(MethodCompileQueue_lock);
|
||||
MutexLocker locker2(Threads_lock);
|
||||
|
||||
char buf[2000];
|
||||
int buflen = sizeof(buf);
|
||||
|
@ -485,6 +485,10 @@ void VM_Exit::wait_if_vm_exited() {
|
||||
}
|
||||
}
|
||||
|
||||
void VM_PrintCompileQueue::doit() {
|
||||
CompileBroker::print_compile_queues(_out);
|
||||
}
|
||||
|
||||
#if INCLUDE_SERVICES
|
||||
void VM_PrintClassHierarchy::doit() {
|
||||
KlassHierarchy::print_class_hierarchy(_out, _print_interfaces, _print_subclasses, _classname);
|
||||
|
@ -105,6 +105,7 @@
|
||||
template(DumpHashtable) \
|
||||
template(DumpTouchedMethods) \
|
||||
template(MarkActiveNMethods) \
|
||||
template(PrintCompileQueue) \
|
||||
template(PrintClassHierarchy) \
|
||||
|
||||
class VM_Operation: public CHeapObj<mtInternal> {
|
||||
@ -421,6 +422,17 @@ class VM_Exit: public VM_Operation {
|
||||
void doit();
|
||||
};
|
||||
|
||||
class VM_PrintCompileQueue: public VM_Operation {
|
||||
private:
|
||||
outputStream* _out;
|
||||
|
||||
public:
|
||||
VM_PrintCompileQueue(outputStream* st) : _out(st) {}
|
||||
VMOp_Type type() const { return VMOp_PrintCompileQueue; }
|
||||
Mode evaluation_mode() const { return _safepoint; }
|
||||
void doit();
|
||||
};
|
||||
|
||||
#if INCLUDE_SERVICES
|
||||
class VM_PrintClassHierarchy: public VM_Operation {
|
||||
private:
|
||||
|
@ -832,7 +832,8 @@ void VMDynamicLibrariesDCmd::execute(DCmdSource source, TRAPS) {
|
||||
}
|
||||
|
||||
void CompileQueueDCmd::execute(DCmdSource source, TRAPS) {
|
||||
CompileBroker::print_compile_queues(output());
|
||||
VM_PrintCompileQueue printCompileQueueOp(output());
|
||||
VMThread::execute(&printCompileQueueOp);
|
||||
}
|
||||
|
||||
void CodeListDCmd::execute(DCmdSource source, TRAPS) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user