Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Integrate i915-perf data into GPUvis #40

Merged
merged 6 commits into from Feb 18, 2020

Conversation

djdeath
Copy link
Collaborator

@djdeath djdeath commented Feb 17, 2020

This PR is making use of the small optional library & recording tool coming off IGT (https://gitlab.freedesktop.org/drm/igt-gpu-tools) and helps showing some data generated by Intel's Gen observation architecture.

This adds essentially 2 new things :

  • a new row tracking the GPU utilization
  • a panel showing the details about a given GPU timeline item

It's a first stab at showing that data into GPUVis. A lot more could be added but we have to start somewhere :)

I've tried to make this optional code so that there is no hard requirement on IGT.

It works with this IGT branch : https://github.com/djdeath/intel-gpu-tools/tree/review/i915-perf-tools
Just posted for review.

A couple of screenshots :
Screenshot from 2020-02-17 11-12-38
Screenshot from 2020-02-17 11-16-11

If we want to merge events coming from different sources (in the
future changes, files), we need to be able to label the events
uniquely across sources so assigning an ID right before an item is
added to the array makes more sense.
We're about to allow multiple files to be loaded and we need to have a
common time base for all files. Relative timestamps local to a file
won't work.
2 things we need to do :

  * refrain from processing events until all files have been loaded.
    Since we create relationships between different events, we need to
    wait for all of them to be loaded before doing anything.

  * sort the loaded events by timestamps (as multiple files can
    overlap, events won't be ordered initially)

As a result we load all events, then sort them and assign them IDs and
finally create the relationship as we used to do before this change.
In addition to the normal ftrace recording, the scripts will use the
i915-perf-recorder tool from IGT to record GPU generated performance
data on Intel platforms.

Before starting the recording, set the following variable

  export USE_I915_PERF=1

You can also select what metric set you want to use. This will affect
what kind of GPU performance data is recorded. A list of metric set is
available from the following command :

  i915-perf-recorder -m list

You can list counters recorded for each metric set along with their
description :

  i915-perf-recorder -m RenderBasic -C

then

  ./trace-cmd-start-tracing.sh
On top of adding an additional row in the graph view, this also adds a
new panel at the bottom of the window in which the user can look at
the performance counter values associated to a given item of the GPU
timeline.

This code is conditional to compile with the -DUSE_I915_PERF=ON
option.
@djdeath
Copy link
Collaborator Author

djdeath commented Feb 17, 2020

Closes #38

@mikesart mikesart merged commit 323cd34 into mikesart:master Feb 18, 2020
@djdeath djdeath deleted the review/i915-perf branch March 17, 2020 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants