]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man2/s390_runtime_instr.2
mmap.2: srcfix: note kernel commit that caused MAP_POPULATE | MAP_NONBLOCK to be...
[thirdparty/man-pages.git] / man2 / s390_runtime_instr.2
CommitLineData
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 27s390_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
35The
36.BR s390_runtime_instr ()
e6d86b41 37system call starts or stops CPU run-time instrumentation for the
2908f2b4 38calling thread.
efeece04 39.PP
820630e1
JG
40The
41.IR command
2908f2b4
MK
42argument controls whether run-time instrumentation is started
43.RB ( S390_RUNTIME_INSTR_START ,
441) or stopped
45.RB ( S390_RUNTIME_INSTR_STOP ,
462) for the calling thread.
efeece04 47.PP
820630e1
JG
48The
49.IR signum
50argument specifies the number of a real-time signal.
cca27058
HC
51This argument was used to specify a signal number that should be delivered
52to the thread if the run-time instrumentation buffer was full or if
53the run-time-instrumentation-halted interrupt had occurred.
34451e6e
MK
54This feature was never used,
55and in Linux 4.4 support for this feature was removed;
56.\" commit b38feccd663b55ab07116208b68e1ffc7c3c7e78
57thus, in current kernels, this argument is ignored.
820630e1 58.SH RETURN VALUE
2908f2b4 59On success,
820630e1
JG
60.BR s390_runtime_instr ()
61returns 0 and enables the thread for
2908f2b4 62run-time instrumentation by assigning the thread a default run-time
820630e1 63instrumentation control block.
2908f2b4 64The caller can then read and modify the control block and start the run-time
820630e1 65instrumentation.
2908f2b4 66On error, \-1 is returned and
820630e1
JG
67.IR errno
68is set to one of the error codes listed below.
820630e1
JG
69.SH ERRORS
70.TP
820630e1
JG
71.B EINVAL
72The value specified in
73.IR command
cca27058
HC
74is not a valid command.
75.TP
76.B EINVAL
77The value specified in
820630e1
JG
78.IR signum
79is not a real-time signal number.
cca27058
HC
80From Linux 4.4 onwards, the
81.IR signum
fee6e679
MK
82argument has no effect,
83so that an invalid signal number will not result in an error.
820630e1
JG
84.TP
85.B ENOMEM
2908f2b4
MK
86Allocating memory for the run-time instrumentation control block failed.
87.TP
88.B EOPNOTSUPP
89The run-time instrumentation facility is not available.
820630e1
JG
90.SH VERSIONS
91This system call is available since Linux 3.7.
820630e1 92.SH CONFORMING TO
33a0ccb2 93This Linux-specific system call is available only on the s390 architecture.
fee6e679
MK
94The run-time instrumentation facility is available
95beginning with System z EC12.
820630e1
JG
96.SH NOTES
97Glibc does not provide a wrapper for this system call, use
98.BR syscall (2)
99to call it.
447d8953 100.PP
03b3fa4a
MK
101The
102.I asm/runtime_instr.h
103header file is available
104.\" commit df2f815a7df7edb5335a3bdeee6a8f9f6f9c35c4
105since Linux 4.16.
cca27058 106.PP
34451e6e
MK
107Starting with Linux 4.4,
108support for signalling was removed, as was the check whether
cca27058 109.IR signum
34451e6e
MK
110is a valid real-time signal.
111For backwards compatibility with older kernels, it is recommended to pass
112a valid real-time signal number in
113.I signum
114and install a handler for that signal.
820630e1
JG
115.SH SEE ALSO
116.BR syscall (2),
117.BR signal (7)