• Home
  • Raw
  • Download

Lines Matching refs:obj

66 static void updateDeadlockPrediction(Thread* self, Object* obj);
67 static void removeCollectedObject(Object* obj);
120 Object* obj; /* what object are we part of [debug only] */ member
163 Monitor* dvmCreateMonitor(Object* obj) in dvmCreateMonitor() argument
176 mon->obj = obj; in dvmCreateMonitor()
228 if (mon->obj != NULL) in dvmDumpMonitorInfo()
245 return mon->obj; in dvmGetMonitorObject()
251 static u4 lockOwner(Object* obj) in lockOwner() argument
256 assert(obj != NULL); in lockOwner()
261 lock = obj->lock; in lockOwner()
276 Thread* dvmGetObjectLockHolder(Object* obj) in dvmGetObjectLockHolder() argument
278 u4 threadId = lockOwner(obj); in dvmGetObjectLockHolder()
289 bool dvmHoldsLock(Thread* thread, Object* obj) in dvmHoldsLock() argument
291 if (thread == NULL || obj == NULL) { in dvmHoldsLock()
294 return thread->threadId == lockOwner(obj); in dvmHoldsLock()
302 static void freeObjectMonitor(Object* obj) in freeObjectMonitor() argument
306 assert(LW_SHAPE(obj->lock) == LW_SHAPE_FAT); in freeObjectMonitor()
310 removeCollectedObject(obj); in freeObjectMonitor()
313 mon = LW_MONITOR(obj->lock); in freeObjectMonitor()
314 obj->lock = DVM_LOCK_INITIAL_THIN_VALUE; in freeObjectMonitor()
341 Object *obj; in dvmSweepMonitorList() local
351 obj = curr->obj; in dvmSweepMonitorList()
352 if (obj != NULL && (*isUnmarkedObject)(obj) != 0) { in dvmSweepMonitorList()
354 freeObjectMonitor(obj); in dvmSweepMonitorList()
944 static void inflateMonitor(Thread *self, Object *obj) in inflateMonitor() argument
950 assert(obj != NULL); in inflateMonitor()
951 assert(LW_SHAPE(obj->lock) == LW_SHAPE_THIN); in inflateMonitor()
952 assert(LW_LOCK_OWNER(obj->lock) == self->threadId); in inflateMonitor()
954 mon = dvmCreateMonitor(obj); in inflateMonitor()
957 thin = obj->lock; in inflateMonitor()
962 android_atomic_release_store(thin, (int32_t *)&obj->lock); in inflateMonitor()
971 void dvmLockObject(Thread* self, Object *obj) in dvmLockObject() argument
980 assert(obj != NULL); in dvmLockObject()
982 thinp = &obj->lock; in dvmLockObject()
995 obj->lock += 1 << LW_LOCK_COUNT_SHIFT; in dvmLockObject()
996 if (LW_LOCK_COUNT(obj->lock) == LW_LOCK_COUNT_MASK) { in dvmLockObject()
1002 inflateMonitor(self, obj); in dvmLockObject()
1021 threadId, &obj->lock, 0, *thinp, thin); in dvmLockObject()
1075 threadId, &obj->lock); in dvmLockObject()
1081 threadId, &obj->lock, 0, *thinp, thin); in dvmLockObject()
1090 inflateMonitor(self, obj); in dvmLockObject()
1091 LOG_THIN("(%d) lock %p fattened", threadId, &obj->lock); in dvmLockObject()
1097 assert(LW_MONITOR(obj->lock) != NULL); in dvmLockObject()
1098 lockMonitor(self, LW_MONITOR(obj->lock)); in dvmLockObject()
1124 updateDeadlockPrediction(self, obj); in dvmLockObject()
1131 dvmAddToMonitorList(self, obj, false); in dvmLockObject()
1132 dvmUnlockObject(self, obj); in dvmLockObject()
1143 dvmAddToMonitorList(self, obj, gDvm.deadlockPredictMode != kDPOff); in dvmLockObject()
1148 dvmAddToMonitorList(self, obj, false); in dvmLockObject()
1157 bool dvmUnlockObject(Thread* self, Object *obj) in dvmUnlockObject() argument
1163 assert(obj != NULL); in dvmUnlockObject()
1168 thin = obj->lock; in dvmUnlockObject()
1185 obj->lock &= (LW_HASH_STATE_MASK << LW_HASH_STATE_SHIFT); in dvmUnlockObject()
1191 obj->lock -= 1 << LW_LOCK_COUNT_SHIFT; in dvmUnlockObject()
1207 assert(LW_MONITOR(obj->lock) != NULL); in dvmUnlockObject()
1208 if (!unlockMonitor(self, LW_MONITOR(obj->lock))) { in dvmUnlockObject()
1220 dvmRemoveFromMonitorList(self, obj); in dvmUnlockObject()
1229 void dvmObjectWait(Thread* self, Object *obj, s8 msec, s4 nsec, in dvmObjectWait() argument
1233 u4 thin = obj->lock; in dvmObjectWait()
1251 inflateMonitor(self, obj); in dvmObjectWait()
1253 self->threadId, &obj->lock, mon->lockCount); in dvmObjectWait()
1255 mon = LW_MONITOR(obj->lock); in dvmObjectWait()
1262 void dvmObjectNotify(Thread* self, Object *obj) in dvmObjectNotify() argument
1264 u4 thin = obj->lock; in dvmObjectNotify()
1290 void dvmObjectNotifyAll(Thread* self, Object *obj) in dvmObjectNotifyAll() argument
1292 u4 thin = obj->lock; in dvmObjectNotifyAll()
1383 u4 dvmIdentityHashCode(Object *obj) in dvmIdentityHashCode() argument
1385 return (u4)obj; in dvmIdentityHashCode()
1391 u4 dvmIdentityHashCode(Object *obj) in dvmIdentityHashCode() argument
1398 if (obj == NULL) { in dvmIdentityHashCode()
1404 lw = &obj->lock; in dvmIdentityHashCode()
1413 return (u4)obj >> 3; in dvmIdentityHashCode()
1420 assert(obj->clazz != gDvm.classJavaLangClass); in dvmIdentityHashCode()
1421 if (IS_CLASS_FLAG_SET(obj->clazz, CLASS_ISARRAY)) { in dvmIdentityHashCode()
1422 size = dvmArrayObjectSize((ArrayObject *)obj); in dvmIdentityHashCode()
1425 size = obj->clazz->objectSize; in dvmIdentityHashCode()
1427 return *(u4 *)(((char *)obj) + size); in dvmIdentityHashCode()
1434 if (self->threadId == lockOwner(obj)) { in dvmIdentityHashCode()
1440 return (u4)obj >> 3; in dvmIdentityHashCode()
1461 return (u4)obj >> 3; in dvmIdentityHashCode()
1472 return (u4)obj >> 3; in dvmIdentityHashCode()
1517 if (dvmHoldsLock(thread, obj)) { in dvmIdentityHashCode()
1525 return (u4)obj >> 3; in dvmIdentityHashCode()
1534 LOGE("object %p has an unknown hash state %#x", obj, hashState); in dvmIdentityHashCode()
1646 static void expandObjAddEntry(ExpandingObjectList* pList, Object* obj) in expandObjAddEntry() argument
1665 pList->list[pList->count++] = obj; in expandObjAddEntry()
1671 static bool expandObjRemoveEntry(ExpandingObjectList* pList, Object* obj) in expandObjRemoveEntry() argument
1676 if (pList->list[i] == obj) in expandObjRemoveEntry()
1700 static bool expandObjHas(const ExpandingObjectList* pList, Object* obj) in expandObjHas() argument
1705 if (pList->list[i] == obj) in expandObjHas()
1834 lod->obj, lod->recursionCount, lod->obj->clazz->descriptor); in logHeldMonitors()
1848 static bool traverseTree(Thread* self, const Object* obj) in traverseTree() argument
1850 assert(IS_LOCK_FAT(&obj->lock)); in traverseTree()
1851 Monitor* mon = LW_MONITOR(obj->lock); in traverseTree()
1862 LOGW("--- object %p (%s)\n", obj, obj->clazz->descriptor); in traverseTree()
1899 LOGW("--- object %p (%s)\n", obj, obj->clazz->descriptor); in traverseTree()
1983 if (objectInChildList(mrl->obj, acqObj)) in updateDeadlockPrediction()
1994 if (!IS_LOCK_FAT(&mrl->obj->lock)) { in updateDeadlockPrediction()
1996 mrl->obj, acqObj, LW_LOCK_COUNT(mrl->obj->lock)); in updateDeadlockPrediction()
1997 inflateMonitor(self, mrl->obj); in updateDeadlockPrediction()
2021 linkParentToChild(mrl->obj, acqObj); in updateDeadlockPrediction()
2027 unlinkParentFromChild(mrl->obj, acqObj); in updateDeadlockPrediction()
2083 static void removeCollectedObject(Object* obj) in removeCollectedObject() argument
2087 LOGVV("+++ collecting %p\n", obj); in removeCollectedObject()
2098 assert(IS_LOCK_FAT(&obj->lock)); in removeCollectedObject()
2099 mon = LW_MONITOR(obj->lock); in removeCollectedObject()
2105 if (!expandObjRemoveEntry(&parentMon->historyChildren, obj)) { in removeCollectedObject()
2106 LOGW("WARNING: child %p not found in parent %p\n", obj, parent); in removeCollectedObject()
2108 assert(!expandObjHas(&parentMon->historyChildren, obj)); in removeCollectedObject()
2110 mergeChildren(parent, obj); in removeCollectedObject()
2122 if (!expandObjRemoveEntry(&childMon->historyParents, obj)) { in removeCollectedObject()
2123 LOGW("WARNING: parent %p not found in child %p\n", obj, child); in removeCollectedObject()
2125 assert(!expandObjHas(&childMon->historyParents, obj)); in removeCollectedObject()