How qualcomm/libqcperf works
libqcperf is a cross-platform Qualcomm performance-profiling library. An application uses the public API to discover backend capabilities and request metrics; the core connects the selected backend, which collects platform metrics and delivers results through callbacks. The documented backend set spans CPU, NPU, thermal, power, and a dummy reference implementation. The graph also shows the shared asynchronous/threading layer. Several backend implementations were not sampled, so their detailed internal dependencies are omitted.
Main entry points: qcperf.c Core Runtime · qcom_linux_cpu.c Linux CPU · wos_cpu.c WoS CPU · wos_power_backend.c WoS Power
Components 15
Application API
- Public API
qcperf/core/inc/qcperf.h
Core Dispatch
- Core Runtime
qcperf/core/src/qcperf.c - Backend Registry
qcperf/backends/inc/qcperf_backends.h - Backend Contract
qcperf/core/inc/internal/qcperf_backend_interface.h - Metric Types
qcperf/core/inc/qcperf_common.h
Metric Backends
- Linux CPU
qcperf/backends/qcom-linux-cpu/src/qcom_linux_cpu.c - DSP NPU
qcperf/backends/qcom-dsp-npu/src/qcom_dsp_npu.c - WoS CPU
qcperf/backends/wos-cpu/src/wos_cpu.c - WoS Power
qcperf/backends/wos-power-backend/src/wos_power_backend.c - WoS Thermal
qcperf/backends/wos-thermal/src/wos_thermal.c - Dummy Backend
qcperf/backends/dummy/src/dummy.c - Thermal Support
qcperf/backends/utils/wos/cpu-thermal-etw/src/thermal_common.cpp
Shared Internals
- Thread Utility
qcperf/utils/qthread/inc/qthread.h - Time Utility
qcperf/utils/qtime/inc/qtime.h
Other components
- Application
Connections 19
- Application → Public API: requests metrics
README.md - Public API → Core Runtime: routes API calls
qcperf/core/src/qcperf.c - Core Runtime → Backend Registry: selects backends
qcperf/core/src/qcperf.c - Core Runtime → Backend Contract: initializes interface
qcperf/core/src/qcperf.c - Core Runtime → Metric Types: uses metric types
qcperf/core/src/qcperf.c - Core Runtime → Linux CPU: dispatches requests
README.md - Core Runtime → DSP NPU: dispatches requests
README.md - Core Runtime → WoS CPU: dispatches requests
README.md - Core Runtime → WoS Power: dispatches requests
README.md - Core Runtime → WoS Thermal: dispatches requests
README.md - Core Runtime → Dummy Backend: dispatches requests
README.md - Linux CPU → Thread Utility: uses threads
qcperf/backends/qcom-linux-cpu/src/qcom_linux_cpu.c - Linux CPU → Time Utility: reads time
qcperf/backends/qcom-linux-cpu/src/qcom_linux_cpu.c - WoS CPU → Thread Utility: uses threads
qcperf/backends/wos-cpu/src/wos_cpu.c - WoS CPU → Time Utility: reads time
qcperf/backends/wos-cpu/src/wos_cpu.c - WoS Power → Thread Utility: uses threads
qcperf/backends/wos-power-backend/src/wos_power_backend.c - WoS Power → Time Utility: reads time
qcperf/backends/wos-power-backend/src/wos_power_backend.c - WoS Thermal → Thermal Support: uses support
- Core Runtime → Application: delivers callbacks
README.md