Skip to contentSkip to conversation

perfmonctl.2: Is it up to date?

DISCUSSION Alejandro Colomar (man-pages) 2 participants 2 messages Apr 23, 2021 – May 9, 2021 Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore
#0 lore raw

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.

Cheers,

Alex

Signature · 3 lines
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/
#1 lore raw

Hello Alex,

Quoted 10 lines · Alejandro Colomar (man-pages)

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

man2/perfmonctl.2 +8 -2
index b376126a1..319712e6d 100644
@@ -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)
Signature · 3 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/