• Home
  • Raw
  • Download

Lines Matching refs:gHs

57         assert(gHs == gDvm.gcHeap->heapSource); \
298 static HeapSource *gHs = NULL; variable
325 for (size_t i = 0; i < gHs->numHeaps; i++) { in dvmHeapSourceMorecore()
326 if (gHs->heaps[i].msp == mspace) { in dvmHeapSourceMorecore()
327 heap = &gHs->heaps[i]; in dvmHeapSourceMorecore()
446 dvmLockMutex(&gHs->gcThreadMutex); in gcDaemonThread()
447 while (gHs->gcThreadShutdown != true) { in gcDaemonThread()
449 if (gHs->gcThreadTrimNeeded) { in gcDaemonThread()
450 int result = dvmRelativeCondWait(&gHs->gcThreadCond, &gHs->gcThreadMutex, in gcDaemonThread()
457 dvmWaitCond(&gHs->gcThreadCond, &gHs->gcThreadMutex); in gcDaemonThread()
470 gHs->gcThreadTrimNeeded = false; in gcDaemonThread()
473 gHs->gcThreadTrimNeeded = true; in gcDaemonThread()
485 dvmInitMutex(&gHs->gcThreadMutex); in gcDaemonStartup()
486 pthread_cond_init(&gHs->gcThreadCond, NULL); in gcDaemonStartup()
487 gHs->gcThreadShutdown = false; in gcDaemonStartup()
488 gHs->hasGcThread = dvmCreateInternalThread(&gHs->gcThread, "GC", in gcDaemonStartup()
490 return gHs->hasGcThread; in gcDaemonStartup()
495 if (gHs->hasGcThread) { in gcDaemonShutdown()
496 dvmLockMutex(&gHs->gcThreadMutex); in gcDaemonShutdown()
497 gHs->gcThreadShutdown = true; in gcDaemonShutdown()
498 dvmSignalCond(&gHs->gcThreadCond); in gcDaemonShutdown()
499 dvmUnlockMutex(&gHs->gcThreadMutex); in gcDaemonShutdown()
500 pthread_join(gHs->gcThread, NULL); in gcDaemonShutdown()
550 assert(gHs == NULL); in dvmHeapSourceStartup()
634 gHs = hs; in dvmHeapSourceStartup()
656 HeapSource *hs = gHs; // use a local to avoid the implicit "volatile" in dvmHeapSourceStartupBeforeFork()
698 gHs = NULL; in dvmHeapSourceShutdown()
709 return gHs->heapBase; in dvmHeapSourceGetBase()
718 HeapSource *hs = gHs; in dvmHeapSourceGetLimit()
740 HeapSource *hs = gHs; in dvmHeapSourceGetValue()
778 HeapSource *hs = gHs; in dvmHeapSourceGetRegions()
796 return &gHs->liveBits; in dvmHeapSourceGetLiveBits()
806 return &gHs->markBits; in dvmHeapSourceGetMarkBits()
811 HeapBitmap tmp = gHs->liveBits; in dvmHeapSourceSwapBitmaps()
812 gHs->liveBits = gHs->markBits; in dvmHeapSourceSwapBitmaps()
813 gHs->markBits = tmp; in dvmHeapSourceSwapBitmaps()
820 dvmHeapBitmapZero(&gHs->markBits); in dvmHeapSourceZeroMarkBitmap()
830 assert(immuneLimit == gHs->heaps[0].base || in dvmMarkImmuneObjects()
832 assert(gHs->liveBits.base == gHs->markBits.base); in dvmMarkImmuneObjects()
833 assert(gHs->liveBits.bitsLen == gHs->markBits.bitsLen); in dvmMarkImmuneObjects()
835 assert(gHs->heaps[0].base >= immuneLimit); in dvmMarkImmuneObjects()
836 assert(gHs->heaps[0].limit > immuneLimit); in dvmMarkImmuneObjects()
838 for (size_t i = 1; i < gHs->numHeaps; ++i) { in dvmMarkImmuneObjects()
839 if (gHs->heaps[i].base < immuneLimit) { in dvmMarkImmuneObjects()
840 assert(gHs->heaps[i].limit <= immuneLimit); in dvmMarkImmuneObjects()
843 (uintptr_t)gHs->heaps[i].base - gHs->liveBits.base); in dvmMarkImmuneObjects()
845 char *src = (char *)(gHs->liveBits.bits + index); in dvmMarkImmuneObjects()
846 char *dst = (char *)(gHs->markBits.bits + index); in dvmMarkImmuneObjects()
849 gHs->heaps[i].limit - gHs->heaps[i].base); in dvmMarkImmuneObjects()
853 if (gHs->markBits.max < (uintptr_t)gHs->heaps[i].limit) { in dvmMarkImmuneObjects()
854 gHs->markBits.max = (uintptr_t)gHs->heaps[i].limit; in dvmMarkImmuneObjects()
867 HeapSource *hs = gHs; in dvmHeapSourceAlloc()
898 dvmSignalCond(&gHs->gcThreadCond); in dvmHeapSourceAlloc()
932 HeapSource *hs = gHs; in dvmHeapSourceAllocAndGrow()
990 Heap* heap = ptr2heap(gHs, *ptrs); in dvmHeapSourceFreeList()
998 if (heap == gHs->heaps) { in dvmHeapSourceFreeList()
1002 assert(ptr2heap(gHs, ptrs[i]) == heap); in dvmHeapSourceFreeList()
1011 assert(ptr2heap(gHs, ptrs[i]) == heap); in dvmHeapSourceFreeList()
1037 return dvmHeapBitmapIsObjectBitSet(&gHs->liveBits, ptr) != 0; in dvmHeapSourceContains()
1044 HeapSource *hs = gHs; in dvmIsZygoteObject()
1071 Heap* heap = ptr2heap(gHs, ptr); in dvmHeapSourceChunkSize()
1089 return oldHeapOverhead(gHs, true); in dvmHeapSourceFootprint()
1104 return getMaximumSize(gHs); in dvmHeapSourceGetMaximumSize()
1117 gHs->growthLimit = gHs->maximumSize; in dvmClearGrowthLimit()
1118 size_t overhead = oldHeapOverhead(gHs, false); in dvmClearGrowthLimit()
1119 gHs->heaps[0].maximumSize = gHs->maximumSize - overhead; in dvmClearGrowthLimit()
1120 gHs->heaps[0].limit = gHs->heaps[0].base + gHs->heaps[0].maximumSize; in dvmClearGrowthLimit()
1134 HeapSource *hs = gHs; in getSoftFootprint()
1149 HeapSource *hs = gHs; in dvmHeapSourceGetIdealFootprint()
1191 HeapSource *hs = gHs; in setIdealFootprint()
1231 HeapSource *hs = gHs; in dvmGetTargetHeapUtilization()
1244 HeapSource *hs = gHs; in dvmSetTargetHeapUtilization()
1294 HeapSource *hs = gHs; in dvmHeapSourceGrowForUtilization()
1356 HeapSource *hs = gHs; in trimHeaps()
1390 HeapSource *hs = gHs; in dvmHeapSourceWalk()
1407 return gHs->numHeaps; in dvmHeapSourceGetNumHeaps()
1413 return hs2heap(gHs)->base; in dvmHeapSourceGetImmuneLimit()