Sunteți pe pagina 1din 31

GPUView Overview

[This is preliminary documentation and subject to change.]

GPUView is a tool that reads logged video and kernel events from an event trace log (.etl) file and presents
the data graphically to a user. Video core developers can use GPUView to determine the performance of the
graphics processing unit (GPU) and the central processing unit (CPU) with regard to direct memory access
(DMA) buffer processing (and all other video processing) on the video hardware. Developers and testers can
use GPUView to view and analyze the work that the operating system performs. They can use GPUView to
show different kinds of events that might lead to unusual conditions like glitches, preparation delays, and
poor synchronization.

GPUView also comes with some built-in analysis code that can help to catch outlier conditions. For more
information about outlier conditions, see Profiler Statistics Dialog Box. Catching these conditions can reduce the
time required to find problematic areas in the GPUView timeline.

Getting Started with GPUView


[This is preliminary documentation and subject to change.]

The following sections describe how to get started with the GPUView tool:
Installing GPUView

Generating a Trace for GPUView


Enabling Logging of DirectX Video Acceleration Version 2 and Direct3D Version 9 Events

Installing GPUView
[This is preliminary documentation and subject to change.]

This section lists the components that are packaged with GPUView and describes how to install GPUView.

GPUView is shipped with the Windows Performance Toolkit (WPT) as an installable option of the XPerf MSI.
You should install the appropriate XPerf MSI for the appropriate platform (for example, XPerf_x86.msi for an
x86 platform).

The MSI file installs the following files:

Files Purpose

EULA.rtf Legal agreement

GPUView.chm GPUView help file

Readme.txt Any additional information that does not fit in the format of
the help file

GPUView.exe Program for viewing ETL files with video data

AEplugin.dll, DWMPlugin.dll, MFPlugin.dll, NTPlugin.dll, DxPlugin.dll, Plug-ins that are used to interpret events
and DxgkPlugin.dll
CoreTPlugin.dll Plug-in that is used for Statistical Options dialog box

Log.cmd Script to turn on and off the appropriate information for


logging

SymbolSearchPath.txt A text file that is used to set the symbol path to resolve
stackwalk and other events

The MSI file is self extracting. It installs (or uninstalls) GPUView on your operating system. The default
installation directory is in the Microsoft Windows Performance Toolkit directory. You can choose the Custom
Installation option for custom placement of the binaries and corresponding support files.

Generating a Trace for GPUView


[This is preliminary documentation and subject to change.]

Before you can use GPUView to view video and kernel events, you must create an event trace log (.etl) file
that contains the events. The GPUView install package places a custom-designed script file (Log.cmd) in the
same location as GPUView. You can use that script file to start and stop the event logging process and to
generate the merged ETL file that GPUView reads.

To generate an ETL file, you must run Log.cmd from an administrator-level command prompt. To start an
administrator-level command prompt on Windows Vista, click the start menu, search for command, right-
click the product of the search (cmd), and select Run as administrator.

To start event trace logging, run Log.cmd. To stop event trace logging, run the same Log.cmd. Running
Log.cmd produces a merged.etl file that GPUView can read.

To load this ETL file into GPUView, run GPUView from the command prompt (for example, GPUView
merged.etl). Alternatively, you can associate GPUView with ETL files and then double-click the merged.etl
file.

Note that the buffers that are used to store event messages in the ETL file are circular buffers. Storing event
messages in circular buffers limits the amount of time that you can spend between the start and the end of
logging to less than a minute. You should set up test scenarios so that you can turn on logging immediately
before an unusual condition and turn off logging again before too much time has elapsed.

You should read through the Log.cmd file that performs the work on behalf of the other scripts or read
through the information that is provided with XPerf regarding the creation of ETL files. The basic providers
for multimedia events are shown in the Log.cmd file. You can activate these events through the command-
line parameters of Log.cmd.

You can use the following command-line parameters with Log.cmd to log your required amount of events:
log n
(minimum)

Only log the minimum basic events.


log l
(light)

Only log a few more than the minimum events.


log
(normal)

Log the most interesting events.


log v
(verbose)

Log everything that GPUView is aware of.


Enabling Logging of DirectX Video Acceleration Version 2 and
Direct3D Version 9 Events
[This is preliminary documentation and subject to change.]

When GPUView is installed, the installation sets a registry key to enable the logging of DirectX Video
Acceleration (VA) version 2 and Direct3D version 9 events.

To enable logging of DirectX VA 2 events, the installation writes the following value into the indicated
registry key. You should validate this value if DirectX VA 2 events do not show up in the resulting ETL files.

[ HKEY_LOCAL_MACHINE\ SOFTWARE\Microsoft\Windows Media Foundation]


“WmiInstrumentation”=dword:00000001

Direct3D 9 events are defined under the Microsoft Media Foundation provider GUID, which is provided in the
Log.cmd file.

Using GPUView
[This is preliminary documentation and subject to change.]

The following sections explain how to use the features of GPUView and how to read the data on the GPUView
display:
Summary of GPUView Controls

GPUView Command-Line Options


Information Logged After Loading

Loading Large ETL Files


Supporting Symbols

Displaying More or Fewer Threads


GPUView Main Window

GPUView Zoomed Main Window


Charts in Main Window
GPUView Menu Options
Goto Dialog Box

Event Listing Dialog Box


