Skip to content

Commit

Permalink
8316581: Improve performance of Symbol::print_value_on()
Browse files Browse the repository at this point in the history
Backport-of: 90bcdbd
  • Loading branch information
krk authored and shipilev committed Oct 2, 2024
1 parent e7439b7 commit 2d963ac
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/hotspot/share/oops/symbol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
*
*/


#include "precompiled.hpp"
#include "cds/metaspaceShared.hpp"
#include "classfile/altHashing.hpp"
Expand Down Expand Up @@ -388,11 +387,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); }
Expand Down

0 comments on commit 2d963ac

Please sign in to comment.