RFR: 8241830: Simplify commit error messages in G1PageBasedVirtualSpace

Claes Redestad claes.redestad at oracle.com
Mon Mar 30 14:23:35 UTC 2020


Hi,

when committing memory for virtual space, we eagerly generate an error
message using err_msg, which ends up malloc'ing some memory. As this is
done for each potential heap region, this turns out to have a
significant cost on startup when ergonomics decide we should run with
many regions.

Since the address range information is redundant (a warning will be
printed along with the hs_err file with similar detail), I propose
replacing with a static error message. This aligns with other call
sites. For unrecoverable mmap failures, the message will be ignored and
replaced by "committing reserved memory", meaning the extra information
is unlikely to actually manifest.

Webrev: http://cr.openjdk.java.net/~redestad/8241830/open.00/
Bug:    https://bugs.openjdk.java.net/browse/JDK-8241830

Thanks!

/Claes



More information about the hotspot-gc-dev mailing list