comparison src/share/vm/oops/instanceKlass.hpp @ 3939:f6f3bb0ee072

7088955: add C2 IR support to the SA Reviewed-by: kvn
author never
date Sun, 11 Sep 2011 14:48:24 -0700
parents e6b1331a51d2
children 04b9a2566eec 75c0a73eee98 069ab3f976d3
comparison
equal deleted inserted replaced
3938:e6b1331a51d2 3939:f6f3bb0ee072
1010 // Return the interesting information for the next previous version 1010 // Return the interesting information for the next previous version
1011 // of the klass. Returns NULL if there are no more previous versions. 1011 // of the klass. Returns NULL if there are no more previous versions.
1012 PreviousVersionInfo* next_previous_version(); 1012 PreviousVersionInfo* next_previous_version();
1013 }; 1013 };
1014 1014
1015
1016 //
1017 // nmethodBucket is used to record dependent nmethods for
1018 // deoptimization. nmethod dependencies are actually <klass, method>
1019 // pairs but we really only care about the klass part for purposes of
1020 // finding nmethods which might need to be deoptimized. Instead of
1021 // recording the method, a count of how many times a particular nmethod
1022 // was recorded is kept. This ensures that any recording errors are
1023 // noticed since an nmethod should be removed as many times are it's
1024 // added.
1025 //
1026 class nmethodBucket: public CHeapObj {
1027 friend class VMStructs;
1028 private:
1029 nmethod* _nmethod;
1030 int _count;
1031 nmethodBucket* _next;
1032
1033 public:
1034 nmethodBucket(nmethod* nmethod, nmethodBucket* next) {
1035 _nmethod = nmethod;
1036 _next = next;
1037 _count = 1;
1038 }
1039 int count() { return _count; }
1040 int increment() { _count += 1; return _count; }
1041 int decrement() { _count -= 1; assert(_count >= 0, "don't underflow"); return _count; }
1042 nmethodBucket* next() { return _next; }
1043 void set_next(nmethodBucket* b) { _next = b; }
1044 nmethod* get_nmethod() { return _nmethod; }
1045 };
1046
1015 #endif // SHARE_VM_OOPS_INSTANCEKLASS_HPP 1047 #endif // SHARE_VM_OOPS_INSTANCEKLASS_HPP