radeon memory visualizer documentation

38
Radeon Memory Visualizer Documentation Release 1.2.0 AMD Developer Tools Jul 21, 2021

Upload: others

Post on 07-Dec-2021

31 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Radeon Memory Visualizer Documentation

Radeon Memory VisualizerDocumentation

Release 1.2.0

AMD Developer Tools

Jul 21, 2021

Page 2: Radeon Memory Visualizer Documentation
Page 3: Radeon Memory Visualizer Documentation

Contents

1 Supported graphics APIs, RDNA and GCN hardware, and operating systems 3

2 Radeon Memory Visualizer - Quick Start 52.1 How to generate a memory trace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52.2 Starting the Radeon Memory Visualizer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52.3 How to load a trace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52.4 The Radeon Memory Visualizer user interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

3 Settings 93.1 General . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93.2 Themes and colors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93.3 Keyboard shortcuts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103.4 UI Navigation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

4 The Timeline windows 134.1 Snapshot generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134.2 Device configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

5 Snapshot windows 175.1 Heap overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175.2 Resource overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185.3 Allocation overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215.4 The Carousel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235.5 Resource list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265.6 Allocation explorer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275.7 Resource details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

6 Compare windows 316.1 Snapshot delta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316.2 Memory leak finder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326.3 Vulkan resource naming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336.4 Viewing resource names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336.5 DISCLAIMER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

i

Page 4: Radeon Memory Visualizer Documentation

ii

Page 5: Radeon Memory Visualizer Documentation

Radeon Memory Visualizer Documentation, Release 1.2.0

The Radeon Memory Visualizer is a memory optimization tool that can be used by developers to optimize memoryusage for DirectX® 12, Vulkan™ applications for AMD GCN and RDNA™ hardware.

This document describes how the Radeon Memory Visualizer can be used to examine a memory trace file.

Contents 1

Page 6: Radeon Memory Visualizer Documentation

Radeon Memory Visualizer Documentation, Release 1.2.0

2 Contents

Page 7: Radeon Memory Visualizer Documentation

CHAPTER 1

Supported graphics APIs, RDNA and GCN hardware, and operatingsystems

Supported APIs

• DirectX 12

• Vulkan

Supported RDNA and GCN hardware

• AMD Radeon RX 6000 series

• AMD Radeon RX 5000 series

• AMD Radeon VII

• AMD RX Vega 64 and RX Vega 56

• AMD Ryzen™ Processors with Radeon Vega Graphics

• AMD Radeon R9 Fury and Nano series

• AMD Radeon RX 400 and RX 500 series

• AMD Tonga R9 285, R9 380

Supported Operating Systems

• Windows® 10 only (version 1903 or higher recommended)

3

Page 8: Radeon Memory Visualizer Documentation

Radeon Memory Visualizer Documentation, Release 1.2.0

4 Chapter 1. Supported graphics APIs, RDNA and GCN hardware, and operating systems

Page 9: Radeon Memory Visualizer Documentation

CHAPTER 2

Radeon Memory Visualizer - Quick Start

2.1 How to generate a memory trace

The first thing you will need to do is generate a memory trace. Currently, this is done via the Radeon Developer Panel.Read the documentation provided with this distribution for information on how to create a memory trace. This canbe obtained from within the Radeon Developer Panel or from the link on the Radeon Memory Visualizer “Welcome”view. The documentation is also available online at: http://radeon-developer-panel.readthedocs.io/en/latest/

This documentation can also be found online at: http://radeon-memory-visualizer.readthedocs.io/en/latest/

2.2 Starting the Radeon Memory Visualizer

Start RadeonMemoryVisualizer.exe (this is the tool used to view memory trace data).

2.3 How to load a trace

There are a few ways to load a trace into RMV.

1) Use the “File/Open trace” pull down menu, or the “File/Recent trace” pull down menu item.

