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

Packit 577717
/*
Packit 577717
 * Copyright (c) 2012 Google, Inc
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: snbep_unc_imc (Intel SandyBridge-EP IMC uncore PMU)
Packit 577717
 */
Packit 577717
Packit 577717
static const intel_x86_umask_t snbep_unc_m_cas_count[]={
Packit 577717
  { .uname = "ALL",
Packit 577717
    .udesc  = "Counts total number of DRAM CAS commands issued on this channel",
Packit 577717
    .ucode  = 0xf00,
Packit 577717
    .uflags = INTEL_X86_NCOMBO | INTEL_X86_DFL,
Packit 577717
  },
Packit 577717
  { .uname = "RD",
Packit 577717
    .udesc  = "Counts all DRAM reads on this channel, incl. underfills",
Packit 577717
    .ucode  = 0x300,
Packit 577717
    .uflags = INTEL_X86_NCOMBO,
Packit 577717
  },
Packit 577717
  { .uname = "RD_REG",
Packit 577717
    .udesc  = "Counts number of DRAM read CAS commands issued on this channel, incl. regular read CAS and those with implicit precharge",
Packit 577717
    .ucode  = 0x100,
Packit 577717
    .uflags = INTEL_X86_NCOMBO,
Packit 577717
  },
Packit 577717
  { .uname = "RD_UNDERFILL",
Packit 577717
    .udesc  = "Counts number of underfill reads issued by the memory controller",
Packit 577717
    .ucode  = 0x200,
Packit 577717
    .uflags = INTEL_X86_NCOMBO,
Packit 577717
  },
Packit 577717
  { .uname = "WR",
Packit 577717
    .udesc  = "Counts number of DRAM write CAS commands on this channel",
Packit 577717
    .ucode  = 0xc00,
Packit 577717
    .uflags = INTEL_X86_NCOMBO,
Packit 577717
  },
Packit 577717
  { .uname = "WR_RMM",
Packit 577717
    .udesc  = "Counts Number of opportunistic DRAM write CAS commands issued on this channel",
Packit 577717
    .ucode  = 0x800,
Packit 577717
    .uflags = INTEL_X86_NCOMBO,
Packit 577717
  },
Packit 577717
  { .uname = "WR_WMM",
Packit 577717
    .udesc  = "Counts number of DRAM write CAS commands issued on this channel while in Write-Major mode",
Packit 577717
    .ucode  = 0x400,
Packit 577717
    .uflags = INTEL_X86_NCOMBO,
Packit 577717
  },
Packit 577717
};
Packit 577717
Packit 577717
static const intel_x86_umask_t snbep_unc_m_dram_refresh[]={
Packit 577717
  { .uname = "HIGH",
Packit 577717
    .udesc  = "TBD",
Packit 577717
    .ucode  = 0x400,
Packit 577717
    .uflags = INTEL_X86_NCOMBO,
Packit 577717
  },
Packit 577717
  { .uname = "PANIC",
Packit 577717
    .udesc  = "TBD",
Packit 577717
    .ucode  = 0x200,
Packit 577717
    .uflags = INTEL_X86_NCOMBO,
Packit 577717
  },
Packit 577717
};
Packit 577717
Packit 577717
static const intel_x86_umask_t snbep_unc_m_major_modes[]={
Packit 577717
  { .uname = "ISOCH",
Packit 577717
    .udesc  = "Counts cycles in ISOCH Major mode",
Packit 577717
    .ucode  = 0x800,
Packit 577717
    .uflags = INTEL_X86_NCOMBO,
Packit 577717
  },
Packit 577717
  { .uname = "PARTIAL",
Packit 577717
    .udesc  = "Counts cycles in Partial Major mode",
Packit 577717
    .ucode  = 0x400,
Packit 577717
    .uflags = INTEL_X86_NCOMBO,
Packit 577717
  },
Packit 577717
  { .uname = "READ",
Packit 577717
    .udesc  = "Counts cycles in Read Major mode",
Packit 577717
    .ucode  = 0x100,
Packit 577717
    .uflags = INTEL_X86_NCOMBO,
Packit 577717
  },
Packit 577717
  { .uname = "WRITE",
Packit 577717
    .udesc  = "Counts cycles in Write Major mode",
Packit 577717
    .ucode  = 0x200,
Packit 577717
    .uflags = INTEL_X86_NCOMBO,
Packit 577717
  },
Packit 577717
};
Packit 577717
Packit 577717
static const intel_x86_umask_t snbep_unc_m_power_cke_cycles[]={
Packit 577717
  { .uname = "RANK0",
Packit 577717
    .udesc  = "Count cycles for rank 0",
Packit 577717
    .ucode  = 0x100,
Packit 577717
    .uflags = INTEL_X86_NCOMBO,
Packit 577717
  },
Packit 577717
  { .uname = "RANK1",
Packit 577717
    .udesc  = "Count cycles for rank 1",
Packit 577717
    .ucode  = 0x200,
Packit 577717
    .uflags = INTEL_X86_NCOMBO,
Packit 577717
  },
Packit 577717
  { .uname = "RANK2",
Packit 577717
    .udesc  = "Count cycles for rank 2",
Packit 577717
    .ucode  = 0x400,
Packit 577717
    .uflags = INTEL_X86_NCOMBO,
Packit 577717
  },
Packit 577717
  { .uname = "RANK3",
Packit 577717
    .udesc  = "Count cycles for rank 3",
Packit 577717
    .ucode  = 0x800,
Packit 577717
    .uflags = INTEL_X86_NCOMBO,
Packit 577717
  },
Packit 577717
  { .uname = "RANK4",
Packit 577717
    .udesc  = "Count cycles for rank 4",
Packit 577717
    .ucode  = 0x1000,
Packit 577717
    .uflags = INTEL_X86_NCOMBO,
Packit 577717
  },
Packit 577717
  { .uname = "RANK5",
Packit 577717
    .udesc  = "Count cycles for rank 5",
Packit 577717
    .ucode  = 0x2000,
Packit 577717
    .uflags = INTEL_X86_NCOMBO,
Packit 577717
  },
Packit 577717
  { .uname = "RANK6",
Packit 577717
    .udesc  = "Count cycles for rank 6",
Packit 577717
    .ucode  = 0x4000,
Packit 577717
    .uflags = INTEL_X86_NCOMBO,
Packit 577717
  },
Packit 577717
  { .uname = "RANK7",
Packit 577717
    .udesc  = "Count cycles for rank 7",
Packit 577717
    .ucode  = 0x8000,
Packit 577717
    .uflags = INTEL_X86_NCOMBO,
Packit 577717
  },
Packit 577717
};
Packit 577717
Packit 577717
static const intel_x86_umask_t snbep_unc_m_preemption[]={
Packit 577717
  { .uname = "RD_PREEMPT_RD",
Packit 577717
    .udesc  = "Counts read over read preemptions",
Packit 577717
    .ucode  = 0x100,
Packit 577717
    .uflags = INTEL_X86_NCOMBO,
Packit 577717
  },
Packit 577717
  { .uname = "RD_PREEMPT_WR",
Packit 577717
    .udesc  = "Counts read over write preemptions",
Packit 577717
    .ucode  = 0x200,
Packit 577717
    .uflags = INTEL_X86_NCOMBO,
Packit 577717
  },
Packit 577717
};
Packit 577717
Packit 577717
static const intel_x86_umask_t snbep_unc_m_pre_count[]={
Packit 577717
  { .uname = "PAGE_CLOSE",
Packit 577717
    .udesc  = "Counts number of DRAM precharge commands sent on this channel as a result of the page close counter expiring",
Packit 577717
    .ucode  = 0x200,
Packit 577717
    .uflags = INTEL_X86_NCOMBO,
Packit 577717
  },
Packit 577717
  { .uname = "PAGE_MISS",
Packit 577717
    .udesc  = "Counts number of DRAM precharge commands sent on this channel as a result of page misses",
Packit 577717
    .ucode  = 0x100,
Packit 577717
    .uflags = INTEL_X86_NCOMBO,
Packit 577717
  },
Packit 577717
};
Packit 577717
Packit 577717
static const intel_x86_entry_t intel_snbep_unc_m_pe[]={
Packit 577717
  { .name   = "UNC_M_CLOCKTICKS",
Packit 577717
    .desc   = "IMC Uncore clockticks",
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
    .desc = "DRAM Activate Count",
Packit 577717
    .code = 0x1,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
    .modmsk = SNBEP_UNC_IMC_ATTRS,
Packit 577717
  },
Packit 577717
  { .name = "UNC_M_CAS_COUNT",
Packit 577717
    .desc = "DRAM RD_CAS and WR_CAS Commands.",
Packit 577717
    .code = 0x4,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
    .ngrp = 1,
Packit 577717
    .modmsk = SNBEP_UNC_IMC_ATTRS,
Packit 577717
    .numasks = LIBPFM_ARRAY_SIZE(snbep_unc_m_cas_count),
Packit 577717
    .umasks  = snbep_unc_m_cas_count
Packit 577717
  },
Packit 577717
  { .name = "UNC_M_DRAM_PRE_ALL",
Packit 577717
    .desc = "DRAM Precharge All Commands",
Packit 577717
    .code = 0x6,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
    .modmsk = SNBEP_UNC_IMC_ATTRS,
Packit 577717
  },
Packit 577717
  { .name = "UNC_M_DRAM_REFRESH",
Packit 577717
    .desc = "Number of DRAM Refreshes Issued",
Packit 577717
    .code = 0x5,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
    .ngrp = 1,
Packit 577717
    .modmsk = SNBEP_UNC_IMC_ATTRS,
Packit 577717
    .numasks = LIBPFM_ARRAY_SIZE(snbep_unc_m_dram_refresh),
Packit 577717
    .umasks  = snbep_unc_m_dram_refresh
Packit 577717
  },
Packit 577717
  { .name = "UNC_M_ECC_CORRECTABLE_ERRORS",
Packit 577717
    .desc = "ECC Correctable Errors",
Packit 577717
    .code = 0x9,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
    .modmsk = SNBEP_UNC_IMC_ATTRS,
Packit 577717
  },
Packit 577717
  { .name = "UNC_M_MAJOR_MODES",
Packit 577717
    .desc = "Cycles in a Major Mode",
Packit 577717
    .code = 0x7,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
    .ngrp = 1,
Packit 577717
    .modmsk = SNBEP_UNC_IMC_ATTRS,
Packit 577717
    .numasks = LIBPFM_ARRAY_SIZE(snbep_unc_m_major_modes),
Packit 577717
    .umasks  = snbep_unc_m_major_modes
Packit 577717
  },
Packit 577717
  { .name = "UNC_M_POWER_CHANNEL_DLLOFF",
Packit 577717
    .desc = "Channel DLLOFF Cycles",
Packit 577717
    .code = 0x84,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
    .modmsk = SNBEP_UNC_IMC_ATTRS,
Packit 577717
  },
Packit 577717
  { .name = "UNC_M_POWER_CHANNEL_PPD",
Packit 577717
    .desc = "Channel PPD Cycles",
Packit 577717
    .code = 0x85,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
    .modmsk = SNBEP_UNC_IMC_ATTRS,
Packit 577717
  },
Packit 577717
  { .name = "UNC_M_POWER_CKE_CYCLES",
Packit 577717
    .desc = "CKE_ON_CYCLES by Rank",
Packit 577717
    .code = 0x83,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
    .ngrp = 1,
Packit 577717
    .modmsk = SNBEP_UNC_IMC_ATTRS,
Packit 577717
    .numasks = LIBPFM_ARRAY_SIZE(snbep_unc_m_power_cke_cycles),
Packit 577717
    .umasks  = snbep_unc_m_power_cke_cycles
Packit 577717
  },
Packit 577717
  { .name = "UNC_M_POWER_CRITICAL_THROTTLE_CYCLES",
Packit 577717
    .desc = "Critical Throttle Cycles",
Packit 577717
    .code = 0x86,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
    .modmsk = SNBEP_UNC_IMC_ATTRS,
Packit 577717
  },
Packit 577717
  { .name = "UNC_M_POWER_SELF_REFRESH",
Packit 577717
    .desc = "Clock-Enabled Self-Refresh",
Packit 577717
    .code = 0x43,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
    .modmsk = SNBEP_UNC_IMC_ATTRS,
Packit 577717
  },
Packit 577717
  { .name = "UNC_M_POWER_THROTTLE_CYCLES",
Packit 577717
    .desc = "Throttle Cycles for Rank 0",
Packit 577717
    .code = 0x41,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
    .ngrp = 1,
Packit 577717
    .modmsk = SNBEP_UNC_IMC_ATTRS,
Packit 577717
    .numasks = LIBPFM_ARRAY_SIZE(snbep_unc_m_power_cke_cycles),
Packit 577717
    .umasks  = snbep_unc_m_power_cke_cycles /* identical to snbep_unc_m_power_cke_cycles */
Packit 577717
  },
Packit 577717
  { .name = "UNC_M_PREEMPTION",
Packit 577717
    .desc = "Read Preemption Count",
Packit 577717
    .code = 0x8,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
    .ngrp = 1,
Packit 577717
    .modmsk = SNBEP_UNC_IMC_ATTRS,
Packit 577717
    .numasks = LIBPFM_ARRAY_SIZE(snbep_unc_m_preemption),
Packit 577717
    .umasks  = snbep_unc_m_preemption
Packit 577717
  },
Packit 577717
  { .name = "UNC_M_PRE_COUNT",
Packit 577717
    .desc = "DRAM Precharge commands.",
Packit 577717
    .code = 0x2,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
    .ngrp = 1,
Packit 577717
    .modmsk = SNBEP_UNC_IMC_ATTRS,
Packit 577717
    .numasks = LIBPFM_ARRAY_SIZE(snbep_unc_m_pre_count),
Packit 577717
    .umasks  = snbep_unc_m_pre_count
Packit 577717
  },
Packit 577717
  { .name = "UNC_M_RPQ_CYCLES_FULL",
Packit 577717
    .desc = "Read Pending Queue Full Cycles",
Packit 577717
    .code = 0x12,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
    .modmsk = SNBEP_UNC_IMC_ATTRS,
Packit 577717
  },
Packit 577717
  { .name = "UNC_M_RPQ_CYCLES_NE",
Packit 577717
    .desc = "Read Pending Queue Not Empty",
Packit 577717
    .code = 0x11,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
    .modmsk = SNBEP_UNC_IMC_ATTRS,
Packit 577717
  },
Packit 577717
  { .name = "UNC_M_RPQ_INSERTS",
Packit 577717
    .desc = "Read Pending Queue Allocations",
Packit 577717
    .code = 0x10,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
    .modmsk = SNBEP_UNC_IMC_ATTRS,
Packit 577717
  },
Packit 577717
  { .name = "UNC_M_RPQ_OCCUPANCY",
Packit 577717
    .desc = "Read Pending Queue Occupancy",
Packit 577717
    .code = 0x80,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
    .modmsk = SNBEP_UNC_IMC_ATTRS,
Packit 577717
  },
Packit 577717
  { .name = "UNC_M_WPQ_CYCLES_FULL",
Packit 577717
    .desc = "Write Pending Queue Full Cycles",
Packit 577717
    .code = 0x22,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
    .modmsk = SNBEP_UNC_IMC_ATTRS,
Packit 577717
  },
Packit 577717
  { .name = "UNC_M_WPQ_CYCLES_NE",
Packit 577717
    .desc = "Write Pending Queue Not Empty",
Packit 577717
    .code = 0x21,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
    .modmsk = SNBEP_UNC_IMC_ATTRS,
Packit 577717
  },
Packit 577717
  { .name = "UNC_M_WPQ_INSERTS",
Packit 577717
    .desc = "Write Pending Queue Allocations",
Packit 577717
    .code = 0x20,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
    .modmsk = SNBEP_UNC_IMC_ATTRS,
Packit 577717
  },
Packit 577717
  { .name = "UNC_M_WPQ_OCCUPANCY",
Packit 577717
    .desc = "Write Pending Queue Occupancy",
Packit 577717
    .code = 0x81,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
    .modmsk = SNBEP_UNC_IMC_ATTRS,
Packit 577717
  },
Packit 577717
  { .name = "UNC_M_WPQ_READ_HIT",
Packit 577717
    .desc = "Write Pending Queue CAM Match",
Packit 577717
    .code = 0x23,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
    .modmsk = SNBEP_UNC_IMC_ATTRS,
Packit 577717
  },
Packit 577717
  { .name = "UNC_M_WPQ_WRITE_HIT",
Packit 577717
    .desc = "Write Pending Queue CAM Match",
Packit 577717
    .code = 0x24,
Packit 577717
    .cntmsk = 0xf,
Packit 577717
    .modmsk = SNBEP_UNC_IMC_ATTRS,
Packit 577717
  },
Packit 577717
};