1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 11:38:21 +02:00

Removing some AutoPerfs

This commit is contained in:
Brian Fiete 2020-01-31 17:16:44 -08:00
parent 94c63d233e
commit 430829c57a
3 changed files with 14 additions and 29 deletions

View file

@ -4,6 +4,7 @@
#include "gfx/RenderDevice.h"
#include "gfx/Shader.h"
#include "util/PerfTimer.h"
#include "util/BeefPerf.h"
USING_NS_BF;
@ -185,7 +186,7 @@ void DrawLayer::QueueRenderCmd(RenderCmd* renderCmd)
DrawBatch* DrawLayer::AllocateBatch(int minVtxCount, int minIdxCount)
{
AutoPerf autoPerf("DrawLayer::AllocateBatch");
BP_ZONE("DrawLayer::AllocateBatch");
BF_ASSERT(mRenderDevice->mCurRenderState->mShader != NULL);
int vtxSize = mRenderDevice->mCurRenderState->mShader->mVertexSize;
@ -258,7 +259,7 @@ DrawBatch* DrawLayer::AllocateBatch(int minVtxCount, int minIdxCount)
void DrawLayer::Draw()
{
AutoPerf autoPerf("DrawLayer::Draw");
BP_ZONE("DrawLayer::Draw");
RenderCmd* curRenderCmd = mRenderCmdList.mHead;
while (curRenderCmd != NULL)
@ -384,7 +385,7 @@ BF_EXPORT void BF_CALLTYPE DrawLayer_DrawToRenderTarget(DrawLayer* drawLayer, Te
{
RenderDevice* renderDevice = gBFApp->mRenderDevice;
AutoPerf autoPerf("DrawLayer_DrawToRenderTarget DrawPart");
BP_ZONE("DrawLayer_DrawToRenderTarget DrawPart");
RenderTarget* prevTarget = renderDevice->mCurRenderTarget;
renderDevice->PhysSetRenderState(renderDevice->mDefaultRenderState);
renderDevice->PhysSetRenderTarget(textureSegment->mTexture);

View file

@ -211,7 +211,6 @@ public:
return bigData;
}
//AutoPerf perf("Alloc");
if (mCurPtr + wantSize >= mCurAlloc + ALLOC_SIZE)
GrowPool();

View file

@ -2386,8 +2386,6 @@ bool DbgExprEvaluator::HasField(DbgType* curCheckType, const StringImpl& fieldNa
DbgTypedValue DbgExprEvaluator::DoLookupField(BfAstNode* targetSrc, DbgTypedValue target, DbgType* curCheckType, const StringImpl& fieldName, CPUStackFrame* stackFrame, bool allowImplicitThis)
{
AutoPerf perf("DbgExprEvaluator::DoLookupField");
bool wantsStatic = (!target) || (target.mHasNoValue);
auto flavor = GetFlavor();
auto language = GetLanguage();
@ -2796,8 +2794,6 @@ DbgTypedValue DbgExprEvaluator::DoLookupField(BfAstNode* targetSrc, DbgTypedValu
DbgTypedValue DbgExprEvaluator::LookupField(BfAstNode* targetSrc, DbgTypedValue target, const StringImpl& fieldName)
{
AutoPerf perf("DbgExprEvaluator::LookupField");
CPUStackFrame* stackFrame = GetStackFrame();
DbgType* curCheckType = NULL;
@ -3412,8 +3408,6 @@ void DbgExprEvaluator::AutocompleteAddTopLevelTypes(const StringImpl& filter)
DbgTypedValue DbgExprEvaluator::LookupIdentifier(BfAstNode* identifierNode, bool ignoreInitialError, bool* hadError)
{
AutoPerf perf("DbgExprEvaluator::LookupIdentifier");
if (!mDebugger->mIsRunning)
return DbgTypedValue();
@ -3541,7 +3535,6 @@ DbgTypedValue DbgExprEvaluator::LookupIdentifier(BfAstNode* identifierNode, bool
mDebugTarget->mCapturedNamesPtr = &capturedNames;
mDebugTarget->mCapturedTypesPtr = &capturedTypes;
{
AutoPerf perf("mDebugTarget->GetValueByName");
mDebugTarget->GetValueByName(GetCurrentMethod(), "*", stackFrame, &valAddr, &valType, &addrType);
}
mDebugTarget->mCapturedNamesPtr = NULL;
@ -3549,7 +3542,6 @@ DbgTypedValue DbgExprEvaluator::LookupIdentifier(BfAstNode* identifierNode, bool
auto language = GetLanguage();
BF_ASSERT(capturedTypes.size() == capturedNames.size());
{
AutoPerf perf("capturedNames Add");
//for (auto capturedName : capturedNames)
for (int i = 0; i < (int)capturedNames.size(); i++)
{
@ -3637,7 +3629,6 @@ DbgTypedValue DbgExprEvaluator::LookupIdentifier(BfAstNode* identifierNode, bool
if (language == DbgLanguage_C)
{
// For C++ lambdas, captured a "this" is named "__this", so allow lookups into that
AutoPerf perf("GetValueByName __lambda");
auto currentMethod = GetCurrentMethod();
if (currentMethod != NULL)
{
@ -3694,7 +3685,6 @@ DbgTypedValue DbgExprEvaluator::LookupIdentifier(BfAstNode* identifierNode, bool
if (stackFrame != NULL)
{
AutoPerf perf("GetValueByName findName");
if (mDebugTarget->GetValueByName(GetCurrentMethod(), findName, stackFrame, &valAddr, &valType, &addrType))
{
//BF_ASSERT(valType != NULL);
@ -3724,7 +3714,6 @@ DbgTypedValue DbgExprEvaluator::LookupIdentifier(BfAstNode* identifierNode, bool
if (language == DbgLanguage_Beef)
{
AutoPerf perf("GetValueByName __closure");
intptr valAddr;
DbgType* valType;
//bool valIsAddr = false;
@ -4166,8 +4155,6 @@ void DbgExprEvaluator::AutocompleteAddMembers(DbgType* dbgType, bool wantsStatic
if ((mDbgCompileUnit != NULL) && (dbgType->mLanguage != DbgLanguage_Unknown) && (dbgType->mLanguage != language))
return;
AutoPerf perf("DbgExprEvaluator::AutocompleteAddMembers");
dbgType->PopulateType();
if (dbgType->mNeedsGlobalsPopulated)
mDbgModule->PopulateTypeGlobals(dbgType);
@ -7944,8 +7931,6 @@ void DbgExprEvaluator::Visit(BfTupleExpression* tupleExpr)
DbgTypedValue DbgExprEvaluator::Resolve(BfExpression* expr, DbgType* wantType)
{
AutoPerf perf3("DbgExprEvaluator::Resolve");
BF_ASSERT(!HasPropResult());
SetAndRestoreValue<DbgType*> prevType(mExpectingType, wantType);