]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man2/s390_runtime_instr.2
Many pages: Use correct letter case in page titles (TH)
[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.\"
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 8s390_runtime_instr \- enable/disable s390 CPU run-time instrumentation
356a0956
AC
9.SH LIBRARY
10Standard 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 22glibc provides no wrapper for
01833135 23.BR s390_runtime_instr (),
cca4e32e
AC
24necessitating the use of
25.BR syscall (2).
820630e1
JG
26.SH DESCRIPTION
27The
28.BR s390_runtime_instr ()
e6d86b41 29system call starts or stops CPU run-time instrumentation for the
2908f2b4 30calling thread.
efeece04 31.PP
820630e1 32The
1ae6b2c7 33.I command
2908f2b4
MK
34argument controls whether run-time instrumentation is started
35.RB ( S390_RUNTIME_INSTR_START ,
361) or stopped
37.RB ( S390_RUNTIME_INSTR_STOP ,
382) for the calling thread.
efeece04 39.PP
820630e1 40The
1ae6b2c7 41.I signum
820630e1 42argument specifies the number of a real-time signal.
cca27058
HC
43This argument was used to specify a signal number that should be delivered
44to the thread if the run-time instrumentation buffer was full or if
45the run-time-instrumentation-halted interrupt had occurred.
34451e6e
MK
46This feature was never used,
47and in Linux 4.4 support for this feature was removed;
48.\" commit b38feccd663b55ab07116208b68e1ffc7c3c7e78
49thus, in current kernels, this argument is ignored.
820630e1 50.SH RETURN VALUE
2908f2b4 51On success,
820630e1
JG
52.BR s390_runtime_instr ()
53returns 0 and enables the thread for
2908f2b4 54run-time instrumentation by assigning the thread a default run-time
820630e1 55instrumentation control block.
2908f2b4 56The caller can then read and modify the control block and start the run-time
820630e1 57instrumentation.
2908f2b4 58On error, \-1 is returned and
1ae6b2c7 59.I errno
7a6227d3 60is set to indicate the error.
820630e1
JG
61.SH ERRORS
62.TP
820630e1
JG
63.B EINVAL
64The value specified in
1ae6b2c7 65.I command
cca27058
HC
66is not a valid command.
67.TP
68.B EINVAL
69The value specified in
1ae6b2c7 70.I signum
820630e1 71is not a real-time signal number.
cca27058 72From Linux 4.4 onwards, the
1ae6b2c7 73.I signum
fee6e679
MK
74argument has no effect,
75so that an invalid signal number will not result in an error.
820630e1
JG
76.TP
77.B ENOMEM
2908f2b4
MK
78Allocating memory for the run-time instrumentation control block failed.
79.TP
80.B EOPNOTSUPP
81The run-time instrumentation facility is not available.
820630e1
JG
82.SH VERSIONS
83This system call is available since Linux 3.7.
3113c7f3 84.SH STANDARDS
33a0ccb2 85This Linux-specific system call is available only on the s390 architecture.
fee6e679
MK
86The run-time instrumentation facility is available
87beginning with System z EC12.
820630e1 88.SH NOTES
03b3fa4a
MK
89The
90.I asm/runtime_instr.h
91header file is available
92.\" commit df2f815a7df7edb5335a3bdeee6a8f9f6f9c35c4
93since Linux 4.16.
cca27058 94.PP
34451e6e
MK
95Starting with Linux 4.4,
96support for signalling was removed, as was the check whether
1ae6b2c7 97.I signum
34451e6e
MK
98is a valid real-time signal.
99For backwards compatibility with older kernels, it is recommended to pass
100a valid real-time signal number in
101.I signum
102and install a handler for that signal.
820630e1
JG
103.SH SEE ALSO
104.BR syscall (2),
105.BR signal (7)