[all-commits] [llvm/llvm-project] 9fb871: [llvm-exegesis][NFC] Let the pfm::Counter own the ...

Clement Courbet via All-commits all-commits at lists.llvm.org
Wed Apr 8 06:46:09 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 9fb871866e2bb9b1c0968265bc5c1a3aa71d5845
      https://github.com/llvm/llvm-project/commit/9fb871866e2bb9b1c0968265bc5c1a3aa71d5845
  Author: Clement Courbet <courbet at google.com>
  Date:   2020-04-08 (Wed, 08 Apr 2020)

  Changed paths:
    M llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp
    M llvm/tools/llvm-exegesis/lib/PerfHelper.cpp
    M llvm/tools/llvm-exegesis/lib/PerfHelper.h
    M llvm/unittests/tools/llvm-exegesis/PerfHelperTest.cpp

  Log Message:
  -----------
  [llvm-exegesis][NFC] Let the pfm::Counter own the PerfHelper.

A perf helper is always only ever cretaed to be checked for validity
then passed as Counter ctor argument, never to be touched again.
Its lifetime should outlive that of the counter, and there is never any
reason to have two different counters of top of the perf helper.
Make sure these assumptions always hold by making the Counter consume the
PerfHelper.




More information about the All-commits mailing list