blob: 684cadd496205dbc73d8d27cd9f907903d2fc328 [file] [log] [blame]
Clement Courbetb4493792018-04-10 08:16:37 +00001//===-- X86PfmCounters.td - X86 Hardware Counters ----------*- tablegen -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This describes the available hardware counters for various subtargets.
11//
12//===----------------------------------------------------------------------===//
13
14let SchedModel = SandyBridgeModel in {
15def SBCycleCounter : PfmCycleCounter<"unhalted_core_cycles">;
16def SBPort0Counter : PfmIssueCounter<SBPort0, ["uops_dispatched_port:port_0"]>;
17def SBPort1Counter : PfmIssueCounter<SBPort1, ["uops_dispatched_port:port_1"]>;
18def SBPort23Counter : PfmIssueCounter<SBPort23,
19 ["uops_dispatched_port:port_2",
Simon Pilgrim95f94112018-04-10 14:21:33 +000020 "uops_dispatched_port:port_3"]>;
Clement Courbetb4493792018-04-10 08:16:37 +000021def SBPort4Counter : PfmIssueCounter<SBPort4, ["uops_dispatched_port:port_4"]>;
22def SBPort5Counter : PfmIssueCounter<SBPort5, ["uops_dispatched_port:port_5"]>;
Clement Courbetdac60b92018-10-01 08:37:37 +000023def SBUopsCounter : PfmUopsCounter<"uops_issued:any">;
Clement Courbetb4493792018-04-10 08:16:37 +000024}
25
26let SchedModel = HaswellModel in {
27def HWCycleCounter : PfmCycleCounter<"unhalted_core_cycles">;
28def HWPort0Counter : PfmIssueCounter<HWPort0, ["uops_dispatched_port:port_0"]>;
29def HWPort1Counter : PfmIssueCounter<HWPort1, ["uops_dispatched_port:port_1"]>;
30def HWPort2Counter : PfmIssueCounter<HWPort2, ["uops_dispatched_port:port_2"]>;
31def HWPort3Counter : PfmIssueCounter<HWPort3, ["uops_dispatched_port:port_3"]>;
32def HWPort4Counter : PfmIssueCounter<HWPort4, ["uops_dispatched_port:port_4"]>;
33def HWPort5Counter : PfmIssueCounter<HWPort5, ["uops_dispatched_port:port_5"]>;
34def HWPort6Counter : PfmIssueCounter<HWPort6, ["uops_dispatched_port:port_6"]>;
35def HWPort7Counter : PfmIssueCounter<HWPort7, ["uops_dispatched_port:port_7"]>;
Clement Courbet596c56f2018-09-26 11:22:56 +000036def HWUopsCounter : PfmUopsCounter<"uops_issued:any">;
Clement Courbetb4493792018-04-10 08:16:37 +000037}
38
39let SchedModel = BroadwellModel in {
40def BWCycleCounter : PfmCycleCounter<"unhalted_core_cycles">;
Clement Courbetb18c34b2018-05-04 15:26:12 +000041def BWPort0Counter : PfmIssueCounter<BWPort0, ["uops_executed_port:port_0"]>;
42def BWPort1Counter : PfmIssueCounter<BWPort1, ["uops_executed_port:port_1"]>;
43def BWPort2Counter : PfmIssueCounter<BWPort2, ["uops_executed_port:port_2"]>;
44def BWPort3Counter : PfmIssueCounter<BWPort3, ["uops_executed_port:port_3"]>;
45def BWPort4Counter : PfmIssueCounter<BWPort4, ["uops_executed_port:port_4"]>;
46def BWPort5Counter : PfmIssueCounter<BWPort5, ["uops_executed_port:port_5"]>;
47def BWPort6Counter : PfmIssueCounter<BWPort6, ["uops_executed_port:port_6"]>;
48def BWPort7Counter : PfmIssueCounter<BWPort7, ["uops_executed_port:port_7"]>;
Clement Courbetdac60b92018-10-01 08:37:37 +000049def BWUopsCounter : PfmUopsCounter<"uops_issued:any">;
Clement Courbetb4493792018-04-10 08:16:37 +000050}
51
52let SchedModel = SkylakeClientModel in {
53def SKLCycleCounter : PfmCycleCounter<"unhalted_core_cycles">;
54def SKLPort0Counter : PfmIssueCounter<SKLPort0, ["uops_dispatched_port:port_0"]>;
55def SKLPort1Counter : PfmIssueCounter<SKLPort1, ["uops_dispatched_port:port_1"]>;
56def SKLPort2Counter : PfmIssueCounter<SKLPort2, ["uops_dispatched_port:port_2"]>;
57def SKLPort3Counter : PfmIssueCounter<SKLPort3, ["uops_dispatched_port:port_3"]>;
58def SKLPort4Counter : PfmIssueCounter<SKLPort4, ["uops_dispatched_port:port_4"]>;
59def SKLPort5Counter : PfmIssueCounter<SKLPort5, ["uops_dispatched_port:port_5"]>;
60def SKLPort6Counter : PfmIssueCounter<SKLPort6, ["uops_dispatched_port:port_6"]>;
61def SKLPort7Counter : PfmIssueCounter<SKLPort7, ["uops_dispatched_port:port_7"]>;
Simon Pilgrim2c594752018-10-03 16:45:26 +000062def SKLUopsCounter : PfmUopsCounter<"uops_issued:any">;
Clement Courbetb4493792018-04-10 08:16:37 +000063}
64
65let SchedModel = SkylakeServerModel in {
66def SKXCycleCounter : PfmCycleCounter<"unhalted_core_cycles">;
67def SKXPort0Counter : PfmIssueCounter<SKXPort0, ["uops_dispatched_port:port_0"]>;
68def SKXPort1Counter : PfmIssueCounter<SKXPort1, ["uops_dispatched_port:port_1"]>;
69def SKXPort2Counter : PfmIssueCounter<SKXPort2, ["uops_dispatched_port:port_2"]>;
70def SKXPort3Counter : PfmIssueCounter<SKXPort3, ["uops_dispatched_port:port_3"]>;
71def SKXPort4Counter : PfmIssueCounter<SKXPort4, ["uops_dispatched_port:port_4"]>;
72def SKXPort5Counter : PfmIssueCounter<SKXPort5, ["uops_dispatched_port:port_5"]>;
73def SKXPort6Counter : PfmIssueCounter<SKXPort6, ["uops_dispatched_port:port_6"]>;
74def SKXPort7Counter : PfmIssueCounter<SKXPort7, ["uops_dispatched_port:port_7"]>;
Clement Courbetdac60b92018-10-01 08:37:37 +000075def SKXUopsCounter : PfmUopsCounter<"uops_issued:any">;
Clement Courbetb4493792018-04-10 08:16:37 +000076}
Simon Pilgrima90c2112018-05-24 14:54:32 +000077
78let SchedModel = BtVer2Model in {
79def JCycleCounter : PfmCycleCounter<"cpu_clk_unhalted">;
Simon Pilgrim7e4f1542018-09-27 11:40:26 +000080def JUopsCounter : PfmUopsCounter<"retired_uops">;
Simon Pilgrime3894342018-07-02 09:15:01 +000081def JFPU0Counter : PfmIssueCounter<JFPU0, ["dispatched_fpu:pipe0"]>;
82def JFPU1Counter : PfmIssueCounter<JFPU1, ["dispatched_fpu:pipe1"]>;
Simon Pilgrima90c2112018-05-24 14:54:32 +000083}