Lines Matching defs:Self

207 bool ObjectSynchronizer::quick_enter(oop obj, Thread * Self,
210 assert(Self->is_Java_thread(), "invariant");
211 assert(((JavaThread *) Self)->thread_state() == _thread_in_Java, "invariant");
226 if (owner == Self) {
244 Atomic::cmpxchg_ptr(Self, &(m->_owner), NULL) == NULL) {
246 assert(m->_owner == Self, "invariant");
639 // so we periodically call Self->_ParkEvent->park(1).
673 static inline intptr_t get_next_hash(Thread * Self, oop obj) {
696 unsigned t = Self->_hashStateX;
698 Self->_hashStateX = Self->_hashStateY;
699 Self->_hashStateY = Self->_hashStateZ;
700 Self->_hashStateZ = Self->_hashStateW;
701 unsigned v = Self->_hashStateW;
703 Self->_hashStateW = v;
714 intptr_t ObjectSynchronizer::FastHashCode(Thread * Self, oop obj) {
725 Handle hobj(Self, obj);
741 Self->is_Java_thread() , "invariant");
743 ((JavaThread *)Self)->thread_state() != _thread_blocked, "invariant");
758 hash = get_next_hash(Self, obj); // allocate a new hash code
777 } else if (Self->is_lock_owned((address)mark->locker())) {
796 monitor = ObjectSynchronizer::inflate(Self, obj, inflate_cause_hash_code);
802 hash = get_next_hash(Self, obj);
1064 static void InduceScavenge(Thread * Self, const char * Whence) {
1091 void ObjectSynchronizer::verifyInUse(Thread *Self) {
1094 for (mid = Self->omInUseList; mid != NULL; mid = mid->FreeNext) {
1097 assert(in_use_tally == Self->omInUseCount, "in-use count off");
1100 for (mid = Self->omFreeList; mid != NULL; mid = mid->FreeNext) {
1103 assert(free_tally == Self->omFreeCount, "free count off");
1106 ObjectMonitor* ObjectSynchronizer::omAlloc(Thread * Self) {
1122 m = Self->omFreeList;
1124 Self->omFreeList = m->FreeNext;
1125 Self->omFreeCount--;
1129 m->FreeNext = Self->omInUseList;
1130 Self->omInUseList = m;
1131 Self->omInUseCount++;
1133 verifyInUse(Self);
1151 for (int i = Self->omFreeProvision; --i >= 0 && gFreeList != NULL;) {
1158 omRelease(Self, take, false);
1161 Self->omFreeProvision += 1 + (Self->omFreeProvision/2);
1162 if (Self->omFreeProvision > MAXPRIVATE) Self->omFreeProvision = MAXPRIVATE;
1170 InduceScavenge(Self, "omAlloc");
1256 void ObjectSynchronizer::omRelease(Thread * Self, ObjectMonitor * m,
1264 for (ObjectMonitor* mid = Self->omInUseList; mid != NULL; cur_mid_in_use = mid, mid = mid->FreeNext) {
1267 if (mid == Self->omInUseList) {
1268 Self->omInUseList = mid->FreeNext;
1273 Self->omInUseCount--;
1275 verifyInUse(Self);
1284 m->FreeNext = Self->omFreeList;
1285 Self->omFreeList = m;
1286 Self->omFreeCount++;
1309 void ObjectSynchronizer::omFlush(Thread * Self) {
1310 ObjectMonitor * list = Self->omFreeList; // Null-terminated SLL
1311 Self->omFreeList = NULL;
1331 ObjectMonitor * inUseList = Self->omInUseList;
1335 Self->omInUseList = NULL;
1345 assert(Self->omInUseCount == inUseTally, "in-use count off");
1346 Self->omInUseCount = 0;
1355 assert(Self->omFreeCount == tally, "free-count off");
1356 Self->omFreeCount = 0;
1382 ObjectMonitor* ObjectSynchronizer::inflate(Thread * Self,
1445 ObjectMonitor * m = omAlloc(Self);
1456 omRelease(Self, m, true);
1497 // with this thread we could simply set m->_owner = Self.
1534 // to inflate and then CAS() again to try to swing _owner from NULL to Self.
1539 ObjectMonitor * m = omAlloc(Self);
1553 omRelease(Self, m, true);