Beispiel #1
0
QByteArray DwarfDie::fullyQualifiedName() const
{
    QByteArray baseName;
    auto parent = parentDie();
    if (parent->tag() == DW_TAG_class_type || parent->tag() == DW_TAG_structure_type || parent->tag() == DW_TAG_namespace)
        baseName = parent->fullyQualifiedName() + "::";
    return baseName + typeName();
}
TIME OptimisticTickSyncAlgo::testSpeculationState(TIME specNextTime,TIME currentTime)
{

	if(!hasChild() && specNextTime!=0){
		interface->prepareFork();
#ifdef DEBUG_WITH_PROFILE
CERR << "Creating child process for specTime " << specNextTime << " " << getCurTimeInMs() << endl;
#elif DEBUG
CERR << "Creating child process for specTime " << specNextTime << endl;
#endif

this->createSpeculativeProcess();
if(this->isChild){ //createSpeculativeProcess will modify this flag!
	AbsCommManager* copy=interface->duplicate(); //create new contexts
	st->startSpeculation(currentTime);
	this->interface=copy;
	Integrator::setCommManager(copy);
	this->specFailTime=Infinity;
	attachTimeShm();

#ifdef DEBUG
	CERR << this->mypid << ": I'm child, current time" << currentTime << " run until no sync " << specNextTime << endl;
#endif

#ifdef PROFILE
	speced();
#endif
	return specNextTime;
}else{
	//TODO MEMORY LEAK!
	attachTimeShm();
	AbsCommManager *copy=interface->duplicate();
	st->startSpeculation(currentTime);
	Integrator::setCommManager(copy);
	this->interface=copy;

#ifdef DEBUG
	CERR << this->mypid << ": I'm parent, current time" << currentTime << " re-init complete" << comm->action << endl;
#endif
	return 0;
}
	}
	if(hasChild()){

#if DEBUG
		CERR << "MY action is " << globalAction << endl;
#endif
		switch(globalAction){
		case ACTION_NOINFO:
			doLimbo();
			break;
		case ACTION_DOFAILLALL:
			doFailAll();
			break;
		case ACTION_FAILED:
			childDied();
			break;
		case ACTION_SUCCESS:
			parentDie();
			break;
		default:
			break;
		}

	}

	return 0;
}