Profiler Statistics Dialog Box

Statistical Options Dialog Box


Object Details Dialog Box

Object Viewer Dialog Box

Summary of GPUView Controls


[This is preliminary documentation and subject to change.]

The tables given in this section summarize the controls that GPUView provides.
The following table describes zoom and pan controls.

Action Command

ZoomIn a

ZoomIn10x s

ZoomOut z

ZoomOut10x x

Zoom Home CTRL+ H, ESC

Make selection Press and drag

Clear selection Right or left click mouse

Zoom to Make selection then CTRL+ Z


selection

To pan left or LEFT ARROW or RIGHT ARROW, CTRL+ LEFT ARROW or RIGHT ARROW for fast pan, or drag or page horizontal
right scroll

Up and down UP ARROW or DOWN ARROW, CTRL+ UP ARROW or DOWN ARROW for fast page, which is the same as page up
or down, or drag or page vertical scroll

The following table describes the display-toggles control.

Action Command

Toggle through thread views CTRL+P

Add more threads to view +

Remove threads from view –

Display a specific thread level Numbers 1, 2, 3, 4, 5 or 6

The following table describes the controls to retrieve dialog boxes.

Action Command

Event Listing CTRL+E

Object Viewer CTRL+O

Statistical Options Viewer CTRL+T

Profiler Statistics Viewer CTRL+R

Memory Viewer CTRL+M

Goto CTRL+G
The following table describes the commands to view charts.

Action Command

Toggle Memory Charts CTRL+F7

Toggle Present Charts CTRL+F6

Toggle Reference Charts CTRL+F8

GPUView Command-Line Options


[This is preliminary documentation and subject to change.]

You can control GPUView from a Command Prompt window. You can designate switches with either a minus
sign (–) or a slash mark (/) followed by either the first character of the option or the full name of the option.
The characters are not case sensitive.

All the following commands perform the same operation:

 Gpuview /s merged.etl

 Gpuview –s merged.etl

 Gpuview –Stats merged.etl

 Gpuview /staTS merged.etl

Note  GPUView performs a limited amount of validation on command-line parameters. Therefore,


ensure that the syntax of a command is correct to avoid unwanted side effects.

Note  Also, when you issue command-line parameters, the file name, if it is included in the list of
parameters, must always be last in the list. There is one exception to this file-name requirement. For
more information about this exception, see Option: File.

The following sections describe the GPUView command-line options:

Option: Help
Option: Stats

Option: Limit
Option: File

Option: Help
[This is preliminary documentation and subject to change.]

This option starts GPUView’s help file. GPUView does not load. You can use the following syntax with this
option:

 Gpuview /?

 Gpuview /h

 Gpuview /help
Option: Stats
[This is preliminary documentation and subject to change.]

This option causes GPUView to process all events in an ETL file. GPUView performs a first pass over the
data. GPUView then exits and leaves the GuidStats.txt file. GuidStats.txt is a comma-delineated file.

With large ETL files, there is sometimes not enough memory available to load an entire file into memory.
When this happens, you might still be able to have GPUView process the events in the file and log the
standard GuidStats.txt file. GuidStats.txt shows the number of times a particular type of GUID is found in
the file along with the memory that would be consumed by the GUID if GPUView is loaded typically.

Another key item in the GuidStats.txt file is the Level value that is currently found on the end of the line.
This value can be used with the /limit option to ignore groupings of events in the file. For more information
about how this value is used, see Option: Limit.

You can use the following syntax with this option:

 Gpuview /s merged.etl

 Gpuview /stats merged.etl

Option: Limit
[This is preliminary documentation and subject to change.]

This option causes GPUView to filter unimportant events and objects to prevent GPUView from using too
much memory. If GPUView uses less memory, the user can load large ETL files. Different events and objects
have different levels of importance to GPUView. Therefore, this option allows the user to filter out things
that are unimportant and consume memory space.

There are several different filter levels. Examples of the different levels can be viewed in the GuidStats.txt
file. You can use the following numbers to filter the indicated events and objects:

0
Critical events like process and thread events that are used to generate execution information

1
Key objects that provide context information like queue packets, DMA packets, and object
allocations

2
Useful objects, like VSync, stackwalk, and page fault information

3
Extra information. That is, events that are nice to see, but do not provide any other information
than a name and an event handler, which dumps its own data.

4
Default. Any information that has a name. In other words, if the event has a GUID that is named in
GuidStats.txt, that event is shown.

5
No name events. If an ETL file has events in it that GPUView cannot interpret, the events are not
named. GPUView typically filters out these events with the default level (4). To see these events,
you should specify this level.

You can use the following syntax with this option:

 Gpuview /l 3
 Gpuview -Limit 5

Note  If you specify a level greater than the supported levels, GPUView ignores the input, sets the
level to the default level, and loads typically. If you do not specify a level, which is the default,
GPUView automatically loads as if you specified level 4 on the command line. If you specify more than
one level, GPUView does not load.

Option: File
[This is preliminary documentation and subject to change.]

By default, GPUView inspects the command for the name of the ETL file to open. The ETL file name should
always be the last parameter unless you use this switch.

You can use the following syntax with this option:

 Gpuview /f NameOfEtlFile.etl

 Gpuview /File NameOfEtlFile.etl

