Skip to content

Features

Michael Sartain edited this page Oct 3, 2017 · 13 revisions

Links

Start gpuvis with sample trace file

gpuvis traces/amdgpu_trace.zip

Key bindings

  • Hitting F1 or selecting the Options / GpuVis Help menu item shows a window with hotkeys

Trace information

  • Click Options menu and select Info for 'amdgpu.dat'
  • Graph Row Info shows graph rows and number of events
  • Also shows tgids / processes and how many threads were captured
  • Event Info shows count of each event captured
  • CPU Info is general information about the trace capture and machine

Change colors for specific events

  • Click Options menu and select Color Configuration
  • GpuVis Colors: Graph, vblank, marker, frame marker, etc colors
  • ImGui Colors: General imgui window, button, background, etc colors
  • Event Colors: Events in graph (ie dma_fence_signaled) colors
    • Click on "dma_fence_signaled", select something like red, and those events will now be red in the graph

Event filters

  • An easy way to see specific events is to type $name = dma_fence_signaled in the "Event Filter" field in the Event List, then hit enter. The Event List will only show dma_fence_signaled events and when you double click on them the graph view will move to show the selected event.
  • Clicking "Clear Filter" will clear the event filter.
  • Hover the mouse over the "Event Filter" text input to see a tooltip with more filter options and examples.

Graph tips

  • Click mouse, hold, move to drag around the Events Graph
  • Hit the z key to zoom to 3ms the time the mouse is hovering, and hit z again to zoom back out
  • for example, if you have the graph Length set to 60ms, you can zoom into a specific area at 3ms and then zoom back out to the 60ms view by hitting z twice
  • Hover over events in the graph or event list to see graph and event details in tooltip
  • Right clicking on the graph brings up lots of options:
    • You can save specific views, set markers, toggle graph to entire window, show/hide vblank markers, move rows around, hide rows or tgid/processes, etc
  • Right clicking on the Event List also has several options

There are four fairly advanced features which are pretty powerful but might take a little bit to understand.

Create new graph rows using filters

  • Clear Event Filters by clicking on "Clear Filter" button
  • Right click on graph, choose "Add New Graph Row..."
  • In Row Name, type vblanks and in Row Filter type $name = drm_vblank_event && $crtc = 1

Scale graph row time scale out (for trace navigation)

  • Right click on your vblanks row, and ctrl+click on the Zoom row 'vblanks' out: 1.00x slider
  • Type in 20, hit enter
  • vblanks row label should show up as "vblanks (20.0x)" now
  • The white rounded edged rectangle in the middle of the vblanks row is where the graph is currently
  • You can double click outside that rectangle to move the graph row to that location
  • The tooltip will show you the time for the graph and the vblanks graph row when you hover it over the vblanks row

Zoom / expand gfx row

  • Hover over the gfx row and hit ctrl+shift+z
    • Or right click and select Zoom row 'gfx'
  • This will toggle to showing only the gfx and gfx hw rows in the graph
  • Also works on the sdma, print rows, etc

Plots

  • https://www.youtube.com/watch?v=g5T5wSCXkH4&feature=youtu.be&t=29845
  • Right click on one of the [Compositor] TimeSinceLastVsync: #.### events
  • You can find these events by looking at the print graph row, or typing $buf =~ TimeSinceLastVsync in the "Event Filter"
  • Select the Create Plot for ... menu item
  • Options are: Plot Name, Plot Filter, and Plot Scan Str
    • The filter is the event filter to select the plot events
    • The scan str is used to find where the number to plot is.
  • Hit Create and you should have a new plot row
  • You can plot duration value as well.
  • Calculated durations for various events show in the Event List duration column.
  • To see events with durations, type $name != sched_switch && $duration > 0 in the Event Filter
  • You should see a bunch of dma_fence_signaled, amdgpu_cs_ioctl, amdgpu_sched_run_job, etc. events
  • Right click on one of those in the event list and there should be ~ this item in the menu:
    • Create Plot for amdgpu_cs_ioctl duration...