|
Packit |
577717 |
/*
|
|
Packit |
577717 |
* pfmlib_sicortex.c : support for the generic MIPS64 PMU family
|
|
Packit |
577717 |
*
|
|
Packit |
577717 |
* Contributed by Philip Mucci <mucci@cs.utk.edu> based on code from
|
|
Packit |
577717 |
* Copyright (c) 2005-2006 Hewlett-Packard Development Company, L.P.
|
|
Packit |
577717 |
* Contributed by Stephane Eranian <eranian@hpl.hp.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 |
#include <sys/types.h>
|
|
Packit |
577717 |
#include <ctype.h>
|
|
Packit |
577717 |
#include <string.h>
|
|
Packit |
577717 |
#include <stdio.h>
|
|
Packit |
577717 |
#include <unistd.h>
|
|
Packit |
577717 |
#include <sys/types.h>
|
|
Packit |
577717 |
#include <sys/stat.h>
|
|
Packit |
577717 |
#include <fcntl.h>
|
|
Packit |
577717 |
#include <malloc.h>
|
|
Packit |
577717 |
|
|
Packit |
577717 |
/* public headers */
|
|
Packit |
577717 |
#include <perfmon/pfmlib_gen_mips64.h>
|
|
Packit |
577717 |
#include <perfmon/pfmlib_sicortex.h>
|
|
Packit |
577717 |
|
|
Packit |
577717 |
/* private headers */
|
|
Packit |
577717 |
#include "pfmlib_priv.h" /* library private */
|
|
Packit |
577717 |
#include "pfmlib_sicortex_priv.h" /* architecture private */
|
|
Packit |
577717 |
#include "sicortex/ice9a/ice9a_all_spec_pme.h"
|
|
Packit |
577717 |
#include "sicortex/ice9b/ice9b_all_spec_pme.h"
|
|
Packit |
577717 |
#include "sicortex/ice9/ice9_scb_spec_sw.h"
|
|
Packit |
577717 |
|
|
Packit |
577717 |
/* let's define some handy shortcuts! */
|
|
Packit |
577717 |
#define sel_event_mask perfsel.sel_event_mask
|
|
Packit |
577717 |
#define sel_exl perfsel.sel_exl
|
|
Packit |
577717 |
#define sel_os perfsel.sel_os
|
|
Packit |
577717 |
#define sel_usr perfsel.sel_usr
|
|
Packit |
577717 |
#define sel_sup perfsel.sel_sup
|
|
Packit |
577717 |
#define sel_int perfsel.sel_int
|
|
Packit |
577717 |
|
|
Packit |
577717 |
static pme_sicortex_entry_t *sicortex_pe = NULL;
|
|
Packit |
577717 |
|
|
Packit |
577717 |
// CHANGE FOR ICET
|
|
Packit |
577717 |
#define core_counters 2
|
|
Packit |
577717 |
|
|
Packit |
577717 |
#define MAX_ICE9_PMCS 2+4+256
|
|
Packit |
577717 |
#define MAX_ICE9_PMDS 2+4+256
|
|
Packit |
577717 |
|
|
Packit |
577717 |
static int compute_ice9_counters(int type)
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
int i;
|
|
Packit |
577717 |
int bound = 0;
|
|
Packit |
577717 |
pme_gen_mips64_entry_t *gen_mips64_pe = NULL;
|
|
Packit |
577717 |
|
|
Packit |
577717 |
sicortex_support.pmd_count = 0;
|
|
Packit |
577717 |
sicortex_support.pmc_count = 0;
|
|
Packit |
577717 |
for (i=0;i
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
char tmp[1024];
|
|
Packit |
577717 |
sprintf(tmp,"/sys/kernel/perfmon/pmu_desc/pmd%d",i);
|
|
Packit |
577717 |
if (access(tmp,F_OK) == 0)
|
|
Packit |
577717 |
sicortex_support.pmd_count++;
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
for (i=0;i
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
char tmp[1024];
|
|
Packit |
577717 |
sprintf(tmp,"/sys/kernel/perfmon/pmu_desc/pmc%d",i);
|
|
Packit |
577717 |
if (access(tmp,F_OK) == 0)
|
|
Packit |
577717 |
sicortex_support.pmc_count++;
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
|
|
Packit |
577717 |
/* Compute the max */
|
|
Packit |
577717 |
|
|
Packit |
577717 |
if (type == PFMLIB_MIPS_ICE9A_PMU) {
|
|
Packit |
577717 |
gen_mips64_pe = gen_mips64_ice9a_pe;
|
|
Packit |
577717 |
// core_counters = 2;
|
|
Packit |
577717 |
bound = (sizeof(gen_mips64_ice9a_pe)/sizeof(pme_gen_mips64_entry_t));
|
|
Packit |
577717 |
} else if (type == PFMLIB_MIPS_ICE9B_PMU) {
|
|
Packit |
577717 |
gen_mips64_pe = gen_mips64_ice9b_pe;
|
|
Packit |
577717 |
// core_counters = 2;
|
|
Packit |
577717 |
bound = (sizeof(gen_mips64_ice9b_pe)/sizeof(pme_gen_mips64_entry_t));
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
|
|
Packit |
577717 |
/* Allocate the table */
|
|
Packit |
577717 |
|
|
Packit |
577717 |
sicortex_pe = malloc(bound*sizeof(*sicortex_pe));
|
|
Packit |
577717 |
if (sicortex_pe == NULL)
|
|
Packit |
577717 |
return 0;
|
|
Packit |
577717 |
|
|
Packit |
577717 |
/* If we find we have SCB support */
|
|
Packit |
577717 |
|
|
Packit |
577717 |
if (sicortex_support.pmd_count > 2)
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
/* Account for 4 sampling PMD registers */
|
|
Packit |
577717 |
sicortex_support.num_cnt = sicortex_support.pmd_count - 4;
|
|
Packit |
577717 |
sicortex_support.pme_count = bound;
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
else
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
sicortex_support.pme_count = 0;
|
|
Packit |
577717 |
/* Count up CPU only events */
|
|
Packit |
577717 |
for (i=0;i
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
unsigned int tmp = gen_mips64_pe[i].pme_counters;
|
|
Packit |
577717 |
if (!(tmp & (1<
|
|
Packit |
577717 |
sicortex_support.pme_count++;
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
|
|
Packit |
577717 |
for (i=0;i
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
sicortex_pe[i].pme_name = gen_mips64_pe[i].pme_name;
|
|
Packit |
577717 |
sicortex_pe[i].pme_desc = gen_mips64_pe[i].pme_desc;
|
|
Packit |
577717 |
sicortex_pe[i].pme_code = gen_mips64_pe[i].pme_code;
|
|
Packit |
577717 |
sicortex_pe[i].pme_counters = gen_mips64_pe[i].pme_counters;
|
|
Packit |
577717 |
if (sicortex_pe[i].pme_counters & (1<
|
|
Packit |
577717 |
int j;
|
|
Packit |
577717 |
sicortex_pe[i].pme_numasks = PFMLIB_SICORTEX_MAX_UMASK;
|
|
Packit |
577717 |
for (j=0;j
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
sicortex_pe[i].pme_umasks[j].pme_uname = sicortex_scb_umasks[j].pme_uname;
|
|
Packit |
577717 |
sicortex_pe[i].pme_umasks[j].pme_udesc = sicortex_scb_umasks[j].pme_udesc;
|
|
Packit |
577717 |
sicortex_pe[i].pme_umasks[j].pme_ucode = sicortex_scb_umasks[j].pme_ucode;
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
} else {
|
|
Packit |
577717 |
sicortex_pe[i].pme_numasks = 0;
|
|
Packit |
577717 |
memset(sicortex_pe[i].pme_umasks,0x0,sizeof(sicortex_pe[i].pme_umasks));
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
return 1;
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
|
|
Packit |
577717 |
static int
|
|
Packit |
577717 |
pfm_sicortex_detect(void)
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
static char mips_name[64] = "";
|
|
Packit |
577717 |
int ret;
|
|
Packit |
577717 |
char buffer[128];
|
|
Packit |
577717 |
extern pfm_pmu_support_t sicortex_support;
|
|
Packit |
577717 |
|
|
Packit |
577717 |
ret = __pfm_getcpuinfo_attr("cpu model", buffer, sizeof(buffer));
|
|
Packit |
577717 |
if (ret == -1)
|
|
Packit |
577717 |
return PFMLIB_ERR_NOTSUPP;
|
|
Packit |
577717 |
|
|
Packit |
577717 |
sicortex_support.num_cnt = 0;
|
|
Packit |
577717 |
if (strstr(buffer,"SiCortex ICE9A"))
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
if (compute_ice9_counters(PFMLIB_MIPS_ICE9A_PMU) == 0)
|
|
Packit |
577717 |
return PFMLIB_ERR_NOTSUPP;
|
|
Packit |
577717 |
sicortex_support.pmu_name = mips_name;
|
|
Packit |
577717 |
strcpy(sicortex_support.pmu_name,"MIPSICE9A"),
|
|
Packit |
577717 |
sicortex_support.pmu_type = PFMLIB_MIPS_ICE9A_PMU;
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
else if (strstr(buffer,"SiCortex ICE9B"))
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
if (compute_ice9_counters(PFMLIB_MIPS_ICE9B_PMU) == 0)
|
|
Packit |
577717 |
return PFMLIB_ERR_NOTSUPP;
|
|
Packit |
577717 |
sicortex_support.pmu_name = mips_name;
|
|
Packit |
577717 |
strcpy(sicortex_support.pmu_name,"MIPSICE9B"),
|
|
Packit |
577717 |
sicortex_support.pmu_type = PFMLIB_MIPS_ICE9B_PMU;
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
else
|
|
Packit |
577717 |
return PFMLIB_ERR_NOTSUPP;
|
|
Packit |
577717 |
|
|
Packit |
577717 |
if (sicortex_support.num_cnt == 0)
|
|
Packit |
577717 |
sicortex_support.num_cnt = sicortex_support.pmd_count;
|
|
Packit |
577717 |
|
|
Packit |
577717 |
return PFMLIB_SUCCESS;
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
|
|
Packit |
577717 |
static void stuff_sicortex_regs(pfmlib_event_t *e, int plm, pfmlib_reg_t *pc, pfmlib_reg_t *pd, int cntr, int j, pfmlib_sicortex_input_param_t *mod_in)
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
pfm_sicortex_sel_reg_t reg;
|
|
Packit |
577717 |
reg.val = 0; /* assume reserved bits are zerooed */
|
|
Packit |
577717 |
/* if plm is 0, then assume not specified per-event and use default */
|
|
Packit |
577717 |
plm = e[j].plm ? e[j].plm : plm;
|
|
Packit |
577717 |
reg.sel_usr = plm & PFM_PLM3 ? 1 : 0;
|
|
Packit |
577717 |
reg.sel_os = plm & PFM_PLM0 ? 1 : 0;
|
|
Packit |
577717 |
reg.sel_sup = plm & PFM_PLM1 ? 1 : 0;
|
|
Packit |
577717 |
reg.sel_exl = plm & PFM_PLM2 ? 1 : 0;
|
|
Packit |
577717 |
reg.sel_int = 1; /* force int to 1 */
|
|
Packit |
577717 |
|
|
Packit |
577717 |
/* CPU event */
|
|
Packit |
577717 |
if (sicortex_pe[e[j].event].pme_counters & ((1<
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
reg.sel_event_mask = (sicortex_pe[e[j].event].pme_code >> (cntr*8)) & 0xff;
|
|
Packit |
577717 |
pc[j].reg_addr = cntr*2;
|
|
Packit |
577717 |
pc[j].reg_value = reg.val;
|
|
Packit |
577717 |
pc[j].reg_num = cntr;
|
|
Packit |
577717 |
|
|
Packit |
577717 |
__pfm_vbprintf("[CP0_25_%u(pmc%u)=0x%"PRIx64" event_mask=0x%x usr=%d os=%d sup=%d exl=%d int=1] %s\n",
|
|
Packit |
577717 |
pc[j].reg_addr,
|
|
Packit |
577717 |
pc[j].reg_num,
|
|
Packit |
577717 |
pc[j].reg_value,
|
|
Packit |
577717 |
reg.sel_event_mask,
|
|
Packit |
577717 |
reg.sel_usr,
|
|
Packit |
577717 |
reg.sel_os,
|
|
Packit |
577717 |
reg.sel_sup,
|
|
Packit |
577717 |
reg.sel_exl,
|
|
Packit |
577717 |
sicortex_pe[e[j].event].pme_name);
|
|
Packit |
577717 |
|
|
Packit |
577717 |
pd[j].reg_num = cntr;
|
|
Packit |
577717 |
pd[j].reg_addr = cntr*2 + 1;
|
|
Packit |
577717 |
|
|
Packit |
577717 |
__pfm_vbprintf("[CP0_25_%u(pmd%u)]\n",
|
|
Packit |
577717 |
pc[j].reg_addr,
|
|
Packit |
577717 |
pc[j].reg_num);
|
|
Packit |
577717 |
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
/* SCB event */
|
|
Packit |
577717 |
else
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
pmc_sicortex_scb_reg_t scbreg;
|
|
Packit |
577717 |
int k;
|
|
Packit |
577717 |
scbreg.val = 0;
|
|
Packit |
577717 |
scbreg.sicortex_ScbPerfBucket_reg.event = sicortex_pe[e[j].event].pme_code >> 16;
|
|
Packit |
577717 |
for (k=0;k
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
if (e[j].unit_masks[k] == 4)
|
|
Packit |
577717 |
scbreg.sicortex_ScbPerfBucket_reg.hist = 0x1;
|
|
Packit |
577717 |
else if (e[j].unit_masks[k] == 1)
|
|
Packit |
577717 |
scbreg.sicortex_ScbPerfBucket_reg.ifOther = 0x1;
|
|
Packit |
577717 |
else if (e[j].unit_masks[k] == 2)
|
|
Packit |
577717 |
scbreg.sicortex_ScbPerfBucket_reg.ifOther = 0x2;
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
__pfm_vbprintf("[ScbPerfBucket[%u](pmc%u)=0x%"PRIx64" event=0x%x hist=%d ifOther=0x%x]\n",
|
|
Packit |
577717 |
cntr,cntr+6,scbreg.val,
|
|
Packit |
577717 |
scbreg.sicortex_ScbPerfBucket_reg.event,
|
|
Packit |
577717 |
scbreg.sicortex_ScbPerfBucket_reg.hist,
|
|
Packit |
577717 |
scbreg.sicortex_ScbPerfBucket_reg.ifOther);
|
|
Packit |
577717 |
|
|
Packit |
577717 |
pc[j].reg_addr = cntr;
|
|
Packit |
577717 |
pc[j].reg_value = scbreg.val;
|
|
Packit |
577717 |
pc[j].reg_num = cntr + 6;
|
|
Packit |
577717 |
|
|
Packit |
577717 |
pd[j].reg_addr = cntr;
|
|
Packit |
577717 |
pd[j].reg_num = cntr + 6;
|
|
Packit |
577717 |
|
|
Packit |
577717 |
__pfm_vbprintf("[ScbPerfCount[%u](pmd%u)]\n",
|
|
Packit |
577717 |
pc[j].reg_addr,
|
|
Packit |
577717 |
pc[j].reg_num);
|
|
Packit |
577717 |
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
|
|
Packit |
577717 |
static int stuff_sicortex_scb_control_regs(pfmlib_reg_t *pc, pfmlib_reg_t *pd, int num, pfmlib_sicortex_input_param_t *mod_in)
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
pmc_sicortex_scb_reg_t two;
|
|
Packit |
577717 |
pmc_sicortex_scb_reg_t three;
|
|
Packit |
577717 |
pmc_sicortex_scb_reg_t four;
|
|
Packit |
577717 |
pmc_sicortex_scb_reg_t five;
|
|
Packit |
577717 |
|
|
Packit |
577717 |
// __pfm_vbprintf("num = %d\n",num);
|
|
Packit |
577717 |
|
|
Packit |
577717 |
/* The kernel will enforce most of these, see perfmon_ice9.c in the kernel */
|
|
Packit |
577717 |
|
|
Packit |
577717 |
/* ScbPerfCtl */
|
|
Packit |
577717 |
|
|
Packit |
577717 |
pc[num].reg_num = 2;
|
|
Packit |
577717 |
pc[num].reg_addr = 2;
|
|
Packit |
577717 |
two.val = 0;
|
|
Packit |
577717 |
if (mod_in && (mod_in->flags & PFMLIB_SICORTEX_INPUT_SCB_INTERVAL))
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
two.sicortex_ScbPerfCtl_reg.Interval = mod_in->pfp_sicortex_scb_global.Interval;
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
else
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
two.sicortex_ScbPerfCtl_reg.Interval = 6; /* 2048 cycles */
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
if (mod_in && (mod_in->flags & PFMLIB_SICORTEX_INPUT_SCB_NOINC))
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
two.sicortex_ScbPerfCtl_reg.NoInc = mod_in->pfp_sicortex_scb_global.NoInc;
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
else
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
two.sicortex_ScbPerfCtl_reg.NoInc = 0;
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
|
|
Packit |
577717 |
two.sicortex_ScbPerfCtl_reg.IntBit = 31; /* Interrupt on last bit */
|
|
Packit |
577717 |
two.sicortex_ScbPerfCtl_reg.MagicEvent = 0;
|
|
Packit |
577717 |
two.sicortex_ScbPerfCtl_reg.AddrAssert = 1;
|
|
Packit |
577717 |
|
|
Packit |
577717 |
__pfm_vbprintf("[Scb%s(pmc%u)=0x%"PRIx64" Interval=0x%x IntBit=0x%x NoInc=%d AddrAssert=%d MagicEvent=0x%x]\n","PerfCtl",
|
|
Packit |
577717 |
pc[num].reg_num,
|
|
Packit |
577717 |
two.val,
|
|
Packit |
577717 |
two.sicortex_ScbPerfCtl_reg.Interval,
|
|
Packit |
577717 |
two.sicortex_ScbPerfCtl_reg.IntBit,
|
|
Packit |
577717 |
two.sicortex_ScbPerfCtl_reg.NoInc,
|
|
Packit |
577717 |
two.sicortex_ScbPerfCtl_reg.AddrAssert,
|
|
Packit |
577717 |
two.sicortex_ScbPerfCtl_reg.MagicEvent);
|
|
Packit |
577717 |
pc[num].reg_value = two.val;
|
|
Packit |
577717 |
|
|
Packit |
577717 |
/*ScbPerfHist */
|
|
Packit |
577717 |
|
|
Packit |
577717 |
pc[++num].reg_num = 3;
|
|
Packit |
577717 |
pc[num].reg_addr = 3;
|
|
Packit |
577717 |
three.val = 0;
|
|
Packit |
577717 |
if (mod_in && (mod_in->flags & PFMLIB_SICORTEX_INPUT_SCB_HISTGTE))
|
|
Packit |
577717 |
three.sicortex_ScbPerfHist_reg.HistGte = mod_in->pfp_sicortex_scb_global.HistGte;
|
|
Packit |
577717 |
else
|
|
Packit |
577717 |
three.sicortex_ScbPerfHist_reg.HistGte = 1;
|
|
Packit |
577717 |
|
|
Packit |
577717 |
__pfm_vbprintf("[Scb%s(pmc%u)=0x%"PRIx64" HistGte=0x%x]\n","PerfHist",
|
|
Packit |
577717 |
pc[num].reg_num,
|
|
Packit |
577717 |
three.val,
|
|
Packit |
577717 |
three.sicortex_ScbPerfHist_reg.HistGte);
|
|
Packit |
577717 |
pc[num].reg_value = three.val;
|
|
Packit |
577717 |
|
|
Packit |
577717 |
/*ScbPerfBuckNum */
|
|
Packit |
577717 |
|
|
Packit |
577717 |
pc[++num].reg_num = 4;
|
|
Packit |
577717 |
pc[num].reg_addr = 4;
|
|
Packit |
577717 |
four.val = 0;
|
|
Packit |
577717 |
if (mod_in && (mod_in->flags & PFMLIB_SICORTEX_INPUT_SCB_BUCKET))
|
|
Packit |
577717 |
four.sicortex_ScbPerfBuckNum_reg.Bucket = mod_in->pfp_sicortex_scb_global.Bucket;
|
|
Packit |
577717 |
else
|
|
Packit |
577717 |
four.sicortex_ScbPerfBuckNum_reg.Bucket = 0;
|
|
Packit |
577717 |
__pfm_vbprintf("[Scb%s(pmc%u)=0x%"PRIx64" Bucket=0x%x]\n","PerfBuckNum",
|
|
Packit |
577717 |
pc[num].reg_num,
|
|
Packit |
577717 |
four.val,
|
|
Packit |
577717 |
four.sicortex_ScbPerfBuckNum_reg.Bucket);
|
|
Packit |
577717 |
pc[num].reg_value = four.val;
|
|
Packit |
577717 |
|
|
Packit |
577717 |
/*ScbPerfEna */
|
|
Packit |
577717 |
|
|
Packit |
577717 |
pc[++num].reg_num = 5;
|
|
Packit |
577717 |
pc[num].reg_addr = 5;
|
|
Packit |
577717 |
five.val = 0;
|
|
Packit |
577717 |
five.sicortex_ScbPerfEna_reg.ena = 1;
|
|
Packit |
577717 |
__pfm_vbprintf("[Scb%s(pmc%u)=0x%"PRIx64" ena=%d]\n","PerfEna",
|
|
Packit |
577717 |
pc[num].reg_num,
|
|
Packit |
577717 |
five.val,
|
|
Packit |
577717 |
five.sicortex_ScbPerfEna_reg.ena);
|
|
Packit |
577717 |
pc[num].reg_value = five.val;
|
|
Packit |
577717 |
++num;
|
|
Packit |
577717 |
return(num);
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
|
|
Packit |
577717 |
/*
|
|
Packit |
577717 |
* Automatically dispatch events to corresponding counters following constraints.
|
|
Packit |
577717 |
* Upon return the pfarg_regt structure is ready to be submitted to kernel
|
|
Packit |
577717 |
*/
|
|
Packit |
577717 |
static int
|
|
Packit |
577717 |
pfm_sicortex_dispatch_counters(pfmlib_input_param_t *inp, pfmlib_sicortex_input_param_t *mod_in, pfmlib_output_param_t *outp)
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
/* pfmlib_sicortex_input_param_t *param = mod_in; */
|
|
Packit |
577717 |
pfmlib_event_t *e = inp->pfp_events;
|
|
Packit |
577717 |
pfmlib_reg_t *pc, *pd;
|
|
Packit |
577717 |
unsigned int i, j, cnt = inp->pfp_event_count;
|
|
Packit |
577717 |
unsigned int used = 0;
|
|
Packit |
577717 |
extern pfm_pmu_support_t sicortex_support;
|
|
Packit |
577717 |
unsigned int cntr, avail;
|
|
Packit |
577717 |
|
|
Packit |
577717 |
pc = outp->pfp_pmcs;
|
|
Packit |
577717 |
pd = outp->pfp_pmds;
|
|
Packit |
577717 |
|
|
Packit |
577717 |
/* Degree N rank based allocation */
|
|
Packit |
577717 |
if (cnt > sicortex_support.pmc_count) return PFMLIB_ERR_TOOMANY;
|
|
Packit |
577717 |
|
|
Packit |
577717 |
if (PFMLIB_DEBUG()) {
|
|
Packit |
577717 |
for (j=0; j < cnt; j++) {
|
|
Packit |
577717 |
DPRINT("ev[%d]=%s, counters=0x%x\n", j, sicortex_pe[e[j].event].pme_name,sicortex_pe[e[j].event].pme_counters);
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
|
|
Packit |
577717 |
/* Do rank based allocation, counters that live on 1 reg
|
|
Packit |
577717 |
before counters that live on 2 regs etc. */
|
|
Packit |
577717 |
|
|
Packit |
577717 |
/* CPU counters first */
|
|
Packit |
577717 |
for (i=1;i<=core_counters;i++)
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
for (j=0; j < cnt;j++)
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
/* CPU counters first */
|
|
Packit |
577717 |
if ((sicortex_pe[e[j].event].pme_counters & ((1<
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
/* These counters can be used for this event */
|
|
Packit |
577717 |
avail = ~used & sicortex_pe[e[j].event].pme_counters;
|
|
Packit |
577717 |
DPRINT("Rank %d: Counters available 0x%x\n",i,avail);
|
|
Packit |
577717 |
if (avail == 0x0)
|
|
Packit |
577717 |
return PFMLIB_ERR_NOASSIGN;
|
|
Packit |
577717 |
|
|
Packit |
577717 |
/* Pick one, mark as used*/
|
|
Packit |
577717 |
cntr = ffs(avail) - 1;
|
|
Packit |
577717 |
DPRINT("Rank %d: Chose counter %d\n",i,cntr);
|
|
Packit |
577717 |
|
|
Packit |
577717 |
/* Update registers */
|
|
Packit |
577717 |
stuff_sicortex_regs(e,inp->pfp_dfl_plm,pc,pd,cntr,j,mod_in);
|
|
Packit |
577717 |
|
|
Packit |
577717 |
used |= (1 << cntr);
|
|
Packit |
577717 |
DPRINT("Rank %d: Used counters 0x%x\n",i, used);
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
|
|
Packit |
577717 |
/* SCB counters can live anywhere */
|
|
Packit |
577717 |
|
|
Packit |
577717 |
used = 0;
|
|
Packit |
577717 |
for (j=0; j < cnt;j++)
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
unsigned int cntr;
|
|
Packit |
577717 |
|
|
Packit |
577717 |
/* CPU counters first */
|
|
Packit |
577717 |
if (sicortex_pe[e[j].event].pme_counters & (1<
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
int k, has_ifother = 0, has_hist = 0;
|
|
Packit |
577717 |
for (k=0;k
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
if ((e[j].unit_masks[k] == 0) || (e[j].unit_masks[k] == 1) || (e[j].unit_masks[k] == 2)) {
|
|
Packit |
577717 |
if (has_ifother)
|
|
Packit |
577717 |
return PFMLIB_ERR_UMASK;
|
|
Packit |
577717 |
has_ifother = 1;
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
else if ((e[j].unit_masks[k] == 3) || (e[j].unit_masks[k] == 4)) {
|
|
Packit |
577717 |
if (has_hist)
|
|
Packit |
577717 |
return PFMLIB_ERR_UMASK;
|
|
Packit |
577717 |
has_hist = 1;
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
/* These counters can be used for this event */
|
|
Packit |
577717 |
avail = sicortex_support.num_cnt - core_counters - used;
|
|
Packit |
577717 |
DPRINT("SCB(%d): Counters available %d\n",j,avail);
|
|
Packit |
577717 |
|
|
Packit |
577717 |
cntr = (sicortex_support.num_cnt - core_counters) - avail;
|
|
Packit |
577717 |
DPRINT("SCB(%d): Chose SCB counter %d\n",j,cntr);
|
|
Packit |
577717 |
|
|
Packit |
577717 |
/* Update registers */
|
|
Packit |
577717 |
stuff_sicortex_regs(e,inp->pfp_dfl_plm,pc,pd,cntr,j,mod_in);
|
|
Packit |
577717 |
used++;
|
|
Packit |
577717 |
DPRINT("SCB(%d): Used counters %d\n",j,used);
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
if (used)
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
outp->pfp_pmc_count = stuff_sicortex_scb_control_regs(pc,pd,cnt,mod_in);
|
|
Packit |
577717 |
outp->pfp_pmd_count = cnt;
|
|
Packit |
577717 |
return PFMLIB_SUCCESS;
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
|
|
Packit |
577717 |
/* number of evtsel registers programmed */
|
|
Packit |
577717 |
outp->pfp_pmc_count = cnt;
|
|
Packit |
577717 |
outp->pfp_pmd_count = cnt;
|
|
Packit |
577717 |
|
|
Packit |
577717 |
return PFMLIB_SUCCESS;
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
|
|
Packit |
577717 |
static int
|
|
Packit |
577717 |
pfm_sicortex_dispatch_events(pfmlib_input_param_t *inp, void *model_in, pfmlib_output_param_t *outp, void *model_out)
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
pfmlib_sicortex_input_param_t *mod_sicortex_in = (pfmlib_sicortex_input_param_t *)model_in;
|
|
Packit |
577717 |
|
|
Packit |
577717 |
return pfm_sicortex_dispatch_counters(inp, mod_sicortex_in, outp);
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
|
|
Packit |
577717 |
static int
|
|
Packit |
577717 |
pfm_sicortex_get_event_code(unsigned int i, unsigned int cnt, int *code)
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
extern pfm_pmu_support_t sicortex_support;
|
|
Packit |
577717 |
|
|
Packit |
577717 |
/* check validity of counter index */
|
|
Packit |
577717 |
if (cnt != PFMLIB_CNT_FIRST) {
|
|
Packit |
577717 |
if (cnt < 0 || cnt >= sicortex_support.pmc_count)
|
|
Packit |
577717 |
return PFMLIB_ERR_INVAL; }
|
|
Packit |
577717 |
else {
|
|
Packit |
577717 |
cnt = ffs(sicortex_pe[i].pme_counters)-1;
|
|
Packit |
577717 |
if (cnt == -1)
|
|
Packit |
577717 |
return(PFMLIB_ERR_INVAL);
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
|
|
Packit |
577717 |
/* if cnt == 1, shift right by 0, if cnt == 2, shift right by 8 */
|
|
Packit |
577717 |
/* Works on both 5k anf 20K */
|
|
Packit |
577717 |
|
|
Packit |
577717 |
unsigned int tmp = sicortex_pe[i].pme_counters;
|
|
Packit |
577717 |
/* CPU event */
|
|
Packit |
577717 |
if (tmp & ((1<
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
if (tmp & (1<< cnt))
|
|
Packit |
577717 |
*code = 0xff & (sicortex_pe[i].pme_code >> (cnt*8));
|
|
Packit |
577717 |
else
|
|
Packit |
577717 |
return PFMLIB_ERR_INVAL;
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
/* SCB event */
|
|
Packit |
577717 |
else
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
if ((cnt < 6) || (cnt >= sicortex_support.pmc_count))
|
|
Packit |
577717 |
return PFMLIB_ERR_INVAL;
|
|
Packit |
577717 |
*code = 0xffff & (sicortex_pe[i].pme_code >> 16);
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
|
|
Packit |
577717 |
return PFMLIB_SUCCESS;
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
|
|
Packit |
577717 |
/*
|
|
Packit |
577717 |
* This function is accessible directly to the user
|
|
Packit |
577717 |
*/
|
|
Packit |
577717 |
int
|
|
Packit |
577717 |
pfm_sicortex_get_event_umask(unsigned int i, unsigned long *umask)
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
extern pfm_pmu_support_t sicortex_support;
|
|
Packit |
577717 |
if (i >= sicortex_support.pme_count || umask == NULL) return PFMLIB_ERR_INVAL;
|
|
Packit |
577717 |
*umask = 0; //evt_umask(i);
|
|
Packit |
577717 |
return PFMLIB_SUCCESS;
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
|
|
Packit |
577717 |
static void
|
|
Packit |
577717 |
pfm_sicortex_get_event_counters(unsigned int j, pfmlib_regmask_t *counters)
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
extern pfm_pmu_support_t sicortex_support;
|
|
Packit |
577717 |
unsigned int tmp;
|
|
Packit |
577717 |
|
|
Packit |
577717 |
memset(counters, 0, sizeof(*counters));
|
|
Packit |
577717 |
tmp = sicortex_pe[j].pme_counters;
|
|
Packit |
577717 |
|
|
Packit |
577717 |
/* CPU counter */
|
|
Packit |
577717 |
if (tmp & ((1<
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
while (tmp)
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
int t = ffs(tmp) - 1;
|
|
Packit |
577717 |
pfm_regmask_set(counters, t);
|
|
Packit |
577717 |
tmp = tmp ^ (1 << t);
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
/* SCB counter, requires first 4, then 1 of the remaining */
|
|
Packit |
577717 |
else
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
int i;
|
|
Packit |
577717 |
for (i=6;i
|
|
Packit |
577717 |
pfm_regmask_set(counters, i);
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
|
|
Packit |
577717 |
static void
|
|
Packit |
577717 |
pfm_sicortex_get_impl_perfsel(pfmlib_regmask_t *impl_pmcs)
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
unsigned int i = 0;
|
|
Packit |
577717 |
extern pfm_pmu_support_t sicortex_support;
|
|
Packit |
577717 |
|
|
Packit |
577717 |
/* all pmcs are contiguous */
|
|
Packit |
577717 |
for(i=0; i < sicortex_support.pmc_count; i++) pfm_regmask_set(impl_pmcs, i);
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
|
|
Packit |
577717 |
static void
|
|
Packit |
577717 |
pfm_sicortex_get_impl_perfctr(pfmlib_regmask_t *impl_pmds)
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
unsigned int i = 0;
|
|
Packit |
577717 |
extern pfm_pmu_support_t sicortex_support;
|
|
Packit |
577717 |
|
|
Packit |
577717 |
/* all pmds are contiguous */
|
|
Packit |
577717 |
for(i=0; i < sicortex_support.pmd_count; i++) pfm_regmask_set(impl_pmds, i);
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
|
|
Packit |
577717 |
static void
|
|
Packit |
577717 |
pfm_sicortex_get_impl_counters(pfmlib_regmask_t *impl_counters)
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
unsigned int i = 0;
|
|
Packit |
577717 |
extern pfm_pmu_support_t sicortex_support;
|
|
Packit |
577717 |
|
|
Packit |
577717 |
pfm_regmask_set(impl_counters, 0);
|
|
Packit |
577717 |
pfm_regmask_set(impl_counters, 1);
|
|
Packit |
577717 |
/* If we have the SCB turned on */
|
|
Packit |
577717 |
if (sicortex_support.pmd_count > core_counters)
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
/* counting pmds are not contiguous on ICE9*/
|
|
Packit |
577717 |
for(i=6; i < sicortex_support.pmd_count; i++)
|
|
Packit |
577717 |
pfm_regmask_set(impl_counters, i);
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
|
|
Packit |
577717 |
static void
|
|
Packit |
577717 |
pfm_sicortex_get_hw_counter_width(unsigned int *width)
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
*width = PMU_GEN_MIPS64_COUNTER_WIDTH;
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
|
|
Packit |
577717 |
static char *
|
|
Packit |
577717 |
pfm_sicortex_get_event_name(unsigned int i)
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
return sicortex_pe[i].pme_name;
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
|
|
Packit |
577717 |
static int
|
|
Packit |
577717 |
pfm_sicortex_get_event_description(unsigned int ev, char **str)
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
char *s;
|
|
Packit |
577717 |
s = sicortex_pe[ev].pme_desc;
|
|
Packit |
577717 |
if (s) {
|
|
Packit |
577717 |
*str = strdup(s);
|
|
Packit |
577717 |
} else {
|
|
Packit |
577717 |
*str = NULL;
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
return PFMLIB_SUCCESS;
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
|
|
Packit |
577717 |
static int
|
|
Packit |
577717 |
pfm_sicortex_get_cycle_event(pfmlib_event_t *e)
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
return pfm_find_full_event("CPU_CYCLES",e);
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
|
|
Packit |
577717 |
static int
|
|
Packit |
577717 |
pfm_sicortex_get_inst_retired(pfmlib_event_t *e)
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
return pfm_find_full_event("CPU_INSEXEC",e);
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
|
|
Packit |
577717 |
/* SiCortex specific functions */
|
|
Packit |
577717 |
|
|
Packit |
577717 |
/* CPU counter */
|
|
Packit |
577717 |
int pfm_sicortex_is_cpu(unsigned int i)
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
if (i < sicortex_support.pme_count)
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
unsigned int tmp = sicortex_pe[i].pme_counters;
|
|
Packit |
577717 |
return !(tmp & (1<
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
return 0;
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
|
|
Packit |
577717 |
/* SCB counter */
|
|
Packit |
577717 |
int pfm_sicortex_is_scb(unsigned int i)
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
if (i < sicortex_support.pme_count)
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
unsigned int tmp = sicortex_pe[i].pme_counters;
|
|
Packit |
577717 |
return (tmp & (1<
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
return 0;
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
|
|
Packit |
577717 |
/* Reg 25 domain support */
|
|
Packit |
577717 |
int pfm_sicortex_support_domain(unsigned int i)
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
if (i < sicortex_support.pme_count)
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
unsigned int tmp = sicortex_pe[i].pme_counters;
|
|
Packit |
577717 |
return (tmp & (1<<3));
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
return 0;
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
|
|
Packit |
577717 |
/* VPC/PEA sampling support */
|
|
Packit |
577717 |
int pfm_sicortex_support_vpc_pea(unsigned int i)
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
if (i < sicortex_support.pme_count)
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
unsigned int tmp = sicortex_pe[i].pme_counters;
|
|
Packit |
577717 |
return (tmp & (1<<4));
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
return 0;
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
|
|
Packit |
577717 |
static char *
|
|
Packit |
577717 |
pfm_sicortex_get_event_mask_name(unsigned int ev, unsigned int midx)
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
return sicortex_pe[ev].pme_umasks[midx].pme_uname;
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
|
|
Packit |
577717 |
static int
|
|
Packit |
577717 |
pfm_sicortex_get_event_mask_desc(unsigned int ev, unsigned int midx, char **str)
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
char *s;
|
|
Packit |
577717 |
|
|
Packit |
577717 |
s = sicortex_pe[ev].pme_umasks[midx].pme_udesc;
|
|
Packit |
577717 |
if (s) {
|
|
Packit |
577717 |
*str = strdup(s);
|
|
Packit |
577717 |
} else {
|
|
Packit |
577717 |
*str = NULL;
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
return PFMLIB_SUCCESS;
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
|
|
Packit |
577717 |
static unsigned int
|
|
Packit |
577717 |
pfm_sicortex_get_num_event_masks(unsigned int ev)
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
return sicortex_pe[ev].pme_numasks;
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
|
|
Packit |
577717 |
static int
|
|
Packit |
577717 |
pfm_sicortex_get_event_mask_code(unsigned int ev, unsigned int midx, unsigned int *code)
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
*code = sicortex_pe[ev].pme_umasks[midx].pme_ucode;
|
|
Packit |
577717 |
return PFMLIB_SUCCESS;
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
|
|
Packit |
577717 |
static int
|
|
Packit |
577717 |
pfm_sicortex_has_umask_default(unsigned int ev)
|
|
Packit |
577717 |
{
|
|
Packit |
577717 |
/* all events have default unit mask */
|
|
Packit |
577717 |
return 1;
|
|
Packit |
577717 |
}
|
|
Packit |
577717 |
|
|
Packit |
577717 |
pfm_pmu_support_t sicortex_support = {
|
|
Packit |
577717 |
.pmu_name = NULL,
|
|
Packit |
577717 |
.pmu_type = PFMLIB_UNKNOWN_PMU,
|
|
Packit |
577717 |
.pme_count = 0,
|
|
Packit |
577717 |
.pmc_count = 0,
|
|
Packit |
577717 |
.pmd_count = 0,
|
|
Packit |
577717 |
.num_cnt = 0,
|
|
Packit |
577717 |
.flags = PFMLIB_MULT_CODE_EVENT,
|
|
Packit |
577717 |
.get_event_code = pfm_sicortex_get_event_code,
|
|
Packit |
577717 |
.get_event_name = pfm_sicortex_get_event_name,
|
|
Packit |
577717 |
.get_event_counters = pfm_sicortex_get_event_counters,
|
|
Packit |
577717 |
.dispatch_events = pfm_sicortex_dispatch_events,
|
|
Packit |
577717 |
.pmu_detect = pfm_sicortex_detect,
|
|
Packit |
577717 |
.get_impl_pmcs = pfm_sicortex_get_impl_perfsel,
|
|
Packit |
577717 |
.get_impl_pmds = pfm_sicortex_get_impl_perfctr,
|
|
Packit |
577717 |
.get_impl_counters = pfm_sicortex_get_impl_counters,
|
|
Packit |
577717 |
.get_hw_counter_width = pfm_sicortex_get_hw_counter_width,
|
|
Packit |
577717 |
.get_event_desc = pfm_sicortex_get_event_description,
|
|
Packit |
577717 |
.get_num_event_masks = pfm_sicortex_get_num_event_masks,
|
|
Packit |
577717 |
.get_event_mask_name = pfm_sicortex_get_event_mask_name,
|
|
Packit |
577717 |
.get_event_mask_code = pfm_sicortex_get_event_mask_code,
|
|
Packit |
577717 |
.get_event_mask_desc = pfm_sicortex_get_event_mask_desc,
|
|
Packit |
577717 |
.get_cycle_event = pfm_sicortex_get_cycle_event,
|
|
Packit |
577717 |
.get_inst_retired_event = pfm_sicortex_get_inst_retired,
|
|
Packit |
577717 |
.has_umask_default = pfm_sicortex_has_umask_default
|
|
Packit |
577717 |
};
|