equal
deleted
inserted
replaced
314 if (ct->idle_time_millis() < (c1 ? 500 : 100)) return false; |
314 if (ct->idle_time_millis() < (c1 ? 500 : 100)) return false; |
315 |
315 |
316 // We only allow the last compiler thread of each type to get removed. |
316 // We only allow the last compiler thread of each type to get removed. |
317 jobject last_compiler = c1 ? CompileBroker::compiler1_object(compiler_count - 1) |
317 jobject last_compiler = c1 ? CompileBroker::compiler1_object(compiler_count - 1) |
318 : CompileBroker::compiler2_object(compiler_count - 1); |
318 : CompileBroker::compiler2_object(compiler_count - 1); |
319 if (oopDesc::equals(ct->threadObj(), JNIHandles::resolve_non_null(last_compiler))) { |
319 if (ct->threadObj() == JNIHandles::resolve_non_null(last_compiler)) { |
320 if (do_it) { |
320 if (do_it) { |
321 assert_locked_or_safepoint(CompileThread_lock); // Update must be consistent. |
321 assert_locked_or_safepoint(CompileThread_lock); // Update must be consistent. |
322 compiler->set_num_compiler_threads(compiler_count - 1); |
322 compiler->set_num_compiler_threads(compiler_count - 1); |
323 } |
323 } |
324 return true; |
324 return true; |
1685 // Find Compiler number by its threadObj. |
1685 // Find Compiler number by its threadObj. |
1686 oop compiler_obj = ct->threadObj(); |
1686 oop compiler_obj = ct->threadObj(); |
1687 int compiler_number = 0; |
1687 int compiler_number = 0; |
1688 bool found = false; |
1688 bool found = false; |
1689 for (; compiler_number < count; compiler_number++) { |
1689 for (; compiler_number < count; compiler_number++) { |
1690 if (oopDesc::equals(JNIHandles::resolve_non_null(compiler_objects[compiler_number]), compiler_obj)) { |
1690 if (JNIHandles::resolve_non_null(compiler_objects[compiler_number]) == compiler_obj) { |
1691 found = true; |
1691 found = true; |
1692 break; |
1692 break; |
1693 } |
1693 } |
1694 } |
1694 } |
1695 assert(found, "Compiler must exist at this point"); |
1695 assert(found, "Compiler must exist at this point"); |