Mercurial > hg > graal-jvmci-8
comparison src/share/vm/oops/instanceKlass.hpp @ 47:2c106685d6d0
6497639: 4/3 Profiling Swing application caused JVM crash
Summary: Make RedefineClasses() interoperate better with class sharing.
Reviewed-by: sspitsyn, jmasa
author | dcubed |
---|---|
date | Wed, 12 Mar 2008 18:06:50 -0700 |
parents | a61af66fc99e |
children | 31000d79ec71 |
comparison
equal
deleted
inserted
replaced
2:7836be3e92d0 | 47:2c106685d6d0 |
---|---|
836 | 836 |
837 | 837 |
838 // A collection point for interesting information about the previous | 838 // A collection point for interesting information about the previous |
839 // version(s) of an instanceKlass. This class uses weak references to | 839 // version(s) of an instanceKlass. This class uses weak references to |
840 // the information so that the information may be collected as needed | 840 // the information so that the information may be collected as needed |
841 // by the system. A GrowableArray of PreviousVersionNodes is attached | 841 // by the system. If the information is shared, then a regular |
842 // reference must be used because a weak reference would be seen as | |
843 // collectible. A GrowableArray of PreviousVersionNodes is attached | |
842 // to the instanceKlass as needed. See PreviousVersionWalker below. | 844 // to the instanceKlass as needed. See PreviousVersionWalker below. |
843 class PreviousVersionNode : public CHeapObj { | 845 class PreviousVersionNode : public CHeapObj { |
844 private: | 846 private: |
845 jweak _prev_constant_pool; | 847 // A shared ConstantPool is never collected so we'll always have |
848 // a reference to it so we can update items in the cache. We'll | |
849 // have a weak reference to a non-shared ConstantPool until all | |
850 // of the methods (EMCP or obsolete) have been collected; the | |
851 // non-shared ConstantPool becomes collectible at that point. | |
852 jobject _prev_constant_pool; // regular or weak reference | |
853 bool _prev_cp_is_weak; // true if not a shared ConstantPool | |
854 | |
846 // If the previous version of the instanceKlass doesn't have any | 855 // If the previous version of the instanceKlass doesn't have any |
847 // EMCP methods, then _prev_EMCP_methods will be NULL. If all the | 856 // EMCP methods, then _prev_EMCP_methods will be NULL. If all the |
848 // EMCP methods have been collected, then _prev_EMCP_methods can | 857 // EMCP methods have been collected, then _prev_EMCP_methods can |
849 // have a length of zero. | 858 // have a length of zero. |
850 GrowableArray<jweak>* _prev_EMCP_methods; | 859 GrowableArray<jweak>* _prev_EMCP_methods; |
851 | 860 |
852 public: | 861 public: |
853 PreviousVersionNode(jweak prev_constant_pool, | 862 PreviousVersionNode(jobject prev_constant_pool, bool prev_cp_is_weak, |
854 GrowableArray<jweak>* prev_EMCP_methods); | 863 GrowableArray<jweak>* prev_EMCP_methods); |
855 ~PreviousVersionNode(); | 864 ~PreviousVersionNode(); |
856 jweak prev_constant_pool() const { | 865 jobject prev_constant_pool() const { |
857 return _prev_constant_pool; | 866 return _prev_constant_pool; |
858 } | 867 } |
859 GrowableArray<jweak>* prev_EMCP_methods() const { | 868 GrowableArray<jweak>* prev_EMCP_methods() const { |
860 return _prev_EMCP_methods; | 869 return _prev_EMCP_methods; |
861 } | 870 } |