Note  Spaces and quotes are not allowed in the file name. Also, when GPUView loads, it tries to verify
that the file name that is specified is an actual file. If the file name does not exist, GPUView does not
load.

Information Logged After Loading


[This is preliminary documentation and subject to change.]

When GPUView successfully loads, it logs the GuidStats.txt and FuncStats.txt text files and places these text
files in the same directory that contains GPUView.exe. The following sections describe these text files.

GuidStats.txt

GuidStats.txt is a text file that lists all the different GUIDs that GPUView is aware of along with the hit count,
memory-consumption estimate, friendly name, and level for the GUID. This GUID information provides a
quick overview about the different events that GPUView found in an ETL file. The following list describes the
overview information that GuidStats.txt provides for each GUID:

Hit count
The number of times that an event of a particular type occurred in the ETL file

Bytes consumed
The amount of memory that was allocated to store the event’s data

Friendly name
The friendly name that GPUView associates with the GUID for reference

Level
A value that GPUView assigns to the event. You can use this value with the /Limit command-line
option. For more information about how this value is used, see Option: Limit.

FuncStats.txt

FuncStats.txt is a text file that contains information about all profiled functions that GPUView is aware of.
GPUView scans all processes and threads and summarizes the hit count and time spent in the functions.
FuncStats.txt is useful for quickly determining if a particular function was called during the generation of the
ETL file.

Loading Large ETL Files


[This is preliminary documentation and subject to change.]

ETL files are often larger than what the GPUView can load into memory. To make these large ETL files
useful, GPUView provides the /Limit command-line option. For more information about this option, see
Option: Limit. You can use the /Limit option to filter out events that do not interest you and that consumes
memory when GPUView loads the ETL file.

The default level for the /Limit option is 4. To determine a more limiting level, open the GuidStats.txt file to
find events that are consuming too much memory, and then note the level for those events. If they exist on
level 4, you might want to have GPUView filter out events at a more limiting level (for example, level 3). To
set level 3, use the following command;

Gpuview /l 3

GPUView filters out unnamed events by default (that is, at level 4). Therefore, if you want to view an ETL file
that is known to contain private events of GPUView-unknown events, use the following command to make
GPUView show these unknown events by using their GUID as the name.

Gpuview /l 5

Supporting Symbols
[This is preliminary documentation and subject to change.]

A SymbolSearchPath.txt text file is installed with GPUView. SymbolSearchPath.txt contains information about
how to set up a symbol search path for resolving symbols. By default, GPUView searches for the
SystemConfigExGuid to build a default path. To override this functionality, you should either set the
_NT_SYMBOL_PATH environment variable with a valid path or modify the first line of SymbolSearchPath.txt
by stating the symbol location. GPUView does not support symbol servers.

GPUView also has a run-time dialog box that you can use to set the symbol search path. After you load
GPUView, start the Symbols dialog box and enter the appropriate path. You must click the Apply Path
button to make the new path take effect.

Displaying More or Fewer Threads


[This is preliminary documentation and subject to change.]

GPUView has six different thread viewing levels. You can increase or decrease the amount of thread
information that GPUView shows on the screen in the main window. The default viewing level is level 2. You
can use different mechanisms to adjust thread viewing level. The thread viewing level is located next to the
time value in GPUView’s ruler. You can use the PLUS (+) or MINUS (–) key on your keyboard to adjust the
thread viewing level. As you press the PLUS (+) key, the level value increases, and the amount of
information on the screen increases. Likewise, as you press the MINUS (–) key, the level number decreases,
and the amount of information on the screen decreases. Also, you can use the numeric keys on your
keyboard to directly enter the number of the level you want. The numbers 1 through 6 map directly to the
different levels.

Each level builds upon the last level by providing more information as the level increases. The following list
describes each level:

1
Shows only the idle threads along with processes that contain video contexts.

2
Adds any thread that contains a larger number of “Profile” events in the current-view time.

3
Adds any thread that contains a larger amount of execution time during the current-view time.

4
Adds threads that have any “Profile” events in the current-view time.

5
Adds threads that have any execution time in the current-view time.

6
Shows all process and all threads.

This adjustable thread-viewing functionality comes in handy when you view smaller blocks of time. As you
zoom in and out, the number of threads that GPUView displays remains constant. The smaller block of time
that you want to analyze might display a number of threads that contain no information. In this situation,
you can press PLUS (+) followed by MINUS (–) to make GPUView recalculate the display area.

Note   The difference between levels 2 and 3 and levels 4 and 5 is that there is a cutoff point. The
difference from level 2 to level 4 is that the cutoff point is 100 functions. If at least 100 functions are
called in the current view window, level 2 displays the thread. If less than 100 functions are called in
the current view window, the thread is not displayed until you view level 4. Likewise, the difference
from level 3 to level 5 is that the cutoff point is 10 percent of the interval (current-view area). If the
thread runs for at least 10 percent of the interval, level 3 displays the thread. If the thread runs for
less than 10 percent of the interval, the thread is not displayed until you view level 5.

GPUView Main Window


[This is preliminary documentation and subject to change.]

The following figure shows a screen shot that appears when GPUView is loaded. The first thing to notice is
that time passes from left to right and that a section in the left side of the window is reserved for process
and thread information. All the rest of the window is where events are displayed.

