Home
last modified time | relevance | path

Searched refs:gDvm (Results 1 – 25 of 90) sorted by relevance

1234

/dalvik/vm/alloc/
DHeapWorker.c41 assert(!gDvm.heapWorkerInitialized); in dvmInitializeHeapWorkerState()
43 dvmInitMutex(&gDvm.heapWorkerLock); in dvmInitializeHeapWorkerState()
44 pthread_cond_init(&gDvm.heapWorkerCond, NULL); in dvmInitializeHeapWorkerState()
45 pthread_cond_init(&gDvm.heapWorkerIdleCond, NULL); in dvmInitializeHeapWorkerState()
47 gDvm.heapWorkerInitialized = true; in dvmInitializeHeapWorkerState()
57 assert(!gDvm.haltHeapWorker); in dvmHeapWorkerStartup()
58 assert(!gDvm.heapWorkerReady); in dvmHeapWorkerStartup()
59 assert(gDvm.heapWorkerHandle == 0); in dvmHeapWorkerStartup()
60 assert(gDvm.heapWorkerInitialized); in dvmHeapWorkerStartup()
63 dvmLockMutex(&gDvm.heapWorkerLock); in dvmHeapWorkerStartup()
[all …]
DHeap.c58 gDvm.checkAllocLimits = false; in dvmHeapStartup()
59 gDvm.allocationLimit = -1; in dvmHeapStartup()
62 gcHeap = dvmHeapSourceStartup(gDvm.heapSizeStart, gDvm.heapSizeMax); in dvmHeapStartup()
78 gDvm.gcHeap = gcHeap; in dvmHeapStartup()
83 dvmInitMutex(&gDvm.heapWorkerListLock); in dvmHeapStartup()
109 if (gDvm.gcHeap != NULL) { in dvmHeapShutdown()
115 dvmHeapFreeLargeTable(gDvm.gcHeap->finalizableRefs); in dvmHeapShutdown()
116 gDvm.gcHeap->finalizableRefs = NULL; in dvmHeapShutdown()
118 dvmHeapFreeLargeTable(gDvm.gcHeap->pendingFinalizationRefs); in dvmHeapShutdown()
119 gDvm.gcHeap->pendingFinalizationRefs = NULL; in dvmHeapShutdown()
[all …]
DCardTable.c54 GcHeap *gcHeap = gDvm.gcHeap; in dvmCardTableStartup()
60 length = gDvm.heapSizeMax / GC_CARD_SIZE; in dvmCardTableStartup()
79 gDvm.biasedCardTableBase = biasedBase; in dvmCardTableStartup()
89 gDvm.biasedCardTableBase = NULL; in dvmCardTableShutdown()
90 munmap(gDvm.gcHeap->cardTableBase, gDvm.gcHeap->cardTableLength); in dvmCardTableShutdown()
95 assert(gDvm.gcHeap->cardTableBase != NULL); in dvmClearCardTable()
96 memset(gDvm.gcHeap->cardTableBase, GC_CARD_CLEAN, gDvm.gcHeap->cardTableLength); in dvmClearCardTable()
104 GcHeap *h = gDvm.gcHeap; in dvmIsValidCard()
115 u1 *biasedBase = gDvm.biasedCardTableBase; in dvmCardFromAddr()
127 uintptr_t offset = cardAddr - gDvm.biasedCardTableBase; in dvmAddrFromCard()
[all …]
DCopying.c553 heapSource = gDvm.gcHeap->heapSource; in dvmHeapSourceGetValue()
595 return &gDvm.gcHeap->heapSource->allocBits; in dvmHeapSourceGetLiveBits()
614 heapSource = gDvm.gcHeap->heapSource; in dvmHeapSourceAlloc()
670 heapSource = gDvm.gcHeap->heapSource; in allocateGray()
688 HeapSource *heapSource = gDvm.gcHeap->heapSource; in dvmHeapSourceContainsAddress()
701 heapSource = gDvm.gcHeap->heapSource; in dvmHeapSourceContains()
735 return gDvm.gcHeap->heapSource->currentSize; in dvmHeapSourceGetIdealFootprint()
750 return gDvm.gcHeap->heapSource->minimumSize; in dvmMinimumHeapSize()
804 heapSource = gDvm.gcHeap->heapSource; in dvmHeapSourceFlip()
828 heapSource = gDvm.gcHeap->heapSource; in room()
[all …]
DVisit.c178 thread = gDvm.threadList; in visitThreads()
192 visitHashTable(visitor, gDvm.loadedClasses, arg); in dvmVisitRoots()
193 visitHashTable(visitor, gDvm.dbgRegistry, arg); in dvmVisitRoots()
194 visitHashTable(visitor, gDvm.internedStrings, arg); in dvmVisitRoots()
195 visitHashTable(visitor, gDvm.literalStrings, arg); in dvmVisitRoots()
196 visitReferenceTable(visitor, &gDvm.jniGlobalRefTable, arg); in dvmVisitRoots()
197 visitReferenceTable(visitor, &gDvm.jniPinRefTable, arg); in dvmVisitRoots()
198 visitLargeHeapRefTable(visitor, gDvm.gcHeap->referenceOperations, arg); in dvmVisitRoots()
199 visitLargeHeapRefTable(visitor, gDvm.gcHeap->pendingFinalizationRefs, arg); in dvmVisitRoots()
201 (*visitor)(&gDvm.outOfMemoryObj, arg); in dvmVisitRoots()
[all …]
DMarkSweep.c95 GcMarkContext *ctx = &gDvm.gcHeap->markContext; in dvmHeapBeginMarkStep()
131 if (gDvm.gcHeap->hprofContext != NULL) { in markObjectNonNull()
132 hprofMarkRootObject(gDvm.gcHeap->hprofContext, obj, 0); in markObjectNonNull()
163 markObjectNonNull(obj, &gDvm.gcHeap->markContext, false); in dvmMarkObjectNonNull()
194 GcHeap *gcHeap = gDvm.gcHeap; in dvmHeapMarkRootSet()
244 dvmMarkObjectNonNull(gDvm.outOfMemoryObj); in dvmHeapMarkRootSet()
245 dvmMarkObjectNonNull(gDvm.internalErrorObj); in dvmHeapMarkRootSet()
246 dvmMarkObjectNonNull(gDvm.noClassDefFoundErrorObj); in dvmHeapMarkRootSet()
273 GcMarkContext *ctx = &gDvm.gcHeap->markContext; in dvmHeapReMarkRootSet()
327 assert(obj->obj.clazz == gDvm.classJavaLangClass); in scanClassObject()
[all …]
DAlloc.c37 dvmInitMutex(&gDvm.gcHeapLock); in dvmGcStartup()
146 gDvm.outOfMemoryObj = createStockException("Ljava/lang/OutOfMemoryError;", in dvmCreateStockExceptions()
148 dvmReleaseTrackedAlloc(gDvm.outOfMemoryObj, NULL); in dvmCreateStockExceptions()
149 gDvm.internalErrorObj = createStockException("Ljava/lang/InternalError;", in dvmCreateStockExceptions()
151 dvmReleaseTrackedAlloc(gDvm.internalErrorObj, NULL); in dvmCreateStockExceptions()
152 gDvm.noClassDefFoundErrorObj = in dvmCreateStockExceptions()
155 dvmReleaseTrackedAlloc(gDvm.noClassDefFoundErrorObj, NULL); in dvmCreateStockExceptions()
157 if (gDvm.outOfMemoryObj == NULL || gDvm.internalErrorObj == NULL || in dvmCreateStockExceptions()
158 gDvm.noClassDefFoundErrorObj == NULL) in dvmCreateStockExceptions()
214 assert(obj->clazz != gDvm.classJavaLangClass); in dvmCloneObject()
[all …]
/dalvik/vm/
DIntern.c28 dvmInitMutex(&gDvm.internLock); in dvmStringInternStartup()
29 gDvm.internedStrings = dvmHashTableCreate(256, NULL); in dvmStringInternStartup()
30 if (gDvm.internedStrings == NULL) in dvmStringInternStartup()
32 gDvm.literalStrings = dvmHashTableCreate(256, NULL); in dvmStringInternStartup()
33 if (gDvm.literalStrings == NULL) in dvmStringInternStartup()
45 if (gDvm.internedStrings != NULL || gDvm.literalStrings != NULL) { in dvmStringInternShutdown()
46 dvmDestroyMutex(&gDvm.internLock); in dvmStringInternShutdown()
48 dvmHashTableFree(gDvm.internedStrings); in dvmStringInternShutdown()
49 gDvm.internedStrings = NULL; in dvmStringInternShutdown()
50 dvmHashTableFree(gDvm.literalStrings); in dvmStringInternShutdown()
[all …]
DInit.c49 struct DvmGlobals gDvm; variable
335 gDvm.jdwpTransport = kJdwpTransportSocket; in handleJdwpOption()
337 gDvm.jdwpTransport = kJdwpTransportAndroidAdb; in handleJdwpOption()
344 gDvm.jdwpServer = false; in handleJdwpOption()
346 gDvm.jdwpServer = true; in handleJdwpOption()
353 gDvm.jdwpSuspend = false; in handleJdwpOption()
355 gDvm.jdwpSuspend = true; in handleJdwpOption()
367 free(gDvm.jdwpHost); in handleJdwpOption()
368 gDvm.jdwpHost = (char*) malloc(colon - value +1); in handleJdwpOption()
369 strncpy(gDvm.jdwpHost, value, colon - value +1); in handleJdwpOption()
[all …]
DUtfString.c46 if (gDvm.javaLangStringReady < 0) { in stringStartup()
52 if (android_atomic_acquire_cas(0, -1, &gDvm.javaLangStringReady) != 0) { in stringStartup()
54 gDvm.javaLangStringReady); in stringStartup()
58 if (gDvm.classJavaLangString == NULL) in stringStartup()
59 gDvm.classJavaLangString = in stringStartup()
62 gDvm.offJavaLangString_value = in stringStartup()
63 dvmFindFieldOffset(gDvm.classJavaLangString, "value", "[C"); in stringStartup()
64 gDvm.offJavaLangString_count = in stringStartup()
65 dvmFindFieldOffset(gDvm.classJavaLangString, "count", "I"); in stringStartup()
66 gDvm.offJavaLangString_offset = in stringStartup()
[all …]
DProfile.c89 if (!gDvm.profilerWallClock) { in getClock()
144 memset(&gDvm.methodTrace, 0, sizeof(gDvm.methodTrace)); in dvmProfilingStartup()
145 dvmInitMutex(&gDvm.methodTrace.startStopLock); in dvmProfilingStartup()
146 pthread_cond_init(&gDvm.methodTrace.threadExitCond, NULL); in dvmProfilingStartup()
151 gDvm.methodTrace.gcMethod = in dvmProfilingStartup()
153 gDvm.methodTrace.classPrepMethod = in dvmProfilingStartup()
155 if (gDvm.methodTrace.gcMethod == NULL || in dvmProfilingStartup()
156 gDvm.methodTrace.classPrepMethod == NULL) in dvmProfilingStartup()
167 gDvm.executedInstrCounts = (int*) malloc(kNumDalvikInstructions * sizeof(int)); in dvmProfilingStartup()
168 if (gDvm.executedInstrCounts == NULL) in dvmProfilingStartup()
[all …]
DAllocTracker.c79 dvmInitMutex(&gDvm.allocTrackerLock); in dvmAllocTrackerStartup()
82 assert(gDvm.allocRecords == NULL); in dvmAllocTrackerStartup()
92 free(gDvm.allocRecords); in dvmAllocTrackerShutdown()
93 dvmDestroyMutex(&gDvm.allocTrackerLock); in dvmAllocTrackerShutdown()
111 dvmLockMutex(&gDvm.allocTrackerLock); in dvmEnableAllocTracker()
113 if (gDvm.allocRecords == NULL) { in dvmEnableAllocTracker()
117 gDvm.allocRecordHead = gDvm.allocRecordCount = 0; in dvmEnableAllocTracker()
118 gDvm.allocRecords = in dvmEnableAllocTracker()
121 if (gDvm.allocRecords == NULL) in dvmEnableAllocTracker()
125 dvmUnlockMutex(&gDvm.allocTrackerLock); in dvmEnableAllocTracker()
[all …]
DSignalCatcher.c44 gDvm.haltSignalCatcher = false; in dvmSignalCatcherStartup()
46 if (!dvmCreateInternalThread(&gDvm.signalCatcherHandle, in dvmSignalCatcherStartup()
61 gDvm.haltSignalCatcher = true; in dvmSignalCatcherShutdown()
62 if (gDvm.signalCatcherHandle == 0) // not started yet in dvmSignalCatcherShutdown()
65 pthread_kill(gDvm.signalCatcherHandle, SIGQUIT); in dvmSignalCatcherShutdown()
67 pthread_join(gDvm.signalCatcherHandle, NULL); in dvmSignalCatcherShutdown()
150 if (gDvm.stackTraceFile == NULL) { in handleSigQuit()
173 dvmLockMutex(&gDvm.jniGlobalRefLock); in handleSigQuit()
174 dvmDumpReferenceTable(&gDvm.jniGlobalRefTable, "JNI global"); in handleSigQuit()
175 dvmUnlockMutex(&gDvm.jniGlobalRefLock); in handleSigQuit()
[all …]
DThread.c253 gDvm.sumThreadSuspendCount += delta; in dvmAddToThreadSuspendCount()
266 if (pthread_key_create(&gDvm.pthreadKeySelf, threadExitCheck) != 0) { in dvmThreadStartup()
272 if (pthread_getspecific(gDvm.pthreadKeySelf) != NULL) in dvmThreadStartup()
276 dvmInitMutex(&gDvm.threadListLock); in dvmThreadStartup()
277 pthread_cond_init(&gDvm.threadStartCond, NULL); in dvmThreadStartup()
279 pthread_cond_init(&gDvm.vmExitCond, NULL); in dvmThreadStartup()
280 dvmInitMutex(&gDvm._threadSuspendLock); in dvmThreadStartup()
281 dvmInitMutex(&gDvm.threadSuspendCountLock); in dvmThreadStartup()
282 pthread_cond_init(&gDvm.threadSuspendCountCond, NULL); in dvmThreadStartup()
284 dvmInitMutex(&gDvm.deadlockHistoryLock); in dvmThreadStartup()
[all …]
DStdioConverter.c62 gDvm.haltStdioConverter = false; in dvmStdioConverterStartup()
64 dvmInitMutex(&gDvm.stdioConverterLock); in dvmStdioConverterStartup()
65 pthread_cond_init(&gDvm.stdioConverterCond, NULL); in dvmStdioConverterStartup()
101 dvmLockMutex(&gDvm.stdioConverterLock); in dvmStdioConverterStartup()
103 if (!dvmCreateInternalThread(&gDvm.stdioConverterHandle, in dvmStdioConverterStartup()
111 while (!gDvm.stdioConverterReady) { in dvmStdioConverterStartup()
112 dvmWaitCond(&gDvm.stdioConverterCond, &gDvm.stdioConverterLock); in dvmStdioConverterStartup()
114 dvmUnlockMutex(&gDvm.stdioConverterLock); in dvmStdioConverterStartup()
127 gDvm.haltStdioConverter = true; in dvmStdioConverterShutdown()
128 if (gDvm.stdioConverterHandle == 0) // not started, or still starting in dvmStdioConverterShutdown()
[all …]
DProfile.h132 if (gDvm.activeProfilers != 0) { \
133 if (gDvm.methodTrace.traceEnabled) \
135 if (gDvm.emulatorTraceEnableCount != 0) \
141 if (gDvm.activeProfilers != 0) { \
142 if (gDvm.methodTrace.traceEnabled) \
144 if (gDvm.emulatorTraceEnableCount != 0) \
150 if (gDvm.activeProfilers != 0) { \
151 if (gDvm.methodTrace.traceEnabled) \
153 if (gDvm.emulatorTraceEnableCount != 0) \
DProperties.c31 gDvm.maxProps = maxProps; in dvmPropertiesStartup()
33 gDvm.propList = (char**) malloc(maxProps * sizeof(char*)); in dvmPropertiesStartup()
34 if (gDvm.propList == NULL) in dvmPropertiesStartup()
37 gDvm.numProps = 0; in dvmPropertiesStartup()
49 for (i = 0; i < gDvm.numProps; i++) in dvmPropertiesShutdown()
50 free(gDvm.propList[i]); in dvmPropertiesShutdown()
51 free(gDvm.propList); in dvmPropertiesShutdown()
52 gDvm.propList = NULL; in dvmPropertiesShutdown()
74 assert(gDvm.numProps < gDvm.maxProps); in dvmAddCommandLineProperty()
75 gDvm.propList[gDvm.numProps++] = mangle; in dvmAddCommandLineProperty()
[all …]
DException.c111 gDvm.classJavaLangThrowable = in dvmExceptionStartup()
113 gDvm.classJavaLangRuntimeException = in dvmExceptionStartup()
115 gDvm.classJavaLangStackOverflowError = in dvmExceptionStartup()
117 gDvm.classJavaLangError = in dvmExceptionStartup()
119 gDvm.classJavaLangStackTraceElement = in dvmExceptionStartup()
121 gDvm.classJavaLangStackTraceElementArray = in dvmExceptionStartup()
123 if (gDvm.classJavaLangThrowable == NULL || in dvmExceptionStartup()
124 gDvm.classJavaLangStackTraceElement == NULL || in dvmExceptionStartup()
125 gDvm.classJavaLangStackTraceElementArray == NULL) in dvmExceptionStartup()
138 meth = dvmFindDirectMethodByDescriptor(gDvm.classJavaLangStackTraceElement, in dvmExceptionStartup()
[all …]
DUtfString.h37 # define STRING_FIELDOFF_VALUE gDvm.offJavaLangString_value
38 # define STRING_FIELDOFF_OFFSET gDvm.offJavaLangString_offset
39 # define STRING_FIELDOFF_COUNT gDvm.offJavaLangString_count
40 # define STRING_FIELDOFF_HASHCODE gDvm.offJavaLangString_hashCode
DJni.c301 if (!dvmInitIndirectRefTable(&gDvm.jniGlobalRefTable, in dvmJniStartup()
306 if (!dvmInitReferenceTable(&gDvm.jniGlobalRefTable, in dvmJniStartup()
311 dvmInitMutex(&gDvm.jniGlobalRefLock); in dvmJniStartup()
312 gDvm.jniGlobalRefLoMark = 0; in dvmJniStartup()
313 gDvm.jniGlobalRefHiMark = kGrefWaterInterval * 2; in dvmJniStartup()
315 if (!dvmInitReferenceTable(&gDvm.jniPinRefTable, in dvmJniStartup()
319 dvmInitMutex(&gDvm.jniPinRefLock); in dvmJniStartup()
326 gDvm.classJavaLangRefPhantomReference = in dvmJniStartup()
328 if (gDvm.classJavaLangRefPhantomReference == NULL) { in dvmJniStartup()
332 meth= dvmFindDirectMethodByDescriptor(gDvm.classJavaLangRefPhantomReference, in dvmJniStartup()
[all …]
/dalvik/vm/reflect/
DReflect.c28 gDvm.classJavaLangReflectAccessibleObject = in dvmReflectStartup()
30 gDvm.classJavaLangReflectConstructor = in dvmReflectStartup()
32 gDvm.classJavaLangReflectConstructorArray = in dvmReflectStartup()
34 gDvm.classJavaLangReflectField = in dvmReflectStartup()
36 gDvm.classJavaLangReflectFieldArray = in dvmReflectStartup()
38 gDvm.classJavaLangReflectMethod = in dvmReflectStartup()
40 gDvm.classJavaLangReflectMethodArray = in dvmReflectStartup()
42 gDvm.classJavaLangReflectProxy = in dvmReflectStartup()
44 if (gDvm.classJavaLangReflectAccessibleObject == NULL || in dvmReflectStartup()
45 gDvm.classJavaLangReflectConstructor == NULL || in dvmReflectStartup()
[all …]
/dalvik/vm/native/
DInternalNative.c79 gDvm.userDexFiles = dvmHashTableCreate(2, dvmFreeDexOrJar); in dvmInternalNativeStartup()
80 if (gDvm.userDexFiles == NULL) in dvmInternalNativeStartup()
91 dvmHashTableFree(gDvm.userDexFiles); in dvmInternalNativeShutdown()
302 if (!gDvm.javaSecurityAccessControllerReady) { in dvmIsPrivilegedMethod()
321 assert(NELEM(gDvm.methJavaSecurityAccessController_doPrivileged) == in dvmIsPrivilegedMethod()
326 gDvm.methJavaSecurityAccessController_doPrivileged[i] = in dvmIsPrivilegedMethod()
328 if (gDvm.methJavaSecurityAccessController_doPrivileged[i] == NULL) { in dvmIsPrivilegedMethod()
337 &gDvm.javaSecurityAccessControllerReady); in dvmIsPrivilegedMethod()
341 if (gDvm.methJavaSecurityAccessController_doPrivileged[i] == method) { in dvmIsPrivilegedMethod()
Ddalvik_system_DexFile.c79 dvmHashTableLock(gDvm.userDexFiles); in validateCookie()
80 void* result = dvmHashTableLookup(gDvm.userDexFiles, hash, pDexOrJar, in validateCookie()
82 dvmHashTableUnlock(gDvm.userDexFiles); in validateCookie()
152 if (dvmClassPathContains(gDvm.bootClassPath, sourceName)) { in Dalvik_dalvik_system_DexFile_openDexFile()
187 dvmHashTableLock(gDvm.userDexFiles); in Dalvik_dalvik_system_DexFile_openDexFile()
188 result = dvmHashTableLookup(gDvm.userDexFiles, hash, pDexOrJar, in Dalvik_dalvik_system_DexFile_openDexFile()
190 dvmHashTableUnlock(gDvm.userDexFiles); in Dalvik_dalvik_system_DexFile_openDexFile()
232 dvmHashTableLock(gDvm.userDexFiles); in Dalvik_dalvik_system_DexFile_closeDexFile()
233 if (!dvmHashTableRemove(gDvm.userDexFiles, hash, pDexOrJar)) { in Dalvik_dalvik_system_DexFile_closeDexFile()
237 dvmHashTableUnlock(gDvm.userDexFiles); in Dalvik_dalvik_system_DexFile_closeDexFile()
[all …]
/dalvik/vm/oo/
DClass.c312 if (strcmp(gDvm.bootClassPathStr, ".") == 0) { in dvmClassStartup()
317 gDvm.loadedClasses = in dvmClassStartup()
320 gDvm.pBootLoaderAlloc = dvmLinearAllocCreate(NULL); in dvmClassStartup()
321 if (gDvm.pBootLoaderAlloc == NULL) in dvmClassStartup()
333 gDvm.classSerialNumber = INITIAL_CLASS_SERIAL_NUMBER; in dvmClassStartup()
340 gDvm.initiatingLoaderList = in dvmClassStartup()
343 gDvm.classJavaLangClass = (ClassObject*) dvmMalloc( in dvmClassStartup()
345 DVM_OBJECT_INIT(&gDvm.classJavaLangClass->obj, gDvm.classJavaLangClass); in dvmClassStartup()
346 gDvm.classJavaLangClass->descriptor = "Ljava/lang/Class;"; in dvmClassStartup()
351 assert(gDvm.bootClassPath == NULL); in dvmClassStartup()
[all …]
/dalvik/vm/interp/
DInterpDefs.h236 return gDvm.debuggerActive || gDvm.activeProfilers != 0; in dvmDebuggerOrProfilerActive()
247 || gDvm.activeProfilers != 0 in dvmJitDebuggerOrProfilerActive()
248 || gDvm.debuggerActive; in dvmJitDebuggerOrProfilerActive()
257 return (gDvm.sumThreadSuspendCount != 0) || in dvmJitHideTranslation()

1234