I believe the restructuring came with Java 9
.
Instead of having a single code heap, the code cache was segmented into distinct code heaps, each of which contains compiled code of a particular type. Such a design enables to separate code with different properties.
The main idea was to improve performance and enable future extensions.
There are three different top-level types of compiled code:
- JVM internal (non-method) code
- Profiled-code
- Non-profiled code
The corresponding code heaps are:
A non-method code heap containing non-method code, such as compiler buffers and bytecode interpreter. This code type will stay in the code cache forever.
A profiled code heap containing lightly optimized, profiled methods with a short lifetime.
A non-profiled code heap containing fully optimized, non-profiled methods with a potentially long lifetime.
You can find some useful details (like motivation to this restructuring, how to configure new heaps, etc.) in JEP-197 :)