src/share/vm/oops/instanceKlass.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 7088955 Sdiff src/share/vm/oops

src/share/vm/oops/instanceKlass.hpp

Print this page




 996   // It would be nice to have a ResourceMark field in this helper also,
 997   // but the ResourceMark code says to be careful to delete handles held
 998   // in GrowableArrays _before_ deleting the GrowableArray. Since we
 999   // can't guarantee the order in which the fields are destroyed, we
1000   // have to let the creator of the PreviousVersionWalker object do
1001   // the right thing. Also, adding a ResourceMark here causes an
1002   // include loop.
1003 
1004   // A pointer to the current info object so we can handle the deletes.
1005   PreviousVersionInfo *                 _current_p;
1006 
1007  public:
1008   PreviousVersionWalker(instanceKlass *ik);
1009   ~PreviousVersionWalker();
1010 
1011   // Return the interesting information for the next previous version
1012   // of the klass. Returns NULL if there are no more previous versions.
1013   PreviousVersionInfo* next_previous_version();
1014 };
1015 
































1016 #endif // SHARE_VM_OOPS_INSTANCEKLASS_HPP


 996   // It would be nice to have a ResourceMark field in this helper also,
 997   // but the ResourceMark code says to be careful to delete handles held
 998   // in GrowableArrays _before_ deleting the GrowableArray. Since we
 999   // can't guarantee the order in which the fields are destroyed, we
1000   // have to let the creator of the PreviousVersionWalker object do
1001   // the right thing. Also, adding a ResourceMark here causes an
1002   // include loop.
1003 
1004   // A pointer to the current info object so we can handle the deletes.
1005   PreviousVersionInfo *                 _current_p;
1006 
1007  public:
1008   PreviousVersionWalker(instanceKlass *ik);
1009   ~PreviousVersionWalker();
1010 
1011   // Return the interesting information for the next previous version
1012   // of the klass. Returns NULL if there are no more previous versions.
1013   PreviousVersionInfo* next_previous_version();
1014 };
1015 
1016 
1017 //
1018 // nmethodBucket is used to record dependent nmethods for
1019 // deoptimization.  nmethod dependencies are actually <klass, method>
1020 // pairs but we really only care about the klass part for purposes of
1021 // finding nmethods which might need to be deoptimized.  Instead of
1022 // recording the method, a count of how many times a particular nmethod
1023 // was recorded is kept.  This ensures that any recording errors are
1024 // noticed since an nmethod should be removed as many times are it's
1025 // added.
1026 //
1027 class nmethodBucket: public CHeapObj {
1028   friend class VMStructs;
1029  private:
1030   nmethod*       _nmethod;
1031   int            _count;
1032   nmethodBucket* _next;
1033 
1034  public:
1035   nmethodBucket(nmethod* nmethod, nmethodBucket* next) {
1036     _nmethod = nmethod;
1037     _next = next;
1038     _count = 1;
1039   }
1040   int count()                             { return _count; }
1041   int increment()                         { _count += 1; return _count; }
1042   int decrement()                         { _count -= 1; assert(_count >= 0, "don't underflow"); return _count; }
1043   nmethodBucket* next()                   { return _next; }
1044   void set_next(nmethodBucket* b)         { _next = b; }
1045   nmethod* get_nmethod()                  { return _nmethod; }
1046 };
1047 
1048 #endif // SHARE_VM_OOPS_INSTANCEKLASS_HPP
src/share/vm/oops/instanceKlass.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File