The window is also logically separated in rows. The idea is that the main grouping is by process, but the
events are tracked by thread. Notice that both the processes and the threads are named on the left and that
they have corresponding identifiers in parentheses.
GPUView Main Window

The following sections describe the GPUView display:

Title Bar

The title bar displays the name of the file that GPUView views and basic statistics about the file. Notice that
the window start and duration are displayed on the end of the title. This feature helps when you share a
screen shot with an ETL file because the person that receives the screen shot knows where to look in the file
and at what duration of time.

Gray Region
The gray region represents the time line for the events in the file. The text in the upper left hand side
represents the time offset into the event file. The number in the parentheses is the unit of measurement. As
you zoom in or out, the units changes.

Blue Region – Hardware Queue

The blue region is labeled as the GPU hardware queue. The information that this region displays represents
the ‘work’ that the hardware performs. This ‘work’ takes the form of a DMA buffer.

Green Regions - Processes

Green regions show processes with the associated threads and video context queues. The upper left-hand
corner of a green region shows the process identifier (Id) in parentheses next to the process name.

Threads are displayed in a similar fashion where the thread Id is in parentheses and the owning symbol next
to it. In most cases, you see a module name followed by a hexadecimal number.

There might also be a context CPU queue as in the Dwm.exe and Mfpmp.exe cases. This shows the work
that is queued up and is working in that queue. Context queues represent ‘work’ that the application has
scheduled. These are queue packets and they map nearly one to one to DMA packets in the hardware
queue.

Common Actions on Main Window

Scrolling and zooming is what is most effective on the main window. The wheel on the mouse allows for
scrolling as does the vertical scroll bar. For more information about ways to navigate and change the view,
see Summary of GPUView Controls.

The most effective way to zoom in is to select the area you want to look at and then press CTRL+ Z. To
select a region, press and drag the area you want to zoom in. Now that you have a selection region, press
CTRL+ Z to set that region into your view. The figures in the GPUView Zoomed Main Window topic are examples
of zoomed time lines.

GPUView Zoomed Main Window


[This is preliminary documentation and subject to change.]

The following figure shows a screen shot that is an example of a zoomed GPUView time line. As you zoom in
the data in the event log, you find a greater level of detail than in the original view. What first appeared
black, when zoomed, becomes enhanced with color, size, and location information. Note that the data in the
ETL file is very symmetrical with regards to logical start and stop operations. This logic enables GPUView to
display many different types of events as rectangles in a thread’s execution time slices and context queues.
GPUView Zoomed Main Window View

The following sections describe the GPUView zoomed view:

Time Ruler (Gray Region)

In the preceding figure, GPUView shows events that are 80288.2 100 nanosecond units into the trace file.
Each unit on the ruler measures one nanosecond.

GPU Hardware Queue (Blue Region)

The Microsoft DirectX graphics kernel subsystem generally schedules two work items on the hardware at a
time. Therefore, items in the hardware queue generally stack up two deep (that is, two items in the queue).
These work items are DMA buffers with work from different applications. In the preceding figure, the light
blue rectangle is a DMA buffer from the SchBillboard.exe process and the dark khaki DMA buffers are from
the Dwm.exe process. The black DMA buffer is a preemption packet that is placed in the queue by the GPU
scheduler. The red DMA buffers are paging packets, which are also placed in the queue by the GPU
scheduler.

Exceptions to the two-deep rule come in the form of paging, present, and preemption packets. Notice that
the DMA buffer that is light blue with red hatches is the corresponding present packet from the
SchBillboard.exe process. Also, to the right, notice that there are two standard DMA buffers that are logically
down on the hardware (one from the Dwm.exe process and the other from the SchBillboard.exe process)
along with two paging packets.

Process (Green Region)

Information that is associated with a process space is contained within the green gradient areas. When you
scroll, only the process areas move. The GPU Hardware Queue and Time Ruler remain visible.

Context CPU Queues

The context CPU queues that are contained within the process region represent the work that applications
have scheduled for the video hardware. Unlike the hardware queue that typically only stacks up two deep,
the application might schedule lots of work ahead of time. Therefore, the work can stack up to unlimited
heights. It is not unusual to find the queues 12 or 20 items high.

There is a direct connection between the queue packets in the context queue and the DMA packets in the
GPU hardware queue. If you click one of the rectangles in either region, the corresponding packet in the
other region is also highlighted. Logically, work scheduled in the context queue appears earlier in time;
then, the same work scheduled in the hardware queue and the work in the context queue ends after the
work is finished in the hardware queue.

Thread Execution

The kernel event for context switches is used to define the start and end boundaries for thread execution.
This kernel event is represented in GPUView as a colored interval in the thread’s gray-screen region. In the
preceding figure, there are two threads in the Idle process, one thread in the System process, one thread in
the Svchost.exe process, and another thread in the Dwm.exe process. The background colors for the
intervals generally represent the CPU that the thread runs on. Notice that in the Idle process the -2 thread
has white intervals and the -3 thread has green intervals. On single-core computers, all intervals should be
the same color. GPUView supports up to eight different colors for CPUs.

Further into the interval are rectangles that represent known API and DDI execution blocks. Notice that in
the System thread there are little red blocks within the last interval. These red blocks are built off enter and
exit events of a known API. In this case, the events are part of the Dxgkrnl.sys thread that performs the
paging preparation that leads to the two Paging DMA packets that appear shortly thereafter in the GPU
hardware queue.

