8316581: Improve performance of Symbol::print_value_on()

Reviewed-by: shade, coleenp, dholmes
This commit is contained in:
Thomas Schatzl 2023-09-21 14:47:06 +00:00
parent 8350268c05
commit 90bcdbd15f

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); }