JDK-6935466 : new CodeCache flushing code is not guarded by the flag
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: hs17
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: solaris_10
  • CPU: x86
  • Submitted: 2010-03-16
  • Updated: 2010-09-24
  • Resolved: 2010-03-31
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7 Other
6u21Fixed 7Fixed hs17Fixed
Related Reports
Relates :  
Description
Eric Caspole wrote:
> Hi Tom,
> In the course of working on the sweeper, I happened to notice that what looks like a merge mistake with the code cache unloading thing. In CompileBroker::compile_method(), the call to  find_and_remove_saved_code() is not guarded by the  UseCodeCacheFlushing flag, so it ends up taking the code cache lock to do that check even when unloading is off. I don't think it should be like this, although it is only a minor point. What do you think?
> Thanks,
> Eric
>
>  989     if (method->is_not_compilable(comp_level)) return NULL;
>  990
>  991     nmethod* saved = CodeCache::find_and_remove_saved_code(method());
>  992     if (saved != NULL) {
>  993       method->set_code(method, saved);
>
>
> 400 nmethod* CodeCache::find_and_remove_saved_code(methodOop m) {
> 401   MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
> 402   nmethod* saved = _saved_nmethods;
> 403   nmethod* prev = NULL;
> 404   while (saved != NULL) {
>

Comments
EVALUATION http://hg.openjdk.java.net/hsx/hsx17/master/rev/2cb394bd7f8f,ChangeRequest=6935466
26-03-2010

EVALUATION ChangeSet=http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/428a9c451986,ChangeRequest=6935466
17-03-2010