18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Performance counter support for POWER8 processors. 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Copyright 2014 Sukadev Bhattiprolu, IBM Corporation. 68c2ecf20Sopenharmony_ci */ 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ci/* 98c2ecf20Sopenharmony_ci * Power8 event codes. 108c2ecf20Sopenharmony_ci */ 118c2ecf20Sopenharmony_ciEVENT(PM_CYC, 0x0001e) 128c2ecf20Sopenharmony_ciEVENT(PM_GCT_NOSLOT_CYC, 0x100f8) 138c2ecf20Sopenharmony_ciEVENT(PM_CMPLU_STALL, 0x4000a) 148c2ecf20Sopenharmony_ciEVENT(PM_INST_CMPL, 0x00002) 158c2ecf20Sopenharmony_ciEVENT(PM_BRU_FIN, 0x10068) 168c2ecf20Sopenharmony_ciEVENT(PM_BR_MPRED_CMPL, 0x400f6) 178c2ecf20Sopenharmony_ci 188c2ecf20Sopenharmony_ci/* All L1 D cache load references counted at finish, gated by reject */ 198c2ecf20Sopenharmony_ciEVENT(PM_LD_REF_L1, 0x100ee) 208c2ecf20Sopenharmony_ci/* Load Missed L1 */ 218c2ecf20Sopenharmony_ciEVENT(PM_LD_MISS_L1, 0x3e054) 228c2ecf20Sopenharmony_ci/* Store Missed L1 */ 238c2ecf20Sopenharmony_ciEVENT(PM_ST_MISS_L1, 0x300f0) 248c2ecf20Sopenharmony_ci/* L1 cache data prefetches */ 258c2ecf20Sopenharmony_ciEVENT(PM_L1_PREF, 0x0d8b8) 268c2ecf20Sopenharmony_ci/* Instruction fetches from L1 */ 278c2ecf20Sopenharmony_ciEVENT(PM_INST_FROM_L1, 0x04080) 288c2ecf20Sopenharmony_ci/* Demand iCache Miss */ 298c2ecf20Sopenharmony_ciEVENT(PM_L1_ICACHE_MISS, 0x200fd) 308c2ecf20Sopenharmony_ci/* Instruction Demand sectors wriittent into IL1 */ 318c2ecf20Sopenharmony_ciEVENT(PM_L1_DEMAND_WRITE, 0x0408c) 328c2ecf20Sopenharmony_ci/* Instruction prefetch written into IL1 */ 338c2ecf20Sopenharmony_ciEVENT(PM_IC_PREF_WRITE, 0x0408e) 348c2ecf20Sopenharmony_ci/* The data cache was reloaded from local core's L3 due to a demand load */ 358c2ecf20Sopenharmony_ciEVENT(PM_DATA_FROM_L3, 0x4c042) 368c2ecf20Sopenharmony_ci/* Demand LD - L3 Miss (not L2 hit and not L3 hit) */ 378c2ecf20Sopenharmony_ciEVENT(PM_DATA_FROM_L3MISS, 0x300fe) 388c2ecf20Sopenharmony_ci/* All successful D-side store dispatches for this thread */ 398c2ecf20Sopenharmony_ciEVENT(PM_L2_ST, 0x17080) 408c2ecf20Sopenharmony_ci/* All successful D-side store dispatches for this thread that were L2 Miss */ 418c2ecf20Sopenharmony_ciEVENT(PM_L2_ST_MISS, 0x17082) 428c2ecf20Sopenharmony_ci/* Total HW L3 prefetches(Load+store) */ 438c2ecf20Sopenharmony_ciEVENT(PM_L3_PREF_ALL, 0x4e052) 448c2ecf20Sopenharmony_ci/* Data PTEG reload */ 458c2ecf20Sopenharmony_ciEVENT(PM_DTLB_MISS, 0x300fc) 468c2ecf20Sopenharmony_ci/* ITLB Reloaded */ 478c2ecf20Sopenharmony_ciEVENT(PM_ITLB_MISS, 0x400fc) 488c2ecf20Sopenharmony_ci/* Run_Instructions */ 498c2ecf20Sopenharmony_ciEVENT(PM_RUN_INST_CMPL, 0x500fa) 508c2ecf20Sopenharmony_ci/* Alternate event code for PM_RUN_INST_CMPL */ 518c2ecf20Sopenharmony_ciEVENT(PM_RUN_INST_CMPL_ALT, 0x400fa) 528c2ecf20Sopenharmony_ci/* Run_cycles */ 538c2ecf20Sopenharmony_ciEVENT(PM_RUN_CYC, 0x600f4) 548c2ecf20Sopenharmony_ci/* Alternate event code for Run_cycles */ 558c2ecf20Sopenharmony_ciEVENT(PM_RUN_CYC_ALT, 0x200f4) 568c2ecf20Sopenharmony_ci/* Marked store completed */ 578c2ecf20Sopenharmony_ciEVENT(PM_MRK_ST_CMPL, 0x10134) 588c2ecf20Sopenharmony_ci/* Alternate event code for Marked store completed */ 598c2ecf20Sopenharmony_ciEVENT(PM_MRK_ST_CMPL_ALT, 0x301e2) 608c2ecf20Sopenharmony_ci/* Marked two path branch */ 618c2ecf20Sopenharmony_ciEVENT(PM_BR_MRK_2PATH, 0x10138) 628c2ecf20Sopenharmony_ci/* Alternate event code for PM_BR_MRK_2PATH */ 638c2ecf20Sopenharmony_ciEVENT(PM_BR_MRK_2PATH_ALT, 0x40138) 648c2ecf20Sopenharmony_ci/* L3 castouts in Mepf state */ 658c2ecf20Sopenharmony_ciEVENT(PM_L3_CO_MEPF, 0x18082) 668c2ecf20Sopenharmony_ci/* Alternate event code for PM_L3_CO_MEPF */ 678c2ecf20Sopenharmony_ciEVENT(PM_L3_CO_MEPF_ALT, 0x3e05e) 688c2ecf20Sopenharmony_ci/* Data cache was reloaded from a location other than L2 due to a marked load */ 698c2ecf20Sopenharmony_ciEVENT(PM_MRK_DATA_FROM_L2MISS, 0x1d14e) 708c2ecf20Sopenharmony_ci/* Alternate event code for PM_MRK_DATA_FROM_L2MISS */ 718c2ecf20Sopenharmony_ciEVENT(PM_MRK_DATA_FROM_L2MISS_ALT, 0x401e8) 728c2ecf20Sopenharmony_ci/* Alternate event code for PM_CMPLU_STALL */ 738c2ecf20Sopenharmony_ciEVENT(PM_CMPLU_STALL_ALT, 0x1e054) 748c2ecf20Sopenharmony_ci/* Two path branch */ 758c2ecf20Sopenharmony_ciEVENT(PM_BR_2PATH, 0x20036) 768c2ecf20Sopenharmony_ci/* Alternate event code for PM_BR_2PATH */ 778c2ecf20Sopenharmony_ciEVENT(PM_BR_2PATH_ALT, 0x40036) 788c2ecf20Sopenharmony_ci/* # PPC Dispatched */ 798c2ecf20Sopenharmony_ciEVENT(PM_INST_DISP, 0x200f2) 808c2ecf20Sopenharmony_ci/* Alternate event code for PM_INST_DISP */ 818c2ecf20Sopenharmony_ciEVENT(PM_INST_DISP_ALT, 0x300f2) 828c2ecf20Sopenharmony_ci/* Marked filter Match */ 838c2ecf20Sopenharmony_ciEVENT(PM_MRK_FILT_MATCH, 0x2013c) 848c2ecf20Sopenharmony_ci/* Alternate event code for PM_MRK_FILT_MATCH */ 858c2ecf20Sopenharmony_ciEVENT(PM_MRK_FILT_MATCH_ALT, 0x3012e) 868c2ecf20Sopenharmony_ci/* Alternate event code for PM_LD_MISS_L1 */ 878c2ecf20Sopenharmony_ciEVENT(PM_LD_MISS_L1_ALT, 0x400f0) 888c2ecf20Sopenharmony_ci/* 898c2ecf20Sopenharmony_ci * Memory Access Event -- mem_access 908c2ecf20Sopenharmony_ci * Primary PMU event used here is PM_MRK_INST_CMPL, along with 918c2ecf20Sopenharmony_ci * Random Load/Store Facility Sampling (RIS) in Random sampling mode (MMCRA[SM]). 928c2ecf20Sopenharmony_ci */ 938c2ecf20Sopenharmony_ciEVENT(MEM_ACCESS, 0x10401e0) 94