8316581: Improve performance of Symbol::print_value_on()

Backport-of: 90bcdbd15f
This commit is contained in:
Aleksey Shipilev
2023-11-27 15:56:09 +00:00
committed by Vitaly Provodin
parent 9e857e860d
commit f92d5acba2

View File

@@ -22,7 +22,6 @@
*
*/
#include "precompiled.hpp"
#include "cds/metaspaceShared.hpp"
#include "classfile/altHashing.hpp"
@@ -390,11 +389,9 @@ void Symbol::print() const { print_on(tty); }
// The print_value functions are present in all builds, to support the
// disassembler and error reporting.
void Symbol::print_value_on(outputStream* st) const {
st->print("'");
for (int i = 0; i < utf8_length(); i++) {
st->print("%c", char_at(i));
}
st->print("'");
st->print_raw("'", 1);
st->print_raw((const char*)base(), utf8_length());
st->print_raw("'", 1);
}
void Symbol::print_value() const { print_value_on(tty); }