rednaxelafx at gmail.com
Wed Mar 7 10:21:10 PST 2012
Hi Dean & Nils,
How about the other way around:
1. make a copy of java/lang/Integer.java, modify its valueOf()
implementation to simply call the constructor; add the resulting class file
2. run the tests with -XX:-EliminateAutoBox
Another solution, targeting C2 only, could be: make a new case to cover
vmIntrinsics::_Integer_valueOf in LibraryCallKit::try_to_inline(), and
substitute the call to Integer.valueOf() with an allocation/constructor
On Thu, Mar 8, 2012 at 1:47 AM, Dean Long <dean.long at oracle.com> wrote:
> I thought hotspot had an "API hiding" mechanism that used bytecode
> rewriting of method calls, but I can't seem to find it in the code, just
> references to it on the wiki.
> On 3/7/2012 5:33 AM, Nils Eliasson wrote:
> Hi all,
> Are there any mechanism present for method substitution?
> I would like to do a runtime substitution of all calls to Integer.valueOf
> to the Integer constructor. I am doing some experiments on boxing
> elimination and are trying to get a number on how much problem the Integer
> cache is causing.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the hotspot-runtime-dev