Esempio n. 1
0
	void
	scanAllSlots(MM_EnvironmentBase *env)
	{
		J9HashTableState state;
		OMR_VM_Example *omrVM = (OMR_VM_Example *)env->getOmrVM()->_language_vm;
		RootEntry *rootEntry = (RootEntry *)hashTableStartDo(omrVM->rootTable, &state);
		while (rootEntry != NULL) {
			_scavenger->backOutFixSlotWithoutCompression((volatile omrobjectptr_t *) &rootEntry->rootPtr);
			rootEntry = (RootEntry *)hashTableNextDo(&state);
		}
		ObjectEntry *objectEntry = (ObjectEntry *)hashTableStartDo(omrVM->objectTable, &state);
		while (NULL != objectEntry) {
			if (NULL != objectEntry->objPtr) {
				_scavenger->backOutFixSlotWithoutCompression((volatile omrobjectptr_t *) &objectEntry->objPtr);
			}
			objectEntry = (ObjectEntry *)hashTableNextDo(&state);
		}
		OMR_VMThread *walkThread;
		GC_OMRVMThreadListIterator threadListIterator(env->getOmrVM());
		while((walkThread = threadListIterator.nextOMRVMThread()) != NULL) {
			if (NULL != walkThread->_savedObject1) {
				_scavenger->backOutFixSlotWithoutCompression((volatile omrobjectptr_t *) &walkThread->_savedObject1);
			}
			if (NULL != walkThread->_savedObject2) {
				_scavenger->backOutFixSlotWithoutCompression((volatile omrobjectptr_t *) &walkThread->_savedObject2);
			}
		}
	}
Esempio n. 2
0
	void
	scanAllSlots(MM_EnvironmentBase *env)
	{
		J9HashTableState state;
		OMR_VM_Example *omrVM = (OMR_VM_Example *)env->getOmrVM()->_language_vm;
		RootEntry *rootEntry = (RootEntry *)hashTableStartDo(omrVM->rootTable, &state);
		while (rootEntry != NULL) {
			_scavenger->backOutFixSlotWithoutCompression((volatile omrobjectptr_t *) &rootEntry->rootPtr);
			rootEntry = (RootEntry *)hashTableNextDo(&state);
		}
	}
void
MM_CollectorLanguageInterfaceImpl::markingScheme_scanRoots(MM_EnvironmentBase *env)
{
	OMR_VM_Example *omrVM = (OMR_VM_Example *)env->getOmrVM()->_language_vm;
	J9HashTableState state;
	RootEntry *rEntry = NULL;
	rEntry = (RootEntry *)hashTableStartDo(omrVM->rootTable, &state);
	while (rEntry != NULL) {
		_markingScheme->markObject(env, rEntry->rootPtr);
		rEntry = (RootEntry *)hashTableNextDo(&state);
	}
}
void
MM_CollectorLanguageInterfaceImpl::markingScheme_masterCleanupAfterGC(MM_EnvironmentBase *env)
{
	OMR_VM_Example *omrVM = (OMR_VM_Example *)env->getOmrVM()->_language_vm;
	J9HashTableState state;
	ObjectEntry *rEntry = NULL;
	rEntry = (ObjectEntry *)hashTableStartDo(omrVM->objectTable, &state);
	while (rEntry != NULL) {
		if (!_markingScheme->isMarked(rEntry->objPtr)) {
			hashTableDoRemove(&state);
		}
		rEntry = (ObjectEntry *)hashTableNextDo(&state);
	}
}
Esempio n. 5
0
void
MM_MarkingDelegate::masterCleanupAfterGC(MM_EnvironmentBase *env)
{
	OMRPORT_ACCESS_FROM_OMRVM(env->getOmrVM());
	J9HashTableState state;
	ObjectEntry *objEntry = NULL;
	OMR_VM_Example *omrVM = (OMR_VM_Example *)env->getOmrVM()->_language_vm;
	objEntry = (ObjectEntry *)hashTableStartDo(omrVM->objectTable, &state);
	while (objEntry != NULL) {
		if (!_markingScheme->isMarked(objEntry->objPtr)) {
			omrmem_free_memory((void *)objEntry->name);
			objEntry->name = NULL;
			hashTableDoRemove(&state);
		}
		objEntry = (ObjectEntry *)hashTableNextDo(&state);
	}
}
Esempio n. 6
0
void
MM_MarkingDelegate::scanRoots(MM_EnvironmentBase *env)
{
	OMR_VM_Example *omrVM = (OMR_VM_Example *)env->getOmrVM()->_language_vm;
	J9HashTableState state;
	RootEntry *rEntry = NULL;
	rEntry = (RootEntry *)hashTableStartDo(omrVM->rootTable, &state);
	while (rEntry != NULL) {
		_markingScheme->markObject(env, rEntry->rootPtr);
		rEntry = (RootEntry *)hashTableNextDo(&state);
	}
	OMR_VMThread *walkThread;
	GC_OMRVMThreadListIterator threadListIterator(env->getOmrVM());
	while((walkThread = threadListIterator.nextOMRVMThread()) != NULL) {
		if (NULL != walkThread->_savedObject1) {
			_markingScheme->markObject(env, (omrobjectptr_t)walkThread->_savedObject1);
		}
		if (NULL != walkThread->_savedObject2) {
			_markingScheme->markObject(env, (omrobjectptr_t)walkThread->_savedObject2);
		}
	}
}