1S390_RUNTIME_INSTR(2)         System Calls Manual        S390_RUNTIME_INSTR(2)
2
3
4

NAME

6       s390_runtime_instr - enable/disable s390 CPU run-time instrumentation
7

SYNOPSIS

9       #include <asm/runtime_instr.h> /* Definition of S390_* constants */
10       #include <sys/syscall.h>       /* Definition of SYS_* constants */
11       #include <unistd.h>
12
13       int syscall(SYS_s390_runtime_instr, int command, int signum);
14
15       Note: glibc provides no wrapper for s390_runtime_instr(), necessitating
16       the use of syscall(2).
17

DESCRIPTION

19       The s390_runtime_instr() system call starts or stops CPU  run-time  in‐
20       strumentation for the calling thread.
21
22       The  command  argument  controls  whether  run-time  instrumentation is
23       started  (S390_RUNTIME_INSTR_START,  1)  or  stopped  (S390_RUNTIME_IN‐
24       STR_STOP, 2) for the calling thread.
25
26       The  signum  argument specifies the number of a real-time signal.  This
27       argument was used to specify a signal number that should  be  delivered
28       to the thread if the run-time instrumentation buffer was full or if the
29       run-time-instrumentation-halted interrupt had occurred.   This  feature
30       was  never used, and in Linux 4.4 support for this feature was removed;
31       thus, in current kernels, this argument is ignored.
32

RETURN VALUE

34       On success, s390_runtime_instr() returns 0 and enables the  thread  for
35       run-time instrumentation by assigning the thread a default run-time in‐
36       strumentation control block.  The caller can then read and  modify  the
37       control  block and start the run-time instrumentation.  On error, -1 is
38       returned and errno is set to indicate the error.
39

ERRORS

41       EINVAL The value specified in command is not a valid command.
42
43       EINVAL The value specified in signum is not a real-time signal  number.
44              From  Linux  4.4  onwards, the signum argument has no effect, so
45              that an invalid signal number will not result in an error.
46
47       ENOMEM Allocating memory for the run-time instrumentation control block
48              failed.
49
50       EOPNOTSUPP
51              The run-time instrumentation facility is not available.
52

VERSIONS

54       This system call is available since Linux 3.7.
55

CONFORMING TO

57       This Linux-specific system call is available only on the s390 architec‐
58       ture.  The run-time instrumentation  facility  is  available  beginning
59       with System z EC12.
60

NOTES

62       The asm/runtime_instr.h header file is available since Linux 4.16.
63
64       Starting with Linux 4.4, support for signalling was removed, as was the
65       check whether signum is a valid real-time signal.  For  backwards  com‐
66       patibility  with older kernels, it is recommended to pass a valid real-
67       time signal number in signum and install a handler for that signal.
68

SEE ALSO

70       syscall(2), signal(7)
71

COLOPHON

73       This page is part of release 5.13 of the Linux  man-pages  project.   A
74       description  of  the project, information about reporting bugs, and the
75       latest    version    of    this    page,    can     be     found     at
76       https://www.kernel.org/doc/man-pages/.
77
78
79
80Linux Programmer's Manual         2021-03-22             S390_RUNTIME_INSTR(2)
Impressum