2) Go to the “Welcome” view and click on the “Open a Radeon Memory trace. . . ”

3) Go to the “Welcome” view and click on a trace that you have previously loaded in the Recent list.

5

Page 10: Radeon Memory Visualizer Documentation

Radeon Memory Visualizer Documentation, Release 1.2.0

4) Go to the Recent traces view to see a full list of all your recent traces.

Notice that there is additional information provided for each trace when viewed in this pane, such as thedate when the trace was last accessed. It is also possible to remove recent traces from the list using the“Remove from list” link button. Note that they will only be removed from the list; they won’t be deletedfrom the file system. There is also a link button, “Open file location” to open the folder where that tracefile is on the disk.

5) Drag and drop a memory trace file onto the Radeon Memory Visualizer executable, or onto an already openRMV instance.

6 Chapter 2. Radeon Memory Visualizer - Quick Start

Page 11: Radeon Memory Visualizer Documentation

Radeon Memory Visualizer Documentation, Release 1.2.0

2.4 The Radeon Memory Visualizer user interface

RMV uses the concepts of traces and snapshots. A trace is the file which has been loaded as described in the previoussection. A memory trace file contains various memory-related events that happened on the GPU over time (memoryallocations, deallocations, binding resources etc). A snapshot is the state of the GPU at a particular instance in time.Using snapshots, it is possible to examine which memory has been allocated and where resources can be found. It isalso possible to compare snapshots to look for memory leaks. For example, a snapshot could be taken before startinga game level and another snapshot taken after completing the level. Ideally, the 2 snapshots should be the same.

There are four main menus in the Radeon Memory Visualizer and each may have a number of sub-windows..

1. Start

a. Welcome - Shows links to help documentation, and a list of recently opened traces, and a sample trace.

b. Recent traces - Displays a list of the recently opened traces.

c. About - Shows build information about RMV and useful links.

2. Timeline

Gives an overview of memory consumption over time. Allows for the viewing and creation of snap-shots

3. Snapshot

a. Heap overview - Gives an overview of the heaps available and their associated properties

b. Resource overview - Gives an overview of the total resources allocated and shows their relative sizes andtypes

c. Allocation overview - Shows the resources within each allocation

d. Resource list - Shows the properties for all the resource in all allocations

e. Allocation explorer - Shows the resources within a chosen allocation

f. Resource details - Display more information about a selected resource

4. Compare

a. Snapshot delta - Shows an overview of the differences between one snapshot and another

b. Memory leak finder - Shows allocations from each snapshot and how those allocations intersect to helplocate memory leaks

2.4. The Radeon Memory Visualizer user interface 7

Page 12: Radeon Memory Visualizer Documentation

Radeon Memory Visualizer Documentation, Release 1.2.0

8 Chapter 2. Radeon Memory Visualizer - Quick Start

Page 13: Radeon Memory Visualizer Documentation

CHAPTER 3

Settings

3.1 General

Check for updates If checked, the Radeon Memory Visualizer will alert you that a new version is available fordownload.

3.2 Themes and colors

The visualizer makes heavy use of coloring to display its information. This pane allows users to thoroughly customizethose colors.

9

Page 14: Radeon Memory Visualizer Documentation

Radeon Memory Visualizer Documentation, Release 1.2.0

3.3 Keyboard shortcuts

Here users will find the Keyboard shortcuts pane:

The Global navigation section refers to keystrokes that aid user navigation, and are always detected regardless ofwhich pane is visible.

The Timeline controls shortcuts are specific to zooming and panning operations that can be performed within theTimeline view (see below).

The Global hotkeys section refers to any hotkeys available anywhere in the product. Currently there are hotkeys toopen and close a trace file and to cycle through the different time units from any pane, rather than having to go to thesettings. This allows you to view a timeline in clock cycles, milliseconds, seconds or minutes very quickly.

All users are encouraged to adopt these keystrokes while using RMV.

3.4 UI Navigation

