Blame man2/s390_runtime_instr.2

Packit 7cfc04
.\" Copyright (c) IBM Corp. 2012
Packit 7cfc04
.\" Author: Jan Glauber <jang@linux.vnet.ibm.com>
Packit 7cfc04
.\"
Packit 7cfc04
.\" %%%LICENSE_START(GPLv2+_DOC_FULL)
Packit 7cfc04
.\" This is free documentation; you can redistribute it and/or
Packit 7cfc04
.\" modify it under the terms of the GNU General Public License as
Packit 7cfc04
.\" published by the Free Software Foundation; either version 2 of
Packit 7cfc04
.\" the License, or (at your option) any later version.
Packit 7cfc04
.\"
Packit 7cfc04
.\" The GNU General Public License's references to "object code"
Packit 7cfc04
.\" and "executables" are to be interpreted as the output of any
Packit 7cfc04
.\" document formatting or typesetting system, including
Packit 7cfc04
.\" intermediate and printed output.
Packit 7cfc04
.\"
Packit 7cfc04
.\" This manual is distributed in the hope that it will be useful,
Packit 7cfc04
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 7cfc04
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit 7cfc04
.\" GNU General Public License for more details.
Packit 7cfc04
.\"
Packit 7cfc04
.\" You should have received a copy of the GNU General Public
Packit 7cfc04
.\" License along with this manual; if not, see
Packit 7cfc04
.\" <http://www.gnu.org/licenses/>.
Packit 7cfc04
.\" %%%LICENSE_END
Packit 7cfc04
.\"
Packit 7cfc04
.TH S390_RUNTIME_INSTR 2 2017-09-15 "Linux Programmer's Manual"
Packit 7cfc04
.SH NAME
Packit 7cfc04
s390_runtime_instr \- enable/disable s390 CPU run-time instrumentation
Packit 7cfc04
.SH SYNOPSIS
Packit 7cfc04
.nf
Packit 7cfc04
.B #include <asm/runtime_instr.h>
Packit 7cfc04
.PP
Packit 7cfc04
.BI "int s390_runtime_instr(int " command ", int " signum ");
Packit 7cfc04
.fi
Packit 7cfc04
.SH DESCRIPTION
Packit 7cfc04
The
Packit 7cfc04
.BR s390_runtime_instr ()
Packit 7cfc04
system call starts or stops CPU run-time instrumentation for the
Packit 7cfc04
calling thread.
Packit 7cfc04
.PP
Packit 7cfc04
The
Packit 7cfc04
.IR command
Packit 7cfc04
argument controls whether run-time instrumentation is started
Packit 7cfc04
.RB ( S390_RUNTIME_INSTR_START ,
Packit 7cfc04
1) or stopped
Packit 7cfc04
.RB ( S390_RUNTIME_INSTR_STOP ,
Packit 7cfc04
2) for the calling thread.
Packit 7cfc04
.PP
Packit 7cfc04
The
Packit 7cfc04
.IR signum
Packit 7cfc04
argument specifies the number of a real-time signal.
Packit 7cfc04
The real-time signal is sent to the thread if the run-time instrumentation
Packit 7cfc04
buffer is full or if the run-time-instrumentation-halted interrupt
Packit 7cfc04
occurred.
Packit 7cfc04
.SH RETURN VALUE
Packit 7cfc04
On success,
Packit 7cfc04
.BR s390_runtime_instr ()
Packit 7cfc04
returns 0 and enables the thread for
Packit 7cfc04
run-time instrumentation by assigning the thread a default run-time
Packit 7cfc04
instrumentation control block.
Packit 7cfc04
The caller can then read and modify the control block and start the run-time
Packit 7cfc04
instrumentation.
Packit 7cfc04
On error, \-1 is returned and
Packit 7cfc04
.IR errno
Packit 7cfc04
is set to one of the error codes listed below.
Packit 7cfc04
.SH ERRORS
Packit 7cfc04
.TP
Packit 7cfc04
.B EINVAL
Packit 7cfc04
The value specified in
Packit 7cfc04
.IR command
Packit 7cfc04
is not a valid command or the value specified in
Packit 7cfc04
.IR signum
Packit 7cfc04
is not a real-time signal number.
Packit 7cfc04
.TP
Packit 7cfc04
.B ENOMEM
Packit 7cfc04
Allocating memory for the run-time instrumentation control block failed.
Packit 7cfc04
.TP
Packit 7cfc04
.B EOPNOTSUPP
Packit 7cfc04
The run-time instrumentation facility is not available.
Packit 7cfc04
.SH VERSIONS
Packit 7cfc04
This system call is available since Linux 3.7.
Packit 7cfc04
.SH CONFORMING TO
Packit 7cfc04
This Linux-specific system call is available only on the s390 architecture.
Packit 7cfc04
The run-time instrumentation facility is available beginning with System z EC12.
Packit 7cfc04
.SH NOTES
Packit 7cfc04
Glibc does not provide a wrapper for this system call, use
Packit 7cfc04
.BR syscall (2)
Packit 7cfc04
to call it.
Packit 7cfc04
.SH SEE ALSO
Packit 7cfc04
.BR syscall (2),
Packit 7cfc04
.BR signal (7)
Packit 7cfc04
.SH COLOPHON
Packit 7cfc04
This page is part of release 4.15 of the Linux
Packit 7cfc04
.I man-pages
Packit 7cfc04
project.
Packit 7cfc04
A description of the project,
Packit 7cfc04
information about reporting bugs,
Packit 7cfc04
and the latest version of this page,
Packit 7cfc04
can be found at
Packit 7cfc04
\%https://www.kernel.org/doc/man\-pages/.