Remove the assert in Integer.valueOf()
Ulf Zibis
Ulf.Zibis at gmx.de
Tue Apr 24 00:12:12 UTC 2012
Hi Rémi,
I think, instead tweaking the java code, Hotspot inlining heuristic should better be changed to
count the bytes of the compiled code.
Than any code would benefit from, not only Integer.valueOf().
-Ulf
Am 23.04.2012 19:35, schrieb Rémi Forax:
> Hi guys,
> I've found a case where assert is harmful because it doesn't
> play well with Hotspot inlining heuristic.
> [...]
> The issue is that Hotspot also count the bytecodes related to assert
> in its inlining heuristic.
> If the assert is commented, the inlining tree is good.
> [...]
> Given that Integer.valueOf() is a method used very often and that if the inlining fails,
> the escape analysis will not remove the allocation,
> I think it's a good idea to comment this assert.
>
> cheers,
> Rémi
More information about the core-libs-dev
mailing list