Odd interaction between ArrayList$Itr and Escape Analysis
Krystal Mok
rednaxelafx at gmail.com
Mon Sep 12 19:56:52 UTC 2016
On Mon, Sep 12, 2016 at 12:38 PM, Vitaly Davidovich <vitalyd at gmail.com>
wrote:
>
> It seems odd to me as well why inlining won't force load the missing
> class(es). If we're inlining, it means the method itself or the call chain
> it's part of is hot - failing to inline can have negative side-effects,
> like this example. I suppose there must be a good reason why it doesn't do
> this though?
>
That's because we can't. The JIT compilers are running on their own
threads, and they're not real "Java threads". So they are not allowed to
run arbitrary Java code. But Java class loading may involve running
arbitrary Java code, e.g. the ClassLoader.loadClass() upcall.
Force class loading can be done on the triggering side (for the top-level
method), because compilation tasks are triggered from real Java threads,
and they're allowed to run arbitrary Java code.
- Kris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20160912/eddee078/attachment.html>
More information about the hotspot-compiler-dev
mailing list