# HG changeset patch # User neliasso # Date 1445852214 -3600 # Node ID b82c87453d2d5f8b2cbbb30341858a3881118d06 # Parent 8d4741610aa93b3784ebec8610e7e811d9863323 8139996: CompileCommand prints quoted ascii strings Summary: Print symbols as utf8 Reviewed-by: kvn diff -r 8d4741610aa9 -r b82c87453d2d hotspot/src/share/vm/compiler/methodMatcher.cpp --- a/hotspot/src/share/vm/compiler/methodMatcher.cpp Fri Oct 23 07:18:31 2015 +0000 +++ b/hotspot/src/share/vm/compiler/methodMatcher.cpp Mon Oct 26 10:36:54 2015 +0100 @@ -320,13 +320,11 @@ } void MethodMatcher::print_symbol(outputStream* st, Symbol* h, Mode mode) { - ResourceMark rm; - if (mode == Suffix || mode == Substring || mode == Any) { st->print("*"); } if (mode != Any) { - h->print_symbol_on(st); + h->print_utf8_on(st); } if (mode == Prefix || mode == Substring) { st->print("*"); @@ -334,11 +332,13 @@ } void MethodMatcher::print_base(outputStream* st) { + ResourceMark rm; + print_symbol(st, class_name(), _class_mode); st->print("."); print_symbol(st, method_name(), _method_mode); if (signature() != NULL) { - signature()->print_symbol_on(st); + signature()->print_utf8_on(st); } } diff -r 8d4741610aa9 -r b82c87453d2d hotspot/src/share/vm/oops/symbol.cpp --- a/hotspot/src/share/vm/oops/symbol.cpp Fri Oct 23 07:18:31 2015 +0000 +++ b/hotspot/src/share/vm/oops/symbol.cpp Mon Oct 26 10:36:54 2015 +0100 @@ -154,6 +154,10 @@ 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 { ResourceMark rm; st = st ? st : tty; diff -r 8d4741610aa9 -r b82c87453d2d hotspot/src/share/vm/oops/symbol.hpp --- a/hotspot/src/share/vm/oops/symbol.hpp Fri Oct 23 07:18:31 2015 +0000 +++ b/hotspot/src/share/vm/oops/symbol.hpp Mon Oct 26 10:36:54 2015 +0100 @@ -225,6 +225,7 @@ // Printing 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_value_on(outputStream* st) const; // Second level print.