RFR: 8360515: PROPERFMTARGS should always use size_t template specialization for unit [v2]

Joel Sikström jsikstro at openjdk.org
Mon Jul 28 12:50:31 UTC 2025


On Thu, 26 Jun 2025 23:48:21 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> I originally wanted this patch to be minimally invasive and just fix the mismatch between PROPERFMT and PROPERFMTARGS. The cast to size_t wasn't added by me, I just changed the format specifier to match the type in PROPERFMTARGS. I agree that it looks a bit weird to have both the expanded macro and PROPERFMTARGS next to each other, and I'm not 100% sure why vm_info.page_size is casted to size_t.
>> 
>> I'm fine with making the usage consistent in this patch, making all the prints use PROPERFMT+PROPERFMTARGS with casts to size_t, or the other way around using the expanded macro.
>
> Sorry for mis-attributing the cast to your change. This could go either way with no way clearly better than the other. Lets see if another reviewer has a strong opinion.

To get this moving I opted to replace the cast with expanded PROPERFMT+PROPERFMTARGS. If someone feels strongly for the other alternative, I'm open to that.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/25975#discussion_r2236294798


More information about the hotspot-dev mailing list