src/share/vm/oops/instanceKlass.hpp

changeset 487
75b0f3cb1943
parent 484
31000d79ec71
child 548
ba764ed4b6f2
     1.1 --- a/src/share/vm/oops/instanceKlass.hpp	Thu Mar 13 05:40:44 2008 -0700
     1.2 +++ b/src/share/vm/oops/instanceKlass.hpp	Thu Mar 13 14:17:48 2008 -0700
     1.3 @@ -432,6 +432,8 @@
     1.4                                                          _enclosing_method_method_index = method_index; }
     1.5  
     1.6    // jmethodID support
     1.7 +  static jmethodID get_jmethod_id(instanceKlassHandle ik_h, size_t idnum,
     1.8 +                                  jmethodID new_id, jmethodID* new_jmeths);
     1.9    static jmethodID jmethod_id_for_impl(instanceKlassHandle ik_h, methodHandle method_h);
    1.10    jmethodID jmethod_id_or_null(methodOop method);
    1.11  
    1.12 @@ -838,11 +840,20 @@
    1.13  // A collection point for interesting information about the previous
    1.14  // version(s) of an instanceKlass. This class uses weak references to
    1.15  // the information so that the information may be collected as needed
    1.16 -// by the system. A GrowableArray of PreviousVersionNodes is attached
    1.17 +// by the system. If the information is shared, then a regular
    1.18 +// reference must be used because a weak reference would be seen as
    1.19 +// collectible. A GrowableArray of PreviousVersionNodes is attached
    1.20  // to the instanceKlass as needed. See PreviousVersionWalker below.
    1.21  class PreviousVersionNode : public CHeapObj {
    1.22   private:
    1.23 -  jweak _prev_constant_pool;
    1.24 +  // A shared ConstantPool is never collected so we'll always have
    1.25 +  // a reference to it so we can update items in the cache. We'll
    1.26 +  // have a weak reference to a non-shared ConstantPool until all
    1.27 +  // of the methods (EMCP or obsolete) have been collected; the
    1.28 +  // non-shared ConstantPool becomes collectible at that point.
    1.29 +  jobject _prev_constant_pool;  // regular or weak reference
    1.30 +  bool    _prev_cp_is_weak;     // true if not a shared ConstantPool
    1.31 +
    1.32    // If the previous version of the instanceKlass doesn't have any
    1.33    // EMCP methods, then _prev_EMCP_methods will be NULL. If all the
    1.34    // EMCP methods have been collected, then _prev_EMCP_methods can
    1.35 @@ -850,10 +861,10 @@
    1.36    GrowableArray<jweak>* _prev_EMCP_methods;
    1.37  
    1.38  public:
    1.39 -  PreviousVersionNode(jweak prev_constant_pool,
    1.40 +  PreviousVersionNode(jobject prev_constant_pool, bool prev_cp_is_weak,
    1.41      GrowableArray<jweak>* prev_EMCP_methods);
    1.42    ~PreviousVersionNode();
    1.43 -  jweak prev_constant_pool() const {
    1.44 +  jobject prev_constant_pool() const {
    1.45      return _prev_constant_pool;
    1.46    }
    1.47    GrowableArray<jweak>* prev_EMCP_methods() const {

mercurial