JDK-8078725 : method adjustments can be done just once for all classes involved into redefinition
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: jvmti
  • Affected Version: 9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2015-04-28
  • Updated: 2024-06-28
  • Resolved: 2019-02-22
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 13
11.0.25-oracleFixed 13 b10Fixed
Related Reports
Blocks :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
 The following scalability/performance issues were recently fixed for class redefinition:
   https://bugs.openjdk.java.net/browse/JDK-8046246
   https://bugs.openjdk.java.net/browse/JDK-8073705

It is going to improve the implementation of the functions:
     ConstantPoolCache::adjust_method_entries()
     klassVtable::adjust_method_entries()
     klassItable::adjust_method_entries()
     InstanceKlass::adjust_default_methods()
     MemberNameTable::adjust_method_entries()

However, there is more space for improvements:
  - The above functions can be run just once for all the redefined classes instead of multiple times after
    redefinition of each class in the list (they have no parameters specific for redefined classes anymore)

Comments
[jdk11u-fix-request] Approval Request from Martin Should get backported for parity with 11.0.25-oracle. The backport has been reviewed and tier 1-4 have passed.
27-06-2024

Github-URL: https://github.com/openjdk/jdk/commit/351280bbb8337eff6b61ce305ead2bf207370889
26-06-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jdk11u-dev/pull/2816 Date: 2024-06-26 12:51:43 +0000
26-06-2024

URL: http://hg.openjdk.java.net/jdk/jdk/rev/9c3fe09f69bc User: coleenp Date: 2019-02-22 19:29:29 +0000
22-02-2019

Below are the performance improvements with the new JMH benchmark for JDK-8139551 with code changes to do a single ClassLoaderDataGraph walk and adjust methods after all redefinitions. clean: RedefineClassesWithAgent.benchmark 10 avgt 10 11.452 ± 0.339 ms/op RedefineClassesWithAgent.benchmark 50 avgt 10 48.517 ± 0.459 ms/op RedefineClassesWithAgent.benchmark 75 avgt 10 84.425 ± 6.603 ms/op RedefineClassesWithAgent.benchmark 100 avgt 10 172.172 ± 13.297 ms/op RedefineClassesWithAgent.benchmark 150 avgt 10 502.780 ± 30.216 ms/op RedefineClassesWithAgent.benchmark 200 avgt 10 906.304 ± 59.121 ms/op with changes: RedefineClassesWithAgent.benchmark 10 avgt 10 7.482 ± 0.244 ms/op RedefineClassesWithAgent.benchmark 50 avgt 10 8.534 ± 0.390 ms/op RedefineClassesWithAgent.benchmark 75 avgt 10 10.520 ± 0.318 ms/op RedefineClassesWithAgent.benchmark 100 avgt 10 12.197 ± 0.388 ms/op RedefineClassesWithAgent.benchmark 150 avgt 10 16.177 ± 0.785 ms/op RedefineClassesWithAgent.benchmark 200 avgt 10 20.489 ± 1.396 ms/op
19-02-2019

Retargeting it to 11. This optimization can be done in the update if necessary.
12-04-2017