1 .\" Copyright (c) IBM Corp. 2012
2 .\" Author: Jan Glauber <jang@linux.vnet.ibm.com>
4 .\" %%%LICENSE_START(GPLv2+_DOC_FULL)
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.
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.
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.
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/>.
25 .TH S390_RUNTIME_INSTR 2 2021-03-22 "Linux Programmer's Manual"
27 s390_runtime_instr \- enable/disable s390 CPU run-time instrumentation
30 .BR "#include <asm/runtime_instr.h>" " /* Definition of " S390_* " constants */"
31 .BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
32 .B #include <unistd.h>
34 .BI "int syscall(SYS_s390_runtime_instr, int " command ", int " signum );
38 glibc provides no wrapper for
39 .BR s390_runtime_instr (),
40 necessitating the use of
44 .BR s390_runtime_instr ()
45 system call starts or stops CPU run-time instrumentation for the
50 argument controls whether run-time instrumentation is started
51 .RB ( S390_RUNTIME_INSTR_START ,
53 .RB ( S390_RUNTIME_INSTR_STOP ,
54 2) for the calling thread.
58 argument specifies the number of a real-time signal.
59 This argument was used to specify a signal number that should be delivered
60 to the thread if the run-time instrumentation buffer was full or if
61 the run-time-instrumentation-halted interrupt had occurred.
62 This feature was never used,
63 and in Linux 4.4 support for this feature was removed;
64 .\" commit b38feccd663b55ab07116208b68e1ffc7c3c7e78
65 thus, in current kernels, this argument is ignored.
68 .BR s390_runtime_instr ()
69 returns 0 and enables the thread for
70 run-time instrumentation by assigning the thread a default run-time
71 instrumentation control block.
72 The caller can then read and modify the control block and start the run-time
74 On error, \-1 is returned and
76 is set to indicate the error.
80 The value specified in
82 is not a valid command.
85 The value specified in
87 is not a real-time signal number.
88 From Linux 4.4 onwards, the
90 argument has no effect,
91 so that an invalid signal number will not result in an error.
94 Allocating memory for the run-time instrumentation control block failed.
97 The run-time instrumentation facility is not available.
99 This system call is available since Linux 3.7.
101 This Linux-specific system call is available only on the s390 architecture.
102 The run-time instrumentation facility is available
103 beginning with System z EC12.
106 .I asm/runtime_instr.h
107 header file is available
108 .\" commit df2f815a7df7edb5335a3bdeee6a8f9f6f9c35c4
111 Starting with Linux 4.4,
112 support for signalling was removed, as was the check whether
114 is a valid real-time signal.
115 For backwards compatibility with older kernels, it is recommended to pass
116 a valid real-time signal number in
118 and install a handler for that signal.