⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

Module pmu

Module pmu 

Source
Expand description

Hardware Performance Monitoring Unit (PMU) Driver

Provides access to hardware performance counters for profiling and optimization. Supports x86_64 (IA32_PERFEVTSELx / IA32_PMCx MSRs), AArch64 (PMCR_EL0, PMCNTENSET_EL0), and RISC-V (mcycle, minstret). Performance events that can be counted:

  • Instructions retired
  • CPU cycles
  • Cache misses (L1, L2, LLC)
  • Branch mispredictions
  • TLB misses