-XX:Inline ignored for system classes?
Andrew Haley
aph at redhat.com
Sun Jan 22 16:56:51 UTC 2017
On 22/01/17 16:48, Peter Veentjer wrote:
> - is the compiler not able to proof that list is of type ArrayList; so
> sharpening the type?
> - if it is able to proof, then I guess reflection is the reason why this
> type guard is needed. Then perhaps a dumb question: instead of adding this
> typeguard, why not add a trap in the reflection that causes the code to get
> deoptimized? Now there is a price to pay even if the field isn't changed
> with reflection. Then the burden will be placed on reflection instead.
How would you do that? You'd have to find every thread executing that
method and forcibly deoptimize it. But it takes more than a safepoint
to do that: every thread would have to reach a point where it had an
uncommon trap. And there might not be one unless you plant a check in
the code at the correct point. Which is what you're looking at...
Andrew.
More information about the hotspot-compiler-dev
mailing list