In an effort to improve workflow, RMV supports keyboard shortcuts and back and forward history to quickly navigatethroughout the UI.

3.4.1 Back and forward navigation

RMV tracks navigation history, which allows users to navigate back and forward between all of RMV’s panes. Thisis achieved using global navigation hotkeys shown above, or the back and forward buttons on all panes in the top left

10 Chapter 3. Settings

Page 15: Radeon Memory Visualizer Documentation

Radeon Memory Visualizer Documentation, Release 1.2.0

below the file menu.

Currently, back and forward navigation is restricted to pane switches.

3.4. UI Navigation 11

Page 16: Radeon Memory Visualizer Documentation

Radeon Memory Visualizer Documentation, Release 1.2.0

12 Chapter 3. Settings

Page 17: Radeon Memory Visualizer Documentation

CHAPTER 4

The Timeline windows

The timeline tab shows the overview of the trace and the system.

4.1 Snapshot generation

The Snapshot generation view will be the first view shown when a memory trace file has loaded. It will show agraphical representation of the memory usage over time for a number of processes running on the system, includingthe application started by the user. Currently only the user’s process is available.

13

Page 18: Radeon Memory Visualizer Documentation

Radeon Memory Visualizer Documentation, Release 1.2.0

RMV uses the concept of snapshots. A snapshot is the memory state at a particular moment in time. Using multiplesnapshots, it is possible to visualize how memory is being used by an application over time. It is also possible tocompare snapshots to check to see if memory is being release or whether there are memory leaks.

Snapshots will be displayed in a table below the timeline graph. If there are no snapshots in the trace, the area underthe timeline graph will indicate that there is nothing to show and offer some guidance of what may be required, asshown above. There are other instances in the tool showing similar displays, such as a resource table being empty ifthe selected allocation contains no resources, or if a resource type has no additional properties to show.

If snapshots were taken while recording, they will be shown as markers on the graph and in the table below the graph.

By default, the graph will be colored by resource type. A color legend below the timeline will indicate what resourcethese colors represent. The coloring mode can be changed by selecting from the combo box above the top-left of thetimeline.

When the mouse is over the timeline, the tooltip help will show information about the memory allocated at the timecorresponding to the mouse position. The time can be seen from the ruler above the graph. The most abundantresources are listed and the rest are combined in the last entry as “Other”.

Zoom controls

Zoom controls are provided for adjusting the time scale that is viewable on screen and are displayed in the top right ofthe timeline pane. These are:

Zoom to selection

When Zoom to selection is clicked, the zoom level is increased to a selected region or selected event. A selectionregion is set by holding down the left mouse button while the mouse is on the graph and dragging the mouse either leftor right. A colored overlay will highlight the selected region on the graph. For graphs that support it, an event maybe selected by clicking on it with the mouse (either the left or right button). Zoom to selection can also be activatedby right clicking on a selection on the graph and choosing the Zoom to selection context menu option. Zooming toa selected event can be accomplished by simply double clicking the event. Pressing the Z shortcut key while holdingdown the CTRL key activates Zoom to selection as well.

Zoom reset

14 Chapter 4. The Timeline windows

Page 19: Radeon Memory Visualizer Documentation

Radeon Memory Visualizer Documentation, Release 1.2.0

When Zoom reset is clicked, the zoom level is returned to the original level to reveal the entire time span on the graph.The zoom level can also be reset using the H shortcut key.

Zoom in

Increases the zoom level incrementally to display a shorter time span on the graph. The zoom level is increased eachtime this icon is clicked until the maximum zoom level is reached. Alternatively, holding down the CTRL key andscrolling the mouse wheel up while the mouse pointer is over the graph will also zoom in for a more detailed view.Zooming in can be activated with the A shortcut key. To zoom in quickly at a 10x rate, press the S shortcut key.

Zoom out

