Review request for 6810254

2009-03-04 Thread Mandy Chung
6810254: Lazily instantiate the shared secret access objects Webrev at: http://cr.openjdk.java.net/~mchung/6810254/webrev.00/ sun.misc.Java*Access objects are created at initialization time. However, they are not always needed. They can be instantiated lazily when needed. The fix is to ad

Re: Review request for 6810254

2009-03-05 Thread David Holmes - Sun Microsystems
Hi Mandy, Isn't this kind of change risky? With static initialization you know that once the VM gets up and running then everything is in place. But with lazy-initialization (and using reflection no less!) there's a danger that when you try to initialize you're more likely to fail due to lack

Re: Review request for 6810254

2009-03-05 Thread Mandy Chung
On 03/05/09 04:18, David Holmes - Sun Microsystems wrote: Hi Mandy, Isn't this kind of change risky? With static initialization you know that once the VM gets up and running then everything is in place. But with lazy-initialization (and using reflection no less!) there's a danger that when yo

Re: Review request for 6810254

2009-03-05 Thread David Holmes - Sun Microsystems
Hi Mandy, Note that my main concern is the use of reflection. If the class involved has not previously had it's reflection objects initialized then getDeclaredMethod can lead to a lot of native and Java-level allocation (I'm assuming this hasn't changed a great deal from the Java 5 code). Ev

Re: Review request for 6810254

2009-03-06 Thread Alan Bateman
Mandy Chung wrote: 6810254: Lazily instantiate the shared secret access objects Webrev at: http://cr.openjdk.java.net/~mchung/6810254/webrev.00/ sun.misc.Java*Access objects are created at initialization time. However, they are not always needed. They can be instantiated lazily when neede

Re: Review request for 6810254

2009-03-06 Thread Mandy Chung
Thanks Alan. This is a good approach that avoids using reflection and addresses David's concern. I was a bit aggressive to lazily instantiate Java*Access objects as many as I can. I'll revise the fix and send out a new webrev. Thanks Mandy Alan Bateman wrote: Mandy Chung wrote: 6810254:

Review request for 6810254 (v01)

2009-03-11 Thread Mandy Chung
David, Alan, Thanks for your feedback. I revise the fix per Alan's suggestion. I decide not to keep the fix to lazily initialize the shutdown hook only. So java.io.Console, DeleteOnExitHook and java.lang.ApplicationShutdownHooks are only loaded when the app uses it. Webrev at: http://cr.

Re: Review request for 6810254 (v01)

2009-03-11 Thread Alan Bateman
Mandy Chung wrote: David, Alan, Thanks for your feedback. I revise the fix per Alan's suggestion. I decide not to keep the fix to lazily initialize the shutdown hook only. So java.io.Console, DeleteOnExitHook and java.lang.ApplicationShutdownHooks are only loaded when the app uses it. Web

Re: Review request for 6810254 (v01)

2009-03-11 Thread Mandy Chung
On 03/11/09 13:01, Alan Bateman wrote: Mandy Chung wrote: David, Alan, Thanks for your feedback. I revise the fix per Alan's suggestion. I decide not to keep the fix to lazily initialize the shutdown hook only. So java.io.Console, DeleteOnExitHook and java.lang.ApplicationShutdownHooks are