Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/pmc.h
Show First 20 Lines • Show All 723 Lines • ▼ Show 20 Lines | |||||
* process-virtual PMC could be concurrently executing on different | * process-virtual PMC could be concurrently executing on different | ||||
* CPUs. The 'pm_runcount' field is atomically incremented every time | * CPUs. The 'pm_runcount' field is atomically incremented every time | ||||
* the PMC gets scheduled on a CPU and atomically decremented when it | * the PMC gets scheduled on a CPU and atomically decremented when it | ||||
* get descheduled. Deletion of a PMC is only permitted when this | * get descheduled. Deletion of a PMC is only permitted when this | ||||
* field is '0'. | * field is '0'. | ||||
* | * | ||||
*/ | */ | ||||
struct pmc_pcpu_state { | struct pmc_pcpu_state { | ||||
uint32_t pps_overflowcnt; /* count overflow interrupts */ | |||||
uint8_t pps_stalled; | uint8_t pps_stalled; | ||||
uint8_t pps_cpustate; | uint8_t pps_cpustate; | ||||
} __aligned(CACHE_LINE_SIZE); | } __aligned(CACHE_LINE_SIZE); | ||||
struct pmc { | struct pmc { | ||||
LIST_HEAD(,pmc_target) pm_targets; /* list of target processes */ | LIST_HEAD(,pmc_target) pm_targets; /* list of target processes */ | ||||
LIST_ENTRY(pmc) pm_next; /* owner's list */ | LIST_ENTRY(pmc) pm_next; /* owner's list */ | ||||
/* | /* | ||||
Show All 28 Lines | struct pmc { | ||||
struct pmc_pcpu_state *pm_pcpu_state; | struct pmc_pcpu_state *pm_pcpu_state; | ||||
volatile cpuset_t pm_cpustate; /* CPUs where PMC should be active */ | volatile cpuset_t pm_cpustate; /* CPUs where PMC should be active */ | ||||
uint32_t pm_caps; /* PMC capabilities */ | uint32_t pm_caps; /* PMC capabilities */ | ||||
enum pmc_event pm_event; /* event being measured */ | enum pmc_event pm_event; /* event being measured */ | ||||
uint32_t pm_flags; /* additional flags PMC_F_... */ | uint32_t pm_flags; /* additional flags PMC_F_... */ | ||||
struct pmc_owner *pm_owner; /* owner thread state */ | struct pmc_owner *pm_owner; /* owner thread state */ | ||||
counter_u64_t pm_runcount; /* #cpus currently on */ | counter_u64_t pm_runcount; /* #cpus currently on */ | ||||
enum pmc_state pm_state; /* current PMC state */ | enum pmc_state pm_state; /* current PMC state */ | ||||
uint32_t pm_overflowcnt; /* count overflow interrupts */ | |||||
/* | /* | ||||
* The PMC ID field encodes the row-index for the PMC, its | * The PMC ID field encodes the row-index for the PMC, its | ||||
* mode, class and the CPU# associated with the PMC. | * mode, class and the CPU# associated with the PMC. | ||||
*/ | */ | ||||
pmc_id_t pm_id; /* allocated PMC id */ | pmc_id_t pm_id; /* allocated PMC id */ | ||||
enum pmc_class pm_class; | enum pmc_class pm_class; | ||||
▲ Show 20 Lines • Show All 443 Lines • Show Last 20 Lines |