| 40 | static bool gIsRecording = false; |
| 41 | |
| 42 | void SetOutputRecordingState(bool record) |
| 43 | { |
| 44 | auto const& args = GetCommandLineArgs(); |
| 45 | |
| 46 | EnterCriticalSection(&gRecordingToggleCS); |
| 47 | |
| 48 | if (gIsRecording != record) { |
| 49 | gIsRecording = record; |
| 50 | |
| 51 | // When capturing from an ETL file, just use the current recording state. |
| 52 | // It's not clear how best to map realtime to ETL QPC time, and there |
| 53 | // aren't any realtime cues in this case. |
| 54 | if (args.mEtlFileName == nullptr) { |
| 55 | uint64_t qpc = 0; |
| 56 | QueryPerformanceCounter((LARGE_INTEGER*) &qpc); |
| 57 | gRecordingToggleHistory.emplace_back(qpc); |
| 58 | } |
| 59 | } |
| 60 | |
| 61 | LeaveCriticalSection(&gRecordingToggleCS); |
| 62 | } |
| 63 | |
| 64 | static bool CopyRecordingToggleHistory(std::vector<uint64_t>* recordingToggleHistory) |
| 65 | { |
no outgoing calls
no test coverage detected