src/share/vm/compiler/compileBroker.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
8082782.01 Cdiff src/share/vm/compiler/compileBroker.cpp
src/share/vm/compiler/compileBroker.cpp
Print this page
*** 343,352 ****
--- 343,360 ----
if (_hot_method != NULL) {
_hot_method->set_on_stack(true);
}
}
+ // RedefineClasses support
+ void CompileTask::metadata_do(void f(Metadata*)) {
+ f(method());
+ if (hot_method() != NULL && hot_method() != method()) {
+ f(hot_method());
+ }
+ }
+
// ------------------------------------------------------------------
// CompileTask::print_line_on_error
//
// This function is called by fatal error handler when the thread
// causing troubles is a compiler thread.
*** 658,667 ****
--- 666,678 ----
/**
* Get the next CompileTask from a CompileQueue
*/
CompileTask* CompileQueue::get() {
+ methodHandle save_method;
+ methodHandle save_hot_method; // save methods from RedefineClasses across safepoint
+
MutexLocker locker(MethodCompileQueue_lock);
// If _first is NULL we have no more compile jobs. There are two reasons for
// having no compile jobs: First, we compiled everything we wanted. Second,
// we ran out of code cache so compilation has been disabled. In the latter
// case we perform code cache sweeps to free memory such that we can re-enable
*** 691,700 ****
--- 702,717 ----
CompileTask* task;
{
No_Safepoint_Verifier nsv;
task = CompilationPolicy::policy()->select_task(this);
}
+
+ // Save method pointer across unlock safepoint. The task is removed from
+ // the compilation queue, which is walked during RedefineClasses.
+ save_method = methodHandle(task->method());
+ save_hot_method = methodHandle(task->hot_method());
+
remove(task);
purge_stale_tasks(); // may temporarily release MCQ lock
return task;
}
src/share/vm/compiler/compileBroker.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File