Decreases the zoom level incrementally to display a longer time span on the graph. The zoom level is decreased eachtime this icon is clicked until the minimum zoom level is reached (i.e. the full available time region). Alternatively,holding down the CTRL key and scrolling the mouse wheel down while the mouse pointer is over the graph will alsozoom in for more detailed view. Zooming out can be activated with the Z shortcut key. To zoom out quickly at a 10xrate, press the X shortcut key.

Zoom panning

When zoomed in on a graph region, the view can be shifted left or right by using the horizontal scroll bar. The viewcan also be scrolled by dragging the mouse left or right while holding down the spacebar and the left mouse button.Left and right arrow keys can be used to scroll as well.

Taking snapshots

Snapshots can be taken by right-clicking anywhere on the memory graph. This will bring up a context menu. Clickingon the context menu option “Add snapshot ..” will take a snapshot and add it to the graph and to the snapshot tablebelow the graph. Notice that only the snapshot name is shown in the table; the other table entries will be created whenthe snapshot is viewed.

Clicking on the snapshot in the table or on the timeline will select that snapshot. Clicking on the SNAPSHOT tab witha snapshot selected, or double-clicking on a snapshot on the table or on the graph will jump to the Heap overviewpane on the SNAPSHOT. This process will generate the snapshot data at the required time and returning back to theSnapshot generation will now show the table fully populated for the selected snapshot.

Right-clicking on a snapshot in the table will show a context menu allowing the snapshot to be renamed or deleted.Snapshots are saved back to the trace file so they can be viewed at a later date.

Two or more snapshots can be selected in the table by holding down the shift key to select a range of snapshots orpressing Ctrl to select individual snapshots. If 2 snapshots are selected, right-clicking on the table while holding downthe Ctrl key will display a context menu to allow them to be compared. Alternatively, the Compare snapshots buttonin the top right will become active. Clicking on either will jump to the Snapshot delta pane in the COMPARE tab.Alternatively, selecting 2 snapshots in the table and clicking on the COMPARE tab will do the same thing. Thesnapshots will be compared as base snapshot vs diff snapshot, where the base snapshot is the last (or highlighted)snapshot that was selected, and the diff snapshot is the first snapshot selected. If no snapshot is highlighted or the lastsnapshot was deselected (in the case where three snapshots are selected and one of those is deselected), the snapshotswill be compared in the order they appear in the table.

RGP Interop

It is possible to take RGP profiles at the same time as capturing an RMV trace. One thing to bear in mind is that at thepoint when an RGP profile is taken, the driver will allocate video memory for the RGP profile data. This can be seenin the RMV memory trace as spikes on the timeline corresponding to a resource type of ‘internal’, as seen below.

4.1. Snapshot generation 15

Page 20: Radeon Memory Visualizer Documentation

Radeon Memory Visualizer Documentation, Release 1.2.0

4.2 Device configuration

This pane will show some of the parameters of the video hardware on which the memory trace was taken, showingsuch things as the name of the video card and the memory bandwidth.

16 Chapter 4. The Timeline windows

Page 21: Radeon Memory Visualizer Documentation

CHAPTER 5

Snapshot windows

These panes allow the user to analyze single snapshots. The panes can be accessed from the list on the left hand side.Below the list is a combo box which allows quick switching between different snapshots.

5.1 Heap overview

This is the default snapshot pane that will be displayed after creating a snapshot. It gives an overview of the amountof memory the application is using and where that memory is allocated. It can be used to very quickly determine if theapplication is using too much memory of a certain type and if the correct memory type is being used where it shouldbe.

17

Page 22: Radeon Memory Visualizer Documentation

Radeon Memory Visualizer Documentation, Release 1.2.0

The display is split into 3 sections, one section per heap type. There is a brief description of the use for each heap.

On the left is the amount of memory used for each heap type as a series of bar graphs:

