HotSpot compilation latency

Tobias Hartmann tobias.hartmann at oracle.com
Tue Aug 13 05:53:13 UTC 2019


On 12.08.19 16:39, Stefan Reich wrote:
> Huh. So the compilation results (which method is compiled and when in the program flow) should
> typically not very between machines of different speed.
> 
> (For a single-threaded program.)

In theory, yes, but not in practice. There are many factors that cause non deterministic behavior.
For example, multiple VM threads that are competing (GC threads, compiler threads, ...), compilation
of one compiler thread affecting other compilations (inlining, profiling, ...), or even an
application that is not deterministic itself. All this affects which method is compiled at what time
in the program flow.

> That's interesting, I always thought there was a time component involved ("profile for 100 ms" or
> something). Optimization makes more sense without it I guess.

Yes, wall clock time does not say anything about how complete the profile information is that we
gathered during that time (the method might not have been executed/profiled at all due to high load
on the system).

Best regards,
Tobias


More information about the hotspot-dev mailing list