diff options
| -rw-r--r-- | indra/newview/llappviewer.cpp | 57 | ||||
| -rw-r--r-- | indra/newview/lldrawable.cpp | 22 | ||||
| -rw-r--r-- | indra/newview/llface.cpp | 29 | ||||
| -rw-r--r-- | indra/newview/llviewerobjectlist.cpp | 4 | ||||
| -rw-r--r-- | indra/newview/pipeline.cpp | 27 | 
5 files changed, 106 insertions, 33 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 8dfc1657cf..0461cf1612 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -3387,6 +3387,8 @@ static LLFastTimer::DeclareTimer FTM_OBJECTLIST_UPDATE("Update Objectlist");  static LLFastTimer::DeclareTimer FTM_REGION_UPDATE("Update Region");  static LLFastTimer::DeclareTimer FTM_WORLD_UPDATE("Update World");  static LLFastTimer::DeclareTimer FTM_NETWORK("Network"); +static LLFastTimer::DeclareTimer FTM_AGENT_NETWORK("Agent Network"); +static LLFastTimer::DeclareTimer FTM_VLMANAGER("VL Manager");  ///////////////////////////////////////////////////////  // idle() @@ -3457,7 +3459,7 @@ void LLAppViewer::idle()  	if (!gDisconnected)  	{ -		LLFastTimer t(FTM_NETWORK); +		LLFastTimer t(FTM_AGENT_NETWORK);  		// Update spaceserver timeinfo  	    LLWorld::getInstance()->setSpaceTimeUSec(LLWorld::getInstance()->getSpaceTimeUSec() + (U32)(dt_raw * SEC_TO_MICROSEC)); @@ -3646,7 +3648,7 @@ void LLAppViewer::idle()  	//  	{ -		LLFastTimer t(FTM_NETWORK); +		LLFastTimer t(FTM_VLMANAGER);  		gVLManager.unpackData();  	} @@ -3891,7 +3893,12 @@ void LLAppViewer::sendLogoutRequest()  static F32 CheckMessagesMaxTime = CHECK_MESSAGES_DEFAULT_MAX_TIME;  #endif -static LLFastTimer::DeclareTimer FTM_IDLE_NETWORK("Network"); +static LLFastTimer::DeclareTimer FTM_IDLE_NETWORK("Idle Network"); +static LLFastTimer::DeclareTimer FTM_MESSAGE_ACKS("Message Acks"); +static LLFastTimer::DeclareTimer FTM_RETRANSMIT("Retransmit"); +static LLFastTimer::DeclareTimer FTM_TIMEOUT_CHECK("Timeout Check"); +static LLFastTimer::DeclareTimer FTM_DYNAMIC_THROTTLE("Dynamic Throttle"); +static LLFastTimer::DeclareTimer FTM_CHECK_REGION_CIRCUIT("Check Region Circuit");  void LLAppViewer::idleNetwork()  { @@ -3945,7 +3952,10 @@ void LLAppViewer::idleNetwork()  		}  		// Handle per-frame message system processing. -		gMessageSystem->processAcks(); +		{ +			LLFastTimer ftm(FTM_MESSAGE_ACKS); +			gMessageSystem->processAcks(); +		}  #ifdef TIME_THROTTLE_MESSAGES  		if (total_time >= CheckMessagesMaxTime) @@ -3983,26 +3993,41 @@ void LLAppViewer::idleNetwork()  	LLViewerStats::getInstance()->mNumNewObjectsStat.addValue(gObjectList.mNumNewObjects);  	// Retransmit unacknowledged packets. -	gXferManager->retransmitUnackedPackets(); -	gAssetStorage->checkForTimeouts(); +	{ +		LLFastTimer ftm(FTM_RETRANSMIT); +		gXferManager->retransmitUnackedPackets(); +	} + +	{ +		LLFastTimer ftm(FTM_TIMEOUT_CHECK); +		gAssetStorage->checkForTimeouts(); +	} +  	llpushcallstacks ; -	gViewerThrottle.updateDynamicThrottle(); + +	{ +		LLFastTimer ftm(FTM_DYNAMIC_THROTTLE); +		gViewerThrottle.updateDynamicThrottle(); +	}  	llpushcallstacks ;  	// Check that the circuit between the viewer and the agent's current  	// region is still alive -	LLViewerRegion *agent_region = gAgent.getRegion(); -	if (agent_region && (LLStartUp::getStartupState()==STATE_STARTED))  	{ -		LLUUID this_region_id = agent_region->getRegionID(); -		bool this_region_alive = agent_region->isAlive(); -		if ((mAgentRegionLastAlive && !this_region_alive) // newly dead -		    && (mAgentRegionLastID == this_region_id)) // same region +		LLFastTimer ftm(FTM_CHECK_REGION_CIRCUIT); +		LLViewerRegion *agent_region = gAgent.getRegion(); +		if (agent_region && (LLStartUp::getStartupState()==STATE_STARTED))  		{ -			forceDisconnect(LLTrans::getString("AgentLostConnection")); +			LLUUID this_region_id = agent_region->getRegionID(); +			bool this_region_alive = agent_region->isAlive(); +			if ((mAgentRegionLastAlive && !this_region_alive) // newly dead +				&& (mAgentRegionLastID == this_region_id)) // same region +			{ +				forceDisconnect(LLTrans::getString("AgentLostConnection")); +			} +			mAgentRegionLastID = this_region_id; +			mAgentRegionLastAlive = this_region_alive;  		} -		mAgentRegionLastID = this_region_id; -		mAgentRegionLastAlive = this_region_alive;  	}  	llpushcallstacks ;  } diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index d60330024a..9a3be975cd 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -189,20 +189,30 @@ BOOL LLDrawable::isLight() const  	}  } +static LLFastTimer::DeclareTimer FTM_CLEANUP_DRAWABLE("Cleanup Drawable"); +static LLFastTimer::DeclareTimer FTM_DEREF_DRAWABLE("Deref"); +static LLFastTimer::DeclareTimer FTM_DELETE_FACES("Faces"); +  void LLDrawable::cleanupReferences()  { -	LLFastTimer t(FTM_PIPELINE); +	LLFastTimer t(FTM_CLEANUP_DRAWABLE); -	std::for_each(mFaces.begin(), mFaces.end(), DeletePointer()); -	mFaces.clear(); +	{ +		LLFastTimer t(FTM_DELETE_FACES); +		std::for_each(mFaces.begin(), mFaces.end(), DeletePointer()); +		mFaces.clear(); +	}  	gObjectList.removeDrawable(this);  	gPipeline.unlinkDrawable(this); -	// Cleanup references to other objects -	mVObjp = NULL; -	mParent = NULL; +	{ +		LLFastTimer t(FTM_DEREF_DRAWABLE); +		// Cleanup references to other objects +		mVObjp = NULL; +		mParent = NULL; +	}  }  void LLDrawable::cleanupDeadDrawables() diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 698d8572aa..91e2fef28d 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -183,22 +183,33 @@ void LLFace::init(LLDrawable* drawablep, LLViewerObject* objp)  	mUsingAtlas  = FALSE ;  } +static LLFastTimer::DeclareTimer FTM_DESTROY_FACE("Destroy Face"); +static LLFastTimer::DeclareTimer FTM_DESTROY_TEXTURE("Texture"); +static LLFastTimer::DeclareTimer FTM_DESTROY_DRAWPOOL("Drawpool"); +static LLFastTimer::DeclareTimer FTM_DESTROY_TEXTURE_MATRIX("Texture Matrix"); +static LLFastTimer::DeclareTimer FTM_DESTROY_DRAW_INFO("Draw Info"); +static LLFastTimer::DeclareTimer FTM_DESTROY_ATLAS("Atlas"); +static LLFastTimer::DeclareTimer FTM_FACE_DEREF("Deref");  void LLFace::destroy()  { +	LLFastTimer t(FTM_DESTROY_FACE);  	if(mTexture.notNull())  	{ +		LLFastTimer t(FTM_DESTROY_TEXTURE);  		mTexture->removeFace(this) ;  	}  	if (mDrawPoolp)  	{ +		LLFastTimer t(FTM_DESTROY_DRAWPOOL);  		mDrawPoolp->removeFace(this);  		mDrawPoolp = NULL;  	}  	if (mTextureMatrix)  	{ +		LLFastTimer t(FTM_DESTROY_TEXTURE_MATRIX);  		delete mTextureMatrix;  		mTextureMatrix = NULL; @@ -213,11 +224,21 @@ void LLFace::destroy()  		}  	} -	setDrawInfo(NULL); +	{ +		LLFastTimer t(FTM_DESTROY_DRAW_INFO); +		setDrawInfo(NULL); +	} -	removeAtlas(); -	mDrawablep = NULL; -	mVObjp = NULL; +	{ +		LLFastTimer t(FTM_DESTROY_ATLAS); +		removeAtlas(); +	} +	 +	{ +		LLFastTimer t(FTM_FACE_DEREF); +		mDrawablep = NULL; +		mVObjp = NULL; +	}  } diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 96828ee1b6..7a6f479685 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -866,8 +866,12 @@ void LLViewerObjectList::cleanupReferences(LLViewerObject *objectp)  	mNumDeadObjects++;  } +static LLFastTimer::DeclareTimer FTM_REMOVE_DRAWABLE("Remove Drawable"); +  void LLViewerObjectList::removeDrawable(LLDrawable* drawablep)  { +	LLFastTimer t(FTM_REMOVE_DRAWABLE); +  	if (!drawablep)  	{  		return; diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index b37645d2de..cac266a683 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -1143,9 +1143,15 @@ void LLPipeline::allocDrawable(LLViewerObject *vobj)  } +static LLFastTimer::DeclareTimer FTM_UNLINK("Unlink"); +static LLFastTimer::DeclareTimer FTM_REMOVE_FROM_MOVE_LIST("Movelist"); +static LLFastTimer::DeclareTimer FTM_REMOVE_FROM_SPATIAL_PARTITION("Spatial Partition"); +static LLFastTimer::DeclareTimer FTM_REMOVE_FROM_LIGHT_SET("Light Set"); +static LLFastTimer::DeclareTimer FTM_REMOVE_FROM_HIGHLIGHT_SET("Highlight Set"); +  void LLPipeline::unlinkDrawable(LLDrawable *drawable)  { -	LLFastTimer t(FTM_PIPELINE); +	LLFastTimer t(FTM_UNLINK);  	assertInitialized(); @@ -1154,6 +1160,7 @@ void LLPipeline::unlinkDrawable(LLDrawable *drawable)  	// Based on flags, remove the drawable from the queues that it's on.  	if (drawablep->isState(LLDrawable::ON_MOVE_LIST))  	{ +		LLFastTimer t(FTM_REMOVE_FROM_MOVE_LIST);  		LLDrawable::drawable_vector_t::iterator iter = std::find(mMovedList.begin(), mMovedList.end(), drawablep);  		if (iter != mMovedList.end())  		{ @@ -1163,6 +1170,7 @@ void LLPipeline::unlinkDrawable(LLDrawable *drawable)  	if (drawablep->getSpatialGroup())  	{ +		LLFastTimer t(FTM_REMOVE_FROM_SPATIAL_PARTITION);  		if (!drawablep->getSpatialGroup()->mSpatialPartition->remove(drawablep, drawablep->getSpatialGroup()))  		{  #ifdef LL_RELEASE_FOR_DOWNLOAD @@ -1173,18 +1181,23 @@ void LLPipeline::unlinkDrawable(LLDrawable *drawable)  		}  	} -	mLights.erase(drawablep); -	for (light_set_t::iterator iter = mNearbyLights.begin(); -				iter != mNearbyLights.end(); iter++)  	{ -		if (iter->drawable == drawablep) +		LLFastTimer t(FTM_REMOVE_FROM_LIGHT_SET); +		mLights.erase(drawablep); + +		for (light_set_t::iterator iter = mNearbyLights.begin(); +					iter != mNearbyLights.end(); iter++)  		{ -			mNearbyLights.erase(iter); -			break; +			if (iter->drawable == drawablep) +			{ +				mNearbyLights.erase(iter); +				break; +			}  		}  	}  	{ +		LLFastTimer t(FTM_REMOVE_FROM_HIGHLIGHT_SET);  		HighlightItem item(drawablep);  		mHighlightSet.erase(item);  | 
