RFR (S) 8216302: StackTraceElement::fill_in can use cached Class.name

Aleksey Shipilev shade at redhat.com
Tue Jan 8 19:41:29 UTC 2019


On 1/8/19 7:20 PM, coleen.phillimore at oracle.com wrote:
> Having the oops on the stack and getting a safepoint is the definition of "unhandled oops"..    If
> the oop isn't used below any calls involving it, it is safe.  If there are intervening calls
> (especially ones with TRAPS), they should be put in Handle so that they are known safe without
> having to know the implementation details of all the functions that are called.  There is little
> overhead if there is a HandleMark near the Handles.

Thanks for the explanation. So, something like this would do?
  http://cr.openjdk.java.net/~shade/8216302/webrev.03/

Passes new test and hotspot tier1. If this patch looks okay, I would put it through jdk-submit.

It is a bit slower than previous version, but still much better than the current baseline:

Benchmark             (depth)  Mode  Cnt    Score   Error  Units

# Old patch
StackTraceBench.test        1  avgt   15   14.450 ± 0.136  us/op
StackTraceBench.test       10  avgt   15   20.182 ± 0.088  us/op
StackTraceBench.test      100  avgt   15   77.107 ± 0.632  us/op
StackTraceBench.test     1000  avgt   15  647.128 ± 6.159  us/op

# New patch
StackTraceBench.test        1  avgt   15   14.841 ± 0.095  us/op
StackTraceBench.test       10  avgt   15   20.708 ± 0.114  us/op
StackTraceBench.test      100  avgt   15   78.628 ± 0.621  us/op
StackTraceBench.test     1000  avgt   15  659.408 ± 6.015  us/op

-Aleksey



More information about the hotspot-dev mailing list