Debian Codegraph @

upstream/debian-unstable/man2/PR_TASK_PERF_EVENTS_DISABLE.2const

raw
1 .\" Copyright 2012-2015, Michael Kerrisk <[email protected]>
2 .\" Copyright, the authors of the Linux man-pages project
3 .\"
4 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
5 .\"
6 .TH PR_TASK_PERF_EVENTS_DISABLE 2const 2026-02-08 "Linux man-pages 6.18"
7 .SH NAME
8 PR_TASK_PERF_EVENTS_DISABLE,
9 PR_TASK_PERF_EVENTS_ENABLE
10 \-
11 disable or enable performance counters attached to the calling process
12 .SH LIBRARY
13 Standard C library
14 .RI ( libc ,\~ \-lc )
15 .SH SYNOPSIS
16 .nf
17 .BR "#include <linux/prctl.h>" " /* Definition of " PR_* " constants */"
18 .B #include <sys/prctl.h>
19 .P
20 .B int prctl(PR_TASK_PERF_EVENTS_DISABLE);
21 .B int prctl(PR_TASK_PERF_EVENTS_ENABLE);
22 .fi
23 .SH DESCRIPTION
24 .TP
25 .B PR_TASK_PERF_EVENTS_DISABLE
26 Disable all performance counters attached to the calling process,
27 regardless of whether the counters were created by
28 this process or another process.
29 Performance counters created by the calling process for other
30 processes are unaffected.
31 .TP
32 .B PR_TASK_PERF_EVENTS_ENABLE
33 The converse of
34 .BR PR_TASK_PERF_EVENTS_DISABLE ;
35 enable performance counters attached to the calling process.
36 .SH RETURN VALUE
37 On success,
38 0 is returned.
39 On error, \-1 is returned, and
40 .I errno
41 is set to indicate the error.
42 .SH STANDARDS
43 Linux.
44 .SH HISTORY
45 Linux 2.6.31.
46 .P
47 Originally called
48 .B PR_TASK_PERF_COUNTERS_DISABLE
49 and
50 .BR PR_TASK_PERF_COUNTERS_ENABLE ;
51 .\" commit 1d1c7ddbfab358445a542715551301b7fc363e28
52 renamed (retaining the same numerical value)
53 .\" commit cdd6c482c9ff9c55475ee7392ec8f672eddb7be6
54 in Linux 2.6.32.
55 .SH SEE ALSO
56 .BR prctl (2)
57 .P
58 For more information on performance counters, see the Linux kernel source file
59 .IR tools/\:perf/\:design.txt .