On Fri, 5 May 2023 15:11:26 GMT, Volker Simonis <simo...@openjdk.org> wrote:
>> Paul Hohensee has updated the pull request incrementally with one additional >> commit since the last revision: >> >> 8304074: [JMX] Add an approximation of total bytes allocated on the Java >> heap by the JVM > > src/hotspot/share/include/jmm.h line 55: > >> 53: JMM_VERSION_2 = 0x20020000, // JDK 10 >> 54: JMM_VERSION_3 = 0x20030000, // JDK 14 >> 55: JMM_VERSION_3_0 = 0x20030000, > > Why do we need `JMM_VERSION_3_0`? We haven't defined `JMM_VERSION_2_0` either. Removed. > src/hotspot/share/include/jmm.h line 321: > >> 319: jstring flag_name, >> 320: jvalue new_value); >> 321: jlong (JNICALL *GetAllThreadAllocatedMemory) > > I'm not sure here, but I think there's no need to "overwrite" a *reserved* > slot if you add this functionality to a new major release as you do. You also > haven't done it when you've added `GetOneThreadAllocatedMemory()` with > [JDK-8231209](https://bugs.openjdk.org/browse/JDK-8231209). > > I think we should keep these *reserved* slots for the case when we eventually > have to downport new functionality from a later release. Done. > src/hotspot/share/services/management.cpp line 2282: > >> 2280: jmm_FindDeadlockedThreads, >> 2281: jmm_SetVMGlobal, >> 2282: jmm_GetAllThreadAllocatedMemory, > > See comment on overwriting the `reserved6` slot above. Done. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/13814#discussion_r1186515133 PR Review Comment: https://git.openjdk.org/jdk/pull/13814#discussion_r1186515257 PR Review Comment: https://git.openjdk.org/jdk/pull/13814#discussion_r1186515422