<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [llvm-exegesis] PfmIssueCounter for uops in amdfam15h"
   href="https://bugs.llvm.org/show_bug.cgi?id=38951">38951</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[llvm-exegesis] PfmIssueCounter for uops in amdfam15h
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>lebedev.ri@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=20882" name="attach_20882" title="uops measurements">attachment 20882</a> <a href="attachment.cgi?id=20882&action=edit" title="uops measurements">[details]</a></span>
uops measurements

On amdfam15h (BdVer2, Piledriver), the uops measurement is problematic.
My current config:

let SchedModel = BdVer2Model in {
def PdCycleCounter : PfmCycleCounter<"cpu_clk_unhalted">;
def PdEXCounter    : PfmIssueCounter<PdEX, // Technically, PdEX
                                     ["retired_uops"]>;
def PdFPU0Counter  : PfmIssueCounter<PdFPU0,
                                     ["dispatched_fpu_ops:ops_pipe0",
                                      "dispatched_fpu_ops:ops_dual_pipe0"]>;
def PdFPU1Counter  : PfmIssueCounter<PdFPU1,
                                     ["dispatched_fpu_ops:ops_pipe1",
                                      "dispatched_fpu_ops:ops_dual_pipe1"]>;
def PdFPU2Counter  : PfmIssueCounter<PdFPU2,
                                     ["dispatched_fpu_ops:ops_pipe2",
                                      "dispatched_fpu_ops:ops_dual_pipe2"]>;
def PdFPU3Counter  : PfmIssueCounter<PdFPU3,
                                     ["dispatched_fpu_ops:ops_pipe3",
                                      "dispatched_fpu_ops:ops_dual_pipe3"]>;

// NOTE: it would seem, there are not uops counters for any other pipes.
}

The fpu stuff seems to work.
But retired_uops is not specific to the EX/AGU units.
And i don't see any other, EX/AGU-specific ones.

It counts all the uops, to all the units. The dual-issue uop is counted as one
uop.
So it would be more correct to define this as:
PdUOpsTotal = retired_uops
PdEXCounter = PdUOpsTotal - PdFPU0Counter - PdFPU1Counter - PdFPU2Counter -
PdFPU3Counter
I think?

I don't have any ideas, i just though i'd bring this up.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>