Rectangle Colors

Much of the content in GPUView is provided in the colors of the different boxes that are displayed. In the
preceding figure, the GPU hardware queue shows five different types of DMA packets.

 Light blue

Standard DMA packet from the context CPU queue that is associated with SchBillboard.exe

 Light blue with red hatches

Present packet from the context CPU queue that is associated with SchBillboard.exe

 Dark khaki

Standard DMA packet from the context CPU queue that is associated with Dwm.exe

 Red
Paging packet that is associated with the Dxgkrnl.sys paging preparation thread

 Black

Preemption request packet

When you click on any of these boxes, the Object Details dialog box appears to provide you with more
information.

Colors that can appear but are not shown include:

 Hot pink

Wait command that is used for synchronization

 Dark pink

Signal command that is used for synchronization

 Orange

Present packet that is associated with Dwm.exe

Note  The synchronization packets in context queues do not correspond to packets in the GPU
hardware queue. This also applies to the present packet from the Dwm.exe context queue.

Mouse hints

The main window contains objects that you can select. If an object is selectable, the mouse pointer should
change into a hand pointer.

Charts in Main Window


[This is preliminary documentation and subject to change.]

GPUView provides memory charts and present charts. These charts show frames per second, latency, and
memory usage at different times within the event trace.

Each chart shows the key for the chart on the left side followed by the chart in the viewport time period. The
following figure shows the chart that corresponds to the main window image that is shown in GPUView Zoomed
Main Window:
Charts

In the preceding figure, frames per second is a simple count, latency is in raw time units, and memory is in
bytes.

GPUView Menu Options


[This is preliminary documentation and subject to change.]

This section describes GPUView's menu options.

File->Exit
Exits the GPUView program.

View->Process->Toggle threads adding more (6 views)


Increases the number of viewed threads until you exceed all threads. When you exceed all threads,
you loop back to the beginning.

View->Process->Show more threads


Increases the level count by one, which shows more threads with more details.

View->Process->Show fewer threads


Decreases the level count by one, which shows fewer threads with fewer details.

View->Zoom->ZoomIn
Reduces the amount of information in the main window viewport. This menu option zooms in at the
center of the viewport.
View->Zoom->ZoomIn10x
Reduces the amount of information in the main window viewport by of factor of 10 relative to
ZoomIn. This menu option zooms in at the center of the viewport.

View->Zoom->ZoomOut
Increases the amount of information in the main window viewport. This menu option zooms out at
the center of the viewport.

View->Zoom->ZoomOut10x
Increases the amount of information in the main window viewport by of factor of 10 relative to
ZoomOut. This menu option zooms out at the center of the viewport.

View->Zoom->Zoom Home
Shows the entire ETL file.

View->Zoom->Zoom to Selection
Zooms to the region of the screen that is shown in the mouse highlight.

View->Zoom->fix
Readjusts the center point.

Tools->Event List…
Shows the Event Listing Dialog Box.

Tools->Object Viewer…
Shows the Object Viewer Dialog Box.

Tools->Analysis Viewer…
Shows Statistical Options Dialog Box.

Tools->Profile Viewer…
Shows Profiler Statistics Dialog Box.

Tools->Memory Viewer…
Shows Memory Viewer Dialog box.

Options->Lock Dialogs
If checked, all dialog boxes move with the main window when you minimize or maximize them. You
should lock dialog boxes when you run multiple versions of GPUView at the same time.

Options->Toggle VSync
Enables or disables the first VSync. This setting is persistent over restarts.

Options->Symbol Path…
Sets the symbol search path.

Options->Toggle Memory Charts


Displays the memory chart in the main window. The setting is persistent over restarts.

Options->Toggle Present Charts


Displays the present chart in the main window. The setting is persistent over restarts.

Options->Dynamically recalc heights


To reduce the amount of ‘dead space’ in the main window, you can use this option to have GPUView
recalculate the heights of context and process areas based on the current viewport time span. When
you select this option, GPUView recalculates on every repaint. The default is off. The setting is
persistent over restarts.

Options->Track Mouse Cursor


Draws a vertical line at the x coordinate of the mouse. The setting is persistent over restarts.

Help->Help File for GPUView…


Starts the GPUView.chm file if it is found.

Help->About GPUView…
Opens a dialog box with version number and other data.
Goto Dialog Box
[This is preliminary documentation and subject to change.]

The Goto dialog box is a navigational helper. When sharing ETL files, a user might have already isolated the
problem area. The Goto dialog box helps set up the main viewing area around the known problematic
region. All times in this dialog box are in base measurement units; therefore, 10,000,000 is one-second
worth of time.

The following figure shows the Goto dialog box when the Duration check box is selected:

Goto dialog box with Duration selected

In the preceding figure, the Start value is used for the left side of the main window. The Duration value
corresponds to the amount of time that the main window displays from the start location.

The following figure shows the Goto dialog box when the Duration check box is cleared:

Goto dialog box with Duration cleared

In the preceding figure, the Start value is used for the left side of the main window. The difference between
the Start and End values correspond to the amount of time for which the main window is displayed.

Note  If the Duration check box is cleared, the view and the operation of the Goto dialog box
changes from the "Goto dialog box with Duration selected" figure to the "Goto dialog box with
Duration cleared" figure.

