RFR(XS): 8163973: VM Anonymous classes should not call Class File Load Hooks

David Holmes david.holmes at oracle.com
Tue Aug 16 03:36:58 UTC 2016

Hi Rachel,

On 16/08/2016 6:48 AM, Rachel Protacio wrote:
> Hello,
> Please review this change, which makes sure class file load hooks are
> not called for VM anonymous classes. See
> http://mail.openjdk.java.net/pipermail/core-libs-dev/2016-January/038353.html
> for justification.
> Passes JPRT and RBT.
> Bug: https://bugs.openjdk.java.net/browse/JDK-8163973
> Open webrev: http://cr.openjdk.java.net/~rprotacio/8163973.00/


  112   // VM Anonymous classes - defined via 
unsafe.DefineAnonymousClass - should not
  113   // call back to a CFLH
  114   if (host_klass == NULL) {
  115     stream = prologue(stream,

suggests that "prologue" can only do CFLH related things. If that is 
true then it would be much clearer in my opinion if prologue were 
renamed to something more explicit - like check_class_file_load_hook ? 
Otherwise, the host_klass should be passed in to prologue and the 
anonymous class check internalized there.

Also I don't think you need to explain where VM anonymous classes come 
from, it suffices to simply say "Skip class file load hook processing 
for VM anonymous classes"; or if the prologue is renamed then simply 
"Skip this processing for VM anonymous classes". :)


> Thank you!
> Rachel

More information about the hotspot-runtime-dev mailing list