Blame src/libpfm4/lib/events/intel_bdx_unc_imc_events.h

Packit 577717
/*
Packit 577717
 * Copyright (c) 2017 Google Inc. All rights reserved
Packit 577717
 * Contributed by Stephane Eranian <eranian@gmail.com>
Packit 577717
 *
Packit 577717
 * Permission is hereby granted, free of charge, to any person obtaining a copy
Packit 577717
 * of this software and associated documentation files (the "Software"), to deal
Packit 577717
 * in the Software without restriction, including without limitation the rights
Packit 577717
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
Packit 577717
 * of the Software, and to permit persons to whom the Software is furnished to do so,
Packit 577717
 * subject to the following conditions:
Packit 577717
 *
Packit 577717
 * The above copyright notice and this permission notice shall be included in all
Packit 577717
 * copies or substantial portions of the Software.
Packit 577717
 *
Packit 577717
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
Packit 577717
 * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
Packit 577717
 * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
Packit 577717
 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
Packit 577717
 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
Packit 577717
 * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Packit 577717
 *
Packit 577717
 * This file is part of libpfm, a performance monitoring support library for
Packit 577717
 * applications on Linux.
Packit 577717
 *
Packit 577717
 * PMU: bdx_unc_imc
Packit 577717
 */
Packit 577717
Packit 577717
static intel_x86_umask_t bdx_unc_m_act_count[]={
Packit 577717
	{ .uname = "BYP",
Packit 577717
	  .ucode = 0x800,
Packit 577717
	  .udesc = "DRAM Activate Count -- Activate due to Write",
Packit 577717
	},
Packit 577717
	{ .uname = "RD",
Packit 577717
	  .ucode = 0x100,
Packit 577717
	  .udesc = "DRAM Activate Count -- Activate due to Read",
Packit 577717
	},
Packit 577717
	{ .uname = "WR",
Packit 577717
	  .ucode = 0x200,
Packit 577717
	  .udesc = "DRAM Activate Count -- Activate due to Write",
Packit 577717
	},
Packit 577717
};
Packit 577717
Packit 577717
static intel_x86_umask_t bdx_unc_m_byp_cmds[]={
Packit 577717
	{ .uname = "ACT",
Packit 577717
	  .ucode = 0x100,
Packit 577717
	  .udesc = "ACT command issued by 2 cycle bypass",
Packit 577717
	},
Packit 577717
	{ .uname = "CAS",
Packit 577717
	  .ucode = 0x200,
Packit 577717
	  .udesc = "CAS command issued by 2 cycle bypass",
Packit 577717
	},
Packit 577717
	{ .uname = "PRE",
Packit 577717
	  .ucode = 0x400,
Packit 577717
	  .udesc = "PRE command issued by 2 cycle bypass",
Packit 577717
	},
Packit 577717
};
Packit 577717
Packit 577717
static intel_x86_umask_t bdx_unc_m_cas_count[]={
Packit 577717
	{ .uname  = "ALL",
Packit 577717
	  .ucode  = 0xf00,
Packit 577717
	  .udesc  = "DRAM RD_CAS and WR_CAS Commands. All DRAM WR_CAS (w/ and w/out auto-pre)",
Packit 577717
	  .uflags = INTEL_X86_NCOMBO | INTEL_X86_DFL,
Packit 577717
	},
Packit 577717
	{ .uname = "RD",
Packit 577717
	  .ucode = 0x300,
Packit 577717
	  .udesc = "DRAM RD_CAS and WR_CAS Commands. All DRAM Reads (RD_CAS + Underfills)",
Packit 577717
	  .uflags = INTEL_X86_NCOMBO,
Packit 577717
	},
Packit 577717
	{ .uname = "RD_REG",
Packit 577717
	  .ucode = 0x100,
Packit 577717
	  .udesc = "DRAM RD_CAS and WR_CAS Commands. All DRAM RD_CAS (w/ and w/out auto-pre)",
Packit 577717
	},
Packit 577717
	{ .uname = "RD_RMM",
Packit 577717
	  .ucode = 0x2000,
Packit 577717
	  .udesc = "DRAM RD_CAS and WR_CAS Commands. Read CAS issued in RMM",
Packit 577717
	},
Packit 577717
	{ .uname = "RD_UNDERFILL",
Packit 577717
	  .ucode = 0x200,
Packit 577717
	  .udesc = "DRAM RD_CAS and WR_CAS Commands. Underfill Read Issued",
Packit 577717
	},
Packit 577717
	{ .uname = "RD_WMM",
Packit 577717
	  .ucode = 0x1000,
Packit 577717
	  .udesc = "DRAM RD_CAS and WR_CAS Commands. Read CAS issued in WMM",
Packit 577717
	},
Packit 577717
	{ .uname  = "WR",
Packit 577717
	  .ucode  = 0xc00,
Packit 577717
	  .udesc  = "DRAM RD_CAS and WR_CAS Commands. All DRAM WR_CAS (both Modes)",
Packit 577717
	  .uflags = INTEL_X86_NCOMBO,
Packit 577717
	},
Packit 577717
	{ .uname = "WR_RMM",
Packit 577717
	  .ucode = 0x800,
Packit 577717
	  .udesc = "DRAM RD_CAS and WR_CAS Commands. DRAM WR_CAS (w/ and w/out auto-pre) in Read Major Mode",
Packit 577717
	},
Packit 577717
	{ .uname = "WR_WMM",
Packit 577717
	  .ucode = 0x400,
Packit 577717
	  .udesc = "DRAM RD_CAS and WR_CAS Commands. DRAM WR_CAS (w/ and w/out auto-pre) in Write Major Mode",
Packit 577717
	},
Packit 577717
};
Packit 577717
Packit 577717
static intel_x86_umask_t bdx_unc_m_dram_refresh[]={
Packit 577717
	{ .uname = "HIGH",
Packit 577717
	  .ucode = 0x400,
Packit 577717
	  .udesc = "Number of DRAM Refreshes Issued",
Packit 577717
	},
Packit 577717
	{ .uname = "PANIC",
Packit 577717
	  .ucode = 0x200,
Packit 577717
	  .udesc = "Number of DRAM Refreshes Issued",
Packit 577717
	},
Packit 577717
};
Packit 577717
Packit 577717
static intel_x86_umask_t bdx_unc_m_major_modes[]={
Packit 577717
	{ .uname = "ISOCH",
Packit 577717
	  .ucode = 0x800,
Packit 577717
	  .udesc = "Cycles in a Major Mode -- Isoch Major Mode",
Packit 577717
	},
Packit 577717
	{ .uname = "PARTIAL",
Packit 577717
	  .ucode = 0x400,
Packit 577717
	  .udesc = "Cycles in a Major Mode -- Partial Major Mode",
Packit 577717
	},
Packit 577717
	{ .uname = "READ",
Packit 577717
	  .ucode = 0x100,
Packit 577717
	  .udesc = "Cycles in a Major Mode -- Read Major Mode",
Packit 577717
	},
Packit 577717
	{ .uname = "WRITE",
Packit 577717
	  .ucode = 0x200,
Packit 577717
	  .udesc = "Cycles in a Major Mode -- Write Major Mode",
Packit 577717
	},
Packit 577717
};
Packit 577717
Packit 577717
static intel_x86_umask_t bdx_unc_m_power_cke_cycles[]={
Packit 577717
	{ .uname  = "RANK0",
Packit 577717
	  .ucode  = 0x100,
Packit 577717
	  .udesc  = "CKE_ON_CYCLES by Rank -- DIMM ID",
Packit 577717
	  .uflags = INTEL_X86_NCOMBO,
Packit 577717
	},
Packit 577717
	{ .uname  = "RANK1",
Packit 577717
	  .ucode  = 0x200,
Packit 577717
	  .udesc  = "CKE_ON_CYCLES by Rank -- DIMM ID",
Packit 577717
	  .uflags = INTEL_X86_NCOMBO,
Packit 577717
	},
Packit 577717
	{ .uname  = "RANK2",
Packit 577717
	  .ucode  = 0x400,
Packit 577717
	  .udesc  = "CKE_ON_CYCLES by Rank -- DIMM ID",
Packit 577717
	  .uflags = INTEL_X86_NCOMBO,
Packit 577717
	},
Packit 577717
	{ .uname  = "RANK3",
Packit 577717
	  .ucode  = 0x800,
Packit 577717
	  .udesc  = "CKE_ON_CYCLES by Rank -- DIMM ID",
Packit 577717
	  .uflags = INTEL_X86_NCOMBO,
Packit 577717
	},
Packit 577717
	{ .uname  = "RANK4",
Packit 577717
	  .ucode  = 0x1000,
Packit 577717
	  .udesc  = "CKE_ON_CYCLES by Rank -- DIMM ID",
Packit 577717
	  .uflags = INTEL_X86_NCOMBO,
Packit 577717
	},
Packit 577717
	{ .uname  = "RANK5",
Packit 577717
	  .ucode  = 0x2000,
Packit 577717
	  .udesc  = "CKE_ON_CYCLES by Rank -- DIMM ID",
Packit 577717
	  .uflags = INTEL_X86_NCOMBO,
Packit 577717
	},
Packit 577717
	{ .uname  = "RANK6",
Packit 577717
	  .ucode  = 0x4000,
Packit 577717
	  .udesc  = "CKE_ON_CYCLES by Rank -- DIMM ID",
Packit 577717
	  .uflags = INTEL_X86_NCOMBO,
Packit 577717
	},
Packit 577717
	{ .uname  = "RANK7",
Packit 577717
	  .ucode  = 0x8000,
Packit 577717
	  .udesc  = "CKE_ON_CYCLES by Rank -- DIMM ID",
Packit 577717
	  .uflags = INTEL_X86_NCOMBO,
Packit 577717
	},
Packit 577717
};
Packit 577717
Packit 577717
static intel_x86_umask_t bdx_unc_m_power_throttle_cycles[]={
Packit 577717
	{ .uname = "RANK0",
Packit 577717
	  .ucode = 0x100,
Packit 577717
	  .udesc = "Throttle Cycles for Rank 0 -- DIMM ID",
Packit 577717
	},
Packit 577717
	{ .uname = "RANK1",
Packit 577717
	  .ucode = 0x200,
Packit 577717
	  .udesc = "Throttle Cycles for Rank 0 -- DIMM ID",
Packit 577717
	},
Packit 577717
	{ .uname = "RANK2",
Packit 577717
	  .ucode = 0x400,
Packit 577717
	  .udesc = "Throttle Cycles for Rank 0 -- DIMM ID",
Packit 577717
	},
Packit 577717
	{ .uname = "RANK3",
Packit 577717
	  .ucode = 0x800,
Packit 577717
	  .udesc = "Throttle Cycles for Rank 0 -- DIMM ID",
Packit 577717
	},
Packit 577717
	{ .uname = "RANK4",
Packit 577717
	  .ucode = 0x1000,
Packit 577717
	  .udesc = "Throttle Cycles for Rank 0 -- DIMM ID",
Packit 577717
	},
Packit 577717
	{ .uname = "RANK5",
Packit 577717
	  .ucode = 0x2000,
Packit 577717
	  .udesc = "Throttle Cycles for Rank 0 -- DIMM ID",
Packit 577717
	},
Packit 577717
	{ .uname = "RANK6",
Packit 577717
	  .ucode = 0x4000,
Packit 577717
	  .udesc = "Throttle Cycles for Rank 0 -- DIMM ID",
Packit 577717
	},
Packit 577717
	{ .uname = "RANK7",
Packit 577717
	  .ucode = 0x8000,
Packit 577717
	  .udesc = "Throttle Cycles for Rank 0 -- DIMM ID",
Packit 577717
	},
Packit 577717
};
Packit 577717
Packit 577717
static intel_x86_umask_t bdx_unc_m_preemption[]={
Packit 577717
	{ .uname = "RD_PREEMPT_RD",
Packit 577717
	  .ucode = 0x100,
Packit 577717
	  .udesc = "Read Preemption Count -- Read over Read Preemption",
Packit 577717
	},
Packit 577717
	{ .uname = "RD_PREEMPT_WR",
Packit 577717
	  .ucode = 0x200,
Packit 577717
	  .udesc = "Read Preemption Count -- Read over Write Preemption",
Packit 577717
	},
Packit 577717
};
Packit 577717
Packit 577717
static intel_x86_umask_t bdx_unc_m_pre_count[]={
Packit 577717
	{ .uname = "BYP",
Packit 577717
	  .ucode = 0x1000,
Packit 577717
	  .udesc = "DRAM Precharge commands. -- Precharge due to bypass",
Packit 577717
	},
Packit 577717
	{ .uname = "PAGE_CLOSE",
Packit 577717
	  .ucode = 0x200,
Packit 577717
	  .udesc = "DRAM Precharge commands. -- Precharge due to timer expiration",
Packit 577717
	},
Packit 577717
	{ .uname = "PAGE_MISS",
Packit 577717
	  .ucode = 0x100,
Packit 577717
	  .udesc = "DRAM Precharge commands. -- Precharges due to page miss",
Packit 577717
	},
Packit 577717
	{ .uname = "RD",
Packit 577717
	  .ucode = 0x400,
Packit 577717
	  .udesc = "DRAM Precharge commands. -- Precharge due to read",
Packit 577717
	},
Packit 577717
	{ .uname = "WR",
Packit 577717
	  .ucode = 0x800,
Packit 577717
	  .udesc = "DRAM Precharge commands. -- Precharge due to write",
Packit 577717
	},
Packit 577717
};
Packit 577717
Packit 577717
static intel_x86_umask_t bdx_unc_m_rd_cas_prio[]={
Packit 577717
	{ .uname = "HIGH",
Packit 577717
	  .ucode = 0x400,
Packit 577717
	  .udesc = "Read CAS issued with HIGH priority",
Packit 577717
	},
Packit 577717
	{ .uname = "LOW",
Packit 577717
	  .ucode = 0x100,
Packit 577717
	  .udesc = "Read CAS issued with LOW priority",
Packit 577717
	},
Packit 577717
	{ .uname = "MED",
Packit 577717
	  .ucode = 0x200,
Packit 577717
	  .udesc = "Read CAS issued with MEDIUM priority",
Packit 577717
	},
Packit 577717
	{ .uname = "PANIC",
Packit 577717
	  .ucode = 0x800,
Packit 577717
	  .udesc = "Read CAS issued with PANIC NON ISOCH priority (starved)",
Packit 577717
	},
Packit 577717
};
Packit 577717
Packit 577717
static intel_x86_umask_t bdx_unc_m_rd_cas_rank0[]={
Packit 577717
	{ .uname  = "ALLBANKS",
Packit 577717
	  .ucode  = 0x1000,
Packit 577717
	  .udesc  = "Access to Rank 0 -- All Banks",
Packit 577717
	  .uflags = INTEL_X86_NCOMBO,
Packit 577717
	},
Packit 577717
	{ .uname  = "BANK0",
Packit 577717
	  .ucode  = 0x0,
Packit 577717
	  .udesc  = "Access to Rank 0 -- Bank 0",
Packit 577717
	  .uflags = INTEL_X86_NCOMBO,
Packit 577717
	},
Packit 577717
	{ .uname  = "BANK1",
Packit 577717
	  .ucode  = 0x100,
Packit 577717
	  .udesc  = "Access to Rank 0 -- Bank 1",
Packit 577717
	  .uflags = INTEL_X86_NCOMBO,
Packit 577717
	},
Packit 577717
	{ .uname  = "BANK10",
Packit 577717
	  .ucode  = 0xa00,
Packit 577717
	  .udesc  = "Access to Rank 0 -- Bank 10",
Packit 577717
	  .uflags = INTEL_X86_NCOMBO,
Packit 577717
	},
Packit 577717
	{ .uname  = "BANK11",
Packit 577717
	  .ucode  = 0xb00,
Packit 577717
	  .udesc  = "Access to Rank 0 -- Bank 11",
Packit 577717
	  .uflags = INTEL_X86_NCOMBO,
Packit 577717
	},
Packit 577717
	{ .uname  = "BANK12",
Packit 577717
	  .ucode  = 0xc00,
Packit 577717
	  .udesc  = "Access to Rank 0 -- Bank 12",
Packit 577717
	  .uflags = INTEL_X86_NCOMBO,
Packit 577717
	},
Packit 577717
	{ .uname  = "BANK13",
Packit 577717
	  .ucode  = 0xd00,
Packit 577717
	  .udesc  = "Access to Rank 0 -- Bank 13",
Packit 577717
	  .uflags = INTEL_X86_NCOMBO,
Packit 577717
	},
Packit 577717
	{ .uname  = "BANK14",
Packit 577717
	  .ucode  = 0xe00,
Packit 577717
	  .udesc  = "Access to Rank 0 -- Bank 14",
Packit 577717
	  .uflags = INTEL_X86_NCOMBO,
Packit 577717
	},
Packit 577717
	{ .uname  = "BANK15",
Packit 577717
	  .ucode  = 0xf00,
Packit 577717
	  .udesc  = "Access to Rank 0 -- Bank 15",
Packit 577717
	  .uflags = INTEL_X86_NCOMBO,
Packit 577717
	},
Packit 577717
	{ .uname  = "BANK2",
Packit 577717
	  .ucode  = 0x200,
Packit 577717
	  .udesc  = "Access to Rank 0 -- Bank 2",
Packit 577717
	  .uflags = INTEL_X86_NCOMBO,
Packit 577717
	},
Packit 577717
	{ .uname  = "BANK3",
Packit 577717
	  .ucode  = 0x300,
Packit 577717
	  .udesc  = "Access to Rank 0 -- Bank 3",
Packit 577717
	  .uflags = INTEL_X86_NCOMBO,
Packit 577717
	},
Packit 577717
	{ .uname  = "BANK4",
Packit 577717
	  .ucode  = 0x400,
Packit 577717
	  .udesc  = "Access to Rank 0 -- Bank 4",
Packit 577717
	  .uflags = INTEL_X86_NCOMBO,
Packit 577717
	},
Packit 577717
	{ .uname  = "BANK5",
Packit 577717
	  .ucode  = 0x500,
Packit 577717
	  .udesc  = "Access to Rank 0 -- Bank 5",
Packit 577717
	  .uflags = INTEL_X86_NCOMBO,
Packit 577717
	},
Packit 577717
	{ .uname  = "BANK6",
Packit 577717
	  .ucode  = 0x600,
Packit 577717
	  .udesc  = "Access to Rank 0 -- Bank 6",
Packit 577717
	  .uflags = INTEL_X86_NCOMBO,
Packit 577717
	},
Packit 577717
	{ .uname  = "BANK7",
Packit 577717
	  .ucode  = 0x700,
Packit 577717
	  .udesc  = "Access to Rank 0 -- Bank 7",
Packit 577717
	  .uflags = INTEL_X86_NCOMBO,
Packit 577717
	},
Packit 577717
	{ .uname  = "BANK8",
Packit 577717
	  .ucode  = 0x800,
Packit 577717
	  .udesc  = "Access to Rank 0 -- Bank 8",
Packit 577717
	  .uflags = INTEL_X86_NCOMBO,
Packit 577717
	},
Packit 577717
	{ .uname  = "BANK9",
Packit 577717
	  .ucode  = 0x900,
Packit 577717
	  .udesc  = "Access to Rank 0 -- Bank 9",
Packit 577717
	  .uflags = INTEL_X86_NCOMBO,
Packit 577717
	},
Packit 577717
	{ .uname  = "BANKG0",
Packit 577717
	  .ucode  = 0x1100,
Packit 577717
	  .udesc  = "Access to Rank 0 -- Bank Group 0 (Banks 0-3)",
Packit 577717
	  .uflags = INTEL_X86_NCOMBO,
Packit 577717
	},
Packit 577717
	{ .uname  = "BANKG1",
Packit 577717
	  .ucode  = 0x1200,
Packit 577717
	  .udesc  = "Access to Rank 0 -- Bank Group 1 (Banks 4-7)",
Packit 577717
	  .uflags = INTEL_X86_NCOMBO,
Packit 577717
	},
Packit 577717
	{ .uname  = "BANKG2",
Packit 577717
	  .ucode  = 0x1300,
Packit 577717
	  .udesc  = "Access to Rank 0 -- Bank Group 2 (Banks 8-11)",
Packit 577717
	  .uflags = INTEL_X86_NCOMBO,
Packit 577717
	},
Packit 577717
	{ .uname  = "BANKG3",
Packit 577717
	  .ucode  = 0x1400,
Packit 577717
	  .udesc  = "Access to Rank 0 -- Bank Group 3 (Banks 12-15)",
Packit 577717
	  .uflags = INTEL_X86_NCOMBO,
Packit 577717
	},
Packit 577717
};
Packit 577717
Packit 577717
static intel_x86_umask_t bdx_unc_m_rd_cas_rank2[]={
Packit 577717
	{ .uname  = "BANK0",
Packit 577717
	  .ucode  = 0x0,
Packit 577717
	  .udesc  = "RD_CAS Access to Rank 2 -- Bank 0",
Packit 577717
	  .uflags = INTEL_X86_DFL,
Packit 577717
	},
Packit 577717
};
Packit 577717
Packit 577717
static intel_x86_umask_t bdx_unc_m_vmse_wr_push[]={
Packit 577717
	{ .uname = "RMM",
Packit 577717
	  .ucode = 0x200,
Packit 577717
	  .udesc = "VMSE WR PUSH issued -- VMSE write PUSH issued in RMM",
Packit 577717
	},
Packit 577717
	{ .uname = "WMM",
Packit 577717
	  .ucode = 0x100,
Packit 577717
	  .udesc = "VMSE WR PUSH issued -- VMSE write PUSH issued in WMM",
Packit 577717
	},
Packit 577717
};
Packit 577717
Packit 577717
static intel_x86_umask_t bdx_unc_m_wmm_to_rmm[]={
Packit 577717
	{ .uname = "LOW_THRESH",
Packit 577717
	  .ucode = 0x100,
Packit 577717
	  .udesc = "Transition from WMM to RMM because of low threshold -- Transition from WMM to RMM because of starve counter",
Packit 577717
	},
Packit 577717
	{ .uname = "STARVE",
Packit 577717
	  .ucode = 0x200,
Packit 577717
	  .udesc = "Transition from WMM to RMM because of low threshold -- ",
Packit 577717
	},
Packit 577717
	{ .uname = "VMSE_RETRY",
Packit 577717
	  .ucode = 0x400,
Packit 577717
	  .udesc = "Transition from WMM to RMM because of low threshold -- ",
Packit 577717
	},
Packit 577717
};
Packit 577717
Packit 577717
static intel_x86_entry_t intel_bdx_unc_m_pe[]={
Packit 577717
  { .name   = "UNC_M_CLOCKTICKS",
Packit 577717
    .desc   = "IMC Uncore clockticks (fixed counter)",
Packit 577717
    .modmsk = 0x0,
Packit 577717
    .cntmsk = 0x100000000ull,
Packit 577717
    .code   = 0xff, /* perf pseudo encoding for fixed counter */
Packit 577717
    .flags  = INTEL_X86_FIXED,
Packit 577717
  },
Packit 577717
  { .name   = "UNC_M_ACT_COUNT",
Packit 577717
    .code   = 0x1,
Packit 577717
    .desc   = "Counts the number of DRAM Activate commands sent on this channel.  Activate commands are issued to open up a page on the DRAM devices so that it can be read or written to with a CAS.  One can calculate the number of Page Misses by subtracting the number of Page Miss precharges from the number of Activates.",
Packit 577717
    .modmsk = BDX_UNC_IMC_ATTRS,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
    .ngrp   = 1,
Packit 577717
    .umasks = bdx_unc_m_act_count,
Packit 577717
    .numasks= LIBPFM_ARRAY_SIZE(bdx_unc_m_act_count),
Packit 577717
  },
Packit 577717
  { .name   = "UNC_M_BYP_CMDS",
Packit 577717
    .code   = 0xa1,
Packit 577717
    .desc   = "TBD",
Packit 577717
    .modmsk = BDX_UNC_IMC_ATTRS,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
    .ngrp   = 1,
Packit 577717
    .umasks = bdx_unc_m_byp_cmds,
Packit 577717
    .numasks= LIBPFM_ARRAY_SIZE(bdx_unc_m_byp_cmds),
Packit 577717
  },
Packit 577717
  { .name   = "UNC_M_CAS_COUNT",
Packit 577717
    .code   = 0x4,
Packit 577717
    .desc   = "DRAM RD_CAS and WR_CAS Commands",
Packit 577717
    .modmsk = BDX_UNC_IMC_ATTRS,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
    .ngrp   = 1,
Packit 577717
    .umasks = bdx_unc_m_cas_count,
Packit 577717
    .numasks= LIBPFM_ARRAY_SIZE(bdx_unc_m_cas_count),
Packit 577717
  },
Packit 577717
  { .name   = "UNC_M_DCLOCKTICKS",
Packit 577717
    .code   = 0x0,
Packit 577717
    .desc   = "TBD",
Packit 577717
    .modmsk = BDX_UNC_IMC_ATTRS,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
  },
Packit 577717
  { .name   = "UNC_M_DRAM_PRE_ALL",
Packit 577717
    .code   = 0x6,
Packit 577717
    .desc   = "Counts the number of times that the precharge all command was sent.",
Packit 577717
    .modmsk = BDX_UNC_IMC_ATTRS,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
  },
Packit 577717
  { .name   = "UNC_M_DRAM_REFRESH",
Packit 577717
    .code   = 0x5,
Packit 577717
    .desc   = "Counts the number of refreshes issued.",
Packit 577717
    .modmsk = BDX_UNC_IMC_ATTRS,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
    .ngrp   = 1,
Packit 577717
    .umasks = bdx_unc_m_dram_refresh,
Packit 577717
    .numasks= LIBPFM_ARRAY_SIZE(bdx_unc_m_dram_refresh),
Packit 577717
  },
Packit 577717
  { .name   = "UNC_M_ECC_CORRECTABLE_ERRORS",
Packit 577717
    .code   = 0x9,
Packit 577717
    .desc   = "Counts the number of ECC errors detected and corrected by the iMC on this channel.  This counter is only useful with ECC DRAM devices.  This count will increment one time for each correction regardless of the number of bits corrected.  The iMC can correct up to 4 bit errors in independent channel mode and 8 bit erros in lockstep mode.",
Packit 577717
    .modmsk = BDX_UNC_IMC_ATTRS,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
  },
Packit 577717
  { .name   = "UNC_M_MAJOR_MODES",
Packit 577717
    .code   = 0x7,
Packit 577717
    .desc   = "Counts the total number of cycles spent in a major mode (selected by a filter) on the given channel.   Major modea are channel-wide, and not a per-rank (or dimm or bank) mode.",
Packit 577717
    .modmsk = BDX_UNC_IMC_ATTRS,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
    .ngrp   = 1,
Packit 577717
    .umasks = bdx_unc_m_major_modes,
Packit 577717
    .numasks= LIBPFM_ARRAY_SIZE(bdx_unc_m_major_modes),
Packit 577717
  },
Packit 577717
  { .name   = "UNC_M_POWER_CHANNEL_DLLOFF",
Packit 577717
    .code   = 0x84,
Packit 577717
    .desc   = "Number of cycles when all the ranks in the channel are in CKE Slow (DLLOFF) mode.",
Packit 577717
    .modmsk = BDX_UNC_IMC_ATTRS,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
  },
Packit 577717
  { .name   = "UNC_M_POWER_CHANNEL_PPD",
Packit 577717
    .code   = 0x85,
Packit 577717
    .desc   = "Number of cycles when all the ranks in the channel are in PPD mode.  If IBT=off is enabled, then this can be used to count those cycles.  If it is not enabled, then this can count the number of cycles when that could have been taken advantage of.",
Packit 577717
    .modmsk = BDX_UNC_IMC_ATTRS,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
  },
Packit 577717
  { .name   = "UNC_M_POWER_CKE_CYCLES",
Packit 577717
    .code   = 0x83,
Packit 577717
    .desc   = "Number of cycles spent in CKE ON mode.  The filter allows you to select a rank to monitor.  If multiple ranks are in CKE ON mode at one time, the counter will ONLY increment by one rather than doing accumulation.  Multiple counters will need to be used to track multiple ranks simultaneously.  There is no distinction between the different CKE modes (APD, PPDS, PPDF).  This can be determined based on the system programming.  These events should commonly be used with Invert to get the number of cycles in power saving mode.  Edge Detect is also useful here.  Make sure that you do NOT use Invert with Edge Detect (this just confuses the system and is not necessary).",
Packit 577717
    .modmsk = BDX_UNC_IMC_ATTRS,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
    .ngrp   = 1,
Packit 577717
    .umasks = bdx_unc_m_power_cke_cycles,
Packit 577717
    .numasks= LIBPFM_ARRAY_SIZE(bdx_unc_m_power_cke_cycles),
Packit 577717
  },
Packit 577717
  { .name   = "UNC_M_POWER_CRITICAL_THROTTLE_CYCLES",
Packit 577717
    .code   = 0x86,
Packit 577717
    .desc   = "Counts the number of cycles when the iMC is in critical thermal throttling.  When this happens, all traffic is blocked.  This should be rare unless something bad is going on in the platform.  There is no filtering by rank for this event.",
Packit 577717
    .modmsk = BDX_UNC_IMC_ATTRS,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
  },
Packit 577717
  { .name   = "UNC_M_POWER_PCU_THROTTLING",
Packit 577717
    .code   = 0x42,
Packit 577717
    .desc   = "TBD",
Packit 577717
    .modmsk = BDX_UNC_IMC_ATTRS,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
  },
Packit 577717
  { .name   = "UNC_M_POWER_SELF_REFRESH",
Packit 577717
    .code   = 0x43,
Packit 577717
    .desc   = "Counts the number of cycles when the iMC is in self-refresh and the iMC still has a clock.  This happens in some package C-states.  For example, the PCU may ask the iMC to enter self-refresh even though some of the cores are still processing.  One use of this is for Monroe technology.  Self-refresh is required during package C3 and C6, but there is no clock in the iMC at this time, so it is not possible to count these cases.",
Packit 577717
    .modmsk = BDX_UNC_IMC_ATTRS,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
  },
Packit 577717
  { .name   = "UNC_M_POWER_THROTTLE_CYCLES",
Packit 577717
    .code   = 0x41,
Packit 577717
    .desc   = "Counts the number of cycles while the iMC is being throttled by either thermal constraints or by the PCU throttling.  It is not possible to distinguish between the two.  This can be filtered by rank.  If multiple ranks are selected and are being throttled at the same time, the counter will only increment by 1.",
Packit 577717
    .modmsk = BDX_UNC_IMC_ATTRS,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
    .ngrp   = 1,
Packit 577717
    .umasks = bdx_unc_m_power_throttle_cycles,
Packit 577717
    .numasks= LIBPFM_ARRAY_SIZE(bdx_unc_m_power_throttle_cycles),
Packit 577717
  },
Packit 577717
  { .name   = "UNC_M_PREEMPTION",
Packit 577717
    .code   = 0x8,
Packit 577717
    .desc   = "Counts the number of times a read in the iMC preempts another read or write.  Generally reads to an open page are issued ahead of requests to closed pages.  This improves the page hit rate of the system.  However, high priority requests can cause pages of active requests to be closed in order to get them out.  This will reduce the latency of the high-priority request at the expense of lower bandwidth and increased overall average latency.",
Packit 577717
    .modmsk = BDX_UNC_IMC_ATTRS,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
    .ngrp   = 1,
Packit 577717
    .umasks = bdx_unc_m_preemption,
Packit 577717
    .numasks= LIBPFM_ARRAY_SIZE(bdx_unc_m_preemption),
Packit 577717
  },
Packit 577717
  { .name   = "UNC_M_PRE_COUNT",
Packit 577717
    .code   = 0x2,
Packit 577717
    .desc   = "Counts the number of DRAM Precharge commands sent on this channel.",
Packit 577717
    .modmsk = BDX_UNC_IMC_ATTRS,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
    .ngrp   = 1,
Packit 577717
    .umasks = bdx_unc_m_pre_count,
Packit 577717
    .numasks= LIBPFM_ARRAY_SIZE(bdx_unc_m_pre_count),
Packit 577717
  },
Packit 577717
  { .name   = "UNC_M_RD_CAS_PRIO",
Packit 577717
    .code   = 0xa0,
Packit 577717
    .desc   = "TBD",
Packit 577717
    .modmsk = BDX_UNC_IMC_ATTRS,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
    .ngrp   = 1,
Packit 577717
    .umasks = bdx_unc_m_rd_cas_prio,
Packit 577717
    .numasks= LIBPFM_ARRAY_SIZE(bdx_unc_m_rd_cas_prio),
Packit 577717
  },
Packit 577717
  { .name   = "UNC_M_RD_CAS_RANK0",
Packit 577717
    .code   = 0xb0,
Packit 577717
    .desc   = "TBD",
Packit 577717
    .modmsk = BDX_UNC_IMC_ATTRS,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
    .ngrp   = 1,
Packit 577717
    .umasks = bdx_unc_m_rd_cas_rank0,
Packit 577717
    .numasks= LIBPFM_ARRAY_SIZE(bdx_unc_m_rd_cas_rank0),
Packit 577717
  },
Packit 577717
  { .name   = "UNC_M_RD_CAS_RANK1",
Packit 577717
    .code   = 0xb1,
Packit 577717
    .desc   = "TBD",
Packit 577717
    .modmsk = BDX_UNC_IMC_ATTRS,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
    .ngrp   = 1,
Packit 577717
    .umasks = bdx_unc_m_rd_cas_rank0,
Packit 577717
    .numasks= LIBPFM_ARRAY_SIZE(bdx_unc_m_rd_cas_rank0), /* shared */
Packit 577717
  },
Packit 577717
  { .name   = "UNC_M_RD_CAS_RANK2",
Packit 577717
    .code   = 0xb2,
Packit 577717
    .desc   = "TBD",
Packit 577717
    .modmsk = BDX_UNC_IMC_ATTRS,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
    .ngrp   = 1,
Packit 577717
    .umasks = bdx_unc_m_rd_cas_rank2,
Packit 577717
    .numasks= LIBPFM_ARRAY_SIZE(bdx_unc_m_rd_cas_rank2),
Packit 577717
  },
Packit 577717
  { .name   = "UNC_M_RD_CAS_RANK4",
Packit 577717
    .code   = 0xb4,
Packit 577717
    .desc   = "TBD",
Packit 577717
    .modmsk = BDX_UNC_IMC_ATTRS,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
    .ngrp   = 1,
Packit 577717
    .umasks = bdx_unc_m_rd_cas_rank0,
Packit 577717
    .numasks= LIBPFM_ARRAY_SIZE(bdx_unc_m_rd_cas_rank0), /* shared */
Packit 577717
  },
Packit 577717
  { .name   = "UNC_M_RD_CAS_RANK5",
Packit 577717
    .code   = 0xb5,
Packit 577717
    .desc   = "TBD",
Packit 577717
    .modmsk = BDX_UNC_IMC_ATTRS,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
    .ngrp   = 1,
Packit 577717
    .umasks = bdx_unc_m_rd_cas_rank0,
Packit 577717
    .numasks= LIBPFM_ARRAY_SIZE(bdx_unc_m_rd_cas_rank0), /* shared */
Packit 577717
  },
Packit 577717
  { .name   = "UNC_M_RD_CAS_RANK6",
Packit 577717
    .code   = 0xb6,
Packit 577717
    .desc   = "TBD",
Packit 577717
    .modmsk = BDX_UNC_IMC_ATTRS,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
    .ngrp   = 1,
Packit 577717
    .umasks = bdx_unc_m_rd_cas_rank0,
Packit 577717
    .numasks= LIBPFM_ARRAY_SIZE(bdx_unc_m_rd_cas_rank0), /* shared */
Packit 577717
  },
Packit 577717
  { .name   = "UNC_M_RD_CAS_RANK7",
Packit 577717
    .code   = 0xb7,
Packit 577717
    .desc   = "TBD",
Packit 577717
    .modmsk = BDX_UNC_IMC_ATTRS,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
    .ngrp   = 1,
Packit 577717
    .umasks = bdx_unc_m_rd_cas_rank0,
Packit 577717
    .numasks= LIBPFM_ARRAY_SIZE(bdx_unc_m_rd_cas_rank0), /* shared */
Packit 577717
  },
Packit 577717
  { .name   = "UNC_M_RPQ_CYCLES_NE",
Packit 577717
    .code   = 0x11,
Packit 577717
    .desc   = "Counts the number of cycles that the Read Pending Queue is not empty.  This can then be used to calculate the average occupancy (in conjunction with the Read Pending Queue Occupancy count).  The RPQ is used to schedule reads out to the memory controller and to track the requests.  Requests allocate into the RPQ soon after they enter the memory controller, and need credits for an entry in this buffer before being sent from the HA to the iMC.  They deallocate after the CAS command has been issued to memory.  This filter is to be used in conjunction with the occupancy filter so that one can correctly track the average occupancies for schedulable entries and scheduled requests.",
Packit 577717
    .modmsk = BDX_UNC_IMC_ATTRS,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
  },
Packit 577717
  { .name   = "UNC_M_RPQ_INSERTS",
Packit 577717
    .code   = 0x10,
Packit 577717
    .desc   = "Counts the number of allocations into the Read Pending Queue.  This queue is used to schedule reads out to the memory controller and to track the requests.  Requests allocate into the RPQ soon after they enter the memory controller, and need credits for an entry in this buffer before being sent from the HA to the iMC.  They deallocate after the CAS command has been issued to memory.  This includes both ISOCH and non-ISOCH requests.",
Packit 577717
    .modmsk = BDX_UNC_IMC_ATTRS,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
  },
Packit 577717
  { .name   = "UNC_M_VMSE_MXB_WR_OCCUPANCY",
Packit 577717
    .code   = 0x91,
Packit 577717
    .desc   = "TBD",
Packit 577717
    .modmsk = BDX_UNC_IMC_ATTRS,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
  },
Packit 577717
  { .name   = "UNC_M_VMSE_WR_PUSH",
Packit 577717
    .code   = 0x90,
Packit 577717
    .desc   = "TBD",
Packit 577717
    .modmsk = BDX_UNC_IMC_ATTRS,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
    .ngrp   = 1,
Packit 577717
    .umasks = bdx_unc_m_vmse_wr_push,
Packit 577717
    .numasks= LIBPFM_ARRAY_SIZE(bdx_unc_m_vmse_wr_push),
Packit 577717
  },
Packit 577717
  { .name   = "UNC_M_WMM_TO_RMM",
Packit 577717
    .code   = 0xc0,
Packit 577717
    .desc   = "TBD",
Packit 577717
    .modmsk = BDX_UNC_IMC_ATTRS,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
    .ngrp   = 1,
Packit 577717
    .umasks = bdx_unc_m_wmm_to_rmm,
Packit 577717
    .numasks= LIBPFM_ARRAY_SIZE(bdx_unc_m_wmm_to_rmm),
Packit 577717
  },
Packit 577717
  { .name   = "UNC_M_WPQ_CYCLES_FULL",
Packit 577717
    .code   = 0x22,
Packit 577717
    .desc   = "Counts the number of cycles when the Write Pending Queue is full.  When the WPQ is full, the HA will not be able to issue any additional read requests into the iMC.  This count should be similar count in the HA which tracks the number of cycles that the HA has no WPQ credits, just somewhat smaller to account for the credit return overhead.",
Packit 577717
    .modmsk = BDX_UNC_IMC_ATTRS,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
  },
Packit 577717
  { .name   = "UNC_M_WPQ_CYCLES_NE",
Packit 577717
    .code   = 0x21,
Packit 577717
    .desc   = "Counts the number of cycles that the Write Pending Queue is not empty.  This can then be used to calculate the average queue occupancy (in conjunction with the WPQ Occupancy Accumulation count).  The WPQ is used to schedule write out to the memory controller and to track the writes.  Requests allocate into the WPQ soon after they enter the memory controller, and need credits for an entry in this buffer before being sent from the HA to the iMC.  They deallocate after being issued to DRAM.  Write requests themselves are able to complete (from the perspective of the rest of the system) as soon they have posted to the iMC.  This is not to be confused with actually performing the write to DRAM.  Therefore, the average latency for this queue is actually not useful for deconstruction intermediate write latencieies.",
Packit 577717
    .modmsk = BDX_UNC_IMC_ATTRS,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
  },
Packit 577717
  { .name   = "UNC_M_WPQ_READ_HIT",
Packit 577717
    .code   = 0x23,
Packit 577717
    .desc   = "Counts the number of times a request hits in the WPQ (write-pending queue).  The iMC allows writes and reads to pass up other writes to different addresses.  Before a read or a write is issued, it will first CAM the WPQ to see if there is a write pending to that address.  When reads hit, they are able to directly pull their data from the WPQ instead of going to memory.  Writes that hit will overwrite the existing data.  Partial writes that hit will not need to do underfill reads and will simply update their relevant sections.",
Packit 577717
    .modmsk = BDX_UNC_IMC_ATTRS,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
  },
Packit 577717
  { .name   = "UNC_M_WPQ_WRITE_HIT",
Packit 577717
    .code   = 0x24,
Packit 577717
    .desc   = "Counts the number of times a request hits in the WPQ (write-pending queue).  The iMC allows writes and reads to pass up other writes to different addresses.  Before a read or a write is issued, it will first CAM the WPQ to see if there is a write pending to that address.  When reads hit, they are able to directly pull their data from the WPQ instead of going to memory.  Writes that hit will overwrite the existing data.  Partial writes that hit will not need to do underfill reads and will simply update their relevant sections.",
Packit 577717
    .modmsk = BDX_UNC_IMC_ATTRS,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
  },
Packit 577717
  { .name   = "UNC_M_WRONG_MM",
Packit 577717
    .code   = 0xc1,
Packit 577717
    .desc   = "TBD",
Packit 577717
    .modmsk = BDX_UNC_IMC_ATTRS,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
  },
Packit 577717
  { .name   = "UNC_M_WR_CAS_RANK0",
Packit 577717
    .code   = 0xb8,
Packit 577717
    .desc   = "TBD",
Packit 577717
    .modmsk = BDX_UNC_IMC_ATTRS,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
    .ngrp   = 1,
Packit 577717
    .umasks = bdx_unc_m_rd_cas_rank0,
Packit 577717
    .numasks= LIBPFM_ARRAY_SIZE(bdx_unc_m_rd_cas_rank0),
Packit 577717
  },
Packit 577717
  { .name   = "UNC_M_WR_CAS_RANK1",
Packit 577717
    .code   = 0xb9,
Packit 577717
    .desc   = "TBD",
Packit 577717
    .modmsk = BDX_UNC_IMC_ATTRS,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
    .ngrp   = 1,
Packit 577717
    .umasks = bdx_unc_m_rd_cas_rank0,
Packit 577717
    .numasks= LIBPFM_ARRAY_SIZE(bdx_unc_m_rd_cas_rank0), /* shared */
Packit 577717
  },
Packit 577717
  { .name   = "UNC_M_WR_CAS_RANK4",
Packit 577717
    .code   = 0xbc,
Packit 577717
    .desc   = "TBD",
Packit 577717
    .modmsk = BDX_UNC_IMC_ATTRS,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
    .ngrp   = 1,
Packit 577717
    .umasks = bdx_unc_m_rd_cas_rank0,
Packit 577717
    .numasks= LIBPFM_ARRAY_SIZE(bdx_unc_m_rd_cas_rank0), /* shared */
Packit 577717
  },
Packit 577717
  { .name   = "UNC_M_WR_CAS_RANK5",
Packit 577717
    .code   = 0xbd,
Packit 577717
    .desc   = "TBD",
Packit 577717
    .modmsk = BDX_UNC_IMC_ATTRS,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
    .ngrp   = 1,
Packit 577717
    .umasks = bdx_unc_m_rd_cas_rank0,
Packit 577717
    .numasks= LIBPFM_ARRAY_SIZE(bdx_unc_m_rd_cas_rank0), /* shared */
Packit 577717
  },
Packit 577717
  { .name   = "UNC_M_WR_CAS_RANK6",
Packit 577717
    .code   = 0xbe,
Packit 577717
    .desc   = "TBD",
Packit 577717
    .modmsk = BDX_UNC_IMC_ATTRS,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
    .ngrp   = 1,
Packit 577717
    .umasks = bdx_unc_m_rd_cas_rank0,
Packit 577717
    .numasks= LIBPFM_ARRAY_SIZE(bdx_unc_m_rd_cas_rank0), /* shared */
Packit 577717
  },
Packit 577717
  { .name   = "UNC_M_WR_CAS_RANK7",
Packit 577717
    .code   = 0xbf,
Packit 577717
    .desc   = "TBD",
Packit 577717
    .modmsk = BDX_UNC_IMC_ATTRS,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
    .ngrp   = 1,
Packit 577717
    .umasks = bdx_unc_m_rd_cas_rank0,
Packit 577717
    .numasks= LIBPFM_ARRAY_SIZE(bdx_unc_m_rd_cas_rank0), /* shared */
Packit 577717
  },
Packit 577717
};
Packit 577717