Rate This Document
Findability
Accuracy
Completeness
Readability

Low-Load Performance Collection Library

Feature Overview

libkperf is a lightweight Linux performance profiling library, allowing developers to perform performance profiling through APIs, including PMU sampling and symbol resolution. libkperf stores the collected data in the memory so that developers can directly process the collected data in the memory, avoiding the overhead caused by reading and writing perf.data.

Environment Requirements

Processor architecture: Kunpeng

Supported OSs:
  • openEuler
  • OpenCloudOS
  • TencentOS
  • KylinOS
  • CentOS

Compilation Requirements

  • Earliest GCC version: GCC 4.8.5 and glibc 2.17
  • Earliest Python version: Python 3.7

If an error message is displayed indicating that the numa.h file is not found during compilation, install the numactl-devel package.

If a CMake error is reported in the phase of "Found PythonInterp" during the compilation, install the python3-devel package.

Compile and generate APIs for the dynamic library and C:

git clone --recurse-submodules https://gitee.com/openeuler/libkperf.git 
cd libkperf 
bash build.sh install_path=/path/to/install

To compile and debug the version:

bash build.sh install_path=/path/to/install buildType=debug 

To compile the Python package:

bash build.sh install_path=/path/to/install python=true 

To uninstall the Python library:

python3 -m pip uninstall -y libkperf