]>
Commit | Line | Data |
---|---|---|
ac56b6a8 | 1 | .\" Copyright (c) IBM Corp. 2012 |
820630e1 | 2 | .\" Author: Jan Glauber <jang@linux.vnet.ibm.com> |
820630e1 | 3 | .\" |
e4a74ca8 | 4 | .\" SPDX-License-Identifier: GPL-2.0-or-later |
2908f2b4 | 5 | .\" |
4c1c5274 | 6 | .TH s390_runtime_instr 2 (date) "Linux man-pages (unreleased)" |
820630e1 | 7 | .SH NAME |
2908f2b4 | 8 | s390_runtime_instr \- enable/disable s390 CPU run-time instrumentation |
356a0956 AC |
9 | .SH LIBRARY |
10 | Standard C library | |
8fc3b2cf | 11 | .RI ( libc ", " \-lc ) |
820630e1 JG |
12 | .SH SYNOPSIS |
13 | .nf | |
cca4e32e AC |
14 | .BR "#include <asm/runtime_instr.h>" " /* Definition of " S390_* " constants */" |
15 | .BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */" | |
16 | .B #include <unistd.h> | |
dbfe9c70 | 17 | .PP |
cca4e32e | 18 | .BI "int syscall(SYS_s390_runtime_instr, int " command ", int " signum ); |
820630e1 | 19 | .fi |
632d1152 GC |
20 | .PP |
21 | .IR Note : | |
cca4e32e | 22 | glibc provides no wrapper for |
01833135 | 23 | .BR s390_runtime_instr (), |
cca4e32e AC |
24 | necessitating the use of |
25 | .BR syscall (2). | |
820630e1 JG |
26 | .SH DESCRIPTION |
27 | The | |
28 | .BR s390_runtime_instr () | |
e6d86b41 | 29 | system call starts or stops CPU run-time instrumentation for the |
2908f2b4 | 30 | calling thread. |
efeece04 | 31 | .PP |
820630e1 | 32 | The |
1ae6b2c7 | 33 | .I command |
2908f2b4 MK |
34 | argument controls whether run-time instrumentation is started |
35 | .RB ( S390_RUNTIME_INSTR_START , | |
36 | 1) or stopped | |
37 | .RB ( S390_RUNTIME_INSTR_STOP , | |
38 | 2) for the calling thread. | |
efeece04 | 39 | .PP |
820630e1 | 40 | The |
1ae6b2c7 | 41 | .I signum |
820630e1 | 42 | argument specifies the number of a real-time signal. |
cca27058 HC |
43 | This argument was used to specify a signal number that should be delivered |
44 | to the thread if the run-time instrumentation buffer was full or if | |
45 | the run-time-instrumentation-halted interrupt had occurred. | |
34451e6e MK |
46 | This feature was never used, |
47 | and in Linux 4.4 support for this feature was removed; | |
48 | .\" commit b38feccd663b55ab07116208b68e1ffc7c3c7e78 | |
49 | thus, in current kernels, this argument is ignored. | |
820630e1 | 50 | .SH RETURN VALUE |
2908f2b4 | 51 | On success, |
820630e1 JG |
52 | .BR s390_runtime_instr () |
53 | returns 0 and enables the thread for | |
2908f2b4 | 54 | run-time instrumentation by assigning the thread a default run-time |
820630e1 | 55 | instrumentation control block. |
2908f2b4 | 56 | The caller can then read and modify the control block and start the run-time |
820630e1 | 57 | instrumentation. |
2908f2b4 | 58 | On error, \-1 is returned and |
1ae6b2c7 | 59 | .I errno |
7a6227d3 | 60 | is set to indicate the error. |
820630e1 JG |
61 | .SH ERRORS |
62 | .TP | |
820630e1 JG |
63 | .B EINVAL |
64 | The value specified in | |
1ae6b2c7 | 65 | .I command |
cca27058 HC |
66 | is not a valid command. |
67 | .TP | |
68 | .B EINVAL | |
69 | The value specified in | |
1ae6b2c7 | 70 | .I signum |
820630e1 | 71 | is not a real-time signal number. |
cca27058 | 72 | From Linux 4.4 onwards, the |
1ae6b2c7 | 73 | .I signum |
fee6e679 MK |
74 | argument has no effect, |
75 | so that an invalid signal number will not result in an error. | |
820630e1 JG |
76 | .TP |
77 | .B ENOMEM | |
2908f2b4 MK |
78 | Allocating memory for the run-time instrumentation control block failed. |
79 | .TP | |
80 | .B EOPNOTSUPP | |
81 | The run-time instrumentation facility is not available. | |
820630e1 JG |
82 | .SH VERSIONS |
83 | This system call is available since Linux 3.7. | |
3113c7f3 | 84 | .SH STANDARDS |
33a0ccb2 | 85 | This Linux-specific system call is available only on the s390 architecture. |
fee6e679 MK |
86 | The run-time instrumentation facility is available |
87 | beginning with System z EC12. | |
820630e1 | 88 | .SH NOTES |
03b3fa4a MK |
89 | The |
90 | .I asm/runtime_instr.h | |
91 | header file is available | |
92 | .\" commit df2f815a7df7edb5335a3bdeee6a8f9f6f9c35c4 | |
93 | since Linux 4.16. | |
cca27058 | 94 | .PP |
34451e6e MK |
95 | Starting with Linux 4.4, |
96 | support for signalling was removed, as was the check whether | |
1ae6b2c7 | 97 | .I signum |
34451e6e MK |
98 | is a valid real-time signal. |
99 | For backwards compatibility with older kernels, it is recommended to pass | |
100 | a valid real-time signal number in | |
101 | .I signum | |
102 | and install a handler for that signal. | |
820630e1 JG |
103 | .SH SEE ALSO |
104 | .BR syscall (2), | |
105 | .BR signal (7) |