The requested bar graph shows how much of that heap was requested by the application. Just because an applicationrequests memory doesn’t automatically mean the application gets it. If the application requests too much memory, awarning message is displayed. The bar is also color coded to show whether the memory type is oversubscibed or isclose to being oversubscribed.

The ‘total size’ bar shows the total amount of physical memory in the heap.

The ‘used’ bar shows how much memory the application is using in dark gray. The lighter gray to the right indicatesthe total amount of memory used by all processes in the system.

The middle column shows a series of statistics for the heap memory type, such as where the memory resides (in systemor video memory), whether it is mapped on the CPU and some statistics on the allocations.

The right column shows the makeup of the resource types in each of the heaps. From this, it can be determined ifcertain resource types are in the optimum memory type for the particular resource (maybe there’s a render target insystem memory when ideally it should be in local memory).

5.2 Resource overview

This pane will show an overview of the resource used by the application. Most of the display is occupied by a resourceview showing a graphical representation of the resources in memory. Resources can be filtered out to only showresources of a particular type or contained in a particular preferred heap. They can also be color-coded according tovarious attributes (by resource type or preferred heap for example).

18 Chapter 5. Snapshot windows

Page 23: Radeon Memory Visualizer Documentation

Radeon Memory Visualizer Documentation, Release 1.2.0

Mousing over the resources will darken the resource under the mouse, and a tooltip will show pertinent informationfor the resource. If resources appear very small on the screen, the Filter by size slider bar can be used to filter out verylarge or very small resources.

Clicking on a resource will show details about it at the bottom of the pane, including various attributes and where theselected resource lies in its corresponding allocation. Most of this information is now available in the tooltip.

The preferred heap drop down list allows you to select resources you want to include in the resource view accordingto which heap was the preferred container for the resource at the time the resource was created. You can do this bychecking one or more heaps you wish to include resources from.

The resource usage drop down allows selection of resources according to their usage type. Again, this is achievedby checking one or more resource types. For example, unbound resources are not shown by default but this can bechanged.

These combo boxes appear on several of the UI’s and they are all independent ie changing heap types on one panewon’t affect the heap types on the other panes that use the heap combo box. Also, the heap selections don’t resetwhen switching snapshots so that comparisons can quickly be done with the same configuration. However, loading anew memory trace will reset the heap combo boxes to their default state. Currently, there are 3 heap types which areexplained a little in the heap overview pane. A fourth heap type in the combo box, Unspecified is used to indicate thatthis resource does not have a preferred heap.

The color combo box allows you to color the display depending on various resource attributes. Examples includecoloring by the resource type (the default) or coloring by resource bind or create times. Using the coloring modesallows you to instantly see the resources with the same parameters. Most of the coloring modes are self-explanatorybut the ‘Commit type’ may need some explanation. There are currently 3 commit types:

Committed This means the resource was created with an implicit heap large enough to contain it. i.e.: The driverstack is being requested to create a full chain of memory mappings down to the physical page.

Placed The resource was requested to be a placed resource. This means the resource is bound to a previously allocatedheap of memory.

Virtual The resource was requested to be a virtual resource. This means that there is no physical memory backingthe resource. The resource will have its own virtual address range allocated at the time the resource is created,but that virtual address space will not be mapped to an underlaying physical address range.

5.2. Resource overview 19

Page 24: Radeon Memory Visualizer Documentation

Radeon Memory Visualizer Documentation, Release 1.2.0

There are also 3 slicing combo boxes. These allow you to group resources by some attribute. The first slicing modeapplies to all the resources. The other 2 slicing modes are applied to the groups set up by the previous slicing mode.

The screenshot below shows slicing and coloring resources depending whether they are in the preferred heap. You cantell instantly if resources are where you’d expect them to be and if not, investigate further by double-clicking on theresource which will jump to the Resource details pane.

If the resource is displayed with a ‘stippled’ effect, it means the resource is aliased indicating that 2 or more resourcesare sharing the same memory. In the screenshot below, the stippling effect can be seen on the command buffer.

20 Chapter 5. Snapshot windows

Page 25: Radeon Memory Visualizer Documentation

Radeon Memory Visualizer Documentation, Release 1.2.0

5.3 Allocation overview

This pane will show the allocations and all the resources in each allocation. Again, the resources will have a stippledeffect if they are aliased.

5.3. Allocation overview 21

Page 26: Radeon Memory Visualizer Documentation

Radeon Memory Visualizer Documentation, Release 1.2.0

Filtering by preferred heap is provided so that only resources in the specified preferred heaps are shown.

The coloring mode can be changed using the ‘color by .. ‘ combo box, which will color the resources and allocationsby various parameters, for example, resource usage, and the preferred heap type.

The allocations can be sorted using the sort combo box at the top. Sorting is currently based on allocation size,allocation Id, allocation age or resource count (the number of resources in the allocation). Another combo box to theleft allows the sort to be in ascending or decending order.

Normally, allocations are sized relative to the largest allocations. Sometimes this makes smaller allocations difficultto see. The ‘Normalize allocations’ check box will draw all allocations the same length, as seen below:

Also notice that the allocations are slightly taller than in the previous screenshot. The allocation height is controlledvia the slider at the top, either allowing more allocations to be visible or showing more detail for a particular allocation.This is necessary in the case of aliased resources, where resources share the same underlying memory. The ‘Showaliasing’ check box will toggle between showing resources as a stacked display. If aliasing isn’t present, the allocationdisplay will be unchanged. This is demonstrated below:

22 Chapter 5. Snapshot windows

Page 27: Radeon Memory Visualizer Documentation

Radeon Memory Visualizer Documentation, Release 1.2.0

Here, there is aliasing on a depth-stencil buffer, and some of the render targets and textures. Normally these would beshown as single resources as seen in the previous image, but switching on the aliasing display, it can be seen that in thecase of the depth-stencil buffer, the 3 resources share the same underlying memory. Also the height of the allocationshas been increased to show the stacking more clearly.

The allocations can also be filtered using the search box. An allocation will only be shown if any part of its displayedtext matches the text in the search box. This way, allocations can be filtered by size, heap type or number of resources.

Double-clicking on a resource will jump to the Allocation explorer.

5.4 The Carousel

The carousel is displayed on the Resource list panes and displays high level information about the resources in thecurrent snapshot. It can be seen as an overview to answer high level questions such as ‘How much memory in eachheap is my application using?’ or ‘How large are my allocations?’.

The Allocation sizes shows the sizes of allocations arranged in buckets. It is easy to see at a glance how manyallocations are being used and their relative sizes.

5.4. The Carousel 23

Page 28: Radeon Memory Visualizer Documentation

Radeon Memory Visualizer Documentation, Release 1.2.0

The Committed memory shows the amount of memory that this application has committed to physical memory foreach of the heap types. Ideally, all memory that the application has requested should be in physical memory.

The Requested virtual memory shows which memory was requested from which heap. The same coloring schemeis used as in the Heap overview pane so it is easy to see if certain heaps are over or undersubscribed.

24 Chapter 5. Snapshot windows

Page 29: Radeon Memory Visualizer Documentation

Radeon Memory Visualizer Documentation, Release 1.2.0

The Resource types shows the makeup of the resources contained within the allocations. The most popular ones aredisplayed with everything else bucketed in the “Other” category.

The Virtual memory shows how much memory has resources bound to it. Unbound memory is effectively usused soshould be minimized as much as possible. Sometimes due to alignment issues this is not possible but if there is a lotof unbound memory, this will be seen in the Allocation overview pane for each allocation.

5.4. The Carousel 25

Page 30: Radeon Memory Visualizer Documentation

Radeon Memory Visualizer Documentation, Release 1.2.0

The carousel is also shown in the Snapshot delta pane but here it shows the differences between the 2 selectedsnapshots.

