Start profiling for an item
| 323 | |
| 324 | // Start profiling for an item |
| 325 | void CProfilerImpl::Enter( SProfileItemHandle handle ) |
| 326 | { |
| 327 | DAEDALUS_ASSERT( handle.Handle < mItems.size(), "Invalid handle!" ); |
| 328 | DAEDALUS_ASSERT( mActiveCallstacks.size() == mActiveItems.size(), "Why are there different numbers of callstacks/items?" ); |
| 329 | |
| 330 | CProfileItem * item = mItems[ handle.Handle ]; |
| 331 | |
| 332 | mActiveItems.push_back( item ); |
| 333 | |
| 334 | CProfileCallstack * callstack = GetActiveStats(); |
| 335 | |
| 336 | mActiveCallstacks.push_back( callstack ); |
| 337 | |
| 338 | callstack->StartTiming(); |
| 339 | |
| 340 | DAEDALUS_ASSERT( mActiveCallstacks.size() == mActiveItems.size(), "Why are there different numbers of callstacks/items?" ); |
| 341 | } |
| 342 | |
| 343 | // Stop profiling for an item |
| 344 | void CProfilerImpl::Exit( SProfileItemHandle handle ) |
no test coverage detected