Re:JVM Anatomy Quarks: Compressed References
by deadc0de on Wednesday March 06, 2019 @01:02AM
(#19316692)
No, compressed oops mode doesn't change at runtime. That's pretty hard to pull off. You'd need to change object layout dynamically and unless you want to reformat the whole heap you'd need tags or regions with different pointer rules. Any of these techniques would have a very substantial runtime overhead.
Am I correct in assuming that this is made possible because Hotspot can re-JIT? So the GC/Allocator just warns the JITter, "hey, all of your Oops [flags] code is no longer valid," resulting in a re-JIT of everything? Or a prologue in every method that checks the Oops flags (and triggers a re-JIT)?