5.5 Resource list

This view will show a list of all the resources in table form for all allocations.

The top of the view shows the carousel, described earlier.

The preferred heap and resource usage filter combo box can be used to show or hide resources depending on theirresource type or preferred heap type. By switching all preferred heaps off, some allocations will be left. Orphanedresources are ones where the parent allocation has been deallocated without freeing the resource first. Other resourceswith a ‘-’ don’t have a parent allocation.

The table items can be sorted by selecting one of the column headers. For example, if the Preferred heap column isselected, the whole table will be sorted by preferred heap.

The search box allows for resources to be filtered by any text which is present in the table. Any resources which donot match the text filter will not be displayed.

Searching any of the resource tables in RMV now adds a range-based search in addition to text searching. For example,if a virtual address is 0x1000 with a size of 256 bytes, entering the search text as 0x1001 will include this resource sinceit is in the address range. This is useful for seeing if memory locations are used by multiple resources. Range-basedsearching will work with either decimal or hexadecimal numbers.

Mousing over a memory size cell in the table will display a tooltip showing the exact number of bytes.

26 Chapter 5. Snapshot windows

Page 31: Radeon Memory Visualizer Documentation

Radeon Memory Visualizer Documentation, Release 1.2.0

5.6 Allocation explorer

This will show the resources for each allocation. The pane consists of 2 tables. The top table lists all of the allocations.These allocations can be filtered using the search box text filter, located above the allocation table, and also by sizeusing the “Filter by size” slider to the right of the search box.

Clicking on an allocation will show it in the graphic below, along with a representation of all of the resources in theselected allocation.

Mousing over a memory size cell in either table will display a tooltip showing the number of bytes.

5.6. Allocation explorer 27

Page 32: Radeon Memory Visualizer Documentation

Radeon Memory Visualizer Documentation, Release 1.2.0

The coloring can be changed using the “color by ..” combo box above the allocation graphic.

The “show aliasing” checkbox will display the resources in the allocation in a stacked view to help visualize aliasing.If no resources in the allocation are aliased, the checkbox will be grayed out. There are 2 splitters above and belowthe graphical allocation display and these can be moved to increase or decrease the height of the graphical allocationdisplay. If there is a lot of aliasing, it may be useful to temporarily increase the height, as shown below:

The table under the allocation display shows a list of all the resources in the chosen allocation. These resources can befiltered using the search box text filter and also by size using the “Filter by size” slider on the right. Double-clickingon a resource will navigate to the Resource details pane.

28 Chapter 5. Snapshot windows

Page 33: Radeon Memory Visualizer Documentation

Radeon Memory Visualizer Documentation, Release 1.2.0

5.7 Resource details

This pane show the information for a selected resource. The pane is in 2 parts. The top section shows informationabout the selected resource and is split into a further 3 sections. To the left is a resource summary showing informationabout the resource (its size, which allocation it is in, when it was created etc).

The middle column shows the resource properties which will vary depending on the resource type. For example,texture resources will show their width, height and pixel format. Some resources will show create or usage flags. Inthe case where these flags are bitfields, the text equivalent of the bitfield will be shown, and where there are multipleflags, they will be separated with a ‘|’. The value in parentheses is the decimal value of the flags.

The right column shows where the texture is resident in physical memory. If it is not resident, it will be shown asunmapped. From here it can be determined if the resource is resident in the heap that was requested. If not, a warningmessage will appear stating what the problem is.

Underneath the resource info is a timeline showing how the resource changed over time. The same data is representedin the table below. A marker is also present showing when the current snapshot was taken. Any events that happenedto the resource after the snapshot are grayed out in the table. This information can be used in conjunction with thephysical residency donut to determine if and why the resource memory is in a different place than requested (maybe itwas made resident at some point and then paged out).

5.7. Resource details 29

Page 34: Radeon Memory Visualizer Documentation

