43typedef enum perf_cntr {
64typedef enum perf_cntr_clock {
90typedef enum perf_cntr_event {
uint64_t perf_cntr_timer_ns(void)
Gets elapsed CPU time (in nanoseconds)
void perf_cntr_timer_enable(void)
Enable the nanosecond timer.
void perf_cntr_timer_disable(void)
Disable the nanosecond timer.
bool perf_cntr_timer_enabled(void)
Check whether the nanosecond timer is enabled.
void perf_cntr_stop(perf_cntr_t counter)
Stop a performance counter.
void perf_cntr_start(perf_cntr_t counter, perf_cntr_event_t event_mode, perf_cntr_clock_t clock_type)
Start a performance counter.
bool perf_cntr_config(perf_cntr_t counter, perf_cntr_event_t *event_mode, perf_cntr_clock_t *clock_type)
Get a performance counter's settings.
perf_cntr_event_t
Performance Counter Event Modes.
Definition perfctr.h:90
perf_cntr_clock_t
Count clock types for the SH4 performance counters.
Definition perfctr.h:64
uint64_t perf_cntr_count(perf_cntr_t counter)
Obtain the count of a performance counter.
void perf_cntr_clear(perf_cntr_t counter)
Clear a performance counter.
perf_cntr_t
Identifiers for the two SH4 performance counters.
Definition perfctr.h:43
void perf_cntr_resume(perf_cntr_t counter)
Resume a performance counter.
@ PMCR_OPERAND_READ_ACCESS_MODE
Quantity; With cache.
Definition perfctr.h:92
@ PMCR_OPERAND_CACHE_MISS_MODE
Quantity.
Definition perfctr.h:106
@ PMCR_INSTRUCTION_ISSUED_MODE
Quantity.
Definition perfctr.h:110
@ PMCR_ALL_OPERAND_ACCESS_MODE
Quantity.
Definition perfctr.h:100
@ PMCR_INTERRUPT_COUNTER_MODE
Quantity.
Definition perfctr.h:113
@ PMCR_ELAPSED_TIME_MODE
Cycles For 200MHz CPU: 5ns per count in 1 cycle = 1 count mode.
Definition perfctr.h:125
@ PMCR_BRANCH_ISSUED_MODE
Quantity; Not the same as branch taken!
Definition perfctr.h:107
@ PMCR_INSTRUCTION_FETCH_MODE
Quantity; With cache.
Definition perfctr.h:97
@ PMCR_PIPELINE_FREEZE_BY_FPU_MODE
Cycles.
Definition perfctr.h:131
@ PMCR_PIPELINE_FREEZE_BY_ICACHE_MISS_MODE
Cycles.
Definition perfctr.h:126
@ PMCR_OPERAND_WRITE_ACCESS_MODE
Quantity; With cache.
Definition perfctr.h:93
@ PMCR_UBC_A_MATCH_MODE
Quantity.
Definition perfctr.h:116
@ PMCR_PIPELINE_FREEZE_BY_CPU_REGISTER_MODE
Cycles.
Definition perfctr.h:130
@ PMCR_OPERAND_ACCESS_MODE
Quantity; With cache, counts both reads and writes.
Definition perfctr.h:105
@ PMCR_FPU_INSTRUCTION_ISSUED_MODE
Quantity.
Definition perfctr.h:112
@ PMCR_INSTRUCTION_CACHE_MISS_MODE
Quantity.
Definition perfctr.h:99
@ PMCR_NMI_COUNTER_MODE
Quantity.
Definition perfctr.h:114
@ PMCR_ALL_INSTRUCTION_FETCH_MODE
Quantity.
Definition perfctr.h:101
@ PMCR_UTLB_MISS_MODE
Quantity.
Definition perfctr.h:94
@ PMCR_SUBROUTINE_ISSUED_MODE
Quantity; Issued a BSR, BSRF, JSR, JSR/N.
Definition perfctr.h:109
@ PMCR_ON_CHIP_RAM_OPERAND_ACCESS_MODE
Quantity.
Definition perfctr.h:102
@ PMCR_OPERAND_CACHE_READ_MISS_MODE
Quantity.
Definition perfctr.h:95
@ PMCR_INIT_NO_MODE
None; Just here to be complete.
Definition perfctr.h:91
@ PMCR_UBC_B_MATCH_MODE
Quantity.
Definition perfctr.h:117
@ PMCR_OPERAND_CACHE_WRITE_MISS_MODE
Quantity.
Definition perfctr.h:96
@ PMCR_TRAPA_INSTRUCTION_COUNTER_MODE
Quantity.
Definition perfctr.h:115
@ PMCR_PIPELINE_FREEZE_BY_BRANCH_MODE
Cycles.
Definition perfctr.h:129
@ PMCR_INSTRUCTION_TLB_MISS_MODE
Quantity.
Definition perfctr.h:98
@ PMCR_ON_CHIP_IO_ACCESS_MODE
Quantity.
Definition perfctr.h:104
@ PMCR_PIPELINE_FREEZE_BY_DCACHE_MISS_MODE
Cycles.
Definition perfctr.h:127
@ PMCR_OPERAND_CACHE_FILL_MODE
Cycles.
Definition perfctr.h:120
@ PMCR_PARALLEL_INSTRUCTION_ISSUED_MODE
Quantity.
Definition perfctr.h:111
@ PMCR_INSTRUCTION_CACHE_FILL_MODE
Cycles.
Definition perfctr.h:119
@ PMCR_BRANCH_TAKEN_MODE
Quantity.
Definition perfctr.h:108
@ PMCR_COUNT_RATIO_CYCLES
Ratio Cycles.
Definition perfctr.h:80
@ PMCR_COUNT_CPU_CYCLES
CPU Cycles.
Definition perfctr.h:70
@ PRFC0
SH4 Performance Counter 0.
Definition perfctr.h:52
@ PRFC1
SH4 Performance Counter 1.
Definition perfctr.h:60