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
- Copyright 2012-2015, Michael Kerrisk <mtk.manpages@gmail.com>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms