LIBPFM(3)
π LIBPFM π
okay bestie, welcome to the Linux Programmer's Manual glow-up of libpfm(3) β yes it's a section 3 man page, yes it's giving "I just need one tiny function," and yes it absolutely ate. π
β¨ NAME β¨
pfm_get_version β get library version πΈ
β¨ SYNOPSIS β¨
#include <perfmon/pfmlib.h>
int pfm_get_version(void);
literally that's it. one line of C and you're done, iykyk π
β¨ DESCRIPTION β¨
so this function π β you can call it whenever. like, any time. no prep, no warm-up, no vibe check needed. you do not have to call pfm_initialize() first before calling this one. it's the low-maintenance bestie of the library fr fr. π¦
what it gives you back is the revision level of the library. and that revision number is made of two fields:
- a major number
- a minor number
both of them can be pulled out using the macros that live in the header file:
PFMLIB_MAJ_VERSION(v)β returns the major number encoded inv.PFMLIB_MIN_VERSION(v)β returns the minor number encoded inv.
so you grab the version, then you crack it open with those macros. iconic behavior honestly. β¨
β¨ RETURN β¨
the function is always successful. like, always always. it never fails, it never ghosts you, it always returns the 32-bit version number. periodt. π
β¨ ERRORS β¨
none babe. nothing. empty. the void. not a single error to report β it's that girl. π«Ά
β¨ AUTHOR β¨
Stephane Eranian <eranian@gmail.com> β thank you for your service king π
this page is from September, 2009, and it's part of LIBPFM in the Linux Programmer's Manual (section 3). mwah, slay, bye bestie π π
π¦ where this page comes from
- arch rolling: libpfm 4.14.1-1 Β· MIT
- centos-stream 10: libpfm-devel 4.14.1-1.el10 Β· MIT
- centos-stream 9: libpfm-devel 4.14.1-1.el9 Β· MIT
- centos-stream 9: libpfm-devel 4.14.1-1.el9 Β· MIT
- debian bookworm: libpfm4-dev 4.13.0-1 Β· MIT
- debian trixie: libpfm4-dev 4.13.0+git99-gc5587f9-1 Β· MIT
- fedora 43: libpfm-devel 4.13.0-16.fc43 Β· MIT
- fedora 43: libpfm-devel 4.13.0-16.fc43 Β· MIT
- fedora 43: libpfm-devel 4.13.0-20.fc43
- fedora 43: libpfm-devel 4.13.0-20.fc43
- fedora 43: libpfm-devel 4.14.1-2.fc43 Β· MIT
- fedora 43: libpfm-devel 4.14.1-2.fc43 Β· MIT
- fedora 44: libpfm-devel 4.13.0-19.fc44 Β· MIT
- fedora 44: libpfm-devel 4.13.0-19.fc44 Β· MIT
- fedora 44: libpfm-devel 4.13.0-20.fc44
- fedora 44: libpfm-devel 4.13.0-20.fc44
- fedora 44: libpfm-devel 4.14.1-2.fc44 Β· MIT
- fedora 44: libpfm-devel 4.14.1-2.fc44 Β· MIT
- nixos 26.05: libpfm 4.13.0
- nixos 26.05: papi 7.2.0
- nixpkgs unstable: libpfm 4.14.1
- nixpkgs unstable: papi 7.2.0
- opensuse-leap 16.0: libpfm-devel 4.13.0-160000.3.1 Β· MIT
- opensuse-leap 16.0: libpfm-devel 4.13.0-160000.3.1 Β· MIT
- opensuse-leap 16.0: libpfm-devel 4.13.0-160000.3.1 Β· MIT
- opensuse-leap 16.0: libpfm-devel 4.13.0-160000.3.1 Β· MIT
- ubuntu jammy: libpfm4-dev 4.11.1+git32-gd0b85fb-1 Β· BSD-like
- ubuntu jammy: libpfm4-dev 4.11.1+git32-gd0b85fb-1ubuntu0.1 Β· BSD-like
- ubuntu noble: libpfm4-dev 4.13.0+git32-g0d4ed0e-1 Β· MIT
- ubuntu noble: libpfm4-dev 4.13.0+git32-g0d4ed0e-1ubuntu0.1 Β· MIT
- ubuntu questing: libpfm4-dev 4.13.0+git99-gc5587f9-1
- ubuntu resolute: libpfm4-dev 4.13.0+git106-g3e4031b-1 Β· MIT
- ubuntu resolute: libpfm4-dev 4.13.0+git106-g3e4031b-1ubuntu0.1 Β· MIT
- ubuntu stonking: libpfm4-dev 4.13.0+git106-g3e4031b-1ubuntu1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms