JDK-8216308 : StackTraceElement::fill_in can use injected Class source-file
  • Type: Sub-task
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 11,12,13
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-01-07
  • Updated: 2019-09-06
  • Resolved: 2019-01-14
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 12 JDK 13
11.0.3Fixed 12.0.2Fixed 13 b04Fixed
Description
This is the subtask of JDK-8151751.

We can inject a "source-file" field into Class, and that would skip interning it all the time during stack trace creation.

Candidate patch:
 http://cr.openjdk.java.net/~shade/8216308/webrev.01/

It yields substantial improvements for stack trace generation:

Benchmark             (depth)  Mode  Cnt    Score   Error  Units

# 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

# 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
Comments
Fix Request This patch fixes the significant performance regression introduced in 9, and affecting users on 11. The patch applies without conflicts to both 11u and 12u. It passes tier1 tests on Linux x86_64 in both 11u and 12u, including the new test.
11-02-2019

URL: http://hg.openjdk.java.net/jdk/jdk/rev/cf80666df79a User: shade Date: 2019-01-14 16:28:54 +0000
14-01-2019

RFR: http://mail.openjdk.java.net/pipermail/hotspot-dev/2019-January/036207.html
10-01-2019