United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6935466 new CodeCache flushing code is not guarded by the flag
JDK-6935466 : new CodeCache flushing code is not guarded by the flag

Details
Type:
Bug
Submit Date:
2010-03-16
Status:
Resolved
Updated Date:
2010-09-24
Project Name:
JDK
Resolved Date:
2010-03-31
Component:
hotspot
OS:
solaris_10
Sub-Component:
compiler
CPU:
x86
Priority:
P4
Resolution:
Fixed
Affected Versions:
hs17
Fixed Versions:
hs17 (b12)

Related Reports
Backport:
Backport:
Backport:
Backport:
Backport:
Backport:
Relates:

Sub Tasks

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

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

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



Hardware and Software, Engineered to Work Together