Add PSO creation as frame metrics#663
Open
planetchili wants to merge 1 commit into
Open
Conversation
Add PSO creation metrics and broader concept of inter-frame events/metrics (events that can span multiple frames and are not strictly tied to any one). Although not strictly tied to any one frame's work, they are associated to frames for transport / output purposes. Multiple metrics derive from the PSO creation event, aggregated differently across associated frames' times. Also add test case ETL containing PSO creation events (Nomad loading screen). Co-authored-by: Guillem Vinals Gangolells <122561163+gvinals@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds D3D12 PSO (CreatePipelineStateObject) compilation timing as a new set of “inter-frame” metrics by correlating ETW activity start/stop events to per-present frame windows, then exposing the derived count/time/busy-% through the metrics pipeline (service/API, CSV output, and tests).
Changes:
- Introduces
InterPresentActivityto attribute ETW activity spans (starting with D3D12 PSO compile) to per-frame stats and wires it into the ETW consumer/session. - Plumbs new PSO compile metrics through the metrics calculator/types, public API/metadata, sample client CSV output, and API integration tests.
- Adds unit tests for inter-present attribution utilities and a new ETL-backed paced polling/frame test case.
Reviewed changes
Copilot reviewed 33 out of 33 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| Tests/aux-data.lock.json | Updates pinned aux-data commit hash for test data. |
| PresentData/PresentMonTraceSession.cpp | Enables/dispatches the Direct3D12 ETW provider when PSO compilation tracking is enabled. |
| PresentData/PresentMonTraceConsumer.hpp | Adds inter-present stats storage to PresentEvent and a tracking toggle + HandleD3D12Event() declaration. |
| PresentData/PresentMonTraceConsumer.cpp | Implements D3D12 ETW handling and completes inter-present activity stats on frame finalization/reset. |
| PresentData/PresentData.vcxproj.filters | Adds new ETW header and inter-present activity files to the project filters. |
| PresentData/PresentData.vcxproj | Adds new ETW header and inter-present activity sources to the project. |
| PresentData/InterPresentActivity.hpp | New attribution component API/types for inter-present (multi-frame) activities. |
| PresentData/InterPresentActivity.cpp | Implements interval clipping/union/sum and per-frame attribution bookkeeping. |
| PresentData/ETW/Microsoft_Windows_Direct3D12.h | Adds generated ETW provider/event descriptors for D3D12 PSO start/stop events. |
| IntelPresentMon/UnitTests/UnitTests.vcxproj | Links tdh.lib, adds new unit test source, and references PresentData project. |
| IntelPresentMon/UnitTests/MetricsCore.cpp | Adds a metrics-calculation unit test covering PSO compile metrics fields. |
| IntelPresentMon/UnitTests/InterPresentActivityTests.cpp | Adds unit tests for clipping/merging and multi-frame attribution behavior. |
| IntelPresentMon/SampleClient/PacedFramePlayback.cpp | Extends CSV output with PSO compile columns + improves paced playback stopping logic. |
| IntelPresentMon/SampleClient/CliOptions.h | Adds CLI options controlling start/inactivity thresholds for paced frame playback. |
| IntelPresentMon/PresentMonService/RealtimePresentMonSession.cpp | Enables D3D12 shader compilation tracking by default for realtime sessions. |
| IntelPresentMon/PresentMonService/MockPresentMonSession.cpp | Enables D3D12 shader compilation tracking by default for mock/playback sessions. |
| IntelPresentMon/PresentMonService/EtwLogger.cpp | Enables D3D12 shader compilation tracking for ETW logging. |
| IntelPresentMon/PresentMonAPI2Tests/PacedPollingTests.cpp | Adds a paced polling test case using the new ETL with PSO events. |
| IntelPresentMon/PresentMonAPI2Tests/PacedFrameTests.cpp | Extends CSV parsing/validation to include PSO compile columns and improves failure messages. |
| IntelPresentMon/PresentMonAPI2Tests/IpcMcIntegrationTests.cpp | Verifies new PSO metrics are exposed as dynamic frame metrics via introspection. |
| IntelPresentMon/PresentMonAPI2/PresentMonAPI.h | Adds public metric IDs for PSO compile count/time/busy percent. |
| IntelPresentMon/metrics.csv | Documents the new PSO compile metrics for external consumption. |
| IntelPresentMon/Interprocess/source/metadata/MetricList.h | Adds new metrics to the IPC metadata list with types/units/data types. |
| IntelPresentMon/Core/source/pmon/RawFrameDataMetricList.h | Adds new metrics to raw frame data metric list for capture/output. |
| IntelPresentMon/CommonUtilities/mc/MetricsTypes.h | Adds inter-frame stats fields to FrameData and new PSO metrics to FrameMetrics. |
| IntelPresentMon/CommonUtilities/mc/MetricsTypes.cpp | Maps PresentEvent inter-present stats into FrameData. |
| IntelPresentMon/CommonUtilities/mc/MetricsCalculatorInternal.h | Declares inter-frame event metrics calculator entry point. |
| IntelPresentMon/CommonUtilities/mc/MetricsCalculatorInterFrameEvent.cpp | New calculator translating inter-frame stats into PSO compile metrics. |
| IntelPresentMon/CommonUtilities/mc/MetricsCalculator.cpp | Hooks inter-frame event metrics into the main per-present computation flow. |
| IntelPresentMon/CommonUtilities/mc/FrameMetricsMemberMap.h | Maps new metric IDs to FrameMetrics members. |
| IntelPresentMon/CommonUtilities/CommonUtilities.vcxproj | Adds the new inter-frame event calculator source to the build. |
| ETLTrimmer/main.cpp | Enables D3D12 shader compilation tracking in ETL trimming to match service playback behavior. |
| AGENTS.md | Updates agent instruction wording/formatting. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add PSO creation metrics and broader concept of inter-frame events/metrics (events that can span multiple frames and are not strictly tied to any one). Although not strictly tied to any one frame's work, they are associated to frames for transport / output purposes. Multiple metrics derive from the PSO creation event, aggregated differently across associated frames' times. Also add test case ETL containing PSO creation events (Nomad loading screen).
closes #657
When reviewing, items to consider: