/* * Event codes defined in ISA v3.0B
*/ #define EVENT(_name, _code) _name = _code,
enum { /* Cycles, alternate code */
EVENT(PM_CYC_ALT, 0x100f0) /* One or more instructions completed in a cycle */
EVENT(PM_CYC_INST_CMPL, 0x100f2) /* Floating-point instruction completed */
EVENT(PM_FLOP_CMPL, 0x100f4) /* Instruction ERAT/L1-TLB miss */
EVENT(PM_L1_ITLB_MISS, 0x100f6) /* All instructions completed and none available */
EVENT(PM_NO_INST_AVAIL, 0x100f8) /* A load-type instruction completed (ISA v3.0+) */
EVENT(PM_LD_CMPL, 0x100fc) /* Instruction completed, alternate code (ISA v3.0+) */
EVENT(PM_INST_CMPL_ALT, 0x100fe) /* A store-type instruction completed */
EVENT(PM_ST_CMPL, 0x200f0) /* Instruction Dispatched */
EVENT(PM_INST_DISP, 0x200f2) /* Run_cycles */
EVENT(PM_RUN_CYC, 0x200f4) /* Data ERAT/L1-TLB miss/reload */
EVENT(PM_L1_DTLB_RELOAD, 0x200f6) /* Taken branch completed */
EVENT(PM_BR_TAKEN_CMPL, 0x200fa) /* Demand iCache Miss */
EVENT(PM_L1_ICACHE_MISS, 0x200fc) /* L1 Dcache reload from memory */
EVENT(PM_L1_RELOAD_FROM_MEM, 0x200fe) /* L1 Dcache store miss */
EVENT(PM_ST_MISS_L1, 0x300f0) /* Alternate code for PM_INST_DISP */
EVENT(PM_INST_DISP_ALT, 0x300f2) /* Branch direction or target mispredicted */
EVENT(PM_BR_MISPREDICT, 0x300f6) /* Data TLB miss/reload */
EVENT(PM_DTLB_MISS, 0x300fc) /* Demand LD - L3 Miss (not L2 hit and not L3 hit) */
EVENT(PM_DATA_FROM_L3MISS, 0x300fe) /* L1 Dcache load miss */
EVENT(PM_LD_MISS_L1, 0x400f0) /* Cycle when instruction(s) dispatched */
EVENT(PM_CYC_INST_DISP, 0x400f2) /* Branch or branch target mispredicted */
EVENT(PM_BR_MPRED_CMPL, 0x400f6) /* Instructions completed with run latch set */
EVENT(PM_RUN_INST_CMPL, 0x400fa) /* Instruction TLB miss/reload */
EVENT(PM_ITLB_MISS, 0x400fc) /* Load data not cached */
EVENT(PM_LD_NOT_CACHED, 0x400fe) /* Instructions */
EVENT(PM_INST_CMPL, 0x500fa) /* Cycles */
EVENT(PM_CYC, 0x600f4)
};
#undef EVENT
/* Table of alternatives, sorted in increasing order of column 0 */ /* Note that in each row, column 0 must be the smallest */ staticconstunsignedint generic_event_alternatives[][MAX_ALT] = {
{ PM_CYC_ALT, PM_CYC },
{ PM_INST_CMPL_ALT, PM_INST_CMPL },
{ PM_INST_DISP, PM_INST_DISP_ALT },
};
/* * We set MMCR0[CC5-6RUN] so we can use counters 5 and 6 for * PM_INST_CMPL and PM_CYC.
*/ staticint generic_compute_mmcr(u64 event[], int n_ev, unsignedint hwc[], struct mmcr_regs *mmcr, struct perf_event *pevents[], u32 flags)
{ int ret;
ret = isa207_compute_mmcr(event, n_ev, hwc, mmcr, pevents, flags); if (!ret)
mmcr->mmcr0 |= MMCR0_C56RUN; return ret;
}
int __init init_generic_compat_pmu(void)
{ int rc = 0;
/* * From ISA v2.07 on, PMU features are architected; * we require >= v3.0 because (a) that has PM_LD_CMPL and * PM_INST_CMPL_ALT, which v2.07 doesn't have, and * (b) we don't expect any non-IBM Power ISA * implementations that conform to v2.07 but not v3.0.
*/ if (!cpu_has_feature(CPU_FTR_ARCH_300)) return -ENODEV;
rc = register_power_pmu(&generic_compat_pmu); if (rc) return rc;
/* Tell userspace that EBB is supported */
cur_cpu_spec->cpu_user_features2 |= PPC_FEATURE2_EBB;
return 0;
}
Messung V0.5
¤ Dauer der Verarbeitung: 0.14 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.