1 .\" Copyright (c) IBM Corp. 2012
2 .\" Author: Jan Glauber <jang@linux.vnet.ibm.com>
4 .\" SPDX-License-Identifier: GPL-2.0-or-later
6 .TH S390_RUNTIME_INSTR 2 2022-09-09 "Linux man-pages (unreleased)"
8 s390_runtime_instr \- enable/disable s390 CPU run-time instrumentation
11 .RI ( libc ", " \-lc )
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>
18 .BI "int syscall(SYS_s390_runtime_instr, int " command ", int " signum );
22 glibc provides no wrapper for
23 .BR s390_runtime_instr (),
24 necessitating the use of
28 .BR s390_runtime_instr ()
29 system call starts or stops CPU run-time instrumentation for the
34 argument controls whether run-time instrumentation is started
35 .RB ( S390_RUNTIME_INSTR_START ,
37 .RB ( S390_RUNTIME_INSTR_STOP ,
38 2) for the calling thread.
42 argument specifies the number of a real-time signal.
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.
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.
52 .BR s390_runtime_instr ()
53 returns 0 and enables the thread for
54 run-time instrumentation by assigning the thread a default run-time
55 instrumentation control block.
56 The caller can then read and modify the control block and start the run-time
58 On error, \-1 is returned and
60 is set to indicate the error.
64 The value specified in
66 is not a valid command.
69 The value specified in
71 is not a real-time signal number.
72 From Linux 4.4 onwards, the
74 argument has no effect,
75 so that an invalid signal number will not result in an error.
78 Allocating memory for the run-time instrumentation control block failed.
81 The run-time instrumentation facility is not available.
83 This system call is available since Linux 3.7.
85 This Linux-specific system call is available only on the s390 architecture.
86 The run-time instrumentation facility is available
87 beginning with System z EC12.
90 .I asm/runtime_instr.h
91 header file is available
92 .\" commit df2f815a7df7edb5335a3bdeee6a8f9f6f9c35c4
95 Starting with Linux 4.4,
96 support for signalling was removed, as was the check whether
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
102 and install a handler for that signal.