Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a system for tracing GPU timeline work #1520

Merged
merged 11 commits into from
Feb 9, 2024
Merged

Conversation

HansKristian-Work
Copy link
Owner

@HansKristian-Work HansKristian-Work commented Apr 18, 2023

A coarse system-level profile method.

The goal here is to be able to see at a glance D3D12 submissions along with presents and when they complete (with present wait). It dumps out a trivial JSON format that Chromium can consume in chrome://tracing.

There are some useful features that can help track down things:

  • Command list reset/close is marked as an instantaneous event
  • Various heavy creation calls are marked as well (to see if it causes stutter, etc)
  • DXGISwapchain::Present time blocking is marked
  • vkQueuePresentKHR time is marked
  • Present wait blocking is marked
  • CPU submission time
  • GPU active time for a submission (ends when submission fence is signalled) not as accurate as gpuviz or something like that.
  • Present blit on GPU timeline is displayed
  • HANDLE signal from fence is outlined.

queue_profile

as an example.

When GetTickCount is imprecise and uses same timebase anyways.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
For profiling, this is more useful since we won't get resets
after recreating a swapchain.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Queue profiler will report the virtual values.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
The fence worker needs to keep track of some extra information
to ensure the trace output is sensible.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Also works around silly GCC warnings.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
@HansKristian-Work HansKristian-Work merged commit 18f708c into master Feb 9, 2024
6 checks passed
@HansKristian-Work HansKristian-Work deleted the queue-profiling branch February 9, 2024 12:22
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.

2 participants