<div dir="ltr"><br>Hi all,<br><br>I would like to get rid of the `-UseCompressedClassPointers` case since it would cut down the number of configurations we need to support and test from three to two (`-UseCompressedClassPointers`, `+UseCompressedClassPointers`, `+UseCompactObjectHeaders`).<br><br>This would leave us with the now default case, `+UseCompressedClassPointers`, as the sole supported CCP case, thereby removing the need for the switch, which we therefore should deprecate and eventually remove.<br><br>Apart from significantly reducing code complexity and testing effort, `-UseCompressedClassPointers` does not seem to be tested that well, especially on 64-bit platforms. See e.g. <a href="https://github.com/openjdk/jdk/pull/23053">https://github.com/openjdk/jdk/pull/23053</a>, and Roman's suspicion is that there are many more.<br><br>It increases memory usage by quite a bit ("Alias for -XX:WasteMemory" - Erik Österlund), and any historical connection to UseCompresseedOops have long been removed.<div><br>Why would we still need `-UseCompressedClassPointers`? Two reasons:<br><br>1) To support 32-bit, where, atm, it is the only implemented mode. But I am confident that I can find some low-effort low-code way to "fake" compressed Klass* pointers, since after all the 32-bit address space could be seen as a 4GB class space. There is also the bigger question of the future of 32-bit - we discussed this at the FOSDEM OpenJDK workshop, with mixed results, but it seems likely that 32-bit will go away at some point, the only question is when.<br><br>2) To load more than ~5-6 million classes. Class space, when maxed out, allows for about 5-6 million classes, given a typical Klass size distribution. I think that number is ridiculous, though. If you load or generate that many classes, you are a likely very patient programmer with a leaky or misdesigned application (just consider for a moment that to fill 4GB class space to the brim with Klass instances, would would typically use up about 5-10 times as much in non-class metaspace. That is for metadata alone. I cannot see a sane application doing that.<br><br>Is anyone using -UseCompressedClassPointers for any valid reason I am not aware of?<br><br>If not, barring any objections, my plan is to deprecate UseCompressedClassPointers for JDK25, find an alternative for 32-bit platforms in JDK26, and remove the uncompressed case in JDK 26 or later. <div><br></div><div>What do people think?<br></div></div></div>