The Linux Kernel Logo
  • Development process
  • Submitting patches
  • Code of conduct
  • Maintainer handbook
  • All development-process docs
  • Core API
  • Driver APIs
  • Subsystems
  • Locking
  • Licensing rules
  • Writing documentation
  • Development tools
  • Testing guide
  • Hacking guide
  • Tracing
  • Fault injection
  • Livepatching
  • Rust
  • Administration
    • General guides to kernel administration
    • Booting the kernel
    • Tracking down and identifying problems
      • Reporting issues
      • Reporting regressions
      • How to quickly build a trimmed Linux kernel
      • How to verify bugs and bisect regressions
      • Bug hunting
      • Bisecting a regression
      • Tainted kernels
      • Ramoops oops/panic logger
      • Dynamic debug
      • Explaining the “No working init found.” boot hang message
      • Documentation for Kdump - The kexec-based Crash Dumping Solution
      • Performance monitor support
        • HiSilicon SoC uncore Performance Monitoring Unit (PMU)
        • HiSilicon PCIe Performance Monitoring Unit (PMU)
        • HNS3 Performance Monitoring Unit (PMU)
        • Freescale i.MX8 DDR Performance Monitoring Unit (PMU)
        • Qualcomm Technologies Level-2 Cache Performance Monitoring Unit (PMU)
        • Qualcomm Datacenter Technologies L3 Cache Performance Monitoring Unit (PMU)
        • StarFive StarLink Performance Monitor Unit (PMU)
        • Marvell Odyssey DDR PMU Performance Monitoring Unit (PMU UNCORE)
        • Marvell Odyssey LLC-TAD Performance Monitoring Unit (PMU UNCORE)
        • ARM Cache Coherent Network
        • Arm Coherent Mesh Network PMU
        • Arm Network-on Chip Interconnect PMU
        • APM X-Gene SoC Performance Monitoring Unit (PMU)
        • ARM DynamIQ Shared Unit (DSU) PMU
        • Cavium ThunderX2 SoC Performance Monitoring Unit (PMU UNCORE)
        • Alibaba’s T-Head SoC Uncore Performance Monitoring Unit (PMU)
        • Synopsys DesignWare Cores (DWC) PCIe Performance Monitoring Unit (PMU)
        • NVIDIA Tegra SoC Uncore Performance Monitoring Unit (PMU)
        • Amlogic SoC DDR Bandwidth Performance Monitoring Unit (PMU)
        • CXL Performance Monitoring Unit (CPMU)
        • Ampere SoC Performance Monitoring Unit (PMU)
        • Marvell Odyssey PEM Performance Monitoring Unit (PMU UNCORE)
      • pstore block oops/panic logger
      • Clearing WARN_ONCE
      • Reducing OS jitter due to per-cpu kthreads
      • Softlockup detector and hardlockup detector (aka nmi_watchdog)
      • Reliability, Availability and Serviceability (RAS)
      • Error decoding
      • Address translation
      • Linux Magic System Request Key Hacks
    • Core-kernel subsystems
    • Block-layer and filesystem administration
    • Device-specific guides
    • Workload analysis
    • Everything else
  • Build system
  • Reporting issues
  • Userspace tools
  • Userspace API
  • Firmware
  • Firmware and Devicetree
  • CPU architectures
  • Unsorted documentation
  • Translations
The Linux Kernel
  • The Linux kernel user’s and administrator’s guide
  • Performance monitor support
  • StarFive StarLink Performance Monitor Unit (PMU)
  • View page source

StarFive StarLink Performance Monitor Unit (PMU)¶

StarFive StarLink Performance Monitor Unit (PMU) exists within the StarLink Coherent Network on Chip (CNoC) that connects multiple CPU clusters with an L3 memory system.

The uncore PMU supports overflow interrupt, up to 16 programmable 64bit event counters, and an independent 64bit cycle counter. The PMU can only be accessed via Memory Mapped I/O and are common to the cores connected to the same PMU.

Driver exposes supported PMU events in sysfs “events” directory under:

/sys/bus/event_source/devices/starfive_starlink_pmu/events/

Driver exposes cpu used to handle PMU events in sysfs “cpumask” directory under:

/sys/bus/event_source/devices/starfive_starlink_pmu/cpumask/

Driver describes the format of config (event ID) in sysfs “format” directory under:

/sys/bus/event_source/devices/starfive_starlink_pmu/format/

Example of perf usage:

$ perf list

starfive_starlink_pmu/cycles/                      [Kernel PMU event]
starfive_starlink_pmu/read_hit/                    [Kernel PMU event]
starfive_starlink_pmu/read_miss/                   [Kernel PMU event]
starfive_starlink_pmu/read_request/                [Kernel PMU event]
starfive_starlink_pmu/release_request/             [Kernel PMU event]
starfive_starlink_pmu/write_hit/                   [Kernel PMU event]
starfive_starlink_pmu/write_miss/                  [Kernel PMU event]
starfive_starlink_pmu/write_request/               [Kernel PMU event]
starfive_starlink_pmu/writeback/                   [Kernel PMU event]


$ perf stat -a -e /starfive_starlink_pmu/cycles/ sleep 1

Sampling is not supported. As a result, “perf record” is not supported. Attaching to a task is not supported, only system-wide counting is supported.

Previous Next

© Copyright The kernel development community.

Built with Sphinx using a theme provided by Read the Docs.