Skip to content

Add PSO creation as frame metrics#663

Open
planetchili wants to merge 1 commit into
mainfrom
feature/pso-frame-metrics
Open

Add PSO creation as frame metrics#663
planetchili wants to merge 1 commit into
mainfrom
feature/pso-frame-metrics

Conversation

@planetchili

@planetchili planetchili commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

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:

  • Most appropriate boundary/dividing line to use when associating/allocating inter-frame work to presents (currently mimics GPUTrace behavior)
  • Implications for (multi) frame generation technologies
  • Would busy % better be represented as busy milliseconds, to better align with existing behavior CPU/GPU bus?
  • Appropriateness of external-facing names (metric ID, CSV column, UI/overlay)
  • Run pull-aux.ps1 to update gold CSVs if running tests during review

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>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 InterPresentActivity to 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.

Comment thread IntelPresentMon/UnitTests/InterPresentActivityTests.cpp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PSO Compilation Metrics

2 participants