pub unsafe extern "C" fn svcControlPerformanceCounter(
    out: *mut u64_,
    op: PerfCounterOperation,
    param1: u32_,
    param2: u64_
) -> Result
Expand description

Controls performance monitoring on the CP15 interface and the SCU. The meaning of the parameters depend on the operation.

§Arguments

  • out (direction out) - Output.
  • op - Operation, see details.
  • param1 - First parameter.
  • param2 - Second parameter.

The operations are the following:

  • PERFCOUNTEROP_ENABLE (void) -> void, tries to enable and lock perfmon. functionality.
  • PERFCOUNTEROP_DISABLE (void) -> void, disable and forcibly unlocks perfmon. functionality.
  • PERFCOUNTEROP_GET_VALUE (PerfCounterRegister reg) -> u64, gets the value of a particular counter register.
  • PERFCOUNTEROP_SET_VALUE (PerfCounterRegister reg, u64 value) -> void, sets the value of a particular counter register.
  • PERFCOUNTEROP_GET_OVERFLOW_FLAGS (void) -> u32, gets the overflow flags of all CP15 and SCU registers.
  • Format is a bitfield of PerfCounterRegister.
  • PERFCOUNTEROP_RESET (u32 valueResetMask, u32 overflowFlagResetMask) -> void, resets the value and/or overflow flags of selected registers.
  • Format is two bitfields of PerfCounterRegister.
  • PERFCOUNTEROP_GET_EVENT (PerfCounterRegister reg) -> PerfCounterEvent, gets the event associated to a particular counter register.
  • PERFCOUNTEROP_SET_EVENT (PerfCounterRegister reg, PerfCounterEvent) -> void, sets the event associated to a particular counter register.
  • PERFCOUNTEROP_SET_VIRTUAL_COUNTER_ENABLED (bool enabled) -> void, (dis)allows the kernel to track counter overflows and to use 64-bit counter values.