This is an archive of the discontinued LLVM Phabricator instance.

[llvm-exegesis] Add support for measuring NumMicroOps.
ClosedPublic

Authored by courbet on Sep 26 2018, 2:36 AM.

Details

Summary

Example output for vzeroall:

---
mode:            uops
key:
  instructions:
    - 'VZEROALL'
  config:          ''
  register_initial_values:
cpu_name:        haswell
llvm_triple:     x86_64-unknown-linux-gnu
num_repetitions: 10000
measurements:
  - { debug_string: HWPort0, value: 0.0006, per_snippet_value: 0.0006,
      key: '3' }
  - { debug_string: HWPort1, value: 0.0011, per_snippet_value: 0.0011,
      key: '4' }
  - { debug_string: HWPort2, value: 0.0004, per_snippet_value: 0.0004,
      key: '5' }
  - { debug_string: HWPort3, value: 0.0018, per_snippet_value: 0.0018,
      key: '6' }
  - { debug_string: HWPort4, value: 0.0002, per_snippet_value: 0.0002,
      key: '7' }
  - { debug_string: HWPort5, value: 1.0019, per_snippet_value: 1.0019,
      key: '8' }
  - { debug_string: HWPort6, value: 1.0033, per_snippet_value: 1.0033,
      key: '9' }
  - { debug_string: HWPort7, value: 0.0001, per_snippet_value: 0.0001,
      key: '10' }
  - { debug_string: NumMicroOps, value: 20.0069, per_snippet_value: 20.0069,
      key: NumMicroOps }
error:           ''
info:            ''
assembled_snippet: C5FC77C5FC77C5FC77C5FC77C5FC77C5FC77C5FC77C5FC77C5FC77C5FC77C5FC77C5FC77C5FC77C5FC77C5FC77C5FC77C3
...

Diff Detail

Repository
rL LLVM

Event Timeline

courbet created this revision.Sep 26 2018, 2:36 AM
lebedev.ri edited the summary of this revision. (Show Details)Sep 26 2018, 2:37 AM
gchatelet added inline comments.Sep 26 2018, 3:40 AM
tools/llvm-exegesis/lib/Uops.cpp
289 ↗(On Diff #167087)

I'm not too fond of the initializer list here because it's not future proof (and not readable)
Maybe create a value on the stack, initializes the members and push_back(std::move())?

Same below.

294 ↗(On Diff #167087)

Might be worth creating a variable for SchedModel.getExtraProcessorInfo().PfmCounters

courbet updated this revision to Diff 167102.Sep 26 2018, 4:18 AM
courbet marked 2 inline comments as done.

address comments

gchatelet accepted this revision.Sep 26 2018, 4:23 AM
This revision is now accepted and ready to land.Sep 26 2018, 4:23 AM
This revision was automatically updated to reflect the committed changes.