diff --git a/src/tests/perf_tests/DawnPerfTest.cpp b/src/tests/perf_tests/DawnPerfTest.cpp index 1bcac7387f..12e5f56e4d 100644 --- a/src/tests/perf_tests/DawnPerfTest.cpp +++ b/src/tests/perf_tests/DawnPerfTest.cpp @@ -125,6 +125,7 @@ void DawnPerfTestEnvironment::DumpTraceEventsToJSONFile() const { value["name"] = traceEvent.name; value["cat"] = traceEvent.categoryName; value["ph"] = &phase[0]; + value["id"] = traceEvent.id; value["ts"] = microseconds; value["pid"] = "Dawn"; diff --git a/src/tests/perf_tests/DawnPerfTestPlatform.cpp b/src/tests/perf_tests/DawnPerfTestPlatform.cpp index 4f3d3bb5b5..c9f74a5834 100644 --- a/src/tests/perf_tests/DawnPerfTestPlatform.cpp +++ b/src/tests/perf_tests/DawnPerfTestPlatform.cpp @@ -80,7 +80,7 @@ uint64_t DawnPerfTestPlatform::AddTraceEvent(char phase, "|enabled| must be the first field of the TraceCategory class."); const TraceCategory* category = reinterpret_cast(categoryGroupEnabled); - mTraceEventBuffer.emplace_back(phase, category->name, name, timestamp); + mTraceEventBuffer.emplace_back(phase, category->name, name, id, timestamp); return static_cast(mTraceEventBuffer.size()); } diff --git a/src/tests/perf_tests/DawnPerfTestPlatform.h b/src/tests/perf_tests/DawnPerfTestPlatform.h index 663c5e6b45..042ea6bd5f 100644 --- a/src/tests/perf_tests/DawnPerfTestPlatform.h +++ b/src/tests/perf_tests/DawnPerfTestPlatform.h @@ -32,13 +32,22 @@ class DawnPerfTestPlatform : public dawn_platform::Platform { struct TraceEvent final { TraceEvent() { } - TraceEvent(char phaseIn, const char* categoryNameIn, const char* nameIn, double timestampIn) - : phase(phaseIn), categoryName(categoryNameIn), name(nameIn), timestamp(timestampIn) { + TraceEvent(char phaseIn, + const char* categoryNameIn, + const char* nameIn, + uint64_t idIn, + double timestampIn) + : phase(phaseIn), + categoryName(categoryNameIn), + name(nameIn), + id(idIn), + timestamp(timestampIn) { } char phase = 0; const char* categoryName = nullptr; const char* name = nullptr; + uint64_t id = 0; double timestamp = 0; };