MCPcopy Create free account
hub / github.com/beefytech/Beef / Enter

Method Enter

BeefySysLib/util/BeefPerf.cpp:364–391  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

362#define MAX_DEPTH 8192
363
364void BpCmdTarget::Enter(const char* name)
365{
366 BPCMD_PREPARE;
367
368 // Failure here could be from unbalanced enter/leave calls
369 BF_ASSERT((uint32)mCurDepth <= MAX_DEPTH);
370
371 if ((intptr)name < BF_ARRAY_COUNT(mDynStrs))
372 {
373 const char* dynStr = mDynStrs[(intptr)name];
374 int len = (int)strlen(dynStr);
375 BPCMD_RESERVE(1 + 8 + len + 1);
376 BPCMD_MEMBER(uint8) = BpCmd_EnterDyn;
377 BPCMD_MEMBER(int64) = GetTimestamp();
378 BPCMD_MEMCPY(dynStr, len + 1);
379 BPCMD_END();
380 }
381 else
382 {
383 BPCMD_RESERVE(1 + 8 + sizeof(const char*));
384 BPCMD_MEMBER(uint8) = BpCmd_Enter;
385 BPCMD_MEMBER(int64) = GetTimestamp();
386 BPCMD_MEMBER(const char*) = name;
387 BPCMD_END();
388 }
389
390 mCurDepth++;
391}
392
393void BpCmdTarget::Enter(const char* name, va_list args)
394{

Callers 4

BeefPerf.hFile · 0.80
BpAutoZoneFMethod · 0.80
BpEnterFunction · 0.80
BpEnterFFunction · 0.80

Calls 1

GetTimestampFunction · 0.85

Tested by

no test coverage detected