On Nov 2, 2013, at 10:03 AM, Alan Bateman <alan.bate...@oracle.com> wrote:

> On 01/11/2013 21:11, Mandy Chung wrote:
>> 
>> I was expecting that would get optimized during runtime and it's a simple 
>> getter method. It's a good suggestion to cache it at the finalize thread 
>> start time and here is the revised webrev:
>> 
>> http://cr.openjdk.java.net/~mchung/jdk8/webrevs/8027351/webrev.01/
> 
> This looks good. A small typo in ensureAccessAvailable, "ntil" -> "until". 
> Also the continue isn't needed.
> 

Plus there is other unmodified code that uses "continue" as well (#207 in 
patched code).

On using a static field to hold JavaLangAccess. If Peter's suggestion is not 
applicable (splitting out finalization functionality from JavaLangAccess) then 
perhaps an alternative is:

- ensureAccessAvailable returns JavaLangAccess (rename to getJavaLangAccess?)

- runFinalizer accepts as a parameter JavaLangAccess

Paul.
 
> On the finalizer thread now waiting for the system classes to be initialized 
> then this is probably a good thing (although I can imagine subtle changes for 
> corner cases, say where an agent is playing with fire and instrumenting 
> classes early in the startup).
> 

Reply via email to