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:
parent
94c63d233e
commit
430829c57a
3 changed files with 14 additions and 29 deletions
|
@ -4,6 +4,7 @@
|
||||||
#include "gfx/RenderDevice.h"
|
#include "gfx/RenderDevice.h"
|
||||||
#include "gfx/Shader.h"
|
#include "gfx/Shader.h"
|
||||||
#include "util/PerfTimer.h"
|
#include "util/PerfTimer.h"
|
||||||
|
#include "util/BeefPerf.h"
|
||||||
|
|
||||||
USING_NS_BF;
|
USING_NS_BF;
|
||||||
|
|
||||||
|
@ -185,7 +186,7 @@ void DrawLayer::QueueRenderCmd(RenderCmd* renderCmd)
|
||||||
|
|
||||||
DrawBatch* DrawLayer::AllocateBatch(int minVtxCount, int minIdxCount)
|
DrawBatch* DrawLayer::AllocateBatch(int minVtxCount, int minIdxCount)
|
||||||
{
|
{
|
||||||
AutoPerf autoPerf("DrawLayer::AllocateBatch");
|
BP_ZONE("DrawLayer::AllocateBatch");
|
||||||
|
|
||||||
BF_ASSERT(mRenderDevice->mCurRenderState->mShader != NULL);
|
BF_ASSERT(mRenderDevice->mCurRenderState->mShader != NULL);
|
||||||
int vtxSize = mRenderDevice->mCurRenderState->mShader->mVertexSize;
|
int vtxSize = mRenderDevice->mCurRenderState->mShader->mVertexSize;
|
||||||
|
@ -258,7 +259,7 @@ DrawBatch* DrawLayer::AllocateBatch(int minVtxCount, int minIdxCount)
|
||||||
|
|
||||||
void DrawLayer::Draw()
|
void DrawLayer::Draw()
|
||||||
{
|
{
|
||||||
AutoPerf autoPerf("DrawLayer::Draw");
|
BP_ZONE("DrawLayer::Draw");
|
||||||
|
|
||||||
RenderCmd* curRenderCmd = mRenderCmdList.mHead;
|
RenderCmd* curRenderCmd = mRenderCmdList.mHead;
|
||||||
while (curRenderCmd != NULL)
|
while (curRenderCmd != NULL)
|
||||||
|
@ -384,7 +385,7 @@ BF_EXPORT void BF_CALLTYPE DrawLayer_DrawToRenderTarget(DrawLayer* drawLayer, Te
|
||||||
{
|
{
|
||||||
RenderDevice* renderDevice = gBFApp->mRenderDevice;
|
RenderDevice* renderDevice = gBFApp->mRenderDevice;
|
||||||
|
|
||||||
AutoPerf autoPerf("DrawLayer_DrawToRenderTarget DrawPart");
|
BP_ZONE("DrawLayer_DrawToRenderTarget DrawPart");
|
||||||
RenderTarget* prevTarget = renderDevice->mCurRenderTarget;
|
RenderTarget* prevTarget = renderDevice->mCurRenderTarget;
|
||||||
renderDevice->PhysSetRenderState(renderDevice->mDefaultRenderState);
|
renderDevice->PhysSetRenderState(renderDevice->mDefaultRenderState);
|
||||||
renderDevice->PhysSetRenderTarget(textureSegment->mTexture);
|
renderDevice->PhysSetRenderTarget(textureSegment->mTexture);
|
||||||
|
|
|
@ -211,7 +211,6 @@ public:
|
||||||
return bigData;
|
return bigData;
|
||||||
}
|
}
|
||||||
|
|
||||||
//AutoPerf perf("Alloc");
|
|
||||||
if (mCurPtr + wantSize >= mCurAlloc + ALLOC_SIZE)
|
if (mCurPtr + wantSize >= mCurAlloc + ALLOC_SIZE)
|
||||||
GrowPool();
|
GrowPool();
|
||||||
|
|
||||||
|
|
|
@ -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)
|
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);
|
bool wantsStatic = (!target) || (target.mHasNoValue);
|
||||||
auto flavor = GetFlavor();
|
auto flavor = GetFlavor();
|
||||||
auto language = GetLanguage();
|
auto language = GetLanguage();
|
||||||
|
@ -2796,8 +2794,6 @@ DbgTypedValue DbgExprEvaluator::DoLookupField(BfAstNode* targetSrc, DbgTypedValu
|
||||||
|
|
||||||
DbgTypedValue DbgExprEvaluator::LookupField(BfAstNode* targetSrc, DbgTypedValue target, const StringImpl& fieldName)
|
DbgTypedValue DbgExprEvaluator::LookupField(BfAstNode* targetSrc, DbgTypedValue target, const StringImpl& fieldName)
|
||||||
{
|
{
|
||||||
AutoPerf perf("DbgExprEvaluator::LookupField");
|
|
||||||
|
|
||||||
CPUStackFrame* stackFrame = GetStackFrame();
|
CPUStackFrame* stackFrame = GetStackFrame();
|
||||||
|
|
||||||
DbgType* curCheckType = NULL;
|
DbgType* curCheckType = NULL;
|
||||||
|
@ -3412,8 +3408,6 @@ void DbgExprEvaluator::AutocompleteAddTopLevelTypes(const StringImpl& filter)
|
||||||
|
|
||||||
DbgTypedValue DbgExprEvaluator::LookupIdentifier(BfAstNode* identifierNode, bool ignoreInitialError, bool* hadError)
|
DbgTypedValue DbgExprEvaluator::LookupIdentifier(BfAstNode* identifierNode, bool ignoreInitialError, bool* hadError)
|
||||||
{
|
{
|
||||||
AutoPerf perf("DbgExprEvaluator::LookupIdentifier");
|
|
||||||
|
|
||||||
if (!mDebugger->mIsRunning)
|
if (!mDebugger->mIsRunning)
|
||||||
return DbgTypedValue();
|
return DbgTypedValue();
|
||||||
|
|
||||||
|
@ -3541,7 +3535,6 @@ DbgTypedValue DbgExprEvaluator::LookupIdentifier(BfAstNode* identifierNode, bool
|
||||||
mDebugTarget->mCapturedNamesPtr = &capturedNames;
|
mDebugTarget->mCapturedNamesPtr = &capturedNames;
|
||||||
mDebugTarget->mCapturedTypesPtr = &capturedTypes;
|
mDebugTarget->mCapturedTypesPtr = &capturedTypes;
|
||||||
{
|
{
|
||||||
AutoPerf perf("mDebugTarget->GetValueByName");
|
|
||||||
mDebugTarget->GetValueByName(GetCurrentMethod(), "*", stackFrame, &valAddr, &valType, &addrType);
|
mDebugTarget->GetValueByName(GetCurrentMethod(), "*", stackFrame, &valAddr, &valType, &addrType);
|
||||||
}
|
}
|
||||||
mDebugTarget->mCapturedNamesPtr = NULL;
|
mDebugTarget->mCapturedNamesPtr = NULL;
|
||||||
|
@ -3549,7 +3542,6 @@ DbgTypedValue DbgExprEvaluator::LookupIdentifier(BfAstNode* identifierNode, bool
|
||||||
auto language = GetLanguage();
|
auto language = GetLanguage();
|
||||||
BF_ASSERT(capturedTypes.size() == capturedNames.size());
|
BF_ASSERT(capturedTypes.size() == capturedNames.size());
|
||||||
{
|
{
|
||||||
AutoPerf perf("capturedNames Add");
|
|
||||||
//for (auto capturedName : capturedNames)
|
//for (auto capturedName : capturedNames)
|
||||||
for (int i = 0; i < (int)capturedNames.size(); i++)
|
for (int i = 0; i < (int)capturedNames.size(); i++)
|
||||||
{
|
{
|
||||||
|
@ -3637,7 +3629,6 @@ DbgTypedValue DbgExprEvaluator::LookupIdentifier(BfAstNode* identifierNode, bool
|
||||||
if (language == DbgLanguage_C)
|
if (language == DbgLanguage_C)
|
||||||
{
|
{
|
||||||
// For C++ lambdas, captured a "this" is named "__this", so allow lookups into that
|
// For C++ lambdas, captured a "this" is named "__this", so allow lookups into that
|
||||||
AutoPerf perf("GetValueByName __lambda");
|
|
||||||
auto currentMethod = GetCurrentMethod();
|
auto currentMethod = GetCurrentMethod();
|
||||||
if (currentMethod != NULL)
|
if (currentMethod != NULL)
|
||||||
{
|
{
|
||||||
|
@ -3694,7 +3685,6 @@ DbgTypedValue DbgExprEvaluator::LookupIdentifier(BfAstNode* identifierNode, bool
|
||||||
|
|
||||||
if (stackFrame != NULL)
|
if (stackFrame != NULL)
|
||||||
{
|
{
|
||||||
AutoPerf perf("GetValueByName findName");
|
|
||||||
if (mDebugTarget->GetValueByName(GetCurrentMethod(), findName, stackFrame, &valAddr, &valType, &addrType))
|
if (mDebugTarget->GetValueByName(GetCurrentMethod(), findName, stackFrame, &valAddr, &valType, &addrType))
|
||||||
{
|
{
|
||||||
//BF_ASSERT(valType != NULL);
|
//BF_ASSERT(valType != NULL);
|
||||||
|
@ -3724,7 +3714,6 @@ DbgTypedValue DbgExprEvaluator::LookupIdentifier(BfAstNode* identifierNode, bool
|
||||||
|
|
||||||
if (language == DbgLanguage_Beef)
|
if (language == DbgLanguage_Beef)
|
||||||
{
|
{
|
||||||
AutoPerf perf("GetValueByName __closure");
|
|
||||||
intptr valAddr;
|
intptr valAddr;
|
||||||
DbgType* valType;
|
DbgType* valType;
|
||||||
//bool valIsAddr = false;
|
//bool valIsAddr = false;
|
||||||
|
@ -4166,8 +4155,6 @@ void DbgExprEvaluator::AutocompleteAddMembers(DbgType* dbgType, bool wantsStatic
|
||||||
if ((mDbgCompileUnit != NULL) && (dbgType->mLanguage != DbgLanguage_Unknown) && (dbgType->mLanguage != language))
|
if ((mDbgCompileUnit != NULL) && (dbgType->mLanguage != DbgLanguage_Unknown) && (dbgType->mLanguage != language))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
AutoPerf perf("DbgExprEvaluator::AutocompleteAddMembers");
|
|
||||||
|
|
||||||
dbgType->PopulateType();
|
dbgType->PopulateType();
|
||||||
if (dbgType->mNeedsGlobalsPopulated)
|
if (dbgType->mNeedsGlobalsPopulated)
|
||||||
mDbgModule->PopulateTypeGlobals(dbgType);
|
mDbgModule->PopulateTypeGlobals(dbgType);
|
||||||
|
@ -7944,8 +7931,6 @@ void DbgExprEvaluator::Visit(BfTupleExpression* tupleExpr)
|
||||||
|
|
||||||
DbgTypedValue DbgExprEvaluator::Resolve(BfExpression* expr, DbgType* wantType)
|
DbgTypedValue DbgExprEvaluator::Resolve(BfExpression* expr, DbgType* wantType)
|
||||||
{
|
{
|
||||||
AutoPerf perf3("DbgExprEvaluator::Resolve");
|
|
||||||
|
|
||||||
BF_ASSERT(!HasPropResult());
|
BF_ASSERT(!HasPropResult());
|
||||||
|
|
||||||
SetAndRestoreValue<DbgType*> prevType(mExpectingType, wantType);
|
SetAndRestoreValue<DbgType*> prevType(mExpectingType, wantType);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue