JDK-6173560 : constant pool of redefined class should be safe and high-performance -- make it append only
  • Type: Bug
  • Component: hotspot
  • Sub-Component: jvmti
  • Affected Version: 1.5.1
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2004-10-03
  • Updated: 2011-02-16
  • Resolved: 2006-03-31
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.
Other JDK 6
5.0u8Fixed 6 b76Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
Currently each version of a class has its own constant pool (CP).  This causes two serious problems:
	1) Inconsistent access can cause failure, see 5088035
	2) Severe performance problems on large redefines (tens of seconds):
		a) caused by required CP updates
		b) and causing equivalent methods to need new versions
		   which, in turn need updates
###@###.### 10/3/04 23:59 GMT
This bug consists of three parts:

1) RFE for making constant pools append only; this work was
   done via 5088035
2) fix stress related crashes in RedefineClasses ("safe" part)
3) fix performance problems (simple changes only)

Since #1 is handled by 5088035, I have changed this CR to a Defect
from and RFE.

Comments
SUGGESTED FIX Please see the attached 6173560-webrev-part2-cr0.tgz file for the proposed changes for part2 of this bug.
07-03-2006

EVALUATION Two more minor performance tweaks are targeted for Mustang-B76: 1) A HotSpot specific optimization related to class loaders. When a class loaded by a user-defined class loader is redefined, the classes loaded by the bootstrap class loader can be skipped during the expensive "adjust" phase. 2) HandleMarks and ResourceMarks are more efficient when passed a Thread parameter. As for the stress part of this bug, there are no known stress related crashes that are not already associated with another bug ID. The RedefineClasses() stress kit has not yet been finished, but I don't want to keep this bug open while that work is completed. If the stress kit reveals new failures, then a new bug will be opened.
07-03-2006

EVALUATION An improvment to the itable adjustment code and a pair of improvments to the vtable adjustment code have been putback for Mustang-B73 as a "partial" fix. Micro benchmark measurements look much, much better. General benchmark testing is still in process.
13-02-2006

SUGGESTED FIX The part1 fix was revised during code review. Please see the attached 6173560-webrev-part1-cr1-delta.tgz file for only the diffs between cr0 and cr1. Please see the attached 6173560-webrev-part1-cr1-full.tgz file for the entire set of changes for part1.
13-02-2006

SUGGESTED FIX Please see the attached 6173560-webrev-part1-cr0.tgz file for the proposed changes for part1 of this bug.
08-02-2006

EVALUATION The constant pool merging work was done with 5088035. This bug remains open for two reasons: 1) when the RedefineClasses stress kit is finished, the first batch of stress related bugs will be fixed using this bug ID 2) simple performance fixes (e.g., loop optimizations, code restructuring) will be done with this bug ID 6173565 remains open to address performance improvements that require larger amounts of code (e.g., new cache mechanism or interesting references lists)
27-01-2006

EVALUATION Must be fixed ###@###.### 10/3/04 23:59 GMT
03-10-2004

SUGGESTED FIX Make the constant pool append only ###@###.### 10/3/04 23:59 GMT
03-10-2004