-
Enhancement
-
Resolution: Fixed
-
P4
-
9
-
b32
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8083376 | emb-9 | Coleen Phillimore | P4 | Resolved | Fixed | b32 |
JDK-8212485 | 8u202 | Kevin Walls | P4 | Resolved | Fixed | b01 |
JDK-8208870 | 8u201 | Kevin Walls | P4 | Resolved | Fixed | b01 |
JDK-8194771 | 8u192 | Kevin Walls | P4 | Resolved | Fixed | b01 |
JDK-8196291 | 8u191 | Kevin Walls | P4 | Resolved | Fixed | b01 |
JDK-8201383 | 8u181 | Kevin Walls | P4 | Resolved | Fixed | b02 |
JDK-8199826 | 8u172 | Kevin Walls | P4 | Resolved | Fixed | b31 |
JDK-8195966 | 8u162 | Kevin Walls | P4 | Closed | Fixed | b32 |
JDK-8216689 | emb-8u201 | Kevin Walls | P4 | Resolved | Fixed | master |
JDK-8211469 | emb-8u191 | Kevin Walls | P4 | Resolved | Fixed | master |
JDK-8203096 | emb-8u181 | Kevin Walls | P4 | Resolved | Fixed | b02 |
For class redefinition, the old methods point to the old constant pool which points to the original class. The scratch class created during redefinition points to the old methods and old constant pool, and the original class points to the new (merged) constant pool and new methods. The pointers are such after class redefinition:
original_class->new_cpool->original_class
original_class->new_methods->new_cpool->original_class (this is good!)
scratch_class->old_cpool->original_class
scratch_class->old_methods->old_cpool->original_class (this is inconsistent but necessary [1])
[1] there's a giant comment why this is necessary in jvmtiRedefineClasses. This is actually something we want to change, so different RFE later.
If any of the old_methods are still running when we redefine the classes, we mark them "on_stack" during class unloading so that we don't deallocate the metadata for them. When we mark them on_stack we also mark the old_cpool on_stack because the old methods need the old_cpool. During class redefinition, we put the scratch_class on the deallocation list, but we don't actually deallocate it until all of the old methods are no longer running.
InstanceKlass::on_stack() { return constants->on_stack(); }
The reason for this is because InstanceKlass is a reliable hook for deallocating metadata in the no-permgen world. With PermGen, I believe scratch_class would have been collected before the old methods so we needed to save running old EMCP methods on the PreviousVersionNode (list) as weak references to hold pointers to them. The pointers to the old_methods are held mainly so that we can set breakpoints in EMCP methods - methods that are equivalent except they point to a merged constant pool (but they don't). If someone sets a breakpoint in a new method and there's an equivalent method before redefinition still running, they expect a breakpoint in the equivalent method.
With no-Permgen, we should use scratch_class to link to the previous versions to hold the old_methods which will make this simpler, more explicit, and remove the PreviousVersionNode structure(s).
- backported by
-
JDK-8083376 Clean up code that saves the previous versions of redefined classes
-
- Resolved
-
-
JDK-8194771 Clean up code that saves the previous versions of redefined classes
-
- Resolved
-
-
JDK-8196291 Clean up code that saves the previous versions of redefined classes
-
- Resolved
-
-
JDK-8199826 Clean up code that saves the previous versions of redefined classes
-
- Resolved
-
-
JDK-8201383 Clean up code that saves the previous versions of redefined classes
-
- Resolved
-
-
JDK-8203096 Clean up code that saves the previous versions of redefined classes
-
- Resolved
-
-
JDK-8208870 Clean up code that saves the previous versions of redefined classes
-
- Resolved
-
-
JDK-8211469 Clean up code that saves the previous versions of redefined classes
-
- Resolved
-
-
JDK-8212485 Clean up code that saves the previous versions of redefined classes
-
- Resolved
-
-
JDK-8216689 Clean up code that saves the previous versions of redefined classes
-
- Resolved
-
-
JDK-8195966 Clean up code that saves the previous versions of redefined classes
-
- Closed
-
- relates to
-
JDK-8276177 nsk/jvmti/RedefineClasses/StressRedefineWithoutBytecodeCorruption failed with "assert(def_ik->is_being_redefined()) failed: should be being redefined to get here"
-
- Resolved
-