mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 03:24:38 +02:00
8139996: CompileCommand prints quoted ascii strings
Print symbols as utf8 Reviewed-by: kvn
This commit is contained in:
parent
4762c58c08
commit
1c8b312b4c
3 changed files with 9 additions and 4 deletions
|
@ -320,13 +320,11 @@ bool MethodMatcher::matches(methodHandle method) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
void MethodMatcher::print_symbol(outputStream* st, Symbol* h, Mode mode) {
|
void MethodMatcher::print_symbol(outputStream* st, Symbol* h, Mode mode) {
|
||||||
ResourceMark rm;
|
|
||||||
|
|
||||||
if (mode == Suffix || mode == Substring || mode == Any) {
|
if (mode == Suffix || mode == Substring || mode == Any) {
|
||||||
st->print("*");
|
st->print("*");
|
||||||
}
|
}
|
||||||
if (mode != Any) {
|
if (mode != Any) {
|
||||||
h->print_symbol_on(st);
|
h->print_utf8_on(st);
|
||||||
}
|
}
|
||||||
if (mode == Prefix || mode == Substring) {
|
if (mode == Prefix || mode == Substring) {
|
||||||
st->print("*");
|
st->print("*");
|
||||||
|
@ -334,11 +332,13 @@ void MethodMatcher::print_symbol(outputStream* st, Symbol* h, Mode mode) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void MethodMatcher::print_base(outputStream* st) {
|
void MethodMatcher::print_base(outputStream* st) {
|
||||||
|
ResourceMark rm;
|
||||||
|
|
||||||
print_symbol(st, class_name(), _class_mode);
|
print_symbol(st, class_name(), _class_mode);
|
||||||
st->print(".");
|
st->print(".");
|
||||||
print_symbol(st, method_name(), _method_mode);
|
print_symbol(st, method_name(), _method_mode);
|
||||||
if (signature() != NULL) {
|
if (signature() != NULL) {
|
||||||
signature()->print_symbol_on(st);
|
signature()->print_utf8_on(st);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -154,6 +154,10 @@ char* Symbol::as_C_string_flexible_buffer(Thread* t,
|
||||||
return as_C_string(str, buf_len);
|
return as_C_string(str, buf_len);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Symbol::print_utf8_on(outputStream* st) const {
|
||||||
|
st->print("%s", as_C_string());
|
||||||
|
}
|
||||||
|
|
||||||
void Symbol::print_symbol_on(outputStream* st) const {
|
void Symbol::print_symbol_on(outputStream* st) const {
|
||||||
ResourceMark rm;
|
ResourceMark rm;
|
||||||
st = st ? st : tty;
|
st = st ? st : tty;
|
||||||
|
|
|
@ -225,6 +225,7 @@ class Symbol : public MetaspaceObj {
|
||||||
|
|
||||||
// Printing
|
// Printing
|
||||||
void print_symbol_on(outputStream* st = NULL) const;
|
void print_symbol_on(outputStream* st = NULL) const;
|
||||||
|
void print_utf8_on(outputStream* st) const;
|
||||||
void print_on(outputStream* st) const; // First level print
|
void print_on(outputStream* st) const; // First level print
|
||||||
void print_value_on(outputStream* st) const; // Second level print.
|
void print_value_on(outputStream* st) const; // Second level print.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue