| 362 | #define MAX_DEPTH 8192 |
| 363 | |
| 364 | void 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 | |
| 393 | void BpCmdTarget::Enter(const char* name, va_list args) |
| 394 | { |
no test coverage detected