On Thu, 16 Apr 2026 05:43:46 GMT, David Holmes <[email protected]> wrote:
>> src/hotspot/share/runtime/fieldDescriptor.hpp line 114: >> >>> 112: void print_on(outputStream* st) const; >>> 113: void print_on_for(outputStream* st, oop obj); >>> 114: #if !defined(PRODUCT) || INCLUDE_JVMTI >> >> The new `!defined(PRODUCT)` seems to be only for the gtest. I wonder if >> gtest can run the test for `print_access_flags` based on `INCLUDE_JVMTI` >> flag instead; the macro condition tweak seems weird. > > I am surprised that we only ever print access flags in relation to JVMTI - I > would have expected logging or crash reporting to do so. In any case I also > find the `!PRODUCT` a little jarring. Given we always have JVMTI it makes no > different to our binaries. After some thought, I have removed all the `#if` guards on the printers. To me, these are now ordinary printing utilities belonging to either `Method`, `InstanceKlass`, or `fieldDescriptor`. They are not directly tied to JVMTI, so should not be guarded by it. Let me know if you agree. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/30746#discussion_r3093168901
