Install libpfm4 by entering the following commands in the terminal:
sudo apt update sudo apt install libpfm4
Library to program the performance monitoring events
Libpfm4 helps convert from an event name, expressed as a string, to the event encoding. The encoding can then be used with specific OS interfaces. Libpfm4 also provides OS-specific interfaces to directly setup OS-specific data structures to be passed to the kernel. The current libpfm4, for instance, provides support for the perf_events interface which was introduced in Linux v2.6.31. . This package provides the shared library.