If you know that the problematic area is 1 second long and 8.5 seconds into the file, you would set Start to
85,000,000, clear Use 64 ms Duration, and set the Duration text box to 10,000,000. These settings
provide you with one second worth of time. Alternatively, you can clear the Duration check box and type
both the start and end times in the Start and End text boxes respectively.

The Save button records the current view so that you can restore the view later.

The Restore button applies the previously saved values.

The Goto button applies the view changes and exits the dialog box.

Event Listing Dialog Box


[This is preliminary documentation and subject to change.]
The Event Listing dialog box’s main purpose is to allow for detailed exploring of events (or classes of
events) over specific periods for a specific focus. The dialog box works in conjunction with the main display
window so that the user can see exactly where the specific events take place relative to what the operating
system does as a whole.

The following figure shows a screen shot of what you might see when you open the dialog box, after you
zoom in on a small region in the event file. Some of the dialog box's main areas and features are outlined
after the figure.

Note  When the Event Listing dialog box is initially created, it reads the current view time and
makes it the default time period. The GUID List represents all the different types of events that
GPUView finds in the ETL file; however, the Event List is empty.

The following screen shot corresponds to the zoomed-to-main-window view that is shown in GPUView Zoomed
Main Window. In this case, three different classes of events were selected in the GUID List: DX – Dma
Packet, DX – Profiler Event, and DX – Queue Packet. Then, the one DX – Dma Packet was selected in the
Event List.
Event Listing dialog box

The following sections describe the Event Listing dialog box:

GUID List
The list box in the upper-right corner of the dialog box is the GUID List. All of the different events that
GPUView finds in the ETL file are displayed in the GUID List. The number of occurrences of an event GUID
is also displayed in the parentheses to the right of the GUID’s name. GUID List is a multi-select listbox,
that is, you can press the CTRL key while you select multiple classes of events using the mouse.

Note  GUID List only displays events that GPUView found in the ETL file when the ETL file was loaded
into GPUView. For a complete breakdown of all event GUIDs that GPUView is aware of, open the
GuidStats.txt file that is logged after GPUView loads.

The data format of each item in GUID List is the GUID’s friendly name followed by the number of times the
event GUID appears in the ETL file.

Event List

Every time a GUID class is selected in GUID List, the dialog box repopulates the Event List with that class
of event GUIDs that were found in the ETL file during the ETL file’s specified time period. The Event List is
also a multi-select list box. Every time an item is selected, a vertical red line is drawn in the main window of
GPUView. This red line denotes the position of that particular event relative to all the other events.

Also, when events are logged, there might be extra information that is associated with each event. This
information is displayed in the Event Data control area in the lower-left corner of the dialog box. As shown
in the preceding screen shot, the DX – Dma Packet (544) ClientPaging event is selected; therefore, the
dialog box displays the extra information that is associated with that event. If more than one event is
selected, the dialog box displays information in the Event Data area for the first highlighted message in
Event List.

The maximum that the number of entries to Event List can be is 5000.

The data format of each item in Event List is the event’s friendly name (or function name) followed by the
identifier of the thread that owns the event (if a thread exists) followed by extra information that the user
might find interesting.

Event Data

The Event Data control is in the lower-left corner. Extra information associated with events that are
selected in Event List is displayed in the Event Data area. Each event type is different; therefore, the
output varies from type to type.

Time

The time period is displayed in the Start Time and End Time edit controls. The three buttons to the right of
these two edit controls apply standard time intervals for the dialog box to process. The All Times button
sets the Start Time value to zero and the End Time value to 0xFFFFFFFF (which translates to
4294967295). The Cur View Time button sets Start Time and End Time values based on the time span
being viewed in the main window. The Selection Time button sets the Start Time and End Time values to
the time period that is associated with a selection, if there is a selection (Cur View Time behavior
otherwise).

VSync

Selecting one of the VSync check boxes highlights all DX VSync DPC events in the Event List with a blue
line in the main window.

Marked Events

The Marked Events list is a storage location for important events that might be used as key reference
points while debugging. The Mark Selected, Select All, and Unmark All buttons are associated with this
functionality. If the user clicks the Mark Selected button, any highlighted event in Event List is marked by
displaying the event in Marked Events. Events that are marked are displayed in light yellow in the main
window. If the marked event is selected, it is displayed in bright yellow. To clear the marked events, press
the Unmark All button. The Select All button selects all the events in the Event List so that you can mark
them.

ThreadId Filter
GPUView tags some events as being owned by a particular thread so that you can filter on events that are
owned by particular threads. For example, if the DX – Profiler Event GUID is selected and the value in the
ThreadId Filter control is set to a particular thread, only profile events from that thread is displayed in
Event List. Thread identifiers are displayed in the main window that precedes the thread name.

Zoom to

A button that if pressed adjusts the main window to display the selected events in Event List. If one event
is selected in Event List, that event is centered in the main window. If multiple events are selected in
Event List, the first and last events are used as the start and end events in the main window.

Add Fltr and Clear Fltr

These two buttons work as a filter bag for profile-type events. Specifically, you can use these buttons when
you view DX – Profiler Event GUIDs. If you click on the DX – Profiler Event GUIDs, the Event List
control displays functions that have run in the video kernel. You can then add functions to the filter bag by
selecting the function in the Event List control and by clicking the Add Fltr button. GPUView then filters out
these functions, which simplifies your view.

Select All

The Event List and the Guid List controls have their own Select All button. They select all the events in
that control.

Locate Object

This button affects selections in the Event Data control. You can use this button to look up memory, device,
or adapter information. When you press this button, the Object Viewer Dialog Box starts. GPUView then uses the
selected item in the Object to locate control. You can then search for the object in the list.

To see this button in action, select something like the DX – Reference Allocation GUID followed by a DX –
Reference Allocation in the Event List. Then, in the Event Data control, select one of the hex numbers
that represents a memory allocation. Then, click the Locate Object button. The Object Viewer dialog box
should start, and the object should be highlighted in the Object tree control.

Reset

A button that sets the state of the dialog box back to an original state

Profiler Statistics Dialog Box


[This is preliminary documentation and subject to change.]

The Profiler Statistics dialog box is a statistical analysis dialog box that focuses primarily on the DX –
Profiler Event GUID events and extracts information about called API and DDI functions. You can use the
Profiler Statistics dialog box to determine execution time and preemption time that is associated with
particular functions on a per-thread basis. The dialog box’s main purpose is to help with the discovery of
statistical outlier events, which are events that stand outside the statistical norm (that is, events that are
very long or very short).

Outlier events that are in the context of GPUView mean events of low probability. For example, if all the
executions times for a particular API function are tallied, the distribution of these events might form a
standard bell shaped curve around a mean with a well-defined standard deviation. Outlier events are the
samples that are furthest away from the mean of the sample set. This dialog box helps the user find the
events that are furthest from the mean – that is, the outliers.

When the Profiler Statistics dialog box first loads, the API List displays all the API and DDI functions that
are associated with that time period across all threads. The Event List is empty because it displays outliers,
and the Results Data control, in the lower-left corner, displays execution time, hit count, and API and DDI
function names.

The following figure contains a screen shot that shows the initial state of a Profiler Statistics dialog box:
Profiler Statistics dialog box

The following sections describe the Profiler Statistics dialog box:

API List

The API List contains all of the API and DDI functions that are found to have executed on a thread during
the given time period. If a user double-clicks on one of the entries in API List, the analysis code is
activated.

The data format of each item in API List is the API or DDI function name followed by the number of
occurrences.
Event List

The Event List contains all of the outlier API and DDI functions that are found in the analyzed time period.

The data format of each item in Event List is the API or DDI function name followed by the thread identifier
in parentheses.

Id Filter

The Id Filter is an edit control that is used to constrain analysis to a particular thread.

The main window display provides the thread identifier or process identifier for the Id Filter edit control.
Typically, you provide a thread identifier when you use API List to look for outlier events. You provide a
process identifier when you output information through the Export Process button.

Sort, Upper, Lower

The Sort, Upper, and Lower check boxes determine how the outlier information is displayed in the Event
List. When Sort is cleared, events are displayed in chronological order. When Sort is selected, the events
are displayed based on distance from the mean (in other words, largest outlier first). Upper and Lower
determine which side of the standard bell curve to process. Upper means to find samples that have a
greater value (usually, on the right side of the standard bell curve). Lower means to take samples from the
other side of the bell curve. To find the longest spanning instance of a particular API function, select both
Sort and Upper and then double-click the API function. The top entry in the Event List is the longest
period for that API function.

Results Data

The Results Data control area in the lower-left corner of the dialog box is used for displaying statistical
measurements about the particular API or DDI function that is being processed. You will find the mean,
standard deviation, number of samples, outlier count, and other information in Results Data.

Standard Deviation

The Standard Deviation edit control allows the user to enter a value of 1, 2, 3, or 4. When you search for
outliers, this number represents how many standard deviations are away from the mean to filter. For
example, at 1 standard deviation, about 68 percent of the samples closest to the mean are filtered out. At 2
standard deviations, about 95 percent of the samples are filtered out. At 3 standard deviations (the default),
99 percent of the samples are filtered out. Therefore, the events that are displayed using a standard
deviation represent less than 1 percent of the samples in the collection.

Threshold Time

The Threshold Time edit control and the associated Use Threshold check box allow you to filter on
particular intervals (lengths of time) rather than standard deviations. Therefore, if you know that a
particular event should never exceed a particular value, you can place the value in the Threshold Time edit
control, select the User Threshold check box, and find if there are any outliers that are greater than
(Upper check box selected) or less than (Lower check box selected) the provided value.

Exporting statistics

The Export Process, Export Thread, and Export All buttons in the lower-left corner of the dialog box let
you export statistical information to a comma-delineated text file (*.txt) to view in Microsoft Office Excel.

When you click Export All, the dialog box creates and populates a file called Profile_All.txt. The dialog box
then puts this file in the GPUView directory.

When you click Export Thread, the value in the Id Filter edit control is used to determine what thread to
process. The file that results is placed in the GPUView root directory and takes the form
ProfileThread_<value>.txt (where <value> is the value from the Id Filter edit control).

When you click Export Process, the value in the Id Filter edit control is used to determine what process to
process. The file that results is placed in the GPUView root directory and takes the form
ProfileProcess_<value>.txt (where <value> is the value from the Id Filter edit control).
Marked Events

The functionality of the Marked Events list works just like the functionality of the Events List.

Profiler Statistics Example

