Lambda class names no longer reported when listening for JVMTI_EVENT_CLASS_FILE_LOAD events

Brian Goetz brian.goetz at oracle.com
Wed Jan 22 15:48:05 PST 2014


Yes.  We moved to "anonymous classes" (in the sense of Unsafe.defineAnonymousClass, not anonymous inner classes), for reasons of both security and performance.  This is an unfortunate side effect.  

On Jan 22, 2014, at 5:33 PM, Frost, Gary wrote:

> Not sure when this change came about but I just started using
> 
> java version "1.8.0-ea"
> Java(TM) SE Runtime Environment (build 1.8.0-ea-b124)
> 
> I noticed that the JVMTI agent I use to  listen for JVMTI_EVENT_CLASS_FILE_LOAD events is no longer seeing events for the dynamically create classes created to encapsulate 'captured' args.  Or possibly the class events are triggeted, but the 'name' is NULL. I am seeing an increase in the number of a events reported NULL as the name.
> 
> The Aparapi project listens for these events so we can determine the captured args for a given lambda.  These are the synthetic classes created on the fly by the method handle factory.
> 
> This had been working fine until recently.  Is there a reason we would stop generating  these, or is this just a regression?
> 
> Gary
> 



More information about the lambda-dev mailing list