RFR (S) 8216308: StackTraceElement::fill_in can use injected Class source-file
Aleksey Shipilev
shade at redhat.com
Thu Jan 10 15:21:20 UTC 2019
RFE:
https://bugs.openjdk.java.net/browse/JDK-8216308
Fix:
http://cr.openjdk.java.net/~shade/8216308/webrev.01/
This is another patch that removes the use of SymbolTable on hot path in stack trace creation. We
can inject Class.source_file field to cache the source file name. Some caution is needed to properly
handle invalidation when redefinition happens.
This makes stack trace generation significantly faster, and finally better than it used to even
before StackWalker and StringTable-related regressions in 9 and 11.
Benchmark (depth) Mode Cnt Score Error Units
# 8u
StackTraceBench.test 1 avgt 15 10.851 ± 0.075 us/op
StackTraceBench.test 10 avgt 15 15.325 ± 0.089 us/op
StackTraceBench.test 100 avgt 15 59.717 ± 0.449 us/op
StackTraceBench.test 1000 avgt 15 529.020 ± 3.654 us/op
# jdk/jdk baseline
StackTraceBench.test 1 avgt 15 15.077 ± 0.065 us/op
StackTraceBench.test 10 avgt 15 21.153 ± 0.123 us/op
StackTraceBench.test 100 avgt 15 80.758 ± 0.363 us/op
StackTraceBench.test 1000 avgt 15 674.888 ± 4.985 us/op
# jdk/jdk patched
StackTraceBench.test 1 avgt 15 8.892 ± 0.064 us/op
StackTraceBench.test 10 avgt 15 12.010 ± 0.079 us/op
StackTraceBench.test 100 avgt 15 43.091 ± 0.254 us/op
StackTraceBench.test 1000 avgt 15 353.194 ± 2.040 us/op
Testing: hotspot tier1, jdk-submit, ad-hoc benchmarks
Thanks,
-Aleksey
More information about the hotspot-dev
mailing list