Radeon Memory Visualizer Documentation, Release 1.2.0

30 Chapter 5. Snapshot windows

Page 35: Radeon Memory Visualizer Documentation

CHAPTER 6

Compare windows

These panes allow the user to compare snapshots to see how allocations and resources have changed over time.

6.1 Snapshot delta

The snapshot delta gives a high level overview of the differences between two snapshots. It shows the difference inthe number of allocations and resources for each heap type.

The carousel works in a similar way to the carousel in the Resource list pane but now shows the differences betweenthe 2 snapshots, indicating such things as whether memory consumption has gone up or down.

The “Switch snapshots” button in the top right corner under the settings tab can be used to switch the snapshots.

31

Page 36: Radeon Memory Visualizer Documentation

Radeon Memory Visualizer Documentation, Release 1.2.0

6.2 Memory leak finder

This pane shows the list of resources from both snapshots and allows them to be filtered depending on whether theyare unique to one snapshot or present in both. This filtering can be achieved using the 3 checkboxes at the top.For example, just selecting the middle checkbox will show resources common to both snapshots. Underneath eachcheckbox is a summary of the number of resources that the checkbox represents and the total amount of memory usedfor that checkbox. For example, the left-most checkbox will show resources that are only present in the first snapshot.

As with the other panes, search strings and the “Filter by size” slider can be used to narrow down the list of resources.

Double-clicking on a resource will navigate to the Resource details pane and allow the snapshot to be viewed in theSNAPSHOT tab. If a resource is common to both snapshots, the base snapshot will be used.

32 Chapter 6. Compare windows

Page 37: Radeon Memory Visualizer Documentation

Radeon Memory Visualizer Documentation, Release 1.2.0

6.3 Vulkan resource naming

Pipelines, images and buffers can be given unique names and these names will show up in the RMV UI. The Vulkanextension VK_EXT_debug_utils can be used for this.

For more information, see the document:

https://www.lunarg.com/wp-content/uploads/2018/05/Vulkan-Debug-Utils_05_18_v1.pdf

specifically the section “Naming Objects”

6.4 Viewing resource names

The resource names will show up in the RMV UI in the resource list pane, for example:

6.3. Vulkan resource naming 33

Page 38: Radeon Memory Visualizer Documentation

Radeon Memory Visualizer Documentation, Release 1.2.0

6.5 DISCLAIMER

The information contained herein is for informational purposes only, and is subject to change without notice. Whileevery precaution has been taken in the preparation of this document, it may contain technical inaccuracies, omissionsand typographical errors, and AMD is under no obligation to update or otherwise correct this information. AdvancedMicro Devices, Inc. makes no representations or warranties with respect to the accuracy or completeness of thecontents of this document, and assumes no liability of any kind, including the implied warranties of noninfringement,merchantability or fitness for particular purposes, with respect to the operation or use of AMD hardware, softwareor other products described herein. No license, including implied or arising by estoppel, to any intellectual propertyrights is granted by this document. Terms and limitations applicable to the purchase or use of AMD’s products are asset forth in a signed agreement between the parties or in AMD’s Standard Terms and Conditions of Sale.

AMD, the AMD Arrow logo, Radeon, Ryzen, RDNA and combinations thereof are trademarks of Advanced MicroDevices, Inc. Other product names used in this publication are for identification purposes only and may be trademarksof their respective companies.

DirectX is a registered trademark of Microsoft Corporation in the US and other jurisdictions.

Vulkan and the Vulkan logo are registered trademarks of the Khronos Group Inc.

OpenCL is a trademark of Apple Inc. used by permission by Khronos Group, Inc.

Microsoft is a registered trademark of Microsoft Corporation in the US and other jurisdictions.

Windows is a registered trademark of Microsoft Corporation in the US and other jurisdictions.

© 2018-2021 Advanced Micro Devices, Inc. All rights reserved.

34 Chapter 6. Compare windows