Path: blob/master/arch/sparc/include/uapi/asm/perfctr.h
26496 views
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */1/*----------------------------------------2PERFORMANCE INSTRUMENTATION3Guillaume Thouvenin 08/10/984David S. Miller 10/06/985---------------------------------------*/6#ifndef PERF_COUNTER_API7#define PERF_COUNTER_API89/* sys_perfctr() interface. First arg is operation code10* from enumeration below. The meaning of further arguments11* are determined by the operation code.12*13* NOTE: This system call is no longer provided, use the perf_events14* infrastructure.15*16* Pointers which are passed by the user are pointers to 64-bit17* integers.18*19* Once enabled, performance counter state is retained until the20* process either exits or performs an exec. That is, performance21* counters remain enabled for fork/clone children.22*/23enum perfctr_opcode {24/* Enable UltraSparc performance counters, ARG0 is pointer25* to 64-bit accumulator for D0 counter in PIC, ARG1 is pointer26* to 64-bit accumulator for D1 counter. ARG2 is a pointer to27* the initial PCR register value to use.28*/29PERFCTR_ON,3031/* Disable UltraSparc performance counters. The PCR is written32* with zero and the user counter accumulator pointers and33* working PCR register value are forgotten.34*/35PERFCTR_OFF,3637/* Add current D0 and D1 PIC values into user pointers given38* in PERFCTR_ON operation. The PIC is cleared before returning.39*/40PERFCTR_READ,4142/* Clear the PIC register. */43PERFCTR_CLRPIC,4445/* Begin using a new PCR value, the pointer to which is passed46* in ARG0. The PIC is also cleared after the new PCR value is47* written.48*/49PERFCTR_SETPCR,5051/* Store in pointer given in ARG0 the current PCR register value52* being used.53*/54PERFCTR_GETPCR55};5657#define PRIV 0x0000000158#define SYS 0x0000000259#define USR 0x000000046061/* Pic.S0 Selection Bit Field Encoding, Ultra-I/II */62#define CYCLE_CNT 0x0000000063#define INSTR_CNT 0x0000001064#define DISPATCH0_IC_MISS 0x0000002065#define DISPATCH0_STOREBUF 0x0000003066#define IC_REF 0x0000008067#define DC_RD 0x0000009068#define DC_WR 0x000000A069#define LOAD_USE 0x000000B070#define EC_REF 0x000000C071#define EC_WRITE_HIT_RDO 0x000000D072#define EC_SNOOP_INV 0x000000E073#define EC_RD_HIT 0x000000F07475/* Pic.S0 Selection Bit Field Encoding, Ultra-III */76#define US3_CYCLE_CNT 0x0000000077#define US3_INSTR_CNT 0x0000001078#define US3_DISPATCH0_IC_MISS 0x0000002079#define US3_DISPATCH0_BR_TGT 0x0000003080#define US3_DISPATCH0_2ND_BR 0x0000004081#define US3_RSTALL_STOREQ 0x0000005082#define US3_RSTALL_IU_USE 0x0000006083#define US3_IC_REF 0x0000008084#define US3_DC_RD 0x0000009085#define US3_DC_WR 0x000000a086#define US3_EC_REF 0x000000c087#define US3_EC_WR_HIT_RTO 0x000000d088#define US3_EC_SNOOP_INV 0x000000e089#define US3_EC_RD_MISS 0x000000f090#define US3_PC_PORT0_RD 0x0000010091#define US3_SI_SNOOP 0x0000011092#define US3_SI_CIQ_FLOW 0x0000012093#define US3_SI_OWNED 0x0000013094#define US3_SW_COUNT_0 0x0000014095#define US3_IU_BR_MISS_TAKEN 0x0000015096#define US3_IU_BR_COUNT_TAKEN 0x0000016097#define US3_DISP_RS_MISPRED 0x0000017098#define US3_FA_PIPE_COMPL 0x0000018099#define US3_MC_READS_0 0x00000200100#define US3_MC_READS_1 0x00000210101#define US3_MC_READS_2 0x00000220102#define US3_MC_READS_3 0x00000230103#define US3_MC_STALLS_0 0x00000240104#define US3_MC_STALLS_2 0x00000250105106/* Pic.S1 Selection Bit Field Encoding, Ultra-I/II */107#define CYCLE_CNT_D1 0x00000000108#define INSTR_CNT_D1 0x00000800109#define DISPATCH0_IC_MISPRED 0x00001000110#define DISPATCH0_FP_USE 0x00001800111#define IC_HIT 0x00004000112#define DC_RD_HIT 0x00004800113#define DC_WR_HIT 0x00005000114#define LOAD_USE_RAW 0x00005800115#define EC_HIT 0x00006000116#define EC_WB 0x00006800117#define EC_SNOOP_CB 0x00007000118#define EC_IT_HIT 0x00007800119120/* Pic.S1 Selection Bit Field Encoding, Ultra-III */121#define US3_CYCLE_CNT_D1 0x00000000122#define US3_INSTR_CNT_D1 0x00000800123#define US3_DISPATCH0_MISPRED 0x00001000124#define US3_IC_MISS_CANCELLED 0x00001800125#define US3_RE_ENDIAN_MISS 0x00002000126#define US3_RE_FPU_BYPASS 0x00002800127#define US3_RE_DC_MISS 0x00003000128#define US3_RE_EC_MISS 0x00003800129#define US3_IC_MISS 0x00004000130#define US3_DC_RD_MISS 0x00004800131#define US3_DC_WR_MISS 0x00005000132#define US3_RSTALL_FP_USE 0x00005800133#define US3_EC_MISSES 0x00006000134#define US3_EC_WB 0x00006800135#define US3_EC_SNOOP_CB 0x00007000136#define US3_EC_IC_MISS 0x00007800137#define US3_RE_PC_MISS 0x00008000138#define US3_ITLB_MISS 0x00008800139#define US3_DTLB_MISS 0x00009000140#define US3_WC_MISS 0x00009800141#define US3_WC_SNOOP_CB 0x0000a000142#define US3_WC_SCRUBBED 0x0000a800143#define US3_WC_WB_WO_READ 0x0000b000144#define US3_PC_SOFT_HIT 0x0000c000145#define US3_PC_SNOOP_INV 0x0000c800146#define US3_PC_HARD_HIT 0x0000d000147#define US3_PC_PORT1_RD 0x0000d800148#define US3_SW_COUNT_1 0x0000e000149#define US3_IU_STAT_BR_MIS_UNTAKEN 0x0000e800150#define US3_IU_STAT_BR_COUNT_UNTAKEN 0x0000f000151#define US3_PC_MS_MISSES 0x0000f800152#define US3_MC_WRITES_0 0x00010800153#define US3_MC_WRITES_1 0x00011000154#define US3_MC_WRITES_2 0x00011800155#define US3_MC_WRITES_3 0x00012000156#define US3_MC_STALLS_1 0x00012800157#define US3_MC_STALLS_3 0x00013000158#define US3_RE_RAW_MISS 0x00013800159#define US3_FM_PIPE_COMPLETION 0x00014000160161struct vcounter_struct {162unsigned long long vcnt0;163unsigned long long vcnt1;164};165166#endif /* !(PERF_COUNTER_API) */167168169