[ping] RFR(L): 8221470: Print methods in exception messages in java-like Syntax.
goetz.lindenmaier at sap.com
Fri Mar 29 10:26:33 UTC 2019
Any interest in this change?
Should I split it to adapt the exceptions separately one-by-one to
make the change smaller and simplify the review?
I would propose to start out with AbstractMethodError only.
From: Lindenmaier, Goetz
Sent: Tuesday, March 26, 2019 1:06 PM
To: hotspot-runtime-dev at openjdk.java.net
Subject: RFR(L): 8221470: Print methods in exception messages in java-like Syntax.
A row of exceptions are thrown from the hotspot runtime.
They print methods with their JNI signatures. To increase
readability and resemblance to source code, this change proposes
to print them in a Java-like syntax.
current method printouts:
double test.TeMe3_B.ma(int, boolean, byte, float)
So far, Method::name_and_sig_as_C_string() is used to print
This change implements function Method::external_name() that prints the better
external_name() is chosen according to Klass::external_name().
Printing the better format requires parsing the signature
Symbol. This is implemented in
void Symbol::print_as_signature_external_return_type(outputStream *os);
void Symbol::print_as_signature_external_parameters(outputStream *os);
These method names are chosen according to Symbol::as_class_external_name().
See this partial webrev for the new functions:
Also, I changed a lot of exception messages to use the new format.
This required to adapt a row of tests. I added a test to check
the signature printing does not regress. For all these changes, see
the full webrev:
I hope I detected all places where method signatures are printed to
More information about the hotspot-runtime-dev