Use this function instead of TraceEventHandle constructor to keep the overhead of ScopedTracer (trace_event.h) constructor minimum.
| 476 | // Use this function instead of TraceEventHandle constructor to keep the |
| 477 | // overhead of ScopedTracer (trace_event.h) constructor minimum. |
| 478 | void MakeHandle(uint32_t chunk_seq, size_t chunk_index, size_t event_index, |
| 479 | TraceEventHandle* handle) { |
| 480 | DCHECK(chunk_seq); |
| 481 | DCHECK(chunk_index < (1u << 16)); |
| 482 | DCHECK(event_index < (1u << 16)); |
| 483 | handle->chunk_seq = chunk_seq; |
| 484 | handle->chunk_index = static_cast<uint16_t>(chunk_index); |
| 485 | handle->event_index = static_cast<uint16_t>(event_index); |
| 486 | } |
| 487 | |
| 488 | //////////////////////////////////////////////////////////////////////////////// |
| 489 | // |
no outgoing calls
no test coverage detected