The following figure contains a screen shot that shows a Profiler Statistics dialog box that resulted from a
GPUView analysis. This example is based on the ETL file that was used to create the preceding initial state
Profiler Statistics dialog box.

In this example, the user double-clicks the DdiSubmitCommand function in the API List. The example then
shows that the DdiSubmitCommand function occurred 5,764 times as GPUView analyzed the ETL file by
using the settings that are displayed. The Results Data control area shows that nine outlier events
occurred. Because the Sort and Upper check boxes are selected, the longest period is displayed as the first
entry in the Event List. When you double-click that event, the view in the main window around that event
is changed. A screen shot of the changed GPUView main window is shown in the figure that follows the
Profiler Statistics dialog box example.
Profiler Statistics dialog box example

Notice that in the following screen shot the tagged event that was selected in the preceding Profiler
Statistics dialog box example is highlighted with a red line. This tagged event corresponds to the start of
the red API rectangle in thread 2856, which resides in the SchBillboard.exe process. Out of the 5,764
DdiSubmitCommand function calls, this call is the longest in the ETL file.
GPUView Main Window for Profiler Statistics dialog box example

Statistical Options Dialog Box


[This is preliminary documentation and subject to change.]

The Statistical Options dialog box is designed to flag standard issues that might lead to problems with
video processing. Notice that the layout of this dialog box is similar to both the Profiler Statistics and
Event Listing dialog boxes. The difference is that the items in the Test List are preprogrammed statistical
measurements. If any one of the tests in Test List is selected, the appropriate outliers are displayed in the
Event List.
Statistical Options dialog box

The following sections describe the Statistical Options dialog box and specific tests in the Test List:

Test List

The items in Test List identify predefined tests that run over the given time period to look for anomalies. If
you click one of the tests in Test List, a description is displayed in the Test Data control that provides you
with an idea about what the test does. If you double-click a test in Test List, the test runs the selected
statistical check over the given time period.
Event List

Operates like the Event List that is described in Event Listing Dialog Box.

Test Data

After a test is run, basic data is displayed in this control. If a particular event is selected, information about
that event is displayed along with the test result data.

Object Details Dialog Box


[This is preliminary documentation and subject to change.]

The Object Details dialog box displays information about particular objects in the main window view area.
The Object Details dialog box is displayed when you click on a DMA packet or Queue packet. The Object
Details dialog box in the following figure was obtained by clicking one of the rectangles in the GPU
hardware queue of the main window that has red hatch marks through it. Objects in the context CPU queue
can also be displayed in this dialog box.
Object Details dialog box

One interesting feature that is associated with this dialog box is that hex values that represent different
objects can be selected and referenced in the Object Viewer dialog box. To reference an object in Object
Viewer, select the object address that you want to look up and click the Locate Object button.

Object Viewer Dialog Box


[This is preliminary documentation and subject to change.]

The Object Viewer dialog box tracks different objects throughout the life span of the trace file. If you want
to look up details about a particular object, this is the dialog box to use.
Object Viewer dialog box

Object tree

On the left side of the dialog box, is the Object tree control. All objects that GPUView tracks should show
up in this tree. The preceding figure shows an allocation that is highlighted on a particular adapter.

Details Area

In the upper-right corner of the dialog box, is the Details Area control that contains the details for the
object that is highlighted in the Object tree control. Any and all basic data that GPUView is aware of
regarding the selected object is displayed in the details area. The Details Area control supports copy
functionality. Therefore, you can select objects in the Details Area control, copy them into the clipboard,
and paste them in the Object to locate control.

Object History

In the lower right-hand corner, is a list box that represents the history of an object. Events that GPUView
logged against a particular object are listed in this list box. The preceding figure shows that all the events in
the history list box correspond to the single selected allocation from the Object tree control.

The Verbose History check box affects the history list box. In the preceding figure, the primary events that
GPUView allows in the history list box with Verbose History selected is excessive DX – Dma Packet
events.
Also, note that the history of an object can span more than just the time frame of the viewport. In the
preceding figure, the events that exist within the viewport time frame are labeled with an asterisk (*).
Events that are outside the viewport time period are left blank.

Locate Event

The Locate Event button locates events that you select from the history list box in the context of the Event
Listing dialog box. To view this functionality, select one of the events marked with an asterisk (*) and click the
Locate Event button. GPUView brings the Event Listing dialog box to the foreground and highlights the
specific event.

Note  When Locate Event is active, it does not change the state of the Event Listing dialog box.
Therefore, if Locate Event does not find the event, you should ensure that there are no selections in
the GUID List control of the Event Listing dialog box. Alternatively, you can select the GUID that
corresponds to the type of event that you are trying to locate.

Object to locate

If you know the value of the object to locate, you can type it into the Object to locate edit control and then
press the Locate button. If GPUView finds the object in the corresponding time period, the object is
highlighted in the Object tree control, and the object’s details are displayed in the Details Area control
accordingly.

Time controls

The Start Time and End Time controls work just like the other dialog boxes. These times are used to limit
the search span for objects.

Requesting Support and Sending Feedback


[This is preliminary documentation and subject to change.]

You can use the following alias to request support and to send feedback:

Gpuviewf@microsoft.com
This is the technical feedback alias that is narrow and currently contains only Microsoft employees.

S-ar putea să vă placă și