United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6767587 missing call to make_not_entrant after deoptimizing for patching volatiles
JDK-6767587 : missing call to make_not_entrant after deoptimizing for patching volatiles

Details
Type:
Bug
Submit Date:
2008-11-05
Status:
Resolved
Updated Date:
2010-12-08
Project Name:
JDK
Resolved Date:
2009-01-31
Component:
hotspot
OS:
solaris_9
Sub-Component:
compiler
CPU:
sparc
Priority:
P3
Resolution:
Fixed
Affected Versions:
hs14
Fixed Versions:
hs14 (b09)

Related Reports
Backport:
Backport:
Backport:

Sub Tasks

Description
Hi Tom,

One question regarding deoptimization and C1: the StoreField and
LoadField code relies on deoptimization in case a load/store cannot be
determined to be volatile at compile time.

In the c1 runtime patch_code method, a VM_DeoptimizeFrame vm operation
is executed. What is puzzling me, is that when I follow the code of this
vm operation I don't find where the nmethod is made not entrant so that
the method will eventually be recompiled.

Indeed when I run this simple test:

public class TestDeopt {
   static class A {
	volatile int i;
   }

   static void m() {
	A a = new A();
	a.i = 0;
   }

   static public void main(String[] args) {
	m();
	m();
	m();
   }
}

With:
-client -Xcomp -XX:+PrintCompilation -XX:-Inline -XX:+TracePatching -XX:+TraceDeoptimization

I see the m method being compiled once but I see 3 "Deoptimizing for
patching volatile field reference" which proves that the compiled code
is not dropped.

Am I missing something?

Thanks,
Roland.

                                    

Comments
EVALUATION

The fix for 6414800 is missing a call to make_not_entrant
                                     
2008-11-05
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot/hotspot/rev/ac8fe14c93e4
                                     
2008-12-13



Hardware and Software, Engineered to Work Together