OSDN Git Service

LDP: Update original to LDP v3.68
[linuxjm/LDP_man-pages.git] / original / man2 / s390_runtime_instr.2
1 .\" Copyright (c) IBM Corp. 2012
2 .\" Author: Jan Glauber <jang@linux.vnet.ibm.com>
3 .\"
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.
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/>.
23 .\" %%%LICENSE_END
24 .\"
25 .TH S390_RUNTIME_INSTR 2 2012-12-17 "Linux Programmer's Manual"
26 .SH NAME
27 s390_runtime_instr \- enable/disable s390 CPU run-time instrumentation
28 .SH SYNOPSIS
29 .nf
30 .B #include <asm/runtime_instr.h>
31
32 .BI "int s390_runtime_instr(int " command ", int " signum ");
33 .fi
34 .SH DESCRIPTION
35 The
36 .BR s390_runtime_instr ()
37 system call starts or stops CPU run-time instrumentation for the
38 calling thread.
39
40 The
41 .IR command
42 argument controls whether run-time instrumentation is started
43 .RB ( S390_RUNTIME_INSTR_START ,
44 1) or stopped
45 .RB ( S390_RUNTIME_INSTR_STOP ,
46 2) for the calling thread.
47
48 The
49 .IR signum
50 argument specifies the number of a real-time signal.
51 The real-time signal is sent to the thread if the run-time instrumentation
52 buffer is full or if the run-time-instrumentation-halted interrupt
53 occurred.
54 .SH RETURN VALUE
55 On success,
56 .BR s390_runtime_instr ()
57 returns 0 and enables the thread for
58 run-time instrumentation by assigning the thread a default run-time
59 instrumentation control block.
60 The caller can then read and modify the control block and start the run-time
61 instrumentation.
62 On error, \-1 is returned and
63 .IR errno
64 is set to one of the error codes listed below.
65 .SH ERRORS
66 .TP
67 .B EINVAL
68 The value specified in
69 .IR command
70 is not a valid command or the value specified in
71 .IR signum
72 is not a real-time signal number.
73 .TP
74 .B ENOMEM
75 Allocating memory for the run-time instrumentation control block failed.
76 .TP
77 .B EOPNOTSUPP
78 The run-time instrumentation facility is not available.
79 .SH VERSIONS
80 This system call is available since Linux 3.7.
81 .SH CONFORMING TO
82 This Linux-specific system call is available only on the s390 architecture.
83 The run-time instrumentation facility is available beginning with System z EC12.
84 .SH NOTES
85 Glibc does not provide a wrapper for this system call, use
86 .BR syscall (2)
87 to call it.
88 .SH SEE ALSO
89 .BR syscall (2),
90 .BR signal (7)
91 .SH COLOPHON
92 This page is part of release 3.68 of the Linux
93 .I man-pages
94 project.
95 A description of the project,
96 information about reporting bugs,
97 and the latest version of this page,
98 can be found at
99 \%http://www.kernel.org/doc/man\-pages/.