Hello Alex, On 4/23/21 10:31 PM, Alejandro Colomar (man-pages) wrote: > Hi Michael, > > I haven't found any of the constants (PFM_*) used by this function in > glibc. Also not in the kernel, although in the kernel I found other > PFM_* constants different from the ones in the manual page. > > I checked that this page hasn't received any patches in a very long time > (except for "Various pages" patches), so I suspect it may be out of date. > > Also, does <perfmon.h> really exist? I couldn't find it either. It's certainly not up to date! In fact, this system call was removed in Linux 5.10. I have applied the patch below. Cheers, Michael diff --git a/man2/perfmonctl.2 b/man2/perfmonctl.2 index b376126a1..319712e6d 100644 --- a/man2/perfmonctl.2 +++ b/man2/perfmonctl.2 @@ -196,12 +196,18 @@ On error, \-1 is returned and is set to indicate the error. .SH VERSIONS .BR perfmonctl () -is available since Linux 2.4. +was added in Linux 2.4; +.\" commit ecf5b72d5f66af843f189dfe9ce31598c3e48ad7 +it was removed in Linux 5.10. .SH CONFORMING TO .BR perfmonctl () is Linux-specific and is available only on the IA-64 architecture. .SH NOTES -Glibc does not provide a wrapper for this system call; call it using +This system call was broken for many years, +and ultimately removed in Linux 5.10. +.PP +Glibc does not provide a wrapper for this system call; +on kernels where it exists, call it using .BR syscall (2). .SH SEE ALSO .BR gprof (1) -- Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/