RFR: 8316581: Improve performance of Symbol::print_value_on()
Aleksey Shipilev
shade at openjdk.org
Wed Sep 20 09:57:39 UTC 2023
On Wed, 20 Sep 2023 09:34:05 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:
> Hi all,
>
> please review this (hopefully correct) optimization of `Symbol::print_value_on()`; investigation into class unloading time distribution showed that a lot of time is spent in the `UnloadingEventLog::log()` call (25+%, see CR).
>
> The reason seems to be the use of `outputStream::print()` without any need for formatting.
>
> This seems to decrease time spent in this logging by almost 10x.
>
> Testing: hs_err output seems still be the same, GHA
>
> Thanks,
> Thomas
Seems to be similar to what `java_lang_Class::print_signature` already does: https://github.com/openjdk/jdk/blob/e1870d360e05c372e672b519d7de2a60c333675b/src/hotspot/share/classfile/javaClasses.cpp#L1296 -- might replace that one with the call to `Symbol::print_value_on` (maybe later).
-------------
Marked as reviewed by shade (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/15838#pullrequestreview-1635238150
More information about the hotspot-dev
mailing list