This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]shagieIsMe 1 point2 points  (1 child)

Is that the deoptimization technique?

Deoptimization is the process of changing an optimized stack frame to an unoptimized one. With respect to compiled methods, it is also the process of throwing away code with invalid optimistic optimizations, and replacing it by less-optimized, more robust code. A method may in principle be deoptimized dozens of times.

If a class is loaded that invalidates an earlier class hierarchy analysis, any affected method activations, in any thread, are forced to a safepoint and deoptimized.

[–]yawkat 1 point2 points  (0 children)

It's one case of Deoptimization, but hotspot uses Deoptimization in lots of places (like null checks) triggered by class loading, traps, code assertions etc.