* Return a string containing all of the trace records from all of the * thread-local buffers. */
| 46 | * thread-local buffers. |
| 47 | */ |
| 48 | string |
| 49 | TimeTrace::getTrace() |
| 50 | { |
| 51 | std::vector<TimeTrace::Buffer*> buffers; |
| 52 | string s; |
| 53 | |
| 54 | // Make a copy of the list of traces, so we can do the actual tracing |
| 55 | // without holding a lock and without fear of the list changing. |
| 56 | { |
| 57 | std::lock_guard<std::mutex> guard(mutex); |
| 58 | buffers = threadBuffers; |
| 59 | } |
| 60 | TimeTrace::printInternal(&buffers, &s); |
| 61 | return s; |
| 62 | } |
| 63 | |
| 64 | /** |
| 65 | * Print all existing trace records to either a user-specified file or to |
nothing calls this directly
no outgoing calls
no test coverage detected