| 1462 | } |
| 1463 | |
| 1464 | void ChannelImpl::push_scope(std::string name, ScopeType type) { |
| 1465 | MGB_LOCK_GUARD(m_spin); |
| 1466 | assert_available(); |
| 1467 | auto& state = get_channel_state(); |
| 1468 | state.stack_manager.enter(name); |
| 1469 | MGB_RECORD_EVENT(ScopeEvent, name, type); |
| 1470 | if (Profiler::is_profiling()) { |
| 1471 | m_worker.add_task( |
| 1472 | {Profiler::next_id(), PushScope{name, type}, |
| 1473 | get_channel_state().stack_manager.dump()}); |
| 1474 | } else { |
| 1475 | m_worker.add_task({ |
| 1476 | Profiler::next_id(), |
| 1477 | PushScope{name}, |
| 1478 | }); |
| 1479 | } |
| 1480 | } |
| 1481 | |
| 1482 | void ChannelImpl::pop_scope(std::string name, ScopeType type) { |
| 1483 | MGB_LOCK_GUARD(m_spin); |
no test coverage detected