]>
Commit | Line | Data |
---|---|---|
ac56b6a8 | 1 | .\" Copyright (c) IBM Corp. 2012 |
820630e1 | 2 | .\" Author: Jan Glauber <jang@linux.vnet.ibm.com> |
820630e1 | 3 | .\" |
1dd72f9c | 4 | .\" %%%LICENSE_START(GPLv2+_DOC_FULL) |
820630e1 JG |
5 | .\" This is free documentation; you can redistribute it and/or |
6 | .\" modify it under the terms of the GNU General Public License as | |
7 | .\" published by the Free Software Foundation; either version 2 of | |
8 | .\" the License, or (at your option) any later version. | |
9 | .\" | |
10 | .\" The GNU General Public License's references to "object code" | |
11 | .\" and "executables" are to be interpreted as the output of any | |
12 | .\" document formatting or typesetting system, including | |
13 | .\" intermediate and printed output. | |
14 | .\" | |
15 | .\" This manual is distributed in the hope that it will be useful, | |
16 | .\" but WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 | .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 | .\" GNU General Public License for more details. | |
19 | .\" | |
20 | .\" You should have received a copy of the GNU General Public | |
21 | .\" License along with this manual; if not, see | |
22 | .\" <http://www.gnu.org/licenses/>. | |
6a8d8745 | 23 | .\" %%%LICENSE_END |
2908f2b4 | 24 | .\" |
9ba01802 | 25 | .TH S390_RUNTIME_INSTR 2 2019-03-06 "Linux Programmer's Manual" |
820630e1 | 26 | .SH NAME |
2908f2b4 | 27 | s390_runtime_instr \- enable/disable s390 CPU run-time instrumentation |
820630e1 JG |
28 | .SH SYNOPSIS |
29 | .nf | |
30 | .B #include <asm/runtime_instr.h> | |
dbfe9c70 | 31 | .PP |
820630e1 JG |
32 | .BI "int s390_runtime_instr(int " command ", int " signum "); |
33 | .fi | |
820630e1 JG |
34 | .SH DESCRIPTION |
35 | The | |
36 | .BR s390_runtime_instr () | |
e6d86b41 | 37 | system call starts or stops CPU run-time instrumentation for the |
2908f2b4 | 38 | calling thread. |
efeece04 | 39 | .PP |
820630e1 JG |
40 | The |
41 | .IR command | |
2908f2b4 MK |
42 | argument controls whether run-time instrumentation is started |
43 | .RB ( S390_RUNTIME_INSTR_START , | |
44 | 1) or stopped | |
45 | .RB ( S390_RUNTIME_INSTR_STOP , | |
46 | 2) for the calling thread. | |
efeece04 | 47 | .PP |
820630e1 JG |
48 | The |
49 | .IR signum | |
50 | argument specifies the number of a real-time signal. | |
cca27058 HC |
51 | This argument was used to specify a signal number that should be delivered |
52 | to the thread if the run-time instrumentation buffer was full or if | |
53 | the run-time-instrumentation-halted interrupt had occurred. | |
34451e6e MK |
54 | This feature was never used, |
55 | and in Linux 4.4 support for this feature was removed; | |
56 | .\" commit b38feccd663b55ab07116208b68e1ffc7c3c7e78 | |
57 | thus, in current kernels, this argument is ignored. | |
820630e1 | 58 | .SH RETURN VALUE |
2908f2b4 | 59 | On success, |
820630e1 JG |
60 | .BR s390_runtime_instr () |
61 | returns 0 and enables the thread for | |
2908f2b4 | 62 | run-time instrumentation by assigning the thread a default run-time |
820630e1 | 63 | instrumentation control block. |
2908f2b4 | 64 | The caller can then read and modify the control block and start the run-time |
820630e1 | 65 | instrumentation. |
2908f2b4 | 66 | On error, \-1 is returned and |
820630e1 JG |
67 | .IR errno |
68 | is set to one of the error codes listed below. | |
820630e1 JG |
69 | .SH ERRORS |
70 | .TP | |
820630e1 JG |
71 | .B EINVAL |
72 | The value specified in | |
73 | .IR command | |
cca27058 HC |
74 | is not a valid command. |
75 | .TP | |
76 | .B EINVAL | |
77 | The value specified in | |
820630e1 JG |
78 | .IR signum |
79 | is not a real-time signal number. | |
cca27058 HC |
80 | From Linux 4.4 onwards, the |
81 | .IR signum | |
fee6e679 MK |
82 | argument has no effect, |
83 | so that an invalid signal number will not result in an error. | |
820630e1 JG |
84 | .TP |
85 | .B ENOMEM | |
2908f2b4 MK |
86 | Allocating memory for the run-time instrumentation control block failed. |
87 | .TP | |
88 | .B EOPNOTSUPP | |
89 | The run-time instrumentation facility is not available. | |
820630e1 JG |
90 | .SH VERSIONS |
91 | This system call is available since Linux 3.7. | |
820630e1 | 92 | .SH CONFORMING TO |
33a0ccb2 | 93 | This Linux-specific system call is available only on the s390 architecture. |
fee6e679 MK |
94 | The run-time instrumentation facility is available |
95 | beginning with System z EC12. | |
820630e1 JG |
96 | .SH NOTES |
97 | Glibc does not provide a wrapper for this system call, use | |
98 | .BR syscall (2) | |
99 | to call it. | |
447d8953 | 100 | .PP |
03b3fa4a MK |
101 | The |
102 | .I asm/runtime_instr.h | |
103 | header file is available | |
104 | .\" commit df2f815a7df7edb5335a3bdeee6a8f9f6f9c35c4 | |
105 | since Linux 4.16. | |
cca27058 | 106 | .PP |
34451e6e MK |
107 | Starting with Linux 4.4, |
108 | support for signalling was removed, as was the check whether | |
cca27058 | 109 | .IR signum |
34451e6e MK |
110 | is a valid real-time signal. |
111 | For backwards compatibility with older kernels, it is recommended to pass | |
112 | a valid real-time signal number in | |
113 | .I signum | |
114 | and install a handler for that signal. | |
820630e1 JG |
115 | .SH SEE ALSO |
116 | .BR syscall (2), | |
117 | .BR signal (7) |