RFR: 8255697: LogTargetHandle::print should check if log level is enabled
Thomas Stuefe
stuefe at openjdk.java.net
Mon Nov 2 07:48:54 UTC 2020
On Fri, 30 Oct 2020 19:40:04 GMT, Claes Redestad <redestad at openjdk.org> wrote:
> An early check in LogTargetHandle::print like this can reduce overhead by not dropping into code that initialize LogDecorations et.c. This saves around 100k instructions on VM bootstrap, and can reduce cost of not logging in a few places.
Makes sense. Callers should test this but it gets often overlooked.
-------------
Marked as reviewed by stuefe (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/964
More information about the hotspot-runtime-dev
mailing list