RFR (S) 8216302: StackTraceElement::fill_in can use cached Class.name
coleen.phillimore at oracle.com
coleen.phillimore at oracle.com
Tue Jan 8 19:47:27 UTC 2019
On 1/8/19 2:41 PM, Aleksey Shipilev wrote:
> 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/
Yes, this looks better. I can't imagine why it would be measurably
slower, but beats faster with low frequency bugs.
http://cr.openjdk.java.net/~shade/8216302/webrev.03/test/hotspot/jtreg/runtime/StackTrace/StackTraceClassCache.java.html
I have heard that the copyright should also have the Oracle line on it.
Thanks,
Coleen
>
> 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