OSDN Git Service

Complete several pages
[linuxjm/LDP_man-pages.git] / draft / man2 / perfmonctl.2
1 .\" Copyright (C) 2006 Red Hat, Inc. All Rights Reserved.
2 .\" and Copyright (C) 2013 Michael Kerrisk <mtk.manpages@gmail.com>
3 .\" Written by Ivana Varekova <varekova@redhat.com>
4 .\"
5 .\" %%%LICENSE_START(VERBATIM)
6 .\" Permission is granted to make and distribute verbatim copies of this
7 .\" manual provided the copyright notice and this permission notice are
8 .\" preserved on all copies.
9 .\"
10 .\" Permission is granted to copy and distribute modified versions of this
11 .\" manual under the conditions for verbatim copying, provided that the
12 .\" entire resulting derived work is distributed under the terms of a
13 .\" permission notice identical to this one.
14 .\"
15 .\" Since the Linux kernel and libraries are constantly changing, this
16 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
17 .\" responsibility for errors or omissions, or for damages resulting from
18 .\" the use of the information contained herein.  The author(s) may not
19 .\" have taken the same level of care in the production of this manual,
20 .\" which is licensed free of charge, as they might when working
21 .\" professionally.
22 .\"
23 .\" Formatted or processed versions of this manual, if unaccompanied by
24 .\" the source, must acknowledge the copyright and authors of this work.
25 .\" %%%LICENSE_END
26 .\"
27 .\"*******************************************************************
28 .\"
29 .\" This file was generated with po4a. Translate the source file.
30 .\"
31 .\"*******************************************************************
32 .TH PERFMONCTL 2 2013\-02\-13 Linux "Linux Programmer's Manual"
33 .SH 名前
34 perfmonctl \- IA\-64 の PMU (性能監視ユニット) のインターフェース
35 .SH 書式
36 .nf
37 \fB#include <syscall.h>\fP
38 \fB#include <perfmon.h>\fP
39 .sp
40 \fBlong perfmonctl(int \fP\fIfd\fP\fB, int \fP\fIcmd\fP\fB, void *\fP\fIarg\fP\fB, int \fP\fInarg\fP\fB);\fP
41 .fi
42 \fI注\fP: このシステムコールには glibc のラッパー関数は存在しない。「注意」の節を参照。
43 .SH 説明
44 IA\-64 固有の \fBperfmonctl\fP() システムコールは PMU (性能監視ユニット; performance monitoring
45 unit) へのインターフェースを提供する。 PMU は PMD (performance monitoring data) レジスターと PMC
46 (performance monitoring control) レジスターで構成され、 ハードウェアの統計を収集する。
47
48 \fBperfmonctl\fP() は、 操作 \fIcmd\fP を \fIarg\fP で指定された入力引き数で行う。 引き数の数は \fInarg\fP で規定される。
49 \fIfd\fP 引き数は操作対象の perfmon コンテキストを指定する。
50
51 \fIcmd\fP に指定できる値は以下のとおりである。
52 .TP 
53 \fBPFM_CREATE_CONTEXT\fP
54 .nf
55 \fBperfmonctl(int \fP\fIfd\fP\fB, PFM_CREATE_CONTEXT, pfarg_context_t *\fP\fIctxt\fP\fB, 1);\fP
56 .fi
57 コンテキストを用意する。
58
59 \fIfd\fP 引き数は無視される。 新しい perfmon コンテキストを \fIctxt\fP で指定した内容で作成し、 そのファイルディスクリプターを
60 \fIctxt\->ctx_fd\fP で返す。
61
62 ファイルディスクリプターはそれ以降の \fBperfmonctl\fP() の呼び出しで使用したり、 \fBread\fP(2) を使ってイベント通知
63 (\fIpfm_msg_t\fP 型) を読み出したりするのに使用できる。 このファイルディスクリプターは \fBselect\fP(2), \fBpoll\fP(2),
64 \fBepoll\fP(7) で状態監視 (ポーリング) することができる。
65
66 コンテキストを破棄するには、 そのファイルディスクリプターに対して \fBclose\fP(2) を呼び出す。
67 .TP 
68 \fBPFM_WRITE_PMCS\fP
69 .\" pfm_write_pmcs()
70 .nf
71 \fBperfmonctl(int \fP\fIfd\fP\fB, PFM_WRITE_PMCS, pfarg_reg_t *\fP\fIpmcs\fP\fB, n);\fP
72 .fi
73 PMC レジスターを設定する。
74 .TP 
75 \fBPFM_WRITE_PMDS\fP
76 .nf
77 \fBperfmonctl(int \fP\fIfd\fP\fB, PFM_WRITE_PMDS, pfarg_reg_t *\fP\fIpmds\fP\fB, n);\fP
78 .fi
79 .\" pfm_write_pmds()
80 PMD レジスターを設定する。
81 .TP 
82 \fBPFM_READ_PMDS\fP
83 .\" pfm_read_pmds()
84 .nf
85 \fBperfmonctl(int \fP\fIfd\fP\fB, PFM_READ_PMDS, pfarg_reg_t *\fP\fIpmds\fP\fB, n);\fP
86 .fi
87 PMD レジスターを読み出す。
88 .TP 
89 \fBPFM_START\fP
90 .\" pfm_start()
91 .nf
92 .\" .BI  "perfmonctl(int " fd ", PFM_START, arg, 1);
93 \fBperfmonctl(int \fP\fIfd\fP\fB, PFM_START, NULL, 0);\fP
94 .fi
95 監視を開始する。
96 .TP 
97 \fBPFM_STOP\fP
98 .\" pfm_stop()
99 .nf
100 \fBperfmonctl(int \fP\fIfd\fP\fB, PFM_STOP, NULL, 0);\fP
101 .fi
102 監視を停止する。
103 .TP 
104 \fBPFM_LOAD_CONTEXT\fP
105 .\" pfm_context_load()
106 .nf
107 \fBperfmonctl(int \fP\fIfd\fP\fB, PFM_LOAD_CONTEXT, pfarg_load_t *\fP\fIlargs\fP\fB, 1);\fP
108 .fi
109 指定したコンテキストをスレッドに接続する。
110 .TP 
111 \fBPFM_UNLOAD_CONTEXT\fP
112 .\" pfm_context_unload()
113 .nf
114 \fBperfmonctl(int \fP\fIfd\fP\fB, PFM_UNLOAD_CONTEXT, NULL, 0);\fP
115 .fi
116 指定したコンテキストをスレッドが切り離す。
117 .TP 
118 \fBPFM_RESTART\fP
119 .\" pfm_restart()
120 .nf
121 \fBperfmonctl(int \fP\fIfd\fP\fB, PFM_RESTART, NULL, 0);\fP
122 .fi
123 オーバーフロー通知を受信した後、 監視を再開する。
124 .TP 
125 \fBPFM_GET_FEATURES\fP
126 .\" pfm_get_features()
127 .nf
128 \fBperfmonctl(int \fP\fIfd\fP\fB, PFM_GET_FEARURES, pfarg_features_t *\fP\fIarg\fP\fB, 1);\fP
129 .fi
130 .TP 
131 \fBPFM_DEBUG\fP
132 .\" pfm_debug()
133 .nf
134 \fBperfmonctl(int \fP\fIfd\fP\fB, PFM_DEBUG, \fP\fIval\fP\fB, 0);\fP
135 .fi
136 \fIval\fP が 0 以外の場合、デバッグモードを有効にする。 そうでない場合、 無効にする。
137 .TP 
138 \fBPFM_GET_PMC_RESET_VAL\fP
139 .\" pfm_get_pmc_reset()
140 .nf
141 \fBperfmonctl(int \fP\fIfd\fP\fB, PFM_GET_PMC_RESET_VAL, pfarg_reg_t * \fP\fIreq\fP\fB, n);\fP
142 .fi
143 .\"
144 .\"
145 .\" .TP
146 .\" .B PFM_CREATE_EVTSETS
147 .\"
148 .\" create or modify event sets
149 .\" .nf
150 .\" .BI  "perfmonctl(int " fd ", PFM_CREATE_EVTSETS, pfarg_setdesc_t *desc , n);
151 .\" .fi
152 .\" .TP
153 .\" .B PFM_DELETE_EVTSETS
154 .\" delete event sets
155 .\" .nf
156 .\" .BI  "perfmonctl(int " fd ", PFM_DELETE_EVTSET, pfarg_setdesc_t *desc , n);
157 .\" .fi
158 .\" .TP
159 .\" .B PFM_GETINFO_EVTSETS
160 .\" get information about event sets
161 .\" .nf
162 .\" .BI  "perfmonctl(int " fd ", PFM_GETINFO_EVTSETS, pfarg_setinfo_t *info, n);
163 .\" .fi
164 PMC レジスターをデフォルト値にリセットする。
165 .SH 返り値
166 \fBperfmonctl\fP() は操作が成功すると 0 を返す。 エラーの場合、 \-1 が返り、 \fIerrno\fP にエラーの原因を示す値が設定される。
167 .SH バージョン
168 \fBperfmonctl\fP() は Linux 2.4 以降で利用可能である。
169 .SH 準拠
170 \fBperfmonctl\fP() は Linux 固有で、 IA\-64 アーキテクチャーでのみ利用できる。
171 .SH 注意
172 glibc はこのシステムコールに対するラッパー関数を提供していない。 \fBsyscall\fP(2)  を使って呼び出すこと。
173 .SH 関連項目
174 \fBgprof\fP(1)
175
176 perfmon2 インターフェース仕様
177 .SH この文書について
178 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.78 の一部
179 である。プロジェクトの説明とバグ報告に関する情報は
180 http://www.kernel.org/doc/man\-pages/ に書かれている。