RFR: 8256379: Replace SIZE_FORMAT with 'z' length modifier
Coleen Phillimore
coleenp at openjdk.org
Thu Aug 3 00:18:20 UTC 2023
On Wed, 2 Aug 2023 01:31:43 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
> Replace SIZE_FORMAT with %zu and SIZE_FORMAT_X with 0x%zx using a 4 line sed script:
>
> sed -e 's/" SIZE_FORMAT "/%zu/g' -e 's/" SIZE_FORMAT,/%zu",/' \
> -e 's/print(SIZE_FORMAT "/print("%zu/g' \
> -e 's/" SIZE_FORMAT_X "/0x%zx/g' -e 's/" SIZE_FORMAT_X,/0x%zx",/g' \
> -e 's/" SIZE_FORMAT$/%zu"/' \
> $f >$f.new
>
> Minor fixups afterwards. I didn't change SIZE_FORMAT_W(number) because it would have required a better sed script.
>
> The definitions in globalDefinitions.hpp can be removed with a later PR, once all instances are cleaned out. This is partial so that people start using %zu instead.
>
> Tested with tier1 on Oracle supported platforms.
Do we want this?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/15115#issuecomment-1663120451
More information about the serviceability-dev
mailing list