RFR: 5043030 (reflect) unnecessary object creation in reflection

Joel Borggrén-Franck joel.franck at oracle.com
Fri Jun 13 08:46:50 UTC 2014

Hi Andrej,

On 2014-06-12, Andrej Golovnin wrote:

> > I don’t think it is that desirable given that we inflate after 15 calls,
> > and it adds code to the VM.
> >
> As I already wrote it is just needed for the consistent behavior.

I don't want consistency here. I want the uninflated invocations/field
gets to return new boxes for now.

> > Lets start with your current tests and the reflection tests in jdk/test
> > and try to get a coverage metric. With the new build system, supply
> > “—with-jtreg=some path” to configure and you can run a test suite called
> > jdk_lang which includes reflection with
> >
> > make TEST=jdk_lang {CONCURRENCY=[num physical cores/4]} test
> >

> The failed tests:
> jdk/lambda/LambdaTranslationTest1.java
> jdk/lambda/LambdaTranslationTest2.java
> From my standpoint, this tests have bugs. They make use of Locale sensitive
> APIs and assume that the current Locale has the same formatting rules as
> Locale.US. I use a locale with a different formatting rules. This tests
> fail even without my patch.

If you start a separate thread posting a reproducer I'll file bugs for

> Before I start to change something I think we should make the decision
> whether we are going to drop the VM part or not.

I am dropping the VM part.

Again, I have very limited time to work on this. We are looking into
other changes in reflection that may or may not change and/or supersede
this work. I think this would be a fine contribution to get in to 9, a
good baseline to build further work upon, but the scope has to be
limited. Given the risk-reward here my bar for accepting this is quite

I'm looking forward to a rewritten test and some coverage information.


More information about the core-libs-dev mailing list