PR_TASK_PERF_EVENTS_DISABLE(2const)

πŸ’… PR_TASK_PERF_EVENTS_DISABLE(2const) β€” no cap, the vibes are counter-intuitive

okay bestie, sit down, hydrate, because we're talking about prctl(2) constants from linux/prctl.h β€” specifically the two little gremlins that turn performance counters on and off for the process that's calling them. It's PR_TASK_PERF_EVENTS_DISABLE(2const) energy and it's lowkey iconic. πŸŽ€


✨ NAME ✨

PR_TASK_PERF_EVENTS_DISABLE, PR_TASK_PERF_EVENTS_ENABLE β€” disable or enable performance counters attached to the calling process. πŸ¦‹


πŸ“š LIBRARY πŸ“š

Standard C library (libc, -lc). bestie you already have it, it's giving standard library realness. πŸ’–


🫢 SYNOPSIS 🫢

#include <linux/prctl.h>  /* Definition of PR_* constants */
#include <sys/prctl.h>

int prctl(PR_TASK_PERF_EVENTS_DISABLE);
int prctl(PR_TASK_PERF_EVENTS_ENABLE);

🌸 DESCRIPTION 🌸

PR_TASK_PERF_EVENTS_DISABLE

This one goes βœ‹ stop βœ‹ to all performance counters attached to the calling process β€” literally all of them, and it does NOT care whether those counters were created by this process or by some other process. Not picky. Not judging. Not filtering. πŸ‘‘

but wait, the plot twist: performance counters that the calling process created for other processes? Those are totally unaffected. Those are doing their own thing, living their own life, main character energy elsewhere. πŸ™ˆ

PR_TASK_PERF_EVENTS_ENABLE

The converse of PR_TASK_PERF_EVENTS_DISABLE β€” it enables performance counters attached to the calling process. That's it. That's the whole thing. Turn it back on. Slay. ✨


πŸ”₯ RETURN VALUE πŸ”₯

On success, 0 is returned. On error, -1 is returned, and errno is set to indicate the error. classic. πŸ’€


πŸ‘‘ STANDARDS πŸ‘‘

Linux. (just Linux. it's giving Linux exclusive, periodt. πŸ’…)


⭐ HISTORY ⭐

Linux 2.6.31. πŸ¦‹

Originally called PR_TASK_PERF_COUNTERS_DISABLE and PR_TASK_PERF_COUNTERS_ENABLE; renamed (retaining the same numerical value) in Linux 2.6.32. So yeah, the glow-up was real β€” same value, cuter names. not me being obsessed with a rename that keeps the number the same 😭


🌈 SEE ALSO 🌈

For more information on performance counters, see the Linux kernel source file tools/perf/design.txt. πŸ“‚ go read it bestie, iykyk


okay that's the whole page, you ate it, no crumbs left πŸ’–βœ¨πŸ₯³

this cutie was brought to you by Linux man-pages 6.20, dated 2026-02-0, and the letter "p" for prctl. mwah. πŸ’‹πŸŽ€

πŸ“¦ where this page comes from
  • arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
  • nixpkgs unstable: man-pages 6.20
  • πŸ“œ the page's license: Linux-man-pages-copyleft
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms