Skip to content

Conversation

jrmuizel
Copy link
Collaborator

This works but I'm not inclined to have it land because the current allocation system is global and so if you're tracking GPU allocations you can't track any other kind of allocations.

@jrmuizel
Copy link
Collaborator Author

Here's an example profile: https://share.firefox.dev/40np7SB

@mstange
Copy link
Owner

mstange commented Jul 28, 2025

What flags did you pass to xperf to get the D3DUmdLogging/MapAllocation events?

@mstange
Copy link
Owner

mstange commented Sep 10, 2025

Jeff told me in person that he was using GPUView to record this trace, and that he needed to include allocation stacks.

@jrmuizel
Copy link
Collaborator Author

Here's my patch to log.cmd:

--- log.cmd     2023-06-14 20:28:42.000000000 +0000
+++ log-umd-stack.cmd   2025-07-15 22:31:15.978689700 +0000
@@ -58,7 +58,7 @@
 set TRACE_DXC_NORMAL=%TRACE_DXC%:0x900236:5
 set TRACE_DXC_VERBOSE=%TRACE_DXC%:0x80900236:5
 set TRACE_DXC_STACKS=%TRACE_DXC%:0x208041:5:'stack'
-set TRACE_UMD=a688ee40-d8d9-4736-b6f9-6b74935ba3b1:0xffff:5
+set TRACE_UMD=a688ee40-d8d9-4736-b6f9-6b74935ba3b1:0xffff:5:'stack'
 set TRACE_DWM=a42c77db-874f-422e-9b44-6d89fe2bd3e5:0x000000007fffffff:0x5
 set TRACE_DWM2=8c9dd1ad-e6e5-4b07-b455-684a9d879900:0xFFFF:6
 set TRACE_DWM3=9e9bba3c-2e38-40cb-99f4-9e8281425164:0xFFFF:6

@jrmuizel
Copy link
Collaborator Author

Which probably would work with something like:

xperf -start "NT Kernel Logger" -on latency -stackwalk profile+cswitch -start "usersession" -on c923f508-96e4-5515-e32c-7539d1b10504 Microsoft-Windows-DxgKrnl:1:1 Microsoft-Windows-DirectComposition a688ee40-d8d9-4736-b6f9-6b74935ba3b1:0xffff:5:'stack'
xperf -stop "NT Kernel Logger" -stop "usersession" -d out.etl

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