OSDN Git Service

509e09a3de0184a7954cb0635d1723dc50e44bc7
[linuxjm/LDP_man-pages.git] / po4a / man2 / po / ja.po
1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # This file is distributed under the same license as the PACKAGE package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5 #
6 msgid ""
7 msgstr ""
8 "Project-Id-Version: PACKAGE VERSION\n"
9 "POT-Creation-Date: 2013-09-28 04:05+0900\n"
10 "PO-Revision-Date: 2013-10-02 00:55+0900\n"
11 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12 "Language-Team: LANGUAGE <LL@li.org>\n"
13 "Language: \n"
14 "MIME-Version: 1.0\n"
15 "Content-Type: text/plain; charset=UTF-8\n"
16 "Content-Transfer-Encoding: 8bit\n"
17
18 #. type: TH
19 #: build/C/man2/arch_prctl.2:25
20 #, no-wrap
21 msgid "ARCH_PRCTL"
22 msgstr "ARCH_PRCTL"
23
24 #. type: TH
25 #: build/C/man2/arch_prctl.2:25
26 #, no-wrap
27 msgid "2007-12-26"
28 msgstr "2007-12-26"
29
30 #. type: TH
31 #: build/C/man2/arch_prctl.2:25 build/C/man2/futex.2:53
32 #: build/C/man2/get_robust_list.2:29 build/C/man2/getunwind.2:27
33 #: build/C/man2/kexec_load.2:26 build/C/man2/lookup_dcookie.2:27
34 #: build/C/man2/modify_ldt.2:24 build/C/man2/nfsservctl.2:8
35 #: build/C/man2/outb.2:26 build/C/man2/pciconfig_read.2:8
36 #: build/C/man2/perf_event_open.2:27 build/C/man2/perfmonctl.2:27
37 #: build/C/man2/personality.2:32 build/C/man2/pivot_root.2:10
38 #: build/C/man2/process_vm_readv.2:29 build/C/man2/ptrace.2:44
39 #: build/C/man2/quotactl.2:27 build/C/man2/sendfile.2:19
40 #: build/C/man2/set_tid_address.2:25 build/C/man2/splice.2:26
41 #: build/C/man2/tee.2:26 build/C/man2/vm86.2:26 build/C/man2/vmsplice.2:26
42 #, no-wrap
43 msgid "Linux"
44 msgstr "Linux"
45
46 #. type: TH
47 #: build/C/man2/arch_prctl.2:25 build/C/man2/futex.2:53
48 #: build/C/man2/getunwind.2:27 build/C/man2/kexec_load.2:26
49 #: build/C/man2/lookup_dcookie.2:27 build/C/man2/modify_ldt.2:24
50 #: build/C/man2/nfsservctl.2:8 build/C/man2/outb.2:26
51 #: build/C/man2/pciconfig_read.2:8 build/C/man2/perf_event_open.2:27
52 #: build/C/man2/perfmonctl.2:27 build/C/man2/personality.2:32
53 #: build/C/man2/pivot_root.2:10 build/C/man2/process_vm_readv.2:29
54 #: build/C/man2/ptrace.2:44 build/C/man2/quotactl.2:27
55 #: build/C/man2/sendfile.2:19 build/C/man2/set_tid_address.2:25
56 #: build/C/man2/splice.2:26 build/C/man2/tee.2:26 build/C/man2/vm86.2:26
57 #: build/C/man2/vmsplice.2:26
58 #, no-wrap
59 msgid "Linux Programmer's Manual"
60 msgstr "Linux Programmer's Manual"
61
62 #. type: SH
63 #: build/C/man2/arch_prctl.2:26 build/C/man2/futex.2:54
64 #: build/C/man2/get_robust_list.2:30 build/C/man2/getunwind.2:28
65 #: build/C/man2/kexec_load.2:27 build/C/man2/lookup_dcookie.2:28
66 #: build/C/man2/modify_ldt.2:25 build/C/man2/nfsservctl.2:9
67 #: build/C/man2/outb.2:27 build/C/man2/pciconfig_read.2:9
68 #: build/C/man2/perf_event_open.2:28 build/C/man2/perfmonctl.2:28
69 #: build/C/man2/personality.2:33 build/C/man2/pivot_root.2:11
70 #: build/C/man2/process_vm_readv.2:30 build/C/man2/ptrace.2:45
71 #: build/C/man2/quotactl.2:28 build/C/man2/sendfile.2:20
72 #: build/C/man2/set_tid_address.2:26 build/C/man2/splice.2:27
73 #: build/C/man2/tee.2:27 build/C/man2/vm86.2:27 build/C/man2/vmsplice.2:27
74 #, no-wrap
75 msgid "NAME"
76 msgstr "名前"
77
78 #. type: Plain text
79 #: build/C/man2/arch_prctl.2:28
80 msgid "arch_prctl - set architecture-specific thread state"
81 msgstr "arch_prctl - アーキテクチャ固有のスレッド状態を設定する"
82
83 #. type: SH
84 #: build/C/man2/arch_prctl.2:28 build/C/man2/futex.2:56
85 #: build/C/man2/get_robust_list.2:32 build/C/man2/getunwind.2:30
86 #: build/C/man2/kexec_load.2:29 build/C/man2/lookup_dcookie.2:30
87 #: build/C/man2/modify_ldt.2:27 build/C/man2/nfsservctl.2:11
88 #: build/C/man2/outb.2:31 build/C/man2/pciconfig_read.2:11
89 #: build/C/man2/perf_event_open.2:30 build/C/man2/perfmonctl.2:30
90 #: build/C/man2/personality.2:35 build/C/man2/pivot_root.2:13
91 #: build/C/man2/process_vm_readv.2:32 build/C/man2/ptrace.2:47
92 #: build/C/man2/quotactl.2:30 build/C/man2/sendfile.2:22
93 #: build/C/man2/set_tid_address.2:28 build/C/man2/splice.2:29
94 #: build/C/man2/tee.2:29 build/C/man2/vm86.2:29 build/C/man2/vmsplice.2:29
95 #, no-wrap
96 msgid "SYNOPSIS"
97 msgstr "書式"
98
99 #. type: Plain text
100 #: build/C/man2/arch_prctl.2:31
101 #, no-wrap
102 msgid "B<#include E<lt>asm/prctl.hE<gt>>\n"
103 msgstr "B<#include E<lt>asm/prctl.hE<gt>>\n"
104
105 #. type: Plain text
106 #: build/C/man2/arch_prctl.2:33
107 #, no-wrap
108 msgid "B<#include E<lt>sys/prctl.hE<gt>>\n"
109 msgstr "B<#include E<lt>sys/prctl.hE<gt>>\n"
110
111 #. type: Plain text
112 #: build/C/man2/arch_prctl.2:36
113 #, no-wrap
114 msgid ""
115 "B<int arch_prctl(int >I<code>B<, unsigned long >I<addr>B<);>\n"
116 "B<int arch_prctl(int >I<code>B<, unsigned long *>I<addr>B<);>\n"
117 msgstr "B<int arch_prctl(int >I<code>B<, unsigned long *>I<addr>B<);>\n"
118
119 #.  Return type was long before glibc 2.7
120 #. type: SH
121 #: build/C/man2/arch_prctl.2:37 build/C/man2/futex.2:68
122 #: build/C/man2/get_robust_list.2:44 build/C/man2/getunwind.2:40
123 #: build/C/man2/kexec_load.2:39 build/C/man2/lookup_dcookie.2:32
124 #: build/C/man2/modify_ldt.2:36 build/C/man2/nfsservctl.2:18
125 #: build/C/man2/outb.2:62 build/C/man2/pciconfig_read.2:22
126 #: build/C/man2/perf_event_open.2:42 build/C/man2/perfmonctl.2:39
127 #: build/C/man2/personality.2:39 build/C/man2/pivot_root.2:18
128 #: build/C/man2/process_vm_readv.2:50 build/C/man2/ptrace.2:54
129 #: build/C/man2/quotactl.2:38 build/C/man2/sendfile.2:47
130 #: build/C/man2/set_tid_address.2:34 build/C/man2/splice.2:39
131 #: build/C/man2/tee.2:38 build/C/man2/vm86.2:35 build/C/man2/vmsplice.2:39
132 #, no-wrap
133 msgid "DESCRIPTION"
134 msgstr "説明"
135
136 #. type: Plain text
137 #: build/C/man2/arch_prctl.2:52
138 msgid ""
139 "The B<arch_prctl>()  function sets architecture-specific process or thread "
140 "state.  I<code> selects a subfunction and passes argument I<addr> to it; "
141 "I<addr> is interpreted as either an I<unsigned long> for the \"set\" "
142 "operations, or as an I<unsigned long\\ *>, for the \"get\" operations."
143 msgstr ""
144 "B<arch_prctl>()  関数はアーキテクチャ固有のプロセス状態またはスレッド状態を設"
145 "定する。 I<code> は副機能を選択し、引き数 I<addr> を副機能に渡す。 I<addr> "
146 "は、\"set\" 操作では I<unsigned long> として、\"get\" 操作では I<unsigned "
147 "long\\ *> として解釈される。"
148
149 #. type: Plain text
150 #: build/C/man2/arch_prctl.2:54
151 msgid "Subfunctions for x86-64 are:"
152 msgstr "x86-64 の副機能は以下の通り:"
153
154 #. type: TP
155 #: build/C/man2/arch_prctl.2:54
156 #, no-wrap
157 msgid "B<ARCH_SET_FS>"
158 msgstr "B<ARCH_SET_FS>"
159
160 #. type: Plain text
161 #: build/C/man2/arch_prctl.2:60
162 msgid "Set the 64-bit base for the I<FS> register to I<addr>."
163 msgstr "I<FS> レジスタの 64 ビットベースを I<addr> に設定する。"
164
165 #. type: TP
166 #: build/C/man2/arch_prctl.2:60
167 #, no-wrap
168 msgid "B<ARCH_GET_FS>"
169 msgstr "B<ARCH_GET_FS>"
170
171 #. type: Plain text
172 #: build/C/man2/arch_prctl.2:68
173 msgid ""
174 "Return the 64-bit base value for the I<FS> register of the current thread in "
175 "the I<unsigned long> pointed to by I<addr>."
176 msgstr ""
177 "現在のスレッドの I<FS> レジスタの 64 ビットベース値を、 I<addr> が指す "
178 "I<unsigned long> の領域に格納する。"
179
180 #. type: TP
181 #: build/C/man2/arch_prctl.2:68
182 #, no-wrap
183 msgid "B<ARCH_SET_GS>"
184 msgstr "B<ARCH_SET_GS>"
185
186 #. type: Plain text
187 #: build/C/man2/arch_prctl.2:74
188 msgid "Set the 64-bit base for the I<GS> register to I<addr>."
189 msgstr "I<GS> レジスタの 64 ビットベースを I<addr> に設定する。"
190
191 #. type: TP
192 #: build/C/man2/arch_prctl.2:74
193 #, no-wrap
194 msgid "B<ARCH_GET_GS>"
195 msgstr "B<ARCH_GET_GS>"
196
197 #. type: Plain text
198 #: build/C/man2/arch_prctl.2:82
199 msgid ""
200 "Return the 64-bit base value for the I<GS> register of the current thread in "
201 "the I<unsigned long> pointed to by I<addr>."
202 msgstr ""
203 "現在のスレッドの I<GS> レジスタの 64 ビットベース値を、 I<addr> が指す "
204 "I<unsigned long> の領域に格納する。"
205
206 #. type: SH
207 #: build/C/man2/arch_prctl.2:82 build/C/man2/futex.2:214
208 #: build/C/man2/get_robust_list.2:77 build/C/man2/getunwind.2:81
209 #: build/C/man2/kexec_load.2:114 build/C/man2/lookup_dcookie.2:43
210 #: build/C/man2/modify_ldt.2:98 build/C/man2/nfsservctl.2:53
211 #: build/C/man2/pciconfig_read.2:50 build/C/man2/perf_event_open.2:2116
212 #: build/C/man2/perfmonctl.2:190 build/C/man2/personality.2:57
213 #: build/C/man2/pivot_root.2:101 build/C/man2/process_vm_readv.2:209
214 #: build/C/man2/ptrace.2:1780 build/C/man2/quotactl.2:419
215 #: build/C/man2/sendfile.2:108 build/C/man2/set_tid_address.2:88
216 #: build/C/man2/splice.2:127 build/C/man2/tee.2:85 build/C/man2/vm86.2:54
217 #: build/C/man2/vmsplice.2:113
218 #, no-wrap
219 msgid "RETURN VALUE"
220 msgstr "返り値"
221
222 #. type: Plain text
223 #: build/C/man2/arch_prctl.2:88
224 msgid ""
225 "On success, B<arch_prctl>()  returns 0; on error, -1 is returned, and "
226 "I<errno> is set to indicate the error."
227 msgstr ""
228 "成功すると、 B<arch_prctl>()  は 0 を返す。エラーの場合、-1 を返し、 "
229 "I<errno> をエラーを示す値に設定する。"
230
231 #. type: SH
232 #: build/C/man2/arch_prctl.2:88 build/C/man2/futex.2:239
233 #: build/C/man2/get_robust_list.2:84 build/C/man2/getunwind.2:88
234 #: build/C/man2/kexec_load.2:121 build/C/man2/lookup_dcookie.2:50
235 #: build/C/man2/modify_ldt.2:108 build/C/man2/pciconfig_read.2:77
236 #: build/C/man2/perf_event_open.2:2122 build/C/man2/personality.2:64
237 #: build/C/man2/pivot_root.2:105 build/C/man2/process_vm_readv.2:229
238 #: build/C/man2/ptrace.2:1801 build/C/man2/quotactl.2:427
239 #: build/C/man2/sendfile.2:115 build/C/man2/set_tid_address.2:91
240 #: build/C/man2/splice.2:142 build/C/man2/tee.2:100 build/C/man2/vm86.2:59
241 #: build/C/man2/vmsplice.2:122
242 #, no-wrap
243 msgid "ERRORS"
244 msgstr "エラー"
245
246 #. type: TP
247 #: build/C/man2/arch_prctl.2:89 build/C/man2/futex.2:254
248 #: build/C/man2/get_robust_list.2:111 build/C/man2/lookup_dcookie.2:51
249 #: build/C/man2/modify_ldt.2:109 build/C/man2/process_vm_readv.2:251
250 #: build/C/man2/process_vm_readv.2:256 build/C/man2/ptrace.2:1805
251 #: build/C/man2/quotactl.2:428 build/C/man2/sendfile.2:125
252 #: build/C/man2/vm86.2:60
253 #, no-wrap
254 msgid "B<EFAULT>"
255 msgstr "B<EFAULT>"
256
257 #. type: Plain text
258 #: build/C/man2/arch_prctl.2:93
259 msgid ""
260 "I<addr> points to an unmapped address or is outside the process address "
261 "space."
262 msgstr ""
263 "I<addr> がアンマップされたアドレスを指しているか、プロセスのアドレス空間の外"
264 "にある。"
265
266 #. type: TP
267 #: build/C/man2/arch_prctl.2:93 build/C/man2/futex.2:266
268 #: build/C/man2/get_robust_list.2:88 build/C/man2/kexec_load.2:126
269 #: build/C/man2/lookup_dcookie.2:54 build/C/man2/modify_ldt.2:113
270 #: build/C/man2/pciconfig_read.2:78 build/C/man2/perf_event_open.2:2123
271 #: build/C/man2/personality.2:65 build/C/man2/pivot_root.2:114
272 #: build/C/man2/process_vm_readv.2:230 build/C/man2/process_vm_readv.2:241
273 #: build/C/man2/process_vm_readv.2:245 build/C/man2/ptrace.2:1816
274 #: build/C/man2/quotactl.2:434 build/C/man2/quotactl.2:501
275 #: build/C/man2/sendfile.2:128 build/C/man2/splice.2:147
276 #: build/C/man2/tee.2:101 build/C/man2/vmsplice.2:127
277 #, no-wrap
278 msgid "B<EINVAL>"
279 msgstr "B<EINVAL>"
280
281 #. type: Plain text
282 #: build/C/man2/arch_prctl.2:97
283 msgid "I<code> is not a valid subcommand."
284 msgstr "I<code> が有効なサブコマンドでない。"
285
286 #. type: TP
287 #: build/C/man2/arch_prctl.2:97 build/C/man2/get_robust_list.2:98
288 #: build/C/man2/kexec_load.2:133 build/C/man2/lookup_dcookie.2:65
289 #: build/C/man2/pciconfig_read.2:105 build/C/man2/pivot_root.2:120
290 #: build/C/man2/process_vm_readv.2:267 build/C/man2/ptrace.2:1826
291 #: build/C/man2/quotactl.2:456 build/C/man2/vm86.2:68
292 #, no-wrap
293 msgid "B<EPERM>"
294 msgstr "B<EPERM>"
295
296 #.  .SH AUTHOR
297 #.  Man page written by Andi Kleen.
298 #. type: Plain text
299 #: build/C/man2/arch_prctl.2:103
300 msgid "I<addr> is outside the process address space."
301 msgstr "I<addr> がプロセスのアドレス空間の外にある。"
302
303 #. type: SH
304 #: build/C/man2/arch_prctl.2:103 build/C/man2/futex.2:301
305 #: build/C/man2/getunwind.2:96 build/C/man2/kexec_load.2:142
306 #: build/C/man2/lookup_dcookie.2:78 build/C/man2/modify_ldt.2:130
307 #: build/C/man2/nfsservctl.2:58 build/C/man2/outb.2:87
308 #: build/C/man2/pciconfig_read.2:112 build/C/man2/perf_event_open.2:2141
309 #: build/C/man2/perfmonctl.2:199 build/C/man2/personality.2:68
310 #: build/C/man2/pivot_root.2:128 build/C/man2/process_vm_readv.2:279
311 #: build/C/man2/ptrace.2:1844 build/C/man2/sendfile.2:148
312 #: build/C/man2/set_tid_address.2:97 build/C/man2/splice.2:170
313 #: build/C/man2/tee.2:119 build/C/man2/vm86.2:73 build/C/man2/vmsplice.2:143
314 #, no-wrap
315 msgid "CONFORMING TO"
316 msgstr "準拠"
317
318 #. type: Plain text
319 #: build/C/man2/arch_prctl.2:107
320 msgid ""
321 "B<arch_prctl>()  is a Linux/x86-64 extension and should not be used in "
322 "programs intended to be portable."
323 msgstr ""
324 "B<arch_prctl>()  は Linux/x86-64 拡張であり、移植性を意図したプログラムでは使"
325 "うべきでない。"
326
327 #. type: SH
328 #: build/C/man2/arch_prctl.2:107 build/C/man2/futex.2:303
329 #: build/C/man2/get_robust_list.2:119 build/C/man2/getunwind.2:99
330 #: build/C/man2/kexec_load.2:144 build/C/man2/lookup_dcookie.2:81
331 #: build/C/man2/modify_ldt.2:133 build/C/man2/perf_event_open.2:2146
332 #: build/C/man2/perfmonctl.2:202 build/C/man2/pivot_root.2:131
333 #: build/C/man2/process_vm_readv.2:281 build/C/man2/ptrace.2:1846
334 #: build/C/man2/sendfile.2:155 build/C/man2/splice.2:172
335 #: build/C/man2/tee.2:121 build/C/man2/vmsplice.2:145
336 #, no-wrap
337 msgid "NOTES"
338 msgstr "注意"
339
340 #. type: Plain text
341 #: build/C/man2/arch_prctl.2:110
342 msgid ""
343 "B<arch_prctl>()  is supported only on Linux/x86-64 for 64-bit programs "
344 "currently."
345 msgstr ""
346 "B<arch_prctl>()  は現在のところ Linux/x86-64 上の 64 ビットプログラムでのみサ"
347 "ポートされている。"
348
349 #. type: Plain text
350 #: build/C/man2/arch_prctl.2:112
351 msgid "The 64-bit base changes when a new 32-bit segment selector is loaded."
352 msgstr ""
353 "新しい 32 ビットセグメントセレクタがロードされた場合、 64 ビットベースは変更"
354 "される。"
355
356 #. type: Plain text
357 #: build/C/man2/arch_prctl.2:115
358 msgid "B<ARCH_SET_GS> is disabled in some kernels."
359 msgstr "B<ARCH_SET_GS> が無効にされているカーネルもある。"
360
361 #. type: Plain text
362 #: build/C/man2/arch_prctl.2:130
363 msgid ""
364 "Context switches for 64-bit segment bases are rather expensive.  It may be a "
365 "faster alternative to set a 32-bit base using a segment selector by setting "
366 "up an LDT with B<modify_ldt>(2)  or using the B<set_thread_area>(2)  system "
367 "call in kernel 2.5 or later.  B<arch_prctl>()  is needed only when you want "
368 "to set bases that are larger than 4GB.  Memory in the first 2GB of address "
369 "space can be allocated by using B<mmap>(2)  with the B<MAP_32BIT> flag."
370 msgstr ""
371 "64 ビットセグメントベースのコンテキストスイッチは、やや高価である。 LDT を "
372 "B<modify_ldt>(2)  で設定してセグメントセレクタを使うか、 (カーネル 2.5 以降"
373 "の)  B<set_thread_area>(2)  システムコールを使うことにより、 32 ビットベース"
374 "を設定するという高速な代替手段もある。 4GB より大きなベースを設定したい場合に"
375 "のみ、 B<arch_prctl>()  が必要である。 アドレス空間の最初の 2GB にあるメモリ"
376 "は、 B<mmap>(2)  に B<MAP_32BIT> フラグを指定して割り当てることができる。"
377
378 #. type: Plain text
379 #: build/C/man2/arch_prctl.2:135
380 msgid ""
381 "As of version 2.7, glibc provides no prototype for B<arch_prctl>().  You "
382 "have to declare it yourself for now.  This may be fixed in future glibc "
383 "versions."
384 msgstr ""
385 "バージョン 2.7 時点では、glibc には B<arch_prctl>()  のプロトタイプがない。 "
386 "今のところユーザは自分自身で宣言する必要がある。 これは将来の glibc のバー"
387 "ジョンで修正されるかもしれない。"
388
389 #. type: Plain text
390 #: build/C/man2/arch_prctl.2:138
391 msgid "I<FS> may be already used by the threading library."
392 msgstr "I<FS> はスレッドライブラリで既に使われているかもしれない。"
393
394 #. type: SH
395 #: build/C/man2/arch_prctl.2:138 build/C/man2/futex.2:317
396 #: build/C/man2/get_robust_list.2:128 build/C/man2/getunwind.2:111
397 #: build/C/man2/kexec_load.2:159 build/C/man2/modify_ldt.2:136
398 #: build/C/man2/outb.2:96 build/C/man2/pciconfig_read.2:114
399 #: build/C/man2/perf_event_open.2:2266 build/C/man2/perfmonctl.2:205
400 #: build/C/man2/pivot_root.2:143 build/C/man2/process_vm_readv.2:331
401 #: build/C/man2/ptrace.2:2000 build/C/man2/quotactl.2:507
402 #: build/C/man2/sendfile.2:197 build/C/man2/set_tid_address.2:99
403 #: build/C/man2/splice.2:226 build/C/man2/tee.2:197
404 #: build/C/man2/vmsplice.2:154
405 #, no-wrap
406 msgid "SEE ALSO"
407 msgstr "関連項目"
408
409 #. type: Plain text
410 #: build/C/man2/arch_prctl.2:143
411 msgid "B<mmap>(2), B<modify_ldt>(2), B<prctl>(2), B<set_thread_area>(2)"
412 msgstr "B<mmap>(2), B<modify_ldt>(2), B<prctl>(2), B<set_thread_area>(2)"
413
414 #. type: Plain text
415 #: build/C/man2/arch_prctl.2:145
416 msgid "AMD X86-64 Programmer's manual"
417 msgstr "AMD X86-64 Programmer's manual"
418
419 #. type: SH
420 #: build/C/man2/arch_prctl.2:145 build/C/man2/futex.2:331
421 #: build/C/man2/get_robust_list.2:137 build/C/man2/getunwind.2:113
422 #: build/C/man2/kexec_load.2:162 build/C/man2/lookup_dcookie.2:88
423 #: build/C/man2/modify_ldt.2:138 build/C/man2/nfsservctl.2:60
424 #: build/C/man2/outb.2:99 build/C/man2/pciconfig_read.2:116
425 #: build/C/man2/perf_event_open.2:2272 build/C/man2/perfmonctl.2:209
426 #: build/C/man2/personality.2:72 build/C/man2/pivot_root.2:149
427 #: build/C/man2/process_vm_readv.2:334 build/C/man2/ptrace.2:2014
428 #: build/C/man2/quotactl.2:512 build/C/man2/sendfile.2:203
429 #: build/C/man2/set_tid_address.2:102 build/C/man2/splice.2:230
430 #: build/C/man2/tee.2:200 build/C/man2/vm86.2:76 build/C/man2/vmsplice.2:157
431 #, no-wrap
432 msgid "COLOPHON"
433 msgstr "この文書について"
434
435 #. type: Plain text
436 #: build/C/man2/arch_prctl.2:152 build/C/man2/futex.2:338
437 #: build/C/man2/get_robust_list.2:144 build/C/man2/getunwind.2:120
438 #: build/C/man2/kexec_load.2:169 build/C/man2/lookup_dcookie.2:95
439 #: build/C/man2/modify_ldt.2:145 build/C/man2/nfsservctl.2:67
440 #: build/C/man2/outb.2:106 build/C/man2/pciconfig_read.2:123
441 #: build/C/man2/perf_event_open.2:2279 build/C/man2/perfmonctl.2:216
442 #: build/C/man2/personality.2:79 build/C/man2/pivot_root.2:156
443 #: build/C/man2/process_vm_readv.2:341 build/C/man2/ptrace.2:2021
444 #: build/C/man2/quotactl.2:519 build/C/man2/sendfile.2:210
445 #: build/C/man2/set_tid_address.2:109 build/C/man2/splice.2:237
446 #: build/C/man2/tee.2:207 build/C/man2/vm86.2:83 build/C/man2/vmsplice.2:164
447 msgid ""
448 "This page is part of release 3.54 of the Linux I<man-pages> project.  A "
449 "description of the project, and information about reporting bugs, can be "
450 "found at \\%http://www.kernel.org/doc/man-pages/."
451 msgstr ""
452 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.54 の一部\n"
453 "である。プロジェクトの説明とバグ報告に関する情報は\n"
454 "http://www.kernel.org/doc/man-pages/ に書かれている。"
455
456 #. type: TH
457 #: build/C/man2/futex.2:53
458 #, no-wrap
459 msgid "FUTEX"
460 msgstr "FUTEX"
461
462 #. type: TH
463 #: build/C/man2/futex.2:53
464 #, no-wrap
465 msgid "2013-09-04"
466 msgstr "2013-09-04"
467
468 #. type: Plain text
469 #: build/C/man2/futex.2:56
470 msgid "futex - fast user-space locking"
471 msgstr "futex - 高速ユーザ空間ロック"
472
473 #. type: Plain text
474 #: build/C/man2/futex.2:61
475 #, no-wrap
476 msgid ""
477 "B<#include E<lt>linux/futex.hE<gt>>\n"
478 "B<#include E<lt>sys/time.hE<gt>>\n"
479 msgstr ""
480 "B<#include E<lt>linux/futex.hE<gt>>\n"
481 "B<#include E<lt>sys/time.hE<gt>>\n"
482
483 #. type: Plain text
484 #: build/C/man2/futex.2:64
485 #, no-wrap
486 msgid "B<int futex(int *>I<uaddr>B<, int >I<op>B<, int >I<val>B<, const struct timespec *>I<timeout>B<,>\n"
487 msgstr "B<int futex(int *>I<uaddr>B<, int >I<op>B<, int >I<val>B<, const struct timespec *>I<timeout>B<,>\n"
488
489 #.  int *? void *? u32 *?
490 #. type: Plain text
491 #: build/C/man2/futex.2:67
492 #, no-wrap
493 msgid "B<          int *>I<uaddr2>B<, int >I<val3>B<);>\n"
494 msgstr "B<          int *>I<uaddr2>B<, int >I<val3>B<);>\n"
495
496 #. type: Plain text
497 #: build/C/man2/futex.2:84
498 msgid ""
499 "The B<futex>()  system call provides a method for a program to wait for a "
500 "value at a given address to change, and a method to wake up anyone waiting "
501 "on a particular address (while the addresses for the same memory in separate "
502 "processes may not be equal, the kernel maps them internally so the same "
503 "memory mapped in different locations will correspond for B<futex>()  "
504 "calls).  This system call is typically used to implement the contended case "
505 "of a lock in shared memory, as described in B<futex>(7)."
506 msgstr ""
507 "B<futex>()  システムコールは、 指定したアドレスの値が変更されるのをプログラム"
508 "が待つ手段や 特定のアドレスに対して待機中のプロセスを wake (起床) させる手段"
509 "を提供する (プロセスが異なれば同じメモリに対するアドレスも同じではないかもし"
510 "れないが、 カーネルは異なる位置にマップされた同じメモリを B<futex>()  で使え"
511 "るよう内部でマップする)。 通常は、このシステムコールは B<futex>(7)  に書かれ"
512 "ているように、 共有メモリ中のロックが競合する場合の処理を実装するのに用いられ"
513 "る。"
514
515 #. type: Plain text
516 #: build/C/man2/futex.2:91
517 msgid ""
518 "When a B<futex>(7)  operation did not finish uncontended in user space, a "
519 "call needs to be made to the kernel to arbitrate.  Arbitration can either "
520 "mean putting the calling process to sleep or, conversely, waking a waiting "
521 "process."
522 msgstr ""
523 "B<futex>(7)  の操作がユーザ空間で競合なく完了しなかった場合、 カーネルに仲裁"
524 "させるためにシステムコールを呼ぶ必要がある。 仲裁というのは、呼び出しプロセス"
525 "を sleep (起床待ち) させたり、反対に 待ちプロセスを wake させたりすることを意"
526 "味する。"
527
528 #. type: Plain text
529 #: build/C/man2/futex.2:98
530 msgid ""
531 "Callers of this function are expected to adhere to the semantics as set out "
532 "in B<futex>(7).  As these semantics involve writing nonportable assembly "
533 "instructions, this in turn probably means that most users will in fact be "
534 "library authors and not general application developers."
535 msgstr ""
536 "この関数を呼び出すプロセスは B<futex>(7)  に記述されているセマンティクスに忠"
537 "実であることが要求される。 このセマンティクスには移植不可能なアセンブリ命令を"
538 "書くことが含まれる。 このことは言い換えると futex のユーザのほとんどは実際は"
539 "ライブラリの作者であり、 一般アプリケーションの開発者ではないということであ"
540 "る。"
541
542 #. type: Plain text
543 #: build/C/man2/futex.2:106
544 msgid ""
545 "The I<uaddr> argument needs to point to an aligned integer which stores the "
546 "counter.  The operation to execute is passed via the I<op> argument, along "
547 "with a value I<val>."
548 msgstr ""
549 "I<uaddr> 引き数は、カウンタを格納する、 アラインメントの揃った int 型変数を指"
550 "している必要がある。 実行する操作は I<op> 引き数を介して、値 I<val> とともに"
551 "渡される。"
552
553 #. type: Plain text
554 #: build/C/man2/futex.2:108
555 msgid "Five operations are currently defined:"
556 msgstr "現在のところ 5 つの操作が定義されている:"
557
558 #. type: TP
559 #: build/C/man2/futex.2:108 build/C/man2/futex.2:221
560 #, no-wrap
561 msgid "B<FUTEX_WAIT>"
562 msgstr "B<FUTEX_WAIT>"
563
564 #. type: Plain text
565 #: build/C/man2/futex.2:131
566 #, fuzzy
567 #| msgid ""
568 #| "This operation atomically verifies that the futex address I<uaddr> still "
569 #| "contains the value I<val>, and sleeps awaiting B<FUTEX_WAKE> on this "
570 #| "futex address.  If the I<timeout> argument is non-NULL, its contents "
571 #| "describe the minimum duration of the wait, which is infinite otherwise.  "
572 #| "The arguments I<uaddr2> and I<val3> are ignored."
573 msgid ""
574 "This operation atomically verifies that the futex address I<uaddr> still "
575 "contains the value I<val>, and sleeps awaiting B<FUTEX_WAKE> on this futex "
576 "address.  If the I<timeout> argument is non-NULL, its contents specify the "
577 "duration of the wait.  (This interval will be rounded up to the system clock "
578 "granularity, and kernel scheduling delays mean that the blocking interval "
579 "may overrun by a small amount.)  If I<timeout> is NULL, the call blocks "
580 "indefinitely.  The arguments I<uaddr2> and I<val3> are ignored."
581 msgstr ""
582 "この操作は futex アドレス I<uaddr> に指定された値 I<val> がまだ格納されている"
583 "かどうかを不可分操作で検証し、 sleep 状態で この futex アドレスに対して "
584 "B<FUTEX_WAKE> が実行されるのを待つ。 I<timeout> 引き数が NULL でない場合、そ"
585 "の内容は 待ち時間の最大値を表す。NULL の場合は無限大を表す。 引き数 "
586 "I<uaddr2> と I<val3> は無視される。"
587
588 #. type: Plain text
589 #: build/C/man2/futex.2:139
590 msgid ""
591 "For B<futex>(7), this call is executed if decrementing the count gave a "
592 "negative value (indicating contention), and will sleep until another process "
593 "releases the futex and executes the B<FUTEX_WAKE> operation."
594 msgstr ""
595 "B<futex>(7)  に照らし合わせると、この呼び出しは カウントのデクリメントで負の"
596 "値 (競合を表す) になった場合に実行され、 別のプロセスがその futex を解放し "
597 "B<FUTEX_WAKE> の操作を実行するまで sleep する。"
598
599 #. type: TP
600 #: build/C/man2/futex.2:139 build/C/man2/futex.2:227
601 #, no-wrap
602 msgid "B<FUTEX_WAKE>"
603 msgstr "B<FUTEX_WAKE>"
604
605 #. type: Plain text
606 #: build/C/man2/futex.2:150
607 msgid ""
608 "This operation wakes at most I<val> processes waiting on this futex address "
609 "(i.e., inside B<FUTEX_WAIT>).  The arguments I<timeout>, I<uaddr2> and "
610 "I<val3> are ignored."
611 msgstr ""
612 "この操作では指定した futex アドレスに対して待ち状態の (すなわち "
613 "B<FUTEX_WAIT> 中の) 最大 I<val> 個のプロセスを wake させる。 引き数 "
614 "I<timeout>, I<uaddr2>, I<val3> は無視される。"
615
616 #. type: Plain text
617 #: build/C/man2/futex.2:156
618 msgid ""
619 "For B<futex>(7), this is executed if incrementing the count showed that "
620 "there were waiters, once the futex value has been set to 1 (indicating that "
621 "it is available)."
622 msgstr ""
623 "B<futex>(4) に照らし合わせると、 この操作は カウントのインクリメントで待ちプ"
624 "ロセスがあると判明し、 futex 値が 1 に設定された (利用可能であることを表す) "
625 "場合に実行される。"
626
627 #. type: TP
628 #: build/C/man2/futex.2:156
629 #, no-wrap
630 msgid "B<FUTEX_FD> (present up to and including Linux 2.6.25)"
631 msgstr "B<FUTEX_FD> (Linux 2.6.25 以前)"
632
633 #.  , suitable for .BR poll (2).
634 #. type: Plain text
635 #: build/C/man2/futex.2:172
636 msgid ""
637 "To support asynchronous wakeups, this operation associates a file descriptor "
638 "with a futex.  If another process executes a B<FUTEX_WAKE>, the process will "
639 "receive the signal number that was passed in I<val>.  The calling process "
640 "must close the returned file descriptor after use.  The arguments "
641 "I<timeout>, I<uaddr2> and I<val3> are ignored."
642 msgstr ""
643 "非同期の wake に対応するため、この操作はファイルディスクリプタを futex に 関"
644 "連づける。 別のプロセスが B<FUTEX_WAKE> を実行すると、プロセスは I<val> で渡"
645 "されたシグナル番号のシグナルを受信する。 呼び出しプロセスは使用後、返された"
646 "ファイルディスクリプタを クローズしなければならない。 引き数 I<timeout>, "
647 "I<uaddr2>, I<val3> は無視される。"
648
649 #. type: Plain text
650 #: build/C/man2/futex.2:177
651 msgid ""
652 "To prevent race conditions, the caller should test if the futex has been "
653 "upped after B<FUTEX_FD> returns."
654 msgstr ""
655 "競合状態を防止するため、呼び出しプロセスは B<FUTEX_FD> が返ったあと futex が "
656 "up されたかどうかを確認しなければならない。"
657
658 #. type: Plain text
659 #: build/C/man2/futex.2:181
660 msgid ""
661 "Because it was inherently racy, B<FUTEX_FD> has been removed from Linux "
662 "2.6.26 onward."
663 msgstr ""
664 "B<FUTEX_FD> はもともと競合が起きやすかったため、 Linux 2.6.26 以降で削除され"
665 "ている。"
666
667 #. type: TP
668 #: build/C/man2/futex.2:181
669 #, no-wrap
670 msgid "B<FUTEX_REQUEUE> (since Linux 2.5.70)"
671 msgstr "B<FUTEX_REQUEUE> (Linux 2.5.70 以降)"
672
673 #. type: Plain text
674 #: build/C/man2/futex.2:196
675 msgid ""
676 "This operation was introduced in order to avoid a \"thundering herd\" effect "
677 "when B<FUTEX_WAKE> is used and all processes woken up need to acquire "
678 "another futex.  This call wakes up I<val> processes, and requeues all other "
679 "waiters on the futex at address I<uaddr2>.  The arguments I<timeout> and "
680 "I<val3> are ignored."
681 msgstr ""
682 "この操作は、 B<FUTEX_WAKE> が使われていて、かつ wake されている全てのプロセス"
683 "が 他の futex を取得する必要がある場合に、 「獣の群れの暴走 (thundering "
684 "herd)」効果を避けるために導入された。 この呼び出しは I<val> 個のプロセスを "
685 "wake し、アドレス I<uaddr2> で futex を待っている他の全てのプロセスを再度"
686 "キューにいれる。 引き数 I<timeout> と I<val3> は無視される。"
687
688 #. type: TP
689 #: build/C/man2/futex.2:196
690 #, no-wrap
691 msgid "B<FUTEX_CMP_REQUEUE> (since Linux 2.6.7)"
692 msgstr "B<FUTEX_CMP_REQUEUE> (Linux 2.6.7 以降)"
693
694 #. type: Plain text
695 #: build/C/man2/futex.2:214
696 msgid ""
697 "There was a race in the intended use of B<FUTEX_REQUEUE>, so "
698 "B<FUTEX_CMP_REQUEUE> was introduced.  This is similar to B<FUTEX_REQUEUE>, "
699 "but first checks whether the location I<uaddr> still contains the value "
700 "I<val3>.  If not, the operation fails with the error B<EAGAIN>.  The "
701 "argument I<timeout> is ignored."
702 msgstr ""
703 "故意に B<FUTEX_REQUEUE> を使う場合に競合が起こるため、 B<FUTEX_CMP_REQUEUE> "
704 "が導入された。これは B<FUTEX_REQUEUE> と似ているが、場所 I<uaddr> に値 "
705 "I<val3> がまだ保持されているかを最初にチェックする。 保持されていない場合、操"
706 "作はエラー B<EAGAIN> で失敗する。引き数 I<timeout> は無視される。"
707
708 #. type: Plain text
709 #: build/C/man2/futex.2:221
710 msgid ""
711 "In the event of an error, all operations return -1, and set I<errno> to "
712 "indicate the error.  The return value on success depends on the operation, "
713 "as described in the following list:"
714 msgstr ""
715 "エラーの場合、全ての操作で -1 が返り、 I<errno> がエラーの内容を示す値に設定"
716 "される。成功時の返り値は操作によって異なり、以下のリストに書かれている通りで"
717 "ある。"
718
719 #. type: Plain text
720 #: build/C/man2/futex.2:227
721 msgid ""
722 "Returns 0 if the process was woken by a B<FUTEX_WAKE> call.  See ERRORS for "
723 "the various possible error returns."
724 msgstr ""
725 "そのプロセスが B<FUTEX_WAKE> により wake された場合 0 を返す。発生する可能性"
726 "があるエラーについては「エラー」の節を参照。"
727
728 #. type: Plain text
729 #: build/C/man2/futex.2:230 build/C/man2/futex.2:236 build/C/man2/futex.2:239
730 msgid "Returns the number of processes woken up."
731 msgstr "wake したプロセスの数を返す。"
732
733 #. type: TP
734 #: build/C/man2/futex.2:230
735 #, no-wrap
736 msgid "B<FUTEX_FD>"
737 msgstr "B<FUTEX_FD>"
738
739 #. type: Plain text
740 #: build/C/man2/futex.2:233
741 msgid "Returns the new file descriptor associated with the futex."
742 msgstr "futex に関連づけられた新たなファイルディスクリプタを返す。"
743
744 #. type: TP
745 #: build/C/man2/futex.2:233
746 #, no-wrap
747 msgid "B<FUTEX_REQUEUE>"
748 msgstr "B<FUTEX_REQUEUE>"
749
750 #. type: TP
751 #: build/C/man2/futex.2:236
752 #, no-wrap
753 msgid "B<FUTEX_CMP_REQUEUE>"
754 msgstr "B<FUTEX_CMP_REQUEUE>"
755
756 #. type: TP
757 #: build/C/man2/futex.2:240 build/C/man2/quotactl.2:486
758 #, no-wrap
759 msgid "B<EACCES>"
760 msgstr "B<EACCES>"
761
762 #. type: Plain text
763 #: build/C/man2/futex.2:243
764 msgid "No read access to futex memory."
765 msgstr "futex メモリに読み込みアクセス権がなかった。"
766
767 #. type: TP
768 #: build/C/man2/futex.2:243 build/C/man2/sendfile.2:116
769 #, no-wrap
770 msgid "B<EAGAIN>"
771 msgstr "B<EAGAIN>"
772
773 #. type: Plain text
774 #: build/C/man2/futex.2:254
775 msgid ""
776 "B<FUTEX_CMP_REQUEUE> detected that the value pointed to by I<uaddr> is not "
777 "equal to the expected value I<val3>.  (This probably indicates a race; use "
778 "the safe B<FUTEX_WAKE> now.)"
779 msgstr ""
780 "B<FUTEX_CMP_REQUEUE> で、I<uaddr> が指す値が期待値 I<val3> と異なる状況が検出"
781 "された。 (これは競合を示しているかもしれない。この場合は安全な B<FUTEX_WAKE> "
782 "を使うこと。)"
783
784 #. type: Plain text
785 #: build/C/man2/futex.2:259
786 msgid "Error retrieving I<timeout> information from user space."
787 msgstr "ユーザ空間から I<timeout> の情報を取得する際にエラーが発生した。"
788
789 #. type: TP
790 #: build/C/man2/futex.2:259
791 #, no-wrap
792 msgid "B<EINTR>"
793 msgstr "B<EINTR>"
794
795 #. type: Plain text
796 #: build/C/man2/futex.2:266
797 msgid ""
798 "A B<FUTEX_WAIT> operation was interrupted by a signal (see B<signal>(7))  or "
799 "a spurious wakeup."
800 msgstr ""
801 "B<FUTEX_WAIT> 操作がシグナル (B<signal>(7) 参照) もしくは偽の wakeup により中"
802 "断された。"
803
804 #. type: Plain text
805 #: build/C/man2/futex.2:269
806 msgid "Invalid argument."
807 msgstr "無効な引き数。"
808
809 #. type: TP
810 #: build/C/man2/futex.2:269
811 #, no-wrap
812 msgid "B<ENFILE>"
813 msgstr "B<ENFILE>"
814
815 #. type: Plain text
816 #: build/C/man2/futex.2:272
817 msgid "The system limit on the total number of open files has been reached."
818 msgstr "オープンされているファイルの総数がシステムの制限に達した。"
819
820 #. type: TP
821 #: build/C/man2/futex.2:272 build/C/man2/modify_ldt.2:126
822 #: build/C/man2/pciconfig_read.2:93 build/C/man2/quotactl.2:447
823 #: build/C/man2/vm86.2:64
824 #, no-wrap
825 msgid "B<ENOSYS>"
826 msgstr "B<ENOSYS>"
827
828 #. type: Plain text
829 #: build/C/man2/futex.2:276
830 msgid "Invalid operation specified in I<op>."
831 msgstr "I<op> に無効な操作が指定された。"
832
833 #. type: TP
834 #: build/C/man2/futex.2:276
835 #, no-wrap
836 msgid "B<ETIMEDOUT>"
837 msgstr "B<ETIMEDOUT>"
838
839 #. type: Plain text
840 #: build/C/man2/futex.2:281
841 msgid "Timeout during the B<FUTEX_WAIT> operation."
842 msgstr "B<FUTEX_WAIT> 操作でタイムアウトが発生した。"
843
844 #. type: TP
845 #: build/C/man2/futex.2:281
846 #, no-wrap
847 msgid "B<EWOULDBLOCK>"
848 msgstr "B<EWOULDBLOCK>"
849
850 #. type: Plain text
851 #: build/C/man2/futex.2:291
852 msgid ""
853 "I<op> was B<FUTEX_WAIT> and the value pointed to by I<uaddr> was not equal "
854 "to the expected value I<val> at the time of the call."
855 msgstr ""
856 "I<op> が B<FUTEX_WAIT> で、その呼び出しにおいて I<uaddr> が指す値が期待値 "
857 "I<val> と異なっていた。"
858
859 #. type: SH
860 #: build/C/man2/futex.2:291 build/C/man2/get_robust_list.2:115
861 #: build/C/man2/getunwind.2:94 build/C/man2/kexec_load.2:138
862 #: build/C/man2/lookup_dcookie.2:73 build/C/man2/perfmonctl.2:196
863 #: build/C/man2/pivot_root.2:125 build/C/man2/process_vm_readv.2:276
864 #: build/C/man2/sendfile.2:142 build/C/man2/set_tid_address.2:94
865 #: build/C/man2/splice.2:165 build/C/man2/tee.2:114
866 #: build/C/man2/vmsplice.2:138
867 #, no-wrap
868 msgid "VERSIONS"
869 msgstr "バージョン"
870
871 #. type: Plain text
872 #: build/C/man2/futex.2:301
873 msgid ""
874 "Initial futex support was merged in Linux 2.5.7 but with different semantics "
875 "from what was described above.  A 4-argument system call with the semantics "
876 "described in this page was introduced in Linux 2.5.40.  In Linux 2.5.70 one "
877 "argument was added.  In Linux 2.6.7 a sixth argument was added\\(emmessy, "
878 "especially on the s390 architecture."
879 msgstr ""
880 "最初の futex 対応は Linux 2.5.7 で組み込まれたが、 上記のセマンティクスとは異"
881 "なる。 4 つの引き数のここに書かれているセマンティクスを持つ システムコール"
882 "は、Linux 2.5.40 で導入された。 Linux 2.5.70 では 1 つの引き数が追加された。 "
883 "Linux 2.6.7 では 6 番目の引き数が追加された。 これは汚く、s390 アーキテクチャ"
884 "上の特別のものである。"
885
886 #. type: Plain text
887 #: build/C/man2/futex.2:303 build/C/man2/kexec_load.2:144
888 #: build/C/man2/set_tid_address.2:99 build/C/man2/splice.2:172
889 #: build/C/man2/tee.2:121 build/C/man2/vmsplice.2:145
890 msgid "This system call is Linux-specific."
891 msgstr "このシステムコールは Linux 固有である。"
892
893 #.  .SH "AUTHORS"
894 #.  .PP
895 #.  Futexes were designed and worked on by
896 #.  Hubertus Franke (IBM Thomas J. Watson Research Center),
897 #.  Matthew Kirkwood, Ingo Molnar (Red Hat)
898 #.  and Rusty Russell (IBM Linux Technology Center).
899 #.  This page written by bert hubert.
900 #. type: Plain text
901 #: build/C/man2/futex.2:317
902 msgid ""
903 "To reiterate, bare futexes are not intended as an easy-to-use abstraction "
904 "for end-users.  (There is no wrapper function for this system call in "
905 "glibc.)  Implementors are expected to be assembly literate and to have read "
906 "the sources of the futex user-space library referenced below."
907 msgstr ""
908 "繰り返すが、裸の futex はエンドユーザが容易に使うことのできる概念として 意図"
909 "されたものではない (glibc にはこのシステムコールに対するラッパー関数はな"
910 "い)。 実装者は、アセンブリ言語に慣れており、以下に挙げる futex ユーザ空間ライ"
911 "ブラリの ソースを読み終えていることが要求される。"
912
913 #. type: Plain text
914 #: build/C/man2/futex.2:320
915 msgid "B<restart_syscall>(2), B<futex>(7)"
916 msgstr "B<restart_syscall>(2), B<futex>(7)"
917
918 #. type: Plain text
919 #: build/C/man2/futex.2:323
920 msgid ""
921 "I<Fuss, Futexes and Furwocks: Fast Userlevel Locking in Linux> (proceedings "
922 "of the Ottawa Linux Symposium 2002), online at"
923 msgstr ""
924 "I<Fuss, Futexes and Furwocks: Fast Userlevel Locking in Linux> (proceedings "
925 "of the Ottawa Linux Symposium 2002), online at"
926
927 #. type: Plain text
928 #: build/C/man2/futex.2:326
929 msgid ""
930 "E<.UR http://kernel.org\\:/doc\\:/ols\\:/2002\\:/ols2002-pages-479-495.pdf> "
931 "E<.UE>"
932 msgstr ""
933 "E<.UR http://kernel.org\\:/doc\\:/ols\\:/2002\\:/ols2002-pages-479-495.pdf> "
934 "E<.UE>"
935
936 #. type: Plain text
937 #: build/C/man2/futex.2:328
938 msgid "Futex example library, futex-*.tar.bz2 at"
939 msgstr "futex の使用例ライブラリ, futex-*.tar.bz2"
940
941 #. type: Plain text
942 #: build/C/man2/futex.2:331
943 msgid ""
944 "E<.UR ftp://ftp.nl.kernel.org\\:/pub\\:/linux\\:/kernel\\:/people\\:/rusty/> "
945 "E<.UE>"
946 msgstr ""
947 "E<.UR ftp://ftp.nl.kernel.org\\:/pub\\:/linux\\:/kernel\\:/people\\:/rusty/> "
948 "E<.UE>"
949
950 #. type: TH
951 #: build/C/man2/get_robust_list.2:29
952 #, no-wrap
953 msgid "GET_ROBUST_LIST"
954 msgstr "GET_ROBUST_LIST"
955
956 #. type: TH
957 #: build/C/man2/get_robust_list.2:29 build/C/man2/kexec_load.2:26
958 #: build/C/man2/modify_ldt.2:24 build/C/man2/pivot_root.2:10
959 #, no-wrap
960 msgid "2012-07-13"
961 msgstr "2012-07-13"
962
963 #. type: TH
964 #: build/C/man2/get_robust_list.2:29
965 #, no-wrap
966 msgid "Linux System Calls"
967 msgstr ""
968
969 #. type: Plain text
970 #: build/C/man2/get_robust_list.2:32
971 msgid "get_robust_list, set_robust_list - get/set list of robust futexes"
972 msgstr ""
973
974 #. type: Plain text
975 #: build/C/man2/get_robust_list.2:36
976 #, no-wrap
977 msgid ""
978 "B<#include E<lt>linux/futex.hE<gt>>\n"
979 "B<#include E<lt>syscall.hE<gt>>\n"
980 msgstr ""
981 "B<#include E<lt>linux/futex.hE<gt>>\n"
982 "B<#include E<lt>syscall.hE<gt>>\n"
983
984 #. type: Plain text
985 #: build/C/man2/get_robust_list.2:40
986 #, no-wrap
987 msgid ""
988 "B<long get_robust_list(int >I<pid>B<, struct robust_list_head **>I<head_ptr>B<,>\n"
989 "B<\t\t\t  size_t *>I<len_ptr>B<);>\n"
990 "B<long set_robust_list(struct robust_list_head *>I<head>B<, size_t >I<len>B<);>\n"
991 msgstr ""
992
993 #. type: Plain text
994 #: build/C/man2/get_robust_list.2:44
995 msgid "I<Note>: There are no glibc wrappers for these system calls; see NOTES."
996 msgstr ""
997 "I<注意>: これらのシステムコールには glibc ラッパー関数は存在しない。 「注意」"
998 "の節を参照。"
999
1000 #. type: Plain text
1001 #: build/C/man2/get_robust_list.2:49
1002 msgid ""
1003 "The robust futex implementation needs to maintain per-thread lists of robust "
1004 "futexes which are unlocked when the thread exits.  These lists are managed "
1005 "in user space; the kernel is notified about only the location of the head of "
1006 "the list."
1007 msgstr ""
1008
1009 #. type: Plain text
1010 #: build/C/man2/get_robust_list.2:65
1011 msgid ""
1012 "The B<get_robust_list>()  system call returns the head of the robust futex "
1013 "list of the thread whose thread ID is specified in I<pid>.  If I<pid> is 0, "
1014 "the head of the list for the calling thread is returned.  The list head is "
1015 "stored in the location pointed to by I<head_ptr>.  The size of the object "
1016 "pointed to by I<**head_ptr> is stored in I<len_ptr>."
1017 msgstr ""
1018
1019 #. type: Plain text
1020 #: build/C/man2/get_robust_list.2:77
1021 msgid ""
1022 "The B<set_robust_list>()  system call requests the kernel to record the head "
1023 "of the list of robust futexes owned by the calling thread.  The I<head> "
1024 "argument is the list head to record.  The I<len> argument should be I<sizeof"
1025 "(*head)>."
1026 msgstr ""
1027
1028 #. type: Plain text
1029 #: build/C/man2/get_robust_list.2:84
1030 msgid ""
1031 "The B<set_robust_list>()  and B<get_robust_list>()  system calls return zero "
1032 "when the operation is successful, an error code otherwise."
1033 msgstr ""
1034
1035 #. type: Plain text
1036 #: build/C/man2/get_robust_list.2:88
1037 msgid ""
1038 "The B<set_robust_list>()  system call can fail with the following error:"
1039 msgstr ""
1040
1041 #. type: Plain text
1042 #: build/C/man2/get_robust_list.2:94
1043 msgid ""
1044 "I<len> does not match the size of structure B<struct robust_list_head> "
1045 "expected by kernel."
1046 msgstr ""
1047
1048 #. type: Plain text
1049 #: build/C/man2/get_robust_list.2:98
1050 msgid ""
1051 "The B<get_robust_list>()  system call can fail with the following errors:"
1052 msgstr ""
1053
1054 #. type: Plain text
1055 #: build/C/man2/get_robust_list.2:106
1056 msgid ""
1057 "The calling process does not have permission to see the robust futex list of "
1058 "the thread with the thread ID I<pid>, and does not have the "
1059 "B<CAP_SYS_PTRACE> capability."
1060 msgstr ""
1061
1062 #. type: TP
1063 #: build/C/man2/get_robust_list.2:106 build/C/man2/process_vm_readv.2:271
1064 #: build/C/man2/ptrace.2:1839 build/C/man2/quotactl.2:461
1065 #: build/C/man2/quotactl.2:504
1066 #, no-wrap
1067 msgid "B<ESRCH>"
1068 msgstr "B<ESRCH>"
1069
1070 #. type: Plain text
1071 #: build/C/man2/get_robust_list.2:111
1072 msgid "No thread with the thread ID I<pid> could be found."
1073 msgstr ""
1074
1075 #. type: Plain text
1076 #: build/C/man2/get_robust_list.2:115
1077 msgid ""
1078 "The head of the robust futex list can't be stored at the location I<head>."
1079 msgstr ""
1080
1081 #. type: Plain text
1082 #: build/C/man2/get_robust_list.2:119
1083 msgid ""
1084 "These system calls were added in Linux 2.6.17.  No library support is "
1085 "provided; use B<syscall>(2)."
1086 msgstr ""
1087 "これらのシステムコールは Linux 2.6.17 で追加された。ライブラリによる\n"
1088 "サポートは提供されていない。 B<syscall>(2) を使うこと。"
1089
1090 #. type: Plain text
1091 #: build/C/man2/get_robust_list.2:124
1092 msgid ""
1093 "These system calls are not needed by normal applications.  No support for "
1094 "them is provided in glibc.  In the unlikely event that you want to call them "
1095 "directly, use B<syscall>(2)."
1096 msgstr ""
1097 "通常のアプリケーションでは、これらのシステムコールは必要ではない。 glibc によ"
1098 "るサポートは提供されていない。おそらくないと思うが、このシステムコールを直接"
1099 "呼び出したい場合は B<syscall>(2) を使うこと。"
1100
1101 #. type: Plain text
1102 #: build/C/man2/get_robust_list.2:128
1103 msgid ""
1104 "A thread can have only one robust futex list; therefore applications that "
1105 "wish to use this functionality should use the robust mutexes provided by "
1106 "glibc."
1107 msgstr ""
1108
1109 #.  .BR pthread_mutexattr_setrobust_np (3)
1110 #. type: Plain text
1111 #: build/C/man2/get_robust_list.2:131
1112 msgid "B<futex>(2)"
1113 msgstr "B<futex>(2)"
1114
1115 #.  http://lwn.net/Articles/172149/
1116 #. type: Plain text
1117 #: build/C/man2/get_robust_list.2:137
1118 msgid ""
1119 "I<Documentation/robust-futexes.txt> and I<Documentation/robust-futex-ABI."
1120 "txt> in the Linux kernel source tree"
1121 msgstr ""
1122
1123 #. type: TH
1124 #: build/C/man2/getunwind.2:27
1125 #, no-wrap
1126 msgid "GETUNWIND"
1127 msgstr ""
1128
1129 #. type: TH
1130 #: build/C/man2/getunwind.2:27 build/C/man2/perfmonctl.2:27
1131 #, no-wrap
1132 msgid "2013-02-13"
1133 msgstr "2013-02-13"
1134
1135 #. type: Plain text
1136 #: build/C/man2/getunwind.2:30
1137 msgid "getunwind - copy the unwind data to caller's buffer"
1138 msgstr ""
1139
1140 #. type: Plain text
1141 #: build/C/man2/getunwind.2:34
1142 #, no-wrap
1143 msgid ""
1144 "B<#include E<lt>syscall.hE<gt>>\n"
1145 "B<#include E<lt>linux/unwind.hE<gt>>\n"
1146 msgstr ""
1147 "B<#include E<lt>syscall.hE<gt>>\n"
1148 "B<#include E<lt>linux/unwind.hE<gt>>\n"
1149
1150 #. type: Plain text
1151 #: build/C/man2/getunwind.2:36
1152 #, no-wrap
1153 msgid "B<long getunwind(void >I<*buf>B<, size_t >I<buf_size>B<);>\n"
1154 msgstr ""
1155
1156 #. type: Plain text
1157 #: build/C/man2/getunwind.2:40 build/C/man2/kexec_load.2:39
1158 #: build/C/man2/modify_ldt.2:36 build/C/man2/perf_event_open.2:42
1159 #: build/C/man2/perfmonctl.2:39 build/C/man2/pivot_root.2:18
1160 msgid "I<Note>: There is no glibc wrapper for this system call; see NOTES."
1161 msgstr ""
1162 "I<注>: このシステムコールには glibc のラッパー関数は存在しない。「注意」の節"
1163 "を参照。"
1164
1165 #. type: Plain text
1166 #: build/C/man2/getunwind.2:42
1167 msgid "I<Note: this function is obsolete.>"
1168 msgstr ""
1169
1170 #. type: Plain text
1171 #: build/C/man2/getunwind.2:52
1172 msgid ""
1173 "The IA-64-specific B<getunwind>()  system call copies the kernel's call "
1174 "frame unwind data into the buffer pointed to by I<buf> and returns the size "
1175 "of the unwind data; this data describes the gate page (kernel code that is "
1176 "mapped into user space)."
1177 msgstr ""
1178
1179 #. type: Plain text
1180 #: build/C/man2/getunwind.2:64
1181 msgid ""
1182 "The size of the buffer I<buf> is specified in I<buf_size>.  The data is "
1183 "copied only if I<buf_size> is greater than or equal to the size of the "
1184 "unwind data and I<buf> is not NULL; otherwise, no data is copied, and the "
1185 "call succeeds, returning the size that would be needed to store the unwind "
1186 "data."
1187 msgstr ""
1188
1189 #. type: Plain text
1190 #: build/C/man2/getunwind.2:68
1191 msgid ""
1192 "The first part of the unwind data contains an unwind table.  The rest "
1193 "contains the associated unwind information, in no particular order.  The "
1194 "unwind table contains entries of the following form:"
1195 msgstr ""
1196
1197 #. type: Plain text
1198 #: build/C/man2/getunwind.2:73
1199 #, no-wrap
1200 msgid ""
1201 "\tu64 start;      (64-bit address of start of function)\n"
1202 "\tu64 end;        (64-bit address of end of function)\n"
1203 "\tu64 info;       (BUF-relative offset to unwind info)\n"
1204 msgstr ""
1205
1206 #. type: Plain text
1207 #: build/C/man2/getunwind.2:81
1208 msgid ""
1209 "An entry whose I<start> value is zero indicates the end of the table.  For "
1210 "more information about the format, see the I<IA-64 Software Conventions and "
1211 "Runtime Architecture> manual."
1212 msgstr ""
1213
1214 #. type: Plain text
1215 #: build/C/man2/getunwind.2:88
1216 msgid ""
1217 "On success, B<getunwind>()  returns the size of unwind table.  On error, -1 "
1218 "is returned and I<errno> is set to indicate the error."
1219 msgstr ""
1220
1221 #. type: Plain text
1222 #: build/C/man2/getunwind.2:94
1223 msgid ""
1224 "B<getunwind>()  fails with the error B<EFAULT> if the unwind info can't be "
1225 "stored in the space specified by I<buf>."
1226 msgstr ""
1227
1228 #. type: Plain text
1229 #: build/C/man2/getunwind.2:96
1230 msgid "This system call is available since Linux 2.4."
1231 msgstr ""
1232
1233 #. type: Plain text
1234 #: build/C/man2/getunwind.2:99
1235 msgid ""
1236 "This system call is Linux specific, and is available only on the IA-64 "
1237 "architecture."
1238 msgstr ""
1239
1240 #. type: Plain text
1241 #: build/C/man2/getunwind.2:107
1242 msgid ""
1243 "This system call has been deprecated.  The modern way to obtain the kernel's "
1244 "unwind data is via the gate DSO.  The address of the ELF header for this DSO "
1245 "is passed to user level via B<AT_SYSINFO_EHDR> (see B<getauxval>(3))."
1246 msgstr ""
1247
1248 #. type: Plain text
1249 #: build/C/man2/getunwind.2:111
1250 msgid ""
1251 "Glibc does not provide a wrapper for this system call; in the unlikely event "
1252 "that you want to call it, use B<syscall>(2)."
1253 msgstr ""
1254 "glibc はこのシステムコールに対するラッパー関数を提供していない。おそらくない"
1255 "と思うが、このシステムコールを呼び出したい場合は B<syscall>(2) を使うこと。"
1256
1257 #. type: Plain text
1258 #: build/C/man2/getunwind.2:113
1259 msgid "B<getauxval>(3)"
1260 msgstr "B<getauxval>(3)"
1261
1262 #. type: TH
1263 #: build/C/man2/kexec_load.2:26
1264 #, no-wrap
1265 msgid "KEXEC_LOAD"
1266 msgstr "KEXEC_LOAD"
1267
1268 #. type: Plain text
1269 #: build/C/man2/kexec_load.2:29
1270 msgid "kexec_load - load a new kernel for later execution"
1271 msgstr "kexec_load - 新しいカーネルを後で実行するためにロードする"
1272
1273 #. type: Plain text
1274 #: build/C/man2/kexec_load.2:31
1275 msgid "B<#include E<lt>linux/kexec.hE<gt>>"
1276 msgstr "B<#include E<lt>linux/kexec.hE<gt>>"
1277
1278 #. type: Plain text
1279 #: build/C/man2/kexec_load.2:33
1280 msgid ""
1281 "B<long kexec_load(unsigned long >I<entry>B<, unsigned long >I<nr_segments>B<,"
1282 ">"
1283 msgstr ""
1284 "B<long kexec_load(unsigned long >I<entry>B<, unsigned long >I<nr_segments>B<,"
1285 ">"
1286
1287 #. type: Plain text
1288 #: build/C/man2/kexec_load.2:36
1289 msgid "B< struct kexec_segment *>I<segments>B<, unsigned long >I<flags>B<);>"
1290 msgstr "B< struct kexec_segment *>I<segments>B<, unsigned long >I<flags>B<);>"
1291
1292 #. type: Plain text
1293 #: build/C/man2/kexec_load.2:44
1294 msgid ""
1295 "The B<kexec_load>()  system call loads a new kernel that can be executed "
1296 "later by B<reboot>(2)."
1297 msgstr ""
1298 "B<kexec_load>() システムコールは、新しいカーネルをロードし、\n"
1299 "その後の B<reboot>(2) で実行できるようにする。"
1300
1301 #. type: Plain text
1302 #: build/C/man2/kexec_load.2:50
1303 msgid ""
1304 "The I<flags> argument is a mask whose high-order bits control the operation "
1305 "of the call.  The following values can be specified in I<flags>:"
1306 msgstr ""
1307 "I<flags> 引き数はマスクビットで、\n"
1308 "その上位ビットでシステムコールの呼び出しの動作を制御する。\n"
1309 "I<flags> には以下の値を指定できる。"
1310
1311 #. type: TP
1312 #: build/C/man2/kexec_load.2:50
1313 #, no-wrap
1314 msgid "B<KEXEC_ON_CRASH> (since Linux 2.6.13)"
1315 msgstr "B<KEXEC_ON_CRASH> (Linux 2.6.13 以降)"
1316
1317 #.  FIXME figure out how this is really used
1318 #. type: Plain text
1319 #: build/C/man2/kexec_load.2:54
1320 msgid "Execute the new kernel automatically on a system crash."
1321 msgstr "システムのクラッシュ時に、新しいカーネルを自動的に実行する。"
1322
1323 #. type: TP
1324 #: build/C/man2/kexec_load.2:54
1325 #, no-wrap
1326 msgid "B<KEXEC_PRESERVE_CONTEXT> (since Linux 2.6.27)"
1327 msgstr "B<KEXEC_PRESERVE_CONTEXT> (Linux 2.6.27 以降)"
1328
1329 #. type: Plain text
1330 #: build/C/man2/kexec_load.2:64
1331 msgid ""
1332 "Preserve the system hardware and software states before executing the new "
1333 "kernel.  This could be used for system suspend.  This flag is available only "
1334 "if the kernel was configured with B<CONFIG_KEXEC_JUMP>, and is effective "
1335 "only if I<nr_segments> is greater than 0."
1336 msgstr ""
1337 "新しいカーネルを実行する前に、\n"
1338 "システムのハードウェアとソフトウェアの状態を保存する。\n"
1339 "システムの中断時 (suspend) などで使用できる。\n"
1340 "このフラグは、カーネルの設定で B<CONFIG_KEXEC_JUMP> が有効の場合のみ\n"
1341 "利用可能であり、 I<nr_segments> が 0 より大きい場合のみ効果がある。"
1342
1343 #. type: Plain text
1344 #: build/C/man2/kexec_load.2:84
1345 msgid ""
1346 "The low-order bits of I<flags> contain the architecture of the to-be-"
1347 "executed kernel.  Specify (OR) the constant B<KEXEC_ARCH_DEFAULT> to use the "
1348 "current architecture, or one of the following architecture constants "
1349 "B<KEXEC_ARCH_386>, B<KEXEC_ARCH_X86_64>, B<KEXEC_ARCH_PPC>, "
1350 "B<KEXEC_ARCH_PPC64>, B<KEXEC_ARCH_IA_64>, B<KEXEC_ARCH_ARM>, "
1351 "B<KEXEC_ARCH_S390>, B<KEXEC_ARCH_SH>, B<KEXEC_ARCH_MIPS>, and "
1352 "B<KEXEC_ARCH_MIPS_LE>.  The architecture must be executable on the CPU of "
1353 "the system."
1354 msgstr ""
1355 "I<flags> の下位ビットには、実行されるカーネルのアーキテクチャが入る。\n"
1356 "現在のアーキテクチャを使うことを意味する定数 B<KEXEC_ARCH_DEFAULT> か、\n"
1357 "アーキテクチャ定数 B<KEXEC_ARCH_386>, B<KEXEC_ARCH_X86_64>,\n"
1358 "B<KEXEC_ARCH_PPC>, B<KEXEC_ARCH_PPC64>, B<KEXEC_ARCH_IA_64>,\n"
1359 "B<KEXEC_ARCH_ARM>, B<KEXEC_ARCH_S390>, B<KEXEC_ARCH_SH>,\n"
1360 "B<KEXEC_ARCH_MIPS>, B<KEXEC_ARCH_MIPS_LE> の\n"
1361 "いずれか一つを (OR で) 指定する。指定するアーキテクチャは、\n"
1362 "システムの CPU で実行可能なものでなければならない。"
1363
1364 #. type: Plain text
1365 #: build/C/man2/kexec_load.2:98
1366 msgid ""
1367 "The I<entry> argument is the physical entry address in the kernel image.  "
1368 "The I<nr_segments> argument is the number of segments pointed to by the "
1369 "I<segments> pointer.  The I<segments> argument is an array of "
1370 "I<kexec_segment> structures which define the kernel layout:"
1371 msgstr ""
1372 "I<entry> 引き数は、カーネルイメージの物理エントリーアドレスである。\n"
1373 "I<nr_segments> 引き数は、 I<segments> ポインタが指すセグメントの\n"
1374 "数である。 I<segments> 引き数は I<kexec_segment> 構造体の配列で、\n"
1375 "この構造体によりカーネルの配置が定義される。"
1376
1377 #. type: Plain text
1378 #: build/C/man2/kexec_load.2:107
1379 #, no-wrap
1380 msgid ""
1381 "struct kexec_segment {\n"
1382 "    void   *buf;        /* Buffer in user space */\n"
1383 "    size_t  bufsz;      /* Buffer length in user space */\n"
1384 "    void   *mem;        /* Physical address of kernel */\n"
1385 "    size_t  memsz;      /* Physical address length */\n"
1386 "};\n"
1387 msgstr ""
1388 "struct kexec_segment {\n"
1389 "    void   *buf;        /* Buffer in user space */\n"
1390 "    size_t  bufsz;      /* Buffer length in user space */\n"
1391 "    void   *mem;        /* Physical address of kernel */\n"
1392 "    size_t  memsz;      /* Physical address length */\n"
1393 "};\n"
1394
1395 #.  FIXME elaborate on the following:
1396 #. type: Plain text
1397 #: build/C/man2/kexec_load.2:114
1398 msgid ""
1399 "The kernel image defined by I<segments> is copied from the calling process "
1400 "into previously reserved memory."
1401 msgstr ""
1402 "I<segments> で定義されたカーネルイメージは、\n"
1403 "呼び出したプロセスから予約済みメモリにコピーされる。"
1404
1405 #. type: Plain text
1406 #: build/C/man2/kexec_load.2:121
1407 msgid ""
1408 "On success, B<kexec_load>()  returns 0.  On error, -1 is returned and "
1409 "I<errno> is set to indicate the error."
1410 msgstr ""
1411 "成功すると、 B<kexec_load> は 0 を返す。\n"
1412 "エラーの場合、 -1 が返り、 I<errno> にエラーを示す値が設定される。"
1413
1414 #. type: TP
1415 #: build/C/man2/kexec_load.2:122 build/C/man2/pivot_root.2:110
1416 #: build/C/man2/ptrace.2:1802 build/C/man2/quotactl.2:495
1417 #, no-wrap
1418 msgid "B<EBUSY>"
1419 msgstr "B<EBUSY>"
1420
1421 #. type: Plain text
1422 #: build/C/man2/kexec_load.2:126
1423 msgid ""
1424 "Another crash kernel is already being loaded or a crash kernel is already in "
1425 "use."
1426 msgstr ""
1427 "別のクラッシュカーネルがすでにロードされているか、\n"
1428 "クラッシュカーネルがすでに使用されている。"
1429
1430 #.  KEXEC_SEGMENT_MAX == 16
1431 #. type: Plain text
1432 #: build/C/man2/kexec_load.2:133
1433 msgid "I<flags> is invalid; or I<nr_segments> is too large"
1434 msgstr "I<flags> が無効である。 I<nr_segments> が大きすぎる。"
1435
1436 #. type: Plain text
1437 #: build/C/man2/kexec_load.2:138
1438 msgid "The caller does not have the B<CAP_SYS_BOOT> capability."
1439 msgstr "呼び出し側が B<CAP_SYS_BOOT> ケーパビリティを持っていない。"
1440
1441 #. type: Plain text
1442 #: build/C/man2/kexec_load.2:142
1443 msgid "The B<kexec_load>()  system call first appeared in Linux 2.6.13."
1444 msgstr "B<kexec_load>() システムコールは Linux 2.6.13 で初めて登場した。"
1445
1446 #. type: Plain text
1447 #: build/C/man2/kexec_load.2:149
1448 msgid ""
1449 "Currently, there is no glibc support for B<kexec_load>().  Call it using "
1450 "B<syscall>(2)."
1451 msgstr ""
1452 "現在のところ、 B<kexec_load>() は glibc ではサポートされていない。\n"
1453 "B<syscall>(2) を使って呼び出すこと。"
1454
1455 #.  FIXME Andi submitted a patch for this.
1456 #.  Check if it got accepted later.
1457 #. type: Plain text
1458 #: build/C/man2/kexec_load.2:156
1459 msgid ""
1460 "The required constants are in the Linux kernel source file I<linux/kexec.h>, "
1461 "which is not currently exported to glibc.  Therefore, these constants must "
1462 "be defined manually."
1463 msgstr ""
1464 "必要な定数は Linux カーネルのソースファイル I<linux/kexec.h> で定義されてい"
1465 "る\n"
1466 "が、現在のところ glibc には公開されていない。\n"
1467 "そのため、これらの定数は手動で定義しなければならない。"
1468
1469 #. type: Plain text
1470 #: build/C/man2/kexec_load.2:159
1471 msgid ""
1472 "This system call is available only if the kernel was configured with "
1473 "B<CONFIG_KEXEC>."
1474 msgstr ""
1475 "このシステムコールは、カーネルの設定で B<CONFIG_KEXEC> が有効になって\n"
1476 "いる場合にのみ利用できる。"
1477
1478 #. type: Plain text
1479 #: build/C/man2/kexec_load.2:162
1480 msgid "B<reboot>(2), B<syscall>(2)"
1481 msgstr "B<reboot>(2), B<syscall>(2)"
1482
1483 #. type: TH
1484 #: build/C/man2/lookup_dcookie.2:27
1485 #, no-wrap
1486 msgid "LOOKUP_DCOOKIE"
1487 msgstr "LOOKUP_DCOOKIE"
1488
1489 #. type: TH
1490 #: build/C/man2/lookup_dcookie.2:27
1491 #, no-wrap
1492 msgid "2004-06-17"
1493 msgstr "2004-06-17"
1494
1495 #. type: Plain text
1496 #: build/C/man2/lookup_dcookie.2:30
1497 msgid "lookup_dcookie - return a directory entry's path"
1498 msgstr "lookup_dcookie - ディレクトリ・エントリのパス名を返す"
1499
1500 #. type: Plain text
1501 #: build/C/man2/lookup_dcookie.2:32
1502 msgid ""
1503 "B<int lookup_dcookie(u64 >I<cookie>B<, char *>I<buffer>B<, size_t >I<len>B<);"
1504 ">"
1505 msgstr ""
1506 "B<int lookup_dcookie(u64 >I<cookie>B<, char *>I<buffer>B<, size_t >I<len>B<);"
1507 ">"
1508
1509 #. type: Plain text
1510 #: build/C/man2/lookup_dcookie.2:38
1511 msgid ""
1512 "Look up the full path of the directory entry specified by the value "
1513 "I<cookie>.  The cookie is an opaque identifier uniquely identifying a "
1514 "particular directory entry.  The buffer given is filled in with the full "
1515 "path of the directory entry."
1516 msgstr ""
1517 "I<cookie> 値で指定されたディレクトリ・エントリのフルパス名を検索する。 "
1518 "cookie は、個々のディレクトリ・エントリを区別する内部識別子 (opaque "
1519 "identifier) である。引き数で指定されたバッファに、ディレクトリ・エントリの フ"
1520 "ルパス名が格納される。"
1521
1522 #. type: Plain text
1523 #: build/C/man2/lookup_dcookie.2:43
1524 msgid ""
1525 "For B<lookup_dcookie>()  to return successfully, the kernel must still hold "
1526 "a cookie reference to the directory entry."
1527 msgstr ""
1528 "B<lookup_dcookie>()  が正常に値を返すためには、カーネルがディレクトリ・エント"
1529 "リへの cookie 参照を 保持していなければならない。"
1530
1531 #. type: Plain text
1532 #: build/C/man2/lookup_dcookie.2:50
1533 msgid ""
1534 "On success, B<lookup_dcookie>()  returns the length of the path string "
1535 "copied into the buffer.  On error, -1 is returned, and I<errno> is set "
1536 "appropriately."
1537 msgstr ""
1538 "成功した場合、 B<lookup_dcookie>()  はバッファにコピーしたパス文字列の長さを"
1539 "返す。 エラーの場合は -1 を返し、 I<errno> に適切な値を設定する。"
1540
1541 #. type: Plain text
1542 #: build/C/man2/lookup_dcookie.2:54
1543 msgid "The buffer was not valid."
1544 msgstr "バッファが有効でなかった。"
1545
1546 #. type: Plain text
1547 #: build/C/man2/lookup_dcookie.2:58
1548 msgid ""
1549 "The kernel has no registered cookie/directory entry mappings at the time of "
1550 "lookup, or the cookie does not refer to a valid directory entry."
1551 msgstr ""
1552 "検索が行われた時、cookie とディレクトリ・エントリのマッピングがカーネルに 登"
1553 "録されていなかったか、または cookie が有効なディレクトリ・エントリを 参照して"
1554 "いない。"
1555
1556 #. type: TP
1557 #: build/C/man2/lookup_dcookie.2:58
1558 #, no-wrap
1559 msgid "B<ENAMETOOLONG>"
1560 msgstr "B<ENAMETOOLONG>"
1561
1562 #. type: Plain text
1563 #: build/C/man2/lookup_dcookie.2:61
1564 msgid "The name could not fit in the buffer."
1565 msgstr "名前がバッファに入り切らなかった。"
1566
1567 #. type: TP
1568 #: build/C/man2/lookup_dcookie.2:61 build/C/man2/process_vm_readv.2:262
1569 #: build/C/man2/sendfile.2:138 build/C/man2/splice.2:155
1570 #: build/C/man2/tee.2:111 build/C/man2/vmsplice.2:135
1571 #, no-wrap
1572 msgid "B<ENOMEM>"
1573 msgstr "B<ENOMEM>"
1574
1575 #. type: Plain text
1576 #: build/C/man2/lookup_dcookie.2:65
1577 msgid ""
1578 "The kernel could not allocate memory for the temporary buffer holding the "
1579 "path."
1580 msgstr ""
1581 "カーネルが、パス名を保持する一時バッファ用のメモリを割り当てることが できな"
1582 "かった。"
1583
1584 #. type: Plain text
1585 #: build/C/man2/lookup_dcookie.2:70
1586 msgid ""
1587 "The process does not have the capability B<CAP_SYS_ADMIN> required to look "
1588 "up cookie values."
1589 msgstr ""
1590 "プロセスが cookie 値を検索するのに必要なケーパビリティ B<CAP_SYS_ADMIN> を"
1591 "持っていない。"
1592
1593 #. type: TP
1594 #: build/C/man2/lookup_dcookie.2:70 build/C/man2/quotactl.2:474
1595 #, no-wrap
1596 msgid "B<ERANGE>"
1597 msgstr "B<ERANGE>"
1598
1599 #. type: Plain text
1600 #: build/C/man2/lookup_dcookie.2:73
1601 msgid ""
1602 "The buffer was not large enough to hold the path of the directory entry."
1603 msgstr ""
1604 "バッファが、ディレクトリ・エントリのパス名を収容するのに 十分な大きさではな"
1605 "かった。"
1606
1607 #. type: Plain text
1608 #: build/C/man2/lookup_dcookie.2:78
1609 msgid ""
1610 "Available since Linux 2.5.43.  The B<ENAMETOOLONG> error return was added in "
1611 "2.5.70."
1612 msgstr ""
1613 "Linux 2.5.43 以降で利用できる。 エラー B<ENAMETOOLONG> を返す仕様は 2.5.70 で"
1614 "追加された。"
1615
1616 #. type: Plain text
1617 #: build/C/man2/lookup_dcookie.2:81
1618 msgid "B<lookup_dcookie>()  is Linux-specific."
1619 msgstr "B<lookup_dcookie>()  は Linux 独自の関数である。"
1620
1621 #. type: Plain text
1622 #: build/C/man2/lookup_dcookie.2:85
1623 msgid ""
1624 "B<lookup_dcookie>()  is a special-purpose system call, currently used only "
1625 "by the oprofile profiler.  It relies on a kernel driver to register cookies "
1626 "for directory entries."
1627 msgstr ""
1628 "B<lookup_dcookie>()  は特殊な用途に使われるシステムコールで、現在のところ "
1629 "oprofile profiler で 使われているだけである。"
1630
1631 #. type: Plain text
1632 #: build/C/man2/lookup_dcookie.2:88
1633 msgid ""
1634 "The path returned may be suffixed by the string \" (deleted)\" if the "
1635 "directory entry has been removed."
1636 msgstr ""
1637 "指定されたディレクトリ・エントリが削除されていた場合、返されるパス名の最後に "
1638 "\" (deleted)\" という文字列が付加されることがある。"
1639
1640 #. type: TH
1641 #: build/C/man2/modify_ldt.2:24
1642 #, no-wrap
1643 msgid "MODIFY_LDT"
1644 msgstr "MODIFY_LDT"
1645
1646 #. type: Plain text
1647 #: build/C/man2/modify_ldt.2:27
1648 msgid "modify_ldt - get or set ldt"
1649 msgstr "modify_ldt - ldt を設定または取得する"
1650
1651 #. type: Plain text
1652 #: build/C/man2/modify_ldt.2:30
1653 #, no-wrap
1654 msgid "B<#include E<lt>sys/types.hE<gt>>\n"
1655 msgstr "B<#include E<lt>sys/types.hE<gt>>\n"
1656
1657 #. type: Plain text
1658 #: build/C/man2/modify_ldt.2:32
1659 #, no-wrap
1660 msgid "B<int modify_ldt(int >I<func>B<, void *>I<ptr>B<, unsigned long >I<bytecount>B<);>\n"
1661 msgstr "B<int modify_ldt(int >I<func>B<, void *>I<ptr>B<, unsigned long >I<bytecount>B<);>\n"
1662
1663 #. type: Plain text
1664 #: build/C/man2/modify_ldt.2:41
1665 msgid ""
1666 "B<modify_ldt>()  reads or writes the local descriptor table (ldt) for a "
1667 "process.  The ldt is a per-process memory management table used by the i386 "
1668 "processor.  For more information on this table, see an Intel 386 processor "
1669 "handbook."
1670 msgstr ""
1671 "B<modify_ldt>()  はプロセスのローカル・ディスクリプタ・テーブル (local "
1672 "descriptor table; ldt)  を読み書きする。 ldt は i386 プロセッサで使用されるプ"
1673 "ロセスごとのメモリ管理テーブルである。 このテーブルに関してのより詳しい情報"
1674 "は Intel 386 processor handbook を 参照すること。"
1675
1676 #. type: Plain text
1677 #: build/C/man2/modify_ldt.2:51
1678 msgid ""
1679 "When I<func> is 0, B<modify_ldt>()  reads the ldt into the memory pointed to "
1680 "by I<ptr>.  The number of bytes read is the smaller of I<bytecount> and the "
1681 "actual size of the ldt."
1682 msgstr ""
1683 "I<func> が 0 ならば、 B<modify_ldt>()  は ldt を I<ptr> が指しているメモリに"
1684 "読み込む。 読み込むバイト数は実際の ldt のサイズか I<bytecount> より小さい方"
1685 "である。"
1686
1687 #.  FIXME ? say something about func == 2 and func == 0x11?
1688 #.  In Linux 2.4, func == 2 returned "the default ldt"
1689 #.  In Linux 2.6, func == 2 is a nop, returning a zeroed out structure.
1690 #.  Linux 2.4 and 2.6 implement an operation for func == 0x11
1691 #. type: Plain text
1692 #: build/C/man2/modify_ldt.2:69
1693 msgid ""
1694 "When I<func> is 1, B<modify_ldt>()  modifies one ldt entry.  I<ptr> points "
1695 "to a I<user_desc> structure and I<bytecount> must equal the size of this "
1696 "structure."
1697 msgstr ""
1698 "I<func> が 1 ならば、 B<modify_ldt>()  は ldt エントリの一つを変更する。 "
1699 "I<ptr> は I<user_desc> 構造体を指し、 I<bytecount> はこの構造体の大きさに等し"
1700 "くなければならない。"
1701
1702 #. type: Plain text
1703 #: build/C/man2/modify_ldt.2:73
1704 msgid "The I<user_desc> structure is defined in I<E<lt>asm/ldt.hE<gt>> as:"
1705 msgstr ""
1706 "I<user_desc> 構造体は I<E<lt>asm/ldt.hE<gt>> で以下のように定義されている:"
1707
1708 #. type: Plain text
1709 #: build/C/man2/modify_ldt.2:87
1710 #, no-wrap
1711 msgid ""
1712 "struct user_desc {\n"
1713 "    unsigned int  entry_number;\n"
1714 "    unsigned long base_addr;\n"
1715 "    unsigned int  limit;\n"
1716 "    unsigned int  seg_32bit:1;\n"
1717 "    unsigned int  contents:2;\n"
1718 "    unsigned int  read_exec_only:1;\n"
1719 "    unsigned int  limit_in_pages:1;\n"
1720 "    unsigned int  seg_not_present:1;\n"
1721 "    unsigned int  useable:1;\n"
1722 "};\n"
1723 msgstr ""
1724 "struct user_desc {\n"
1725 "    unsigned int  entry_number;\n"
1726 "    unsigned long base_addr;\n"
1727 "    unsigned int  limit;\n"
1728 "    unsigned int  seg_32bit:1;\n"
1729 "    unsigned int  contents:2;\n"
1730 "    unsigned int  read_exec_only:1;\n"
1731 "    unsigned int  limit_in_pages:1;\n"
1732 "    unsigned int  seg_not_present:1;\n"
1733 "    unsigned int  useable:1;\n"
1734 "};\n"
1735
1736 #.  .PP
1737 #.  The ldt is specific for the calling process. Any attempts to change
1738 #.  the ldt to include the address space of another process or the kernel
1739 #.  will result in a segmentation violation when trying to access the memory
1740 #.  outside of the process address space. The memory protection is enforced
1741 #.  at the paging layer.
1742 #. type: Plain text
1743 #: build/C/man2/modify_ldt.2:98
1744 msgid "In Linux 2.4 and earlier, this structure was named I<modify_ldt_ldt_s>."
1745 msgstr ""
1746 "Linux 2.4 以前では、この構造体は I<modify_ldt_ldt_s> という名前であった。"
1747
1748 #. type: Plain text
1749 #: build/C/man2/modify_ldt.2:108
1750 msgid ""
1751 "On success, B<modify_ldt>()  returns either the actual number of bytes read "
1752 "(for reading)  or 0 (for writing).  On failure, B<modify_ldt>()  returns -1 "
1753 "and sets I<errno> to indicate the error."
1754 msgstr ""
1755 "成功した場合は、 B<modify_ldt>()  は (読み込みの場合は) 実際に読み込んだバイ"
1756 "ト数、 または (書き込みの場合は) 0 を返す。 失敗した場合は B<modify_ldt>()  "
1757 "は -1 を返し、 I<errno> をエラーを示す値に設定する。"
1758
1759 #. type: Plain text
1760 #: build/C/man2/modify_ldt.2:113
1761 msgid "I<ptr> points outside the address space."
1762 msgstr "I<ptr> がアドレス空間の外を指している。"
1763
1764 #. type: Plain text
1765 #: build/C/man2/modify_ldt.2:126
1766 msgid ""
1767 "I<ptr> is 0, or I<func> is 1 and I<bytecount> is not equal to the size of "
1768 "the structure I<modify_ldt_ldt_s>, or I<func> is 1 and the new ldt entry has "
1769 "invalid values."
1770 msgstr ""
1771 "I<ptr> が 0 である、 または I<func> が 1 で I<bytecount> が "
1772 "I<modify_ldt_ldt_s> 構造体のサイズと等しくないか、 I<func> が 1 で新しい ldt "
1773 "エントリが無効な値である。"
1774
1775 #. type: Plain text
1776 #: build/C/man2/modify_ldt.2:130
1777 msgid "I<func> is neither 0 nor 1."
1778 msgstr "I<func> が 0 でも 1 でもない。"
1779
1780 #. type: Plain text
1781 #: build/C/man2/modify_ldt.2:133
1782 msgid ""
1783 "This call is Linux-specific and should not be used in programs intended to "
1784 "be portable."
1785 msgstr ""
1786 "このコールは Linux 特有であり、移植を意図したプログラムでは 使用してはいけな"
1787 "い。"
1788
1789 #. type: Plain text
1790 #: build/C/man2/modify_ldt.2:136 build/C/man2/perfmonctl.2:205
1791 #: build/C/man2/pivot_root.2:134
1792 msgid ""
1793 "Glibc does not provide a wrapper for this system call; call it using "
1794 "B<syscall>(2)."
1795 msgstr ""
1796 "glibc はこのシステムコールに対するラッパー関数を提供していない。 B<syscall>"
1797 "(2)  を使って呼び出すこと。"
1798
1799 #. type: Plain text
1800 #: build/C/man2/modify_ldt.2:138
1801 msgid "B<vm86>(2)"
1802 msgstr "B<vm86>(2)"
1803
1804 #. type: TH
1805 #: build/C/man2/nfsservctl.2:8
1806 #, no-wrap
1807 msgid "NFSSERVCTL"
1808 msgstr "NFSSERVCTL"
1809
1810 #. type: TH
1811 #: build/C/man2/nfsservctl.2:8
1812 #, no-wrap
1813 msgid "2013-09-17"
1814 msgstr "2013-09-17"
1815
1816 #. type: Plain text
1817 #: build/C/man2/nfsservctl.2:11
1818 msgid "nfsservctl - syscall interface to kernel nfs daemon"
1819 msgstr "nfsservctl - カーネル nfs デーモンのためのインターフェース"
1820
1821 #. type: Plain text
1822 #: build/C/man2/nfsservctl.2:14
1823 #, no-wrap
1824 msgid "B<#include E<lt>linux/nfsd/syscall.hE<gt>>\n"
1825 msgstr "B<#include E<lt>linux/nfsd/syscall.hE<gt>>\n"
1826
1827 #. type: Plain text
1828 #: build/C/man2/nfsservctl.2:17
1829 #, no-wrap
1830 msgid ""
1831 "B<long nfsservctl(int >I<cmd>B<, struct nfsctl_arg *>I<argp>B<,>\n"
1832 "B<                union nfsctl_res *>I<resp>B<);>\n"
1833 msgstr ""
1834 "B<long nfsservctl(int >I<cmd>B<, struct nfsctl_arg *>I<argp>B<,>\n"
1835 "B<                union nfsctl_res *>I<resp>B<);>\n"
1836
1837 #. type: Plain text
1838 #: build/C/man2/nfsservctl.2:21
1839 msgid "I<Note>: Since Linux 3.1, this system call no longer exists."
1840 msgstr "I<注意>: Linux 3.1 以降では、このシステムコールはもはや存在しない。"
1841
1842 #. type: Plain text
1843 #: build/C/man2/nfsservctl.2:35
1844 #, no-wrap
1845 msgid ""
1846 "/*\n"
1847 " * These are the commands understood by nfsctl().\n"
1848 " */\n"
1849 "#define NFSCTL_SVC          0    /* This is a server process. */\n"
1850 "#define NFSCTL_ADDCLIENT    1    /* Add an NFS client. */\n"
1851 "#define NFSCTL_DELCLIENT    2    /* Remove an NFS client. */\n"
1852 "#define NFSCTL_EXPORT       3    /* Export a filesystem. */\n"
1853 "#define NFSCTL_UNEXPORT     4    /* Unexport a filesystem. */\n"
1854 "#define NFSCTL_UGIDUPDATE   5    /* Update a client's UID/GID map\n"
1855 "                                    (only in Linux 2.4.x and earlier). */\n"
1856 "#define NFSCTL_GETFH        6    /* Get a file handle (used by mountd)\n"
1857 "                                    (only in Linux 2.4.x and earlier). */\n"
1858 msgstr ""
1859 "/*\n"
1860 " * nfsctl() によって理解されるコマンド\n"
1861 " */\n"
1862 "#define NFSCTL_SVC          0    /* サーバープロセス */\n"
1863 "#define NFSCTL_ADDCLIENT    1    /* NFS クライアントを追加 */\n"
1864 "#define NFSCTL_DELCLIENT    2    /* NFS クライアンドを削除 */\n"
1865 "#define NFSCTL_EXPORT       3    /* ファイルシステムのエクスポート */\n"
1866 "#define NFSCTL_UNEXPORT     4    /* ファイルシステムのアンエクスポート */\n"
1867 "#define NFSCTL_UGIDUPDATE   5    /* UID/GID マップの更新\n"
1868 "                                    (Linux 2.4.x とそれ以前のみ) */\n"
1869 "#define NFSCTL_GETFH        6    /* (mountd で使用される) fh の取得\n"
1870 "                                    (Linux 2.4.x とそれ以前のみ) */\n"
1871
1872 #. type: Plain text
1873 #: build/C/man2/nfsservctl.2:47
1874 #, no-wrap
1875 msgid ""
1876 "struct nfsctl_arg {\n"
1877 "    int                       ca_version;     /* safeguard */\n"
1878 "    union {\n"
1879 "        struct nfsctl_svc     u_svc;\n"
1880 "        struct nfsctl_client  u_client;\n"
1881 "        struct nfsctl_export  u_export;\n"
1882 "        struct nfsctl_uidmap  u_umap;\n"
1883 "        struct nfsctl_fhparm  u_getfh;\n"
1884 "        unsigned int          u_debug;\n"
1885 "    } u;\n"
1886 "}\n"
1887 msgstr ""
1888 "struct nfsctl_arg {\n"
1889 "    int                       ca_version;     /* safeguard */\n"
1890 "    union {\n"
1891 "        struct nfsctl_svc     u_svc;\n"
1892 "        struct nfsctl_client  u_client;\n"
1893 "        struct nfsctl_export  u_export;\n"
1894 "        struct nfsctl_uidmap  u_umap;\n"
1895 "        struct nfsctl_fhparm  u_getfh;\n"
1896 "        unsigned int          u_debug;\n"
1897 "    } u;\n"
1898 "}\n"
1899
1900 #. type: Plain text
1901 #: build/C/man2/nfsservctl.2:52
1902 #, no-wrap
1903 msgid ""
1904 "union nfsctl_res {\n"
1905 "        struct knfs_fh          cr_getfh;\n"
1906 "        unsigned int            cr_debug;\n"
1907 "};\n"
1908 msgstr ""
1909 "union nfsctl_res {\n"
1910 "        struct knfs_fh          cr_getfh;\n"
1911 "        unsigned int            cr_debug;\n"
1912 "};\n"
1913
1914 #. type: Plain text
1915 #: build/C/man2/nfsservctl.2:58 build/C/man2/pivot_root.2:105
1916 #: build/C/man2/vm86.2:59
1917 msgid ""
1918 "On success, zero is returned.  On error, -1 is returned, and I<errno> is set "
1919 "appropriately."
1920 msgstr ""
1921 "成功した場合は 0 が返される。エラーの場合は -1 が返され、 I<errno> が適切に設"
1922 "定される。"
1923
1924 #. type: Plain text
1925 #: build/C/man2/nfsservctl.2:60
1926 msgid "This call is Linux-specific."
1927 msgstr "このコールは Linux 特有である。"
1928
1929 #. type: TH
1930 #: build/C/man2/outb.2:26
1931 #, no-wrap
1932 msgid "OUTB"
1933 msgstr "OUTB"
1934
1935 #. type: TH
1936 #: build/C/man2/outb.2:26
1937 #, no-wrap
1938 msgid "2012-12-31"
1939 msgstr "2012-12-31"
1940
1941 #. type: Plain text
1942 #: build/C/man2/outb.2:31
1943 msgid ""
1944 "outb, outw, outl, outsb, outsw, outsl, inb, inw, inl, insb, insw, insl, "
1945 "outb_p, outw_p, outl_p, inb_p, inw_p, inl_p - port I/O"
1946 msgstr ""
1947 "outb, outw, outl, outsb, outsw, outsl, inb, inw, inl, insb, insw, insl, "
1948 "outb_p, outw_p, outl_p, inb_p, inw_p, inl_p - ポート入出力"
1949
1950 #. type: Plain text
1951 #: build/C/man2/outb.2:34
1952 #, no-wrap
1953 msgid "B<#include E<lt>sys/io.hE<gt>>\n"
1954 msgstr "B<#include E<lt>sys/io.hE<gt>>\n"
1955
1956 #. type: Plain text
1957 #: build/C/man2/outb.2:41
1958 #, no-wrap
1959 msgid ""
1960 "B<unsigned char inb(unsigned short int >I<port>B<);>\n"
1961 "B<unsigned char inb_p(unsigned short int >I<port>B<);>\n"
1962 "B<unsigned short int inw(unsigned short int >I<port>B<);>\n"
1963 "B<unsigned short int inw_p(unsigned short int >I<port>B<);>\n"
1964 "B<unsigned int inl(unsigned short int >I<port>B<);>\n"
1965 "B<unsigned int inl_p(unsigned short int >I<port>B<);>\n"
1966 msgstr ""
1967 "B<unsigned char inb(unsigned short int >I<port>B<);>\n"
1968 "B<unsigned char inb_p(unsigned short int >I<port>B<);>\n"
1969 "B<unsigned short int inw(unsigned short int >I<port>B<);>\n"
1970 "B<unsigned short int inw_p(unsigned short int >I<port>B<);>\n"
1971 "B<unsigned int inl(unsigned short int >I<port>B<);>\n"
1972 "B<unsigned int inl_p(unsigned short int >I<port>B<);>\n"
1973
1974 #. type: Plain text
1975 #: build/C/man2/outb.2:48
1976 #, no-wrap
1977 msgid ""
1978 "B<void outb(unsigned char >I<value>B<, unsigned short int >I<port>B<);>\n"
1979 "B<void outb_p(unsigned char >I<value>B<, unsigned short int >I<port>B<);>\n"
1980 "B<void outw(unsigned short int >I<value>B<, unsigned short int >I<port>B<);>\n"
1981 "B<void outw_p(unsigned short int >I<value>B<, unsigned short int >I<port>B<);>\n"
1982 "B<void outl(unsigned int >I<value>B<, unsigned short int >I<port>B<);>\n"
1983 "B<void outl_p(unsigned int >I<value>B<, unsigned short int >I<port>B<);>\n"
1984 msgstr ""
1985 "B<void outb(unsigned char >I<value>B<, unsigned short int >I<port>B<);>\n"
1986 "B<void outb_p(unsigned char >I<value>B<, unsigned short int >I<port>B<);>\n"
1987 "B<void outw(unsigned short int >I<value>B<, unsigned short int >I<port>B<);>\n"
1988 "B<void outw_p(unsigned short int >I<value>B<, unsigned short int >I<port>B<);>\n"
1989 "B<void outl(unsigned int >I<value>B<, unsigned short int >I<port>B<);>\n"
1990 "B<void outl_p(unsigned int >I<value>B<, unsigned short int >I<port>B<);>\n"
1991
1992 #. type: Plain text
1993 #: build/C/man2/outb.2:61
1994 #, no-wrap
1995 msgid ""
1996 "B<void insb(unsigned short int >I<port>B<, void *>I<addr>B<,>\n"
1997 "B<           unsigned long int >I<count>B<);>\n"
1998 "B<void insw(unsigned short int >I<port>B<, void *>I<addr>B<,>\n"
1999 "B<           unsigned long int >I<count>B<);>\n"
2000 "B<void insl(unsigned short int >I<port>B<, void *>I<addr>B<,>\n"
2001 "B<           unsigned long int >I<count>B<);>\n"
2002 "B<void outsb(unsigned short int >I<port>B<, const void *>I<addr>B<,>\n"
2003 "B<           unsigned long int >I<count>B<);>\n"
2004 "B<void outsw(unsigned short int >I<port>B<, const void *>I<addr>B<,>\n"
2005 "B<           unsigned long int >I<count>B<);>\n"
2006 "B<void outsl(unsigned short int >I<port>B<, const void *>I<addr>B<,>\n"
2007 "B<           unsigned long int >I<count>B<);>\n"
2008 msgstr ""
2009 "B<void insb(unsigned short int >I<port>B<, void *>I<addr>B<,>\n"
2010 "B<           unsigned long int >I<count>B<);>\n"
2011 "B<void insw(unsigned short int >I<port>B<, void *>I<addr>B<,>\n"
2012 "B<           unsigned long int >I<count>B<);>\n"
2013 "B<void insl(unsigned short int >I<port>B<, void *>I<addr>B<,>\n"
2014 "B<           unsigned long int >I<count>B<);>\n"
2015 "B<void outsb(unsigned short int >I<port>B<, const void *>I<addr>B<,>\n"
2016 "B<           unsigned long int >I<count>B<);>\n"
2017 "B<void outsw(unsigned short int >I<port>B<, const void *>I<addr>B<,>\n"
2018 "B<           unsigned long int >I<count>B<);>\n"
2019 "B<void outsl(unsigned short int >I<port>B<, const void *>I<addr>B<,>\n"
2020 "B<           unsigned long int >I<count>B<);>\n"
2021
2022 #. type: Plain text
2023 #: build/C/man2/outb.2:67
2024 msgid ""
2025 "This family of functions is used to do low-level port input and output.  The "
2026 "out* functions do port output, the in* functions do port input; the b-suffix "
2027 "functions are byte-width and the w-suffix functions word-width; the _p-"
2028 "suffix functions pause until the I/O completes."
2029 msgstr ""
2030 "この一連の関数はポートに対する低レベルの入出力に使用する。 out* 関数はポート"
2031 "出力、in* 関数はポート入力を行う。 語尾に b がついている関数はバイト単位、w "
2032 "がついている関数はワード単位である。 _p がついている関数は I/O が終了するまで"
2033 "待つ。"
2034
2035 #.  , given the following information
2036 #.  in addition to that given in
2037 #.  .BR outb (9).
2038 #. type: Plain text
2039 #: build/C/man2/outb.2:73
2040 msgid ""
2041 "They are primarily designed for internal kernel use, but can be used from "
2042 "user space."
2043 msgstr ""
2044 "これらの関数はもともとカーネル内部での使用を想定して設計されているが、 ユー"
2045 "ザー空間からでも使用できる。"
2046
2047 #. type: Plain text
2048 #: build/C/man2/outb.2:78
2049 msgid ""
2050 "You must compile with B<-O> or B<-O2> or similar.  The functions are defined "
2051 "as inline macros, and will not be substituted in without optimization "
2052 "enabled, causing unresolved references at link time."
2053 msgstr ""
2054 "B<-O> や B<-O2> などを指定してコンパイルしなければならない。 これらの関数はイ"
2055 "ンライン・マクロとして定義されており、 最適化を行わないと関数の展開が行われ"
2056 "ず、 リンクの時に「解決できない参照(unresolved reference)」が発生する。"
2057
2058 #. type: Plain text
2059 #: build/C/man2/outb.2:87
2060 msgid ""
2061 "You use B<ioperm>(2)  or alternatively B<iopl>(2)  to tell the kernel to "
2062 "allow the user space application to access the I/O ports in question.  "
2063 "Failure to do this will cause the application to receive a segmentation "
2064 "fault."
2065 msgstr ""
2066 "ユーザー空間のアプリケーションが I/O ポートにアクセスすることを カーネルに教"
2067 "えるために B<ioperm>(2)  もしくは B<iopl>(2)  を使用すること。これを忘れると"
2068 "アプリケーションはセグメンテーション違反 (segmentation fault) を受けとること"
2069 "になる。"
2070
2071 #. type: Plain text
2072 #: build/C/man2/outb.2:96
2073 msgid ""
2074 "B<outb>()  and friends are hardware-specific.  The I<value> argument is "
2075 "passed first and the I<port> argument is passed second, which is the "
2076 "opposite order from most DOS implementations."
2077 msgstr ""
2078 "B<outb>()  とその仲間はハードウェア特有である。 I<value> 引数が最初に渡さ"
2079 "れ、 I<port> 引数が二番目に渡される。 この順序はほとんどの DOS での実装とは逆"
2080 "である。"
2081
2082 #. type: Plain text
2083 #: build/C/man2/outb.2:99
2084 msgid "B<ioperm>(2), B<iopl>(2)"
2085 msgstr "B<ioperm>(2), B<iopl>(2)"
2086
2087 #. type: TH
2088 #: build/C/man2/pciconfig_read.2:8
2089 #, no-wrap
2090 msgid "PCICONFIG_READ"
2091 msgstr "PCICONFIG_READ"
2092
2093 #. type: TH
2094 #: build/C/man2/pciconfig_read.2:8
2095 #, no-wrap
2096 msgid "2003-07-14"
2097 msgstr "2003-07-14"
2098
2099 #. type: Plain text
2100 #: build/C/man2/pciconfig_read.2:11
2101 msgid ""
2102 "pciconfig_read, pciconfig_write, pciconfig_iobase - pci device information "
2103 "handling"
2104 msgstr ""
2105 "pciconfig_read, pciconfig_write, pciconfig_iobase - pci デバイス情報を扱う"
2106
2107 #. type: Plain text
2108 #: build/C/man2/pciconfig_read.2:14
2109 #, no-wrap
2110 msgid "B<#include E<lt>pci.hE<gt>>\n"
2111 msgstr "B<#include E<lt>pci.hE<gt>>\n"
2112
2113 #. type: Plain text
2114 #: build/C/man2/pciconfig_read.2:21
2115 #, no-wrap
2116 msgid ""
2117 "B<int pciconfig_read(unsigned long >I<bus>B<, unsigned long >I<dfn>B<,>\n"
2118 "B<          unsigned long >I<off>B<, unsigned long >I<len>B<, void *>I<buf>B<);>\n"
2119 "B<int pciconfig_write(unsigned long >I<bus>B<, unsigned long >I<dfn>B<,>\n"
2120 "B<          unsigned long >I<off>B<, unsigned long >I<len>B<, void *>I<buf>B<);>\n"
2121 "B<int pciconfig_iobase(long >I<which>B<, unsigned long >I<bus>B<,>\n"
2122 "B<          unsigned long >I<devfn>B<);>\n"
2123 msgstr ""
2124 "B<int pciconfig_read(unsigned long >I<bus>B<, unsigned long >I<dfn>B<,>\n"
2125 "B<          unsigned long >I<off>B<, unsigned long >I<len>B<, void *>I<buf>B<);>\n"
2126 "B<int pciconfig_write(unsigned long >I<bus>B<, unsigned long >I<dfn>B<,>\n"
2127 "B<          unsigned long >I<off>B<, unsigned long >I<len>B<, void *>I<buf>B<);>\n"
2128 "B<int pciconfig_iobase(long >I<which>B<, unsigned long >I<bus>B<,>\n"
2129 "B<          unsigned long >I<devfn>B<);>\n"
2130
2131 #. type: Plain text
2132 #: build/C/man2/pciconfig_read.2:27
2133 msgid ""
2134 "Most of the interaction with PCI devices is already handled by the kernel "
2135 "PCI layer, and thus these calls should not normally need to be accessed from "
2136 "user space."
2137 msgstr ""
2138 "PCI デバイスとのやり取り (interaction) は カーネル PCI レイヤですでに処理され"
2139 "ているので、 通常はこららの関数をユーザ空間からアクセスする必要はない。"
2140
2141 #. type: TP
2142 #: build/C/man2/pciconfig_read.2:27 build/C/man2/pciconfig_read.2:51
2143 #, no-wrap
2144 msgid "B<pciconfig_read>()"
2145 msgstr "B<pciconfig_read>()"
2146
2147 #. type: Plain text
2148 #: build/C/man2/pciconfig_read.2:36
2149 msgid "Reads to I<buf> from device I<dev> at offset I<off> value."
2150 msgstr "デバイス I<dev> のオフセット I<off> の値を I<buf> に読み込む。"
2151
2152 #. type: TP
2153 #: build/C/man2/pciconfig_read.2:36 build/C/man2/pciconfig_read.2:57
2154 #, no-wrap
2155 msgid "B<pciconfig_write>()"
2156 msgstr "B<pciconfig_write>()"
2157
2158 #. type: Plain text
2159 #: build/C/man2/pciconfig_read.2:45
2160 msgid "Writes from I<buf> to device I<dev> at offset I<off> value."
2161 msgstr "デバイス I<dev> のオフセット I<off> に I<buf> の値を書き込む。"
2162
2163 #. type: TP
2164 #: build/C/man2/pciconfig_read.2:45 build/C/man2/pciconfig_read.2:63
2165 #, no-wrap
2166 msgid "B<pciconfig_iobase>()"
2167 msgstr "B<pciconfig_iobase>()"
2168
2169 #. type: Plain text
2170 #: build/C/man2/pciconfig_read.2:50
2171 msgid ""
2172 "You pass it a bus/devfn pair and get a physical address for either the "
2173 "memory offset (for things like prep, this is 0xc0000000), the IO base for "
2174 "PIO cycles, or the ISA holes if any."
2175 msgstr ""
2176 "bus/devfn ペアをこの関数に渡し、 メモリオフセット (prep のようなものでは、こ"
2177 "の値は 0xc0000000 である) と PIO サイクルの IO ベースの物理アドレスを取得す"
2178 "る。 また、もしあるならば ISA hole の物理アドレスを取得する。"
2179
2180 #. type: Plain text
2181 #: build/C/man2/pciconfig_read.2:57 build/C/man2/pciconfig_read.2:63
2182 msgid ""
2183 "On success zero is returned.  On error, -1 is returned and I<errno> is set "
2184 "appropriately."
2185 msgstr ""
2186 "成功した場合、0 が返される。 エラーの場合、-1 が返され、 I<errno> が適切に設"
2187 "定される。"
2188
2189 #. type: Plain text
2190 #: build/C/man2/pciconfig_read.2:77
2191 msgid ""
2192 "Returns information on locations of various I/O regions in physical memory "
2193 "according to the I<which> value.  Values for I<which> are: "
2194 "B<IOBASE_BRIDGE_NUMBER>, B<IOBASE_MEMORY>, B<IOBASE_IO>, B<IOBASE_ISA_IO>, "
2195 "B<IOBASE_ISA_MEM>."
2196 msgstr ""
2197 "I<which> の値に基づいて、物理メモリ内の様々な I/O 領域の位置情報が返される。 "
2198 "I<which> の値は、 B<IOBASE_BRIDGE_NUMBER>, B<IOBASE_MEMORY>, B<IOBASE_IO>, "
2199 "B<IOBASE_ISA_IO>, B<IOBASE_ISA_MEM> である。"
2200
2201 #. type: Plain text
2202 #: build/C/man2/pciconfig_read.2:84
2203 msgid "I<len> value is invalid.  This does not apply to B<pciconfig_iobase>()."
2204 msgstr ""
2205 "I<len> の値が無効である。 このエラーは B<pciconfig_iobase>()  には適用されな"
2206 "い。"
2207
2208 #. type: TP
2209 #: build/C/man2/pciconfig_read.2:84 build/C/man2/ptrace.2:1819
2210 #: build/C/man2/sendfile.2:134
2211 #, no-wrap
2212 msgid "B<EIO>"
2213 msgstr "B<EIO>"
2214
2215 #. type: Plain text
2216 #: build/C/man2/pciconfig_read.2:87
2217 msgid "I/O error."
2218 msgstr "I/O エラー。"
2219
2220 #. type: TP
2221 #: build/C/man2/pciconfig_read.2:87
2222 #, no-wrap
2223 msgid "B<ENODEV>"
2224 msgstr "B<ENODEV>"
2225
2226 #. type: Plain text
2227 #: build/C/man2/pciconfig_read.2:93
2228 msgid ""
2229 "For B<pciconfig_iobase>(), \"hose\" value is NULL.  For the other calls, "
2230 "could not find a slot."
2231 msgstr ""
2232 "B<pciconfig_iobase>()  の場合、でホース (hose) の値が NULL である。 他の呼び"
2233 "出しの場合、スロット (slot) が見つからない。"
2234
2235 #. type: Plain text
2236 #: build/C/man2/pciconfig_read.2:98
2237 msgid "The system has not implemented these calls (B<CONFIG_PCI> not defined)."
2238 msgstr ""
2239 "このシステムはこれらの呼び出しを実装していない。 (B<CONFIG_PCI> が定義されて"
2240 "いない)。"
2241
2242 #. type: TP
2243 #: build/C/man2/pciconfig_read.2:98
2244 #, no-wrap
2245 msgid "B<EOPNOTSUPP>"
2246 msgstr "B<EOPNOTSUPP>"
2247
2248 #. type: Plain text
2249 #: build/C/man2/pciconfig_read.2:105
2250 msgid ""
2251 "This return value is valid only for B<pciconfig_iobase>().  It is returned "
2252 "if the value for I<which> is invalid."
2253 msgstr ""
2254 "この返り値は B<pciconfig_iobase>()  でのみ有効である。 このエラーは I<which> "
2255 "の値が無効であるときに返される。"
2256
2257 #. type: Plain text
2258 #: build/C/man2/pciconfig_read.2:112
2259 msgid ""
2260 "User does not have the B<CAP_SYS_ADMIN> capability.  This does not apply to "
2261 "B<pciconfig_iobase>()."
2262 msgstr ""
2263 "ユーザが B<CAP_SYS_ADMIN> 権限を持っていない。 このエラーは "
2264 "B<pciconfig_iobase>()  には適用されない。"
2265
2266 #. type: Plain text
2267 #: build/C/man2/pciconfig_read.2:114
2268 msgid "These calls are Linux-specific, available since Linux 2.0.26/2.1.11."
2269 msgstr ""
2270 "これらの呼び出しは Linux 特有のものであり、 Linux 2.0.26/2.1.11 から使用可能"
2271 "である。"
2272
2273 #. type: Plain text
2274 #: build/C/man2/pciconfig_read.2:116
2275 msgid "B<capabilities>(7)"
2276 msgstr "B<capabilities>(7)"
2277
2278 #. type: TH
2279 #: build/C/man2/perf_event_open.2:27
2280 #, no-wrap
2281 msgid "PERF_EVENT_OPEN"
2282 msgstr "PERF_EVENT_OPEN"
2283
2284 #. type: TH
2285 #: build/C/man2/perf_event_open.2:27
2286 #, no-wrap
2287 msgid "2013-09-13"
2288 msgstr "2013-09-13"
2289
2290 #. type: Plain text
2291 #: build/C/man2/perf_event_open.2:30
2292 msgid "perf_event_open - set up performance monitoring"
2293 msgstr ""
2294
2295 #. type: Plain text
2296 #: build/C/man2/perf_event_open.2:34
2297 #, no-wrap
2298 msgid ""
2299 "B<#include E<lt>linux/perf_event.hE<gt>>\n"
2300 "B<#include E<lt>linux/hw_breakpoint.hE<gt>>\n"
2301 msgstr ""
2302 "B<#include E<lt>linux/perf_event.hE<gt>>\n"
2303 "B<#include E<lt>linux/hw_breakpoint.hE<gt>>\n"
2304
2305 #. type: Plain text
2306 #: build/C/man2/perf_event_open.2:38
2307 #, no-wrap
2308 msgid ""
2309 "B<int perf_event_open(struct perf_event_attr *>I<attr>B<,>\n"
2310 "B<                    pid_t >I<pid>B<, int >I<cpu>B<, int >I<group_fd>B<,>\n"
2311 "B<                    unsigned long >I<flags>B<);>\n"
2312 msgstr ""
2313 "B<int perf_event_open(struct perf_event_attr *>I<attr>B<,>\n"
2314 "B<                    pid_t >I<pid>B<, int >I<cpu>B<, int >I<group_fd>B<,>\n"
2315 "B<                    unsigned long >I<flags>B<);>\n"
2316
2317 #. type: Plain text
2318 #: build/C/man2/perf_event_open.2:47
2319 msgid ""
2320 "Given a list of parameters, B<perf_event_open>()  returns a file descriptor, "
2321 "for use in subsequent system calls (B<read>(2), B<mmap>(2), B<prctl>(2), "
2322 "B<fcntl>(2), etc.)."
2323 msgstr ""
2324
2325 #. type: Plain text
2326 #: build/C/man2/perf_event_open.2:55
2327 msgid ""
2328 "A call to B<perf_event_open>()  creates a file descriptor that allows "
2329 "measuring performance information.  Each file descriptor corresponds to one "
2330 "event that is measured; these can be grouped together to measure multiple "
2331 "events simultaneously."
2332 msgstr ""
2333
2334 #. type: Plain text
2335 #: build/C/man2/perf_event_open.2:62
2336 msgid ""
2337 "Events can be enabled and disabled in two ways: via B<ioctl>(2)  and via "
2338 "B<prctl>(2)B<.> When an event is disabled it does not count or generate "
2339 "overflows but does continue to exist and maintain its count value."
2340 msgstr ""
2341
2342 #. type: Plain text
2343 #: build/C/man2/perf_event_open.2:76
2344 msgid ""
2345 "Events come in two flavors: counting and sampled.  A I<counting> event is "
2346 "one that is used for counting the aggregate number of events that occur.  In "
2347 "general, counting event results are gathered with a B<read>(2)  call.  A "
2348 "I<sampling> event periodically writes measurements to a buffer that can then "
2349 "be accessed via B<mmap>(2)B<.>"
2350 msgstr ""
2351
2352 #. type: SS
2353 #: build/C/man2/perf_event_open.2:76
2354 #, no-wrap
2355 msgid "Arguments"
2356 msgstr ""
2357
2358 #. type: Plain text
2359 #: build/C/man2/perf_event_open.2:90
2360 msgid ""
2361 "The argument I<pid> allows events to be attached to processes in various "
2362 "ways.  If I<pid> is 0, measurements happen on the current thread, if I<pid> "
2363 "is greater than 0, the process indicated by I<pid> is measured, and if "
2364 "I<pid> is -1, all processes are counted."
2365 msgstr ""
2366
2367 #. type: Plain text
2368 #: build/C/man2/perf_event_open.2:101
2369 msgid ""
2370 "The I<cpu> argument allows measurements to be specific to a CPU.  If I<cpu> "
2371 "is greater than or equal to 0, measurements are restricted to the specified "
2372 "CPU; if I<cpu> is -1, the events are measured on all CPUs."
2373 msgstr ""
2374
2375 #. type: Plain text
2376 #: build/C/man2/perf_event_open.2:107
2377 msgid ""
2378 "Note that the combination of I<pid> == -1 and I<cpu> == -1 is not valid."
2379 msgstr ""
2380
2381 #. type: Plain text
2382 #: build/C/man2/perf_event_open.2:115
2383 msgid ""
2384 "A I<pid> E<gt> 0 and I<cpu> == -1 setting measures per-process and follows "
2385 "that process to whatever CPU the process gets scheduled to.  Per-process "
2386 "events can be created by any user."
2387 msgstr ""
2388
2389 #. type: Plain text
2390 #: build/C/man2/perf_event_open.2:126
2391 msgid ""
2392 "A I<pid> == -1 and I<cpu> E<gt>= 0 setting is per-CPU and measures all "
2393 "processes on the specified CPU.  Per-CPU events need the B<CAP_SYS_ADMIN> "
2394 "capability or a I</proc/sys/kernel/perf_event_paranoid> value of less than 1."
2395 msgstr ""
2396
2397 #. type: Plain text
2398 #: build/C/man2/perf_event_open.2:148
2399 msgid ""
2400 "The I<group_fd> argument allows event groups to be created.  An event group "
2401 "has one event which is the group leader.  The leader is created first, with "
2402 "I<group_fd> = -1.  The rest of the group members are created with subsequent "
2403 "B<perf_event_open>()  calls with I<group_fd> being set to the fd of the "
2404 "group leader.  (A single event on its own is created with I<group_fd> = -1 "
2405 "and is considered to be a group with only 1 member.)  An event group is "
2406 "scheduled onto the CPU as a unit: it will be put onto the CPU only if all of "
2407 "the events in the group can be put onto the CPU.  This means that the values "
2408 "of the member events can be meaningfully compared, added, divided (to get "
2409 "ratios), etc., with each other, since they have counted events for the same "
2410 "set of executed instructions."
2411 msgstr ""
2412
2413 #. type: Plain text
2414 #: build/C/man2/perf_event_open.2:152
2415 msgid ""
2416 "The I<flags> argument is formed by ORing together zero or more of the "
2417 "following values:"
2418 msgstr ""
2419 "I<flags> 引き数には、以下の値の 0 個以上をビット毎の論理和の形で指定する。"
2420
2421 #. type: TP
2422 #: build/C/man2/perf_event_open.2:152
2423 #, no-wrap
2424 msgid "B<PERF_FLAG_FD_NO_GROUP>"
2425 msgstr ""
2426
2427 #.  FIXME The following sentence is unclear
2428 #.  FIXME So, why is it useful?
2429 #. type: Plain text
2430 #: build/C/man2/perf_event_open.2:159
2431 msgid ""
2432 "This flag allows creating an event as part of an event group but having no "
2433 "group leader.  It is unclear why this is useful."
2434 msgstr ""
2435
2436 #. type: TP
2437 #: build/C/man2/perf_event_open.2:159
2438 #, no-wrap
2439 msgid "B<PERF_FLAG_FD_OUTPUT>"
2440 msgstr ""
2441
2442 #. type: Plain text
2443 #: build/C/man2/perf_event_open.2:162
2444 msgid "This flag re-routes the output from an event to the group leader."
2445 msgstr ""
2446
2447 #. type: TP
2448 #: build/C/man2/perf_event_open.2:162
2449 #, no-wrap
2450 msgid "B<PERF_FLAG_PID_CGROUP> (Since Linux 2.6.39)."
2451 msgstr ""
2452
2453 #. type: Plain text
2454 #: build/C/man2/perf_event_open.2:185
2455 msgid ""
2456 "This flag activates per-container system-wide monitoring.  A container is an "
2457 "abstraction that isolates a set of resources for finer grain control (CPUs, "
2458 "memory, etc.).  In this mode, the event is measured only if the thread "
2459 "running on the monitored CPU belongs to the designated container (cgroup).  "
2460 "The cgroup is identified by passing a file descriptor opened on its "
2461 "directory in the cgroupfs filesystem.  For instance, if the cgroup to "
2462 "monitor is called I<test>, then a file descriptor opened on I</dev/cgroup/"
2463 "test> (assuming cgroupfs is mounted on I</dev/cgroup>)  must be passed as "
2464 "the I<pid> parameter.  cgroup monitoring is available only for system-wide "
2465 "events and may therefore require extra permissions."
2466 msgstr ""
2467
2468 #. type: Plain text
2469 #: build/C/man2/perf_event_open.2:190
2470 msgid ""
2471 "The I<perf_event_attr> structure provides detailed configuration information "
2472 "for the event being created."
2473 msgstr ""
2474
2475 #. type: Plain text
2476 #: build/C/man2/perf_event_open.2:197
2477 #, no-wrap
2478 msgid ""
2479 "struct perf_event_attr {\n"
2480 "    __u32     type;         /* Type of event */\n"
2481 "    __u32     size;         /* Size of attribute structure */\n"
2482 "    __u64     config;       /* Type-specific configuration */\n"
2483 msgstr ""
2484
2485 #. type: Plain text
2486 #: build/C/man2/perf_event_open.2:202
2487 #, no-wrap
2488 msgid ""
2489 "    union {\n"
2490 "        __u64 sample_period;    /* Period of sampling */\n"
2491 "        __u64 sample_freq;      /* Frequency of sampling */\n"
2492 "    };\n"
2493 msgstr ""
2494
2495 #. type: Plain text
2496 #: build/C/man2/perf_event_open.2:205
2497 #, no-wrap
2498 msgid ""
2499 "    __u64     sample_type;  /* Specifies values included in sample */\n"
2500 "    __u64     read_format;  /* Specifies values returned in read */\n"
2501 msgstr ""
2502
2503 #. type: Plain text
2504 #: build/C/man2/perf_event_open.2:231
2505 #, no-wrap
2506 msgid ""
2507 "    __u64     disabled       : 1,   /* off by default */\n"
2508 "              inherit        : 1,   /* children inherit it */\n"
2509 "              pinned         : 1,   /* must always be on PMU */\n"
2510 "              exclusive      : 1,   /* only group on PMU */\n"
2511 "              exclude_user   : 1,   /* don't count user */\n"
2512 "              exclude_kernel : 1,   /* don't count kernel */\n"
2513 "              exclude_hv     : 1,   /* don't count hypervisor */\n"
2514 "              exclude_idle   : 1,   /* don't count when idle */\n"
2515 "              mmap           : 1,   /* include mmap data */\n"
2516 "              comm           : 1,   /* include comm data */\n"
2517 "              freq           : 1,   /* use freq, not period */\n"
2518 "              inherit_stat   : 1,   /* per task counts */\n"
2519 "              enable_on_exec : 1,   /* next exec enables */\n"
2520 "              task           : 1,   /* trace fork/exit */\n"
2521 "              watermark      : 1,   /* wakeup_watermark */\n"
2522 "              precise_ip     : 2,   /* skid constraint */\n"
2523 "              mmap_data      : 1,   /* non-exec mmap data */\n"
2524 "              sample_id_all  : 1,   /* sample_type all events */\n"
2525 "              exclude_host   : 1,   /* don't count in host */\n"
2526 "              exclude_guest  : 1,   /* don't count in guest */\n"
2527 "              exclude_callchain_kernel : 1,\n"
2528 "                                    /* exclude kernel callchains */\n"
2529 "              exclude_callchain_user   : 1,\n"
2530 "\t                            /* exclude user callchains */\n"
2531 "              __reserved_1   : 41;\n"
2532 msgstr ""
2533
2534 #. type: Plain text
2535 #: build/C/man2/perf_event_open.2:236
2536 #, no-wrap
2537 msgid ""
2538 "    union {\n"
2539 "        __u32 wakeup_events;    /* wakeup every n events */\n"
2540 "        __u32 wakeup_watermark; /* bytes before wakeup */\n"
2541 "    };\n"
2542 msgstr ""
2543
2544 #. type: Plain text
2545 #: build/C/man2/perf_event_open.2:238
2546 #, no-wrap
2547 msgid "    __u32     bp_type;          /* breakpoint type */\n"
2548 msgstr ""
2549
2550 #. type: Plain text
2551 #: build/C/man2/perf_event_open.2:243
2552 #, no-wrap
2553 msgid ""
2554 "    union {\n"
2555 "        __u64 bp_addr;          /* breakpoint address */\n"
2556 "        __u64 config1;          /* extension of config */\n"
2557 "    };\n"
2558 msgstr ""
2559
2560 #. type: Plain text
2561 #: build/C/man2/perf_event_open.2:253
2562 #, no-wrap
2563 msgid ""
2564 "    union {\n"
2565 "        __u64 bp_len;           /* breakpoint length */\n"
2566 "        __u64 config2;          /* extension of config1 */\n"
2567 "    };\n"
2568 "    __u64   branch_sample_type; /* enum perf_branch_sample_type */\n"
2569 "    __u64   sample_regs_user;   /* user regs to dump on samples */\n"
2570 "    __u32   sample_stack_user;  /* size of stack to dump on\n"
2571 "                                   samples */\n"
2572 "    __u32   __reserved_2;       /* Align to u64 */\n"
2573 msgstr ""
2574
2575 #. type: Plain text
2576 #: build/C/man2/perf_event_open.2:255
2577 #, no-wrap
2578 msgid "};\n"
2579 msgstr ""
2580
2581 #. type: Plain text
2582 #: build/C/man2/perf_event_open.2:261
2583 msgid ""
2584 "The fields of the I<perf_event_attr> structure are described in more detail "
2585 "below:"
2586 msgstr ""
2587
2588 #. type: TP
2589 #: build/C/man2/perf_event_open.2:261 build/C/man2/perf_event_open.2:1379
2590 #, no-wrap
2591 msgid "I<type>"
2592 msgstr ""
2593
2594 #. type: Plain text
2595 #: build/C/man2/perf_event_open.2:265
2596 msgid ""
2597 "This field specifies the overall event type.  It has one of the following "
2598 "values:"
2599 msgstr ""
2600
2601 #. type: TP
2602 #: build/C/man2/perf_event_open.2:266
2603 #, no-wrap
2604 msgid "B<PERF_TYPE_HARDWARE>"
2605 msgstr ""
2606
2607 #. type: Plain text
2608 #: build/C/man2/perf_event_open.2:273
2609 msgid ""
2610 "This indicates one of the \"generalized\" hardware events provided by the "
2611 "kernel.  See the I<config> field definition for more details."
2612 msgstr ""
2613
2614 #. type: TP
2615 #: build/C/man2/perf_event_open.2:273
2616 #, no-wrap
2617 msgid "B<PERF_TYPE_SOFTWARE>"
2618 msgstr ""
2619
2620 #. type: Plain text
2621 #: build/C/man2/perf_event_open.2:277
2622 msgid ""
2623 "This indicates one of the software-defined events provided by the kernel "
2624 "(even if no hardware support is available)."
2625 msgstr ""
2626
2627 #. type: TP
2628 #: build/C/man2/perf_event_open.2:277
2629 #, no-wrap
2630 msgid "B<PERF_TYPE_TRACEPOINT>"
2631 msgstr "B<PERF_TYPE_TRACEPOINT>"
2632
2633 #. type: Plain text
2634 #: build/C/man2/perf_event_open.2:281
2635 msgid ""
2636 "This indicates a tracepoint provided by the kernel tracepoint infrastructure."
2637 msgstr ""
2638
2639 #. type: TP
2640 #: build/C/man2/perf_event_open.2:281
2641 #, no-wrap
2642 msgid "B<PERF_TYPE_HW_CACHE>"
2643 msgstr ""
2644
2645 #. type: Plain text
2646 #: build/C/man2/perf_event_open.2:287
2647 msgid ""
2648 "This indicates a hardware cache event.  This has a special encoding, "
2649 "described in the I<config> field definition."
2650 msgstr ""
2651
2652 #. type: TP
2653 #: build/C/man2/perf_event_open.2:287
2654 #, no-wrap
2655 msgid "B<PERF_TYPE_RAW>"
2656 msgstr ""
2657
2658 #. type: Plain text
2659 #: build/C/man2/perf_event_open.2:291
2660 msgid ""
2661 "This indicates a \"raw\" implementation-specific event in the I<config> "
2662 "field."
2663 msgstr ""
2664
2665 #. type: TP
2666 #: build/C/man2/perf_event_open.2:291
2667 #, no-wrap
2668 msgid "B<PERF_TYPE_BREAKPOINT> (Since Linux 2.6.33)"
2669 msgstr "B<PERF_TYPE_BREAKPOINT> (Linux 2.6.33 以降)"
2670
2671 #. type: Plain text
2672 #: build/C/man2/perf_event_open.2:296
2673 msgid ""
2674 "This indicates a hardware breakpoint as provided by the CPU.  Breakpoints "
2675 "can be read/write accesses to an address as well as execution of an "
2676 "instruction address."
2677 msgstr ""
2678
2679 #. type: TP
2680 #: build/C/man2/perf_event_open.2:296
2681 #, no-wrap
2682 msgid "dynamic PMU"
2683 msgstr ""
2684
2685 #. type: Plain text
2686 #: build/C/man2/perf_event_open.2:315
2687 msgid ""
2688 "Since Linux 2.6.39, B<perf_event_open>()  can support multiple PMUs.  To "
2689 "enable this, a value exported by the kernel can be used in the I<type> field "
2690 "to indicate which PMU to use.  The value to use can be found in the sysfs "
2691 "filesystem: there is a subdirectory per PMU instance under I</sys/bus/"
2692 "event_source/devices>.  In each sub-directory there is a I<type> file whose "
2693 "content is an integer that can be used in the I<type> field.  For instance, "
2694 "I</sys/bus/event_source/devices/cpu/type> contains the value for the core "
2695 "CPU PMU, which is usually 4."
2696 msgstr ""
2697
2698 #. type: TP
2699 #: build/C/man2/perf_event_open.2:316 build/C/man2/perf_event_open.2:1327
2700 #, no-wrap
2701 msgid "I<size>"
2702 msgstr ""
2703
2704 #. type: Plain text
2705 #: build/C/man2/perf_event_open.2:325
2706 msgid ""
2707 "The size of the I<perf_event_attr> structure for forward/backward "
2708 "compatibility.  Set this using I<sizeof(struct perf_event_attr)> to allow "
2709 "the kernel to see the struct size at the time of compilation."
2710 msgstr ""
2711
2712 #. type: Plain text
2713 #: build/C/man2/perf_event_open.2:340
2714 msgid ""
2715 "The related define B<PERF_ATTR_SIZE_VER0> is set to 64; this was the size of "
2716 "the first published struct.  B<PERF_ATTR_SIZE_VER1> is 72, corresponding to "
2717 "the addition of breakpoints in Linux 2.6.33.  B<PERF_ATTR_SIZE_VER2> is 80 "
2718 "corresponding to the addition of branch sampling in Linux 3.4.  "
2719 "B<PERF_ATR_SIZE_VER3> is 96 corresponding to the addition of "
2720 "I<sample_regs_user> and I<sample_stack_user> in Linux 3.7."
2721 msgstr ""
2722
2723 #. type: TP
2724 #: build/C/man2/perf_event_open.2:340
2725 #, no-wrap
2726 msgid "I<config>"
2727 msgstr ""
2728
2729 #. type: Plain text
2730 #: build/C/man2/perf_event_open.2:351
2731 msgid ""
2732 "This specifies which event you want, in conjunction with the I<type> field.  "
2733 "The I<config1> and I<config2> fields are also taken into account in cases "
2734 "where 64 bits is not enough to fully specify the event.  The encoding of "
2735 "these fields are event dependent."
2736 msgstr ""
2737
2738 #. type: Plain text
2739 #: build/C/man2/perf_event_open.2:357
2740 msgid ""
2741 "The most significant bit (bit 63) of I<config> signifies CPU-specific (raw) "
2742 "counter configuration data; if the most significant bit is unset, the next 7 "
2743 "bits are an event type and the rest of the bits are the event identifier."
2744 msgstr ""
2745
2746 #. type: Plain text
2747 #: build/C/man2/perf_event_open.2:368
2748 msgid ""
2749 "There are various ways to set the I<config> field that are dependent on the "
2750 "value of the previously described I<type> field.  What follows are various "
2751 "possible settings for I<config> separated out by I<type>."
2752 msgstr ""
2753
2754 #. type: Plain text
2755 #: build/C/man2/perf_event_open.2:378
2756 msgid ""
2757 "If I<type> is B<PERF_TYPE_HARDWARE>, we are measuring one of the generalized "
2758 "hardware CPU events.  Not all of these are available on all platforms.  Set "
2759 "I<config> to one of the following:"
2760 msgstr ""
2761
2762 #. type: TP
2763 #: build/C/man2/perf_event_open.2:379
2764 #, no-wrap
2765 msgid "B<PERF_COUNT_HW_CPU_CYCLES>"
2766 msgstr ""
2767
2768 #. type: Plain text
2769 #: build/C/man2/perf_event_open.2:383
2770 msgid "Total cycles.  Be wary of what happens during CPU frequency scaling."
2771 msgstr ""
2772
2773 #. type: TP
2774 #: build/C/man2/perf_event_open.2:383
2775 #, no-wrap
2776 msgid "B<PERF_COUNT_HW_INSTRUCTIONS>"
2777 msgstr ""
2778
2779 #. type: Plain text
2780 #: build/C/man2/perf_event_open.2:388
2781 msgid ""
2782 "Retired instructions.  Be careful, these can be affected by various issues, "
2783 "most notably hardware interrupt counts."
2784 msgstr ""
2785
2786 #. type: TP
2787 #: build/C/man2/perf_event_open.2:388
2788 #, no-wrap
2789 msgid "B<PERF_COUNT_HW_CACHE_REFERENCES>"
2790 msgstr ""
2791
2792 #. type: Plain text
2793 #: build/C/man2/perf_event_open.2:395
2794 msgid ""
2795 "Cache accesses.  Usually this indicates Last Level Cache accesses but this "
2796 "may vary depending on your CPU.  This may include prefetches and coherency "
2797 "messages; again this depends on the design of your CPU."
2798 msgstr ""
2799
2800 #. type: TP
2801 #: build/C/man2/perf_event_open.2:395
2802 #, no-wrap
2803 msgid "B<PERF_COUNT_HW_CACHE_MISSES>"
2804 msgstr ""
2805
2806 #. type: Plain text
2807 #: build/C/man2/perf_event_open.2:402
2808 msgid ""
2809 "Cache misses.  Usually this indicates Last Level Cache misses; this is "
2810 "intended to be used in conjunction with the "
2811 "B<PERF_COUNT_HW_CACHE_REFERENCES> event to calculate cache miss rates."
2812 msgstr ""
2813
2814 #. type: TP
2815 #: build/C/man2/perf_event_open.2:402
2816 #, no-wrap
2817 msgid "B<PERF_COUNT_HW_BRANCH_INSTRUCTIONS>"
2818 msgstr ""
2819
2820 #. type: Plain text
2821 #: build/C/man2/perf_event_open.2:407
2822 msgid ""
2823 "Retired branch instructions.  Prior to Linux 2.6.34, this used the wrong "
2824 "event on AMD processors."
2825 msgstr ""
2826
2827 #. type: TP
2828 #: build/C/man2/perf_event_open.2:407
2829 #, no-wrap
2830 msgid "B<PERF_COUNT_HW_BRANCH_MISSES>"
2831 msgstr ""
2832
2833 #. type: Plain text
2834 #: build/C/man2/perf_event_open.2:410
2835 msgid "Mispredicted branch instructions."
2836 msgstr ""
2837
2838 #. type: TP
2839 #: build/C/man2/perf_event_open.2:410
2840 #, no-wrap
2841 msgid "B<PERF_COUNT_HW_BUS_CYCLES>"
2842 msgstr ""
2843
2844 #. type: Plain text
2845 #: build/C/man2/perf_event_open.2:413
2846 msgid "Bus cycles, which can be different from total cycles."
2847 msgstr ""
2848
2849 #. type: TP
2850 #: build/C/man2/perf_event_open.2:413
2851 #, no-wrap
2852 msgid "B<PERF_COUNT_HW_STALLED_CYCLES_FRONTEND> (Since Linux 3.0)"
2853 msgstr "B<PERF_COUNT_HW_STALLED_CYCLES_FRONTEND> (Linux 3.0 以降)"
2854
2855 #. type: Plain text
2856 #: build/C/man2/perf_event_open.2:416
2857 msgid "Stalled cycles during issue."
2858 msgstr ""
2859
2860 #. type: TP
2861 #: build/C/man2/perf_event_open.2:416
2862 #, no-wrap
2863 msgid "B<PERF_COUNT_HW_STALLED_CYCLES_BACKEND> (Since Linux 3.0)"
2864 msgstr ""
2865
2866 #. type: Plain text
2867 #: build/C/man2/perf_event_open.2:419
2868 msgid "Stalled cycles during retirement."
2869 msgstr ""
2870
2871 #. type: TP
2872 #: build/C/man2/perf_event_open.2:419
2873 #, no-wrap
2874 msgid "B<PERF_COUNT_HW_REF_CPU_CYCLES> (Since Linux 3.3)"
2875 msgstr "B<PERF_COUNT_HW_REF_CPU_CYCLES> (Linux 3.3 以降)"
2876
2877 #. type: Plain text
2878 #: build/C/man2/perf_event_open.2:422
2879 msgid "Total cycles; not affected by CPU frequency scaling."
2880 msgstr ""
2881
2882 #. type: Plain text
2883 #: build/C/man2/perf_event_open.2:432
2884 msgid ""
2885 "If I<type> is B<PERF_TYPE_SOFTWARE>, we are measuring software events "
2886 "provided by the kernel.  Set I<config> to one of the following:"
2887 msgstr ""
2888
2889 #. type: TP
2890 #: build/C/man2/perf_event_open.2:433
2891 #, no-wrap
2892 msgid "B<PERF_COUNT_SW_CPU_CLOCK>"
2893 msgstr ""
2894
2895 #. type: Plain text
2896 #: build/C/man2/perf_event_open.2:436
2897 msgid "This reports the CPU clock, a high-resolution per-CPU timer."
2898 msgstr ""
2899
2900 #. type: TP
2901 #: build/C/man2/perf_event_open.2:436
2902 #, no-wrap
2903 msgid "B<PERF_COUNT_SW_TASK_CLOCK>"
2904 msgstr ""
2905
2906 #. type: Plain text
2907 #: build/C/man2/perf_event_open.2:439
2908 msgid "This reports a clock count specific to the task that is running."
2909 msgstr ""
2910
2911 #. type: TP
2912 #: build/C/man2/perf_event_open.2:439
2913 #, no-wrap
2914 msgid "B<PERF_COUNT_SW_PAGE_FAULTS>"
2915 msgstr ""
2916
2917 #. type: Plain text
2918 #: build/C/man2/perf_event_open.2:442
2919 msgid "This reports the number of page faults."
2920 msgstr ""
2921
2922 #. type: TP
2923 #: build/C/man2/perf_event_open.2:442
2924 #, no-wrap
2925 msgid "B<PERF_COUNT_SW_CONTEXT_SWITCHES>"
2926 msgstr ""
2927
2928 #. type: Plain text
2929 #: build/C/man2/perf_event_open.2:447
2930 msgid ""
2931 "This counts context switches.  Until Linux 2.6.34, these were all reported "
2932 "as user-space events, after that they are reported as happening in the "
2933 "kernel."
2934 msgstr ""
2935
2936 #. type: TP
2937 #: build/C/man2/perf_event_open.2:447
2938 #, no-wrap
2939 msgid "B<PERF_COUNT_SW_CPU_MIGRATIONS>"
2940 msgstr ""
2941
2942 #. type: Plain text
2943 #: build/C/man2/perf_event_open.2:451
2944 msgid "This reports the number of times the process has migrated to a new CPU."
2945 msgstr ""
2946
2947 #. type: TP
2948 #: build/C/man2/perf_event_open.2:451
2949 #, no-wrap
2950 msgid "B<PERF_COUNT_SW_PAGE_FAULTS_MIN>"
2951 msgstr ""
2952
2953 #. type: Plain text
2954 #: build/C/man2/perf_event_open.2:455
2955 msgid ""
2956 "This counts the number of minor page faults.  These did not require disk I/O "
2957 "to handle."
2958 msgstr ""
2959
2960 #. type: TP
2961 #: build/C/man2/perf_event_open.2:455
2962 #, no-wrap
2963 msgid "B<PERF_COUNT_SW_PAGE_FAULTS_MAJ>"
2964 msgstr ""
2965
2966 #. type: Plain text
2967 #: build/C/man2/perf_event_open.2:459
2968 msgid ""
2969 "This counts the number of major page faults.  These required disk I/O to "
2970 "handle."
2971 msgstr ""
2972
2973 #. type: TP
2974 #: build/C/man2/perf_event_open.2:459
2975 #, no-wrap
2976 msgid "B<PERF_COUNT_SW_ALIGNMENT_FAULTS> (Since Linux 2.6.33)"
2977 msgstr "B<PERF_COUNT_SW_ALIGNMENT_FAULTS> (Linux 2.6.33 以降)"
2978
2979 #. type: Plain text
2980 #: build/C/man2/perf_event_open.2:465
2981 msgid ""
2982 "This counts the number of alignment faults.  These happen when unaligned "
2983 "memory accesses happen; the kernel can handle these but it reduces "
2984 "performance.  This happens only on some architectures (never on x86)."
2985 msgstr ""
2986
2987 #. type: TP
2988 #: build/C/man2/perf_event_open.2:465
2989 #, no-wrap
2990 msgid "B<PERF_COUNT_SW_EMULATION_FAULTS> (Since Linux 2.6.33)"
2991 msgstr "B<PERF_COUNT_SW_EMULATION_FAULTS> (Linux 2.6.33 以降)"
2992
2993 #. type: Plain text
2994 #: build/C/man2/perf_event_open.2:471
2995 msgid ""
2996 "This counts the number of emulation faults.  The kernel sometimes traps on "
2997 "unimplemented instructions and emulates them for user space.  This can "
2998 "negatively impact performance."
2999 msgstr ""
3000
3001 #. type: Plain text
3002 #: build/C/man2/perf_event_open.2:484
3003 msgid ""
3004 "If I<type> is B<PERF_TYPE_TRACEPOINT>, then we are measuring kernel "
3005 "tracepoints.  The value to use in I<config> can be obtained from under "
3006 "debugfs I<tracing/events/*/*/id> if ftrace is enabled in the kernel."
3007 msgstr ""
3008
3009 #. type: Plain text
3010 #: build/C/man2/perf_event_open.2:495
3011 msgid ""
3012 "If I<type> is B<PERF_TYPE_HW_CACHE>, then we are measuring a hardware CPU "
3013 "cache event.  To calculate the appropriate I<config> value use the following "
3014 "equation:"
3015 msgstr ""
3016
3017 #. type: Plain text
3018 #: build/C/man2/perf_event_open.2:500
3019 #, no-wrap
3020 msgid ""
3021 "    (perf_hw_cache_id) | (perf_hw_cache_op_id E<lt>E<lt> 8) |\n"
3022 "    (perf_hw_cache_op_result_id E<lt>E<lt> 16)\n"
3023 msgstr ""
3024
3025 #. type: Plain text
3026 #: build/C/man2/perf_event_open.2:505
3027 msgid "where I<perf_hw_cache_id> is one of:"
3028 msgstr ""
3029
3030 #. type: TP
3031 #: build/C/man2/perf_event_open.2:506
3032 #, no-wrap
3033 msgid "B<PERF_COUNT_HW_CACHE_L1D>"
3034 msgstr ""
3035
3036 #. type: Plain text
3037 #: build/C/man2/perf_event_open.2:509
3038 msgid "for measuring Level 1 Data Cache"
3039 msgstr ""
3040
3041 #. type: TP
3042 #: build/C/man2/perf_event_open.2:509
3043 #, no-wrap
3044 msgid "B<PERF_COUNT_HW_CACHE_L1I>"
3045 msgstr ""
3046
3047 #. type: Plain text
3048 #: build/C/man2/perf_event_open.2:512
3049 msgid "for measuring Level 1 Instruction Cache"
3050 msgstr ""
3051
3052 #. type: TP
3053 #: build/C/man2/perf_event_open.2:512
3054 #, no-wrap
3055 msgid "B<PERF_COUNT_HW_CACHE_LL>"
3056 msgstr ""
3057
3058 #. type: Plain text
3059 #: build/C/man2/perf_event_open.2:515
3060 msgid "for measuring Last-Level Cache"
3061 msgstr ""
3062
3063 #. type: TP
3064 #: build/C/man2/perf_event_open.2:515
3065 #, no-wrap
3066 msgid "B<PERF_COUNT_HW_CACHE_DTLB>"
3067 msgstr ""
3068
3069 #. type: Plain text
3070 #: build/C/man2/perf_event_open.2:518
3071 msgid "for measuring the Data TLB"
3072 msgstr ""
3073
3074 #. type: TP
3075 #: build/C/man2/perf_event_open.2:518
3076 #, no-wrap
3077 msgid "B<PERF_COUNT_HW_CACHE_ITLB>"
3078 msgstr ""
3079
3080 #. type: Plain text
3081 #: build/C/man2/perf_event_open.2:521
3082 msgid "for measuring the Instruction TLB"
3083 msgstr ""
3084
3085 #. type: TP
3086 #: build/C/man2/perf_event_open.2:521
3087 #, no-wrap
3088 msgid "B<PERF_COUNT_HW_CACHE_BPU>"
3089 msgstr ""
3090
3091 #. type: Plain text
3092 #: build/C/man2/perf_event_open.2:524
3093 msgid "for measuring the branch prediction unit"
3094 msgstr ""
3095
3096 #. type: TP
3097 #: build/C/man2/perf_event_open.2:524
3098 #, no-wrap
3099 msgid "B<PERF_COUNT_HW_CACHE_NODE> (Since Linux 3.0)"
3100 msgstr "B<PERF_COUNT_HW_CACHE_NODE> (Linux 3.0 以降)"
3101
3102 #. type: Plain text
3103 #: build/C/man2/perf_event_open.2:527
3104 msgid "for measuring local memory accesses"
3105 msgstr ""
3106
3107 #. type: Plain text
3108 #: build/C/man2/perf_event_open.2:532
3109 msgid "and I<perf_hw_cache_op_id> is one of"
3110 msgstr ""
3111
3112 #. type: TP
3113 #: build/C/man2/perf_event_open.2:533
3114 #, no-wrap
3115 msgid "B<PERF_COUNT_HW_CACHE_OP_READ>"
3116 msgstr ""
3117
3118 #. type: Plain text
3119 #: build/C/man2/perf_event_open.2:536
3120 msgid "for read accesses"
3121 msgstr ""
3122
3123 #. type: TP
3124 #: build/C/man2/perf_event_open.2:536
3125 #, no-wrap
3126 msgid "B<PERF_COUNT_HW_CACHE_OP_WRITE>"
3127 msgstr ""
3128
3129 #. type: Plain text
3130 #: build/C/man2/perf_event_open.2:539
3131 msgid "for write accesses"
3132 msgstr ""
3133
3134 #. type: TP
3135 #: build/C/man2/perf_event_open.2:539
3136 #, no-wrap
3137 msgid "B<PERF_COUNT_HW_CACHE_OP_PREFETCH>"
3138 msgstr ""
3139
3140 #. type: Plain text
3141 #: build/C/man2/perf_event_open.2:542
3142 msgid "for prefetch accesses"
3143 msgstr ""
3144
3145 #. type: Plain text
3146 #: build/C/man2/perf_event_open.2:547
3147 msgid "and I<perf_hw_cache_op_result_id> is one of"
3148 msgstr ""
3149
3150 #. type: TP
3151 #: build/C/man2/perf_event_open.2:548
3152 #, no-wrap
3153 msgid "B<PERF_COUNT_HW_CACHE_RESULT_ACCESS>"
3154 msgstr ""
3155
3156 #. type: Plain text
3157 #: build/C/man2/perf_event_open.2:551
3158 msgid "to measure accesses"
3159 msgstr ""
3160
3161 #. type: TP
3162 #: build/C/man2/perf_event_open.2:551
3163 #, no-wrap
3164 msgid "B<PERF_COUNT_HW_CACHE_RESULT_MISS>"
3165 msgstr ""
3166
3167 #. type: Plain text
3168 #: build/C/man2/perf_event_open.2:554
3169 msgid "to measure misses"
3170 msgstr ""
3171
3172 #. type: Plain text
3173 #: build/C/man2/perf_event_open.2:572
3174 msgid ""
3175 "If I<type> is B<PERF_TYPE_RAW>, then a custom \"raw\" I<config> value is "
3176 "needed.  Most CPUs support events that are not covered by the \"generalized"
3177 "\" events.  These are implementation defined; see your CPU manual (for "
3178 "example the Intel Volume 3B documentation or the AMD BIOS and Kernel "
3179 "Developer Guide).  The libpfm4 library can be used to translate from the "
3180 "name in the architectural manuals to the raw hex value B<perf_event_open>()  "
3181 "expects in this field."
3182 msgstr ""
3183
3184 #. type: Plain text
3185 #: build/C/man2/perf_event_open.2:581
3186 msgid ""
3187 "If I<type> is B<PERF_TYPE_BREAKPOINT>, then leave I<config> set to zero.  "
3188 "Its parameters are set in other places."
3189 msgstr ""
3190
3191 #. type: TP
3192 #: build/C/man2/perf_event_open.2:582
3193 #, no-wrap
3194 msgid "I<sample_period>, I<sample_freq>"
3195 msgstr ""
3196
3197 #. type: Plain text
3198 #: build/C/man2/perf_event_open.2:594
3199 msgid ""
3200 "A \"sampling\" counter is one that generates an interrupt every N events, "
3201 "where N is given by I<sample_period>.  A sampling counter has "
3202 "I<sample_period> E<gt> 0.  When an overflow interrupt occurs, requested data "
3203 "is recorded in the mmap buffer.  The I<sample_type> field controls what data "
3204 "is recorded on each interrupt."
3205 msgstr ""
3206
3207 #. type: Plain text
3208 #: build/C/man2/perf_event_open.2:604
3209 msgid ""
3210 "I<sample_freq> can be used if you wish to use frequency rather than period.  "
3211 "In this case you set the I<freq> flag.  The kernel will adjust the sampling "
3212 "period to try and achieve the desired rate.  The rate of adjustment is a "
3213 "timer tick."
3214 msgstr ""
3215
3216 #. type: TP
3217 #: build/C/man2/perf_event_open.2:604
3218 #, no-wrap
3219 msgid "I<sample_type>"
3220 msgstr ""
3221
3222 #. type: Plain text
3223 #: build/C/man2/perf_event_open.2:616
3224 msgid ""
3225 "The various bits in this field specify which values to include in the "
3226 "sample.  They will be recorded in a ring-buffer, which is available to user "
3227 "space using B<mmap>(2).  The order in which the values are saved in the "
3228 "sample are documented in the MMAP Layout subsection below; it is not the "
3229 "I<enum perf_event_sample_format> order."
3230 msgstr ""
3231
3232 #. type: TP
3233 #: build/C/man2/perf_event_open.2:617
3234 #, no-wrap
3235 msgid "B<PERF_SAMPLE_IP>"
3236 msgstr ""
3237
3238 #. type: Plain text
3239 #: build/C/man2/perf_event_open.2:620
3240 msgid "Records instruction pointer."
3241 msgstr ""
3242
3243 #. type: TP
3244 #: build/C/man2/perf_event_open.2:620
3245 #, no-wrap
3246 msgid "B<PERF_SAMPLE_TID>"
3247 msgstr ""
3248
3249 #. type: Plain text
3250 #: build/C/man2/perf_event_open.2:623
3251 msgid "Records the process and thread IDs."
3252 msgstr ""
3253
3254 #. type: TP
3255 #: build/C/man2/perf_event_open.2:623
3256 #, no-wrap
3257 msgid "B<PERF_SAMPLE_TIME>"
3258 msgstr ""
3259
3260 #. type: Plain text
3261 #: build/C/man2/perf_event_open.2:626
3262 msgid "Records a timestamp."
3263 msgstr ""
3264
3265 #. type: TP
3266 #: build/C/man2/perf_event_open.2:626
3267 #, no-wrap
3268 msgid "B<PERF_SAMPLE_ADDR>"
3269 msgstr ""
3270
3271 #. type: Plain text
3272 #: build/C/man2/perf_event_open.2:629
3273 msgid "Records an address, if applicable."
3274 msgstr ""
3275
3276 #. type: TP
3277 #: build/C/man2/perf_event_open.2:629
3278 #, no-wrap
3279 msgid "B<PERF_SAMPLE_READ>"
3280 msgstr ""
3281
3282 #. type: Plain text
3283 #: build/C/man2/perf_event_open.2:632
3284 msgid ""
3285 "Record counter values for all events in a group, not just the group leader."
3286 msgstr ""
3287
3288 #. type: TP
3289 #: build/C/man2/perf_event_open.2:632
3290 #, no-wrap
3291 msgid "B<PERF_SAMPLE_CALLCHAIN>"
3292 msgstr ""
3293
3294 #. type: Plain text
3295 #: build/C/man2/perf_event_open.2:635
3296 msgid "Records the callchain (stack backtrace)."
3297 msgstr ""
3298
3299 #. type: TP
3300 #: build/C/man2/perf_event_open.2:635
3301 #, no-wrap
3302 msgid "B<PERF_SAMPLE_ID>"
3303 msgstr ""
3304
3305 #. type: Plain text
3306 #: build/C/man2/perf_event_open.2:638
3307 msgid "Records a unique ID for the opened event's group leader."
3308 msgstr ""
3309
3310 #. type: TP
3311 #: build/C/man2/perf_event_open.2:638
3312 #, no-wrap
3313 msgid "B<PERF_SAMPLE_CPU>"
3314 msgstr ""
3315
3316 #. type: Plain text
3317 #: build/C/man2/perf_event_open.2:641
3318 msgid "Records CPU number."
3319 msgstr ""
3320
3321 #. type: TP
3322 #: build/C/man2/perf_event_open.2:641
3323 #, no-wrap
3324 msgid "B<PERF_SAMPLE_PERIOD>"
3325 msgstr ""
3326
3327 #. type: Plain text
3328 #: build/C/man2/perf_event_open.2:644
3329 msgid "Records the current sampling period."
3330 msgstr ""
3331
3332 #. type: TP
3333 #: build/C/man2/perf_event_open.2:644
3334 #, no-wrap
3335 msgid "B<PERF_SAMPLE_STREAM_ID>"
3336 msgstr ""
3337
3338 #. type: Plain text
3339 #: build/C/man2/perf_event_open.2:651
3340 msgid ""
3341 "Records a unique ID for the opened event.  Unlike B<PERF_SAMPLE_ID> the "
3342 "actual ID is returned, not the group leader.  This ID is the same as the one "
3343 "returned by PERF_FORMAT_ID."
3344 msgstr ""
3345
3346 #. type: TP
3347 #: build/C/man2/perf_event_open.2:651
3348 #, no-wrap
3349 msgid "B<PERF_SAMPLE_RAW>"
3350 msgstr ""
3351
3352 #. type: Plain text
3353 #: build/C/man2/perf_event_open.2:655
3354 msgid ""
3355 "Records additional data, if applicable.  Usually returned by tracepoint "
3356 "events."
3357 msgstr ""
3358
3359 #. type: TP
3360 #: build/C/man2/perf_event_open.2:655
3361 #, no-wrap
3362 msgid "B<PERF_SAMPLE_BRANCH_STACK> (Since Linux 3.4)"
3363 msgstr "B<PERF_SAMPLE_BRANCH_STACK> (Linux 3.4 以降)"
3364
3365 #. type: Plain text
3366 #: build/C/man2/perf_event_open.2:660
3367 msgid ""
3368 "This provides a record of recent branches, as provided by CPU branch "
3369 "sampling hardware (such as Intel Last Branch Record).  Not all hardware "
3370 "supports this feature."
3371 msgstr ""
3372
3373 #. type: Plain text
3374 #: build/C/man2/perf_event_open.2:664
3375 msgid ""
3376 "See the I<branch_sample_type> field for how to filter which branches are "
3377 "reported."
3378 msgstr ""
3379
3380 #. type: TP
3381 #: build/C/man2/perf_event_open.2:664
3382 #, no-wrap
3383 msgid "B<PERF_SAMPLE_REGS_USER> (Since Linux 3.7)"
3384 msgstr "B<PERF_SAMPLE_REGS_USER> (Linux 3.7 以降)"
3385
3386 #. type: Plain text
3387 #: build/C/man2/perf_event_open.2:668
3388 msgid ""
3389 "Records the current user-level CPU register state (the values in the process "
3390 "before the kernel was called)."
3391 msgstr ""
3392
3393 #. type: TP
3394 #: build/C/man2/perf_event_open.2:668
3395 #, no-wrap
3396 msgid "B<PERF_SAMPLE_STACK_USER> (Since Linux 3.7)"
3397 msgstr "B<PERF_SAMPLE_STACK_USER> (Linux 3.7 以降)"
3398
3399 #. type: Plain text
3400 #: build/C/man2/perf_event_open.2:671
3401 msgid "Records the user level stack, allowing stack unwinding."
3402 msgstr ""
3403
3404 #. type: TP
3405 #: build/C/man2/perf_event_open.2:671
3406 #, no-wrap
3407 msgid "B<PERF_SAMPLE_WEIGHT> (Since Linux 3.10)"
3408 msgstr "B<PERF_SAMPLE_WEIGHT> (Linux 3.10 以降)"
3409
3410 #. type: Plain text
3411 #: build/C/man2/perf_event_open.2:677
3412 msgid ""
3413 "Records a hardware provided weight value that expresses how costly the "
3414 "sampled event was.  This allows the hardware to highlight expensive events "
3415 "in a profile."
3416 msgstr ""
3417
3418 #. type: TP
3419 #: build/C/man2/perf_event_open.2:677
3420 #, no-wrap
3421 msgid "B<PERF_SAMPLE_DATA_SRC> (Since Linux 3.10)"
3422 msgstr "B<PERF_SAMPLE_DATA_SRC> (Linux 3.10 以降)"
3423
3424 #. type: Plain text
3425 #: build/C/man2/perf_event_open.2:683
3426 msgid ""
3427 "Records the data source: where in the memory hierarchy the data associated "
3428 "with the sampled instruction came from.  This is only available if the "
3429 "underlying hardware supports this feature."
3430 msgstr ""
3431
3432 #. type: TP
3433 #: build/C/man2/perf_event_open.2:684
3434 #, no-wrap
3435 msgid "I<read_format>"
3436 msgstr ""
3437
3438 #. type: Plain text
3439 #: build/C/man2/perf_event_open.2:691
3440 msgid ""
3441 "This field specifies the format of the data returned by B<read>(2)  on a "
3442 "B<perf_event_open>()  file descriptor."
3443 msgstr ""
3444
3445 #. type: TP
3446 #: build/C/man2/perf_event_open.2:692
3447 #, no-wrap
3448 msgid "B<PERF_FORMAT_TOTAL_TIME_ENABLED>"
3449 msgstr ""
3450
3451 #. type: Plain text
3452 #: build/C/man2/perf_event_open.2:699
3453 msgid ""
3454 "Adds the 64-bit I<time_enabled> field.  This can be used to calculate "
3455 "estimated totals if the PMU is overcommitted and multiplexing is happening."
3456 msgstr ""
3457
3458 #. type: TP
3459 #: build/C/man2/perf_event_open.2:699
3460 #, no-wrap
3461 msgid "B<PERF_FORMAT_TOTAL_TIME_RUNNING>"
3462 msgstr ""
3463
3464 #. type: Plain text
3465 #: build/C/man2/perf_event_open.2:706
3466 msgid ""
3467 "Adds the 64-bit I<time_running> field.  This can be used to calculate "
3468 "estimated totals if the PMU is overcommitted and multiplexing is happening."
3469 msgstr ""
3470
3471 #. type: TP
3472 #: build/C/man2/perf_event_open.2:706
3473 #, no-wrap
3474 msgid "B<PERF_FORMAT_ID>"
3475 msgstr ""
3476
3477 #. type: Plain text
3478 #: build/C/man2/perf_event_open.2:709
3479 msgid "Adds a 64-bit unique value that corresponds to the event group."
3480 msgstr ""
3481
3482 #. type: TP
3483 #: build/C/man2/perf_event_open.2:709
3484 #, no-wrap
3485 msgid "B<PERF_FORMAT_GROUP>"
3486 msgstr ""
3487
3488 #. type: Plain text
3489 #: build/C/man2/perf_event_open.2:712
3490 msgid "Allows all counter values in an event group to be read with one read."
3491 msgstr ""
3492
3493 #. type: TP
3494 #: build/C/man2/perf_event_open.2:713
3495 #, no-wrap
3496 msgid "I<disabled>"
3497 msgstr ""
3498
3499 #. type: Plain text
3500 #: build/C/man2/perf_event_open.2:723
3501 msgid ""
3502 "The I<disabled> bit specifies whether the counter starts out disabled or "
3503 "enabled.  If disabled, the event can later be enabled by B<ioctl>(2), "
3504 "B<prctl>(2), or I<enable_on_exec>."
3505 msgstr ""
3506
3507 #. type: TP
3508 #: build/C/man2/perf_event_open.2:723
3509 #, no-wrap
3510 msgid "I<inherit>"
3511 msgstr ""
3512
3513 #. type: Plain text
3514 #: build/C/man2/perf_event_open.2:732
3515 msgid ""
3516 "The I<inherit> bit specifies that this counter should count events of child "
3517 "tasks as well as the task specified.  This applies only to new children, not "
3518 "to any existing children at the time the counter is created (nor to any new "
3519 "children of existing children)."
3520 msgstr ""
3521
3522 #. type: Plain text
3523 #: build/C/man2/perf_event_open.2:737
3524 msgid ""
3525 "Inherit does not work for some combinations of I<read_format>s, such as "
3526 "B<PERF_FORMAT_GROUP>."
3527 msgstr ""
3528
3529 #. type: TP
3530 #: build/C/man2/perf_event_open.2:737
3531 #, no-wrap
3532 msgid "I<pinned>"
3533 msgstr ""
3534
3535 #. type: Plain text
3536 #: build/C/man2/perf_event_open.2:750
3537 msgid ""
3538 "The I<pinned> bit specifies that the counter should always be on the CPU if "
3539 "at all possible.  It applies only to hardware counters and only to group "
3540 "leaders.  If a pinned counter cannot be put onto the CPU (e.g., because "
3541 "there are not enough hardware counters or because of a conflict with some "
3542 "other event), then the counter goes into an 'error' state, where reads "
3543 "return end-of-file (i.e., B<read>(2)  returns 0) until the counter is "
3544 "subsequently enabled or disabled."
3545 msgstr ""
3546
3547 #. type: TP
3548 #: build/C/man2/perf_event_open.2:750
3549 #, no-wrap
3550 msgid "I<exclusive>"
3551 msgstr ""
3552
3553 #. type: Plain text
3554 #: build/C/man2/perf_event_open.2:759
3555 msgid ""
3556 "The I<exclusive> bit specifies that when this counter's group is on the CPU, "
3557 "it should be the only group using the CPU's counters.  In the future this "
3558 "may allow monitoring programs to support PMU features that need to run alone "
3559 "so that they do not disrupt other hardware counters."
3560 msgstr ""
3561
3562 #. type: TP
3563 #: build/C/man2/perf_event_open.2:759
3564 #, no-wrap
3565 msgid "I<exclude_user>"
3566 msgstr ""
3567
3568 #. type: Plain text
3569 #: build/C/man2/perf_event_open.2:762
3570 msgid ""
3571 "If this bit is set, the count excludes events that happen in user space."
3572 msgstr ""
3573
3574 #. type: TP
3575 #: build/C/man2/perf_event_open.2:762
3576 #, no-wrap
3577 msgid "I<exclude_kernel>"
3578 msgstr ""
3579
3580 #. type: Plain text
3581 #: build/C/man2/perf_event_open.2:765
3582 msgid ""
3583 "If this bit is set, the count excludes events that happen in kernel-space."
3584 msgstr ""
3585
3586 #. type: TP
3587 #: build/C/man2/perf_event_open.2:765
3588 #, no-wrap
3589 msgid "I<exclude_hv>"
3590 msgstr ""
3591
3592 #. type: Plain text
3593 #: build/C/man2/perf_event_open.2:773
3594 msgid ""
3595 "If this bit is set, the count excludes events that happen in the "
3596 "hypervisor.  This is mainly for PMUs that have built-in support for handling "
3597 "this (such as POWER).  Extra support is needed for handling hypervisor "
3598 "measurements on most machines."
3599 msgstr ""
3600
3601 #. type: TP
3602 #: build/C/man2/perf_event_open.2:773
3603 #, no-wrap
3604 msgid "I<exclude_idle>"
3605 msgstr ""
3606
3607 #. type: Plain text
3608 #: build/C/man2/perf_event_open.2:776
3609 msgid "If set, don't count when the CPU is idle."
3610 msgstr ""
3611
3612 #. type: TP
3613 #: build/C/man2/perf_event_open.2:776
3614 #, no-wrap
3615 msgid "I<mmap>"
3616 msgstr ""
3617
3618 #. type: Plain text
3619 #: build/C/man2/perf_event_open.2:781
3620 msgid "The I<mmap> bit enables recording of exec mmap events."
3621 msgstr ""
3622
3623 #. type: TP
3624 #: build/C/man2/perf_event_open.2:781
3625 #, no-wrap
3626 msgid "I<comm>"
3627 msgstr ""
3628
3629 #. type: Plain text
3630 #: build/C/man2/perf_event_open.2:792
3631 msgid ""
3632 "The I<comm> bit enables tracking of process command name as modified by the "
3633 "I<exec>(2)  and I<prctl>(PR_SET_NAME)  system calls.  Unfortunately for "
3634 "tools, there is no way to distinguish one system call versus the other."
3635 msgstr ""
3636
3637 #. type: TP
3638 #: build/C/man2/perf_event_open.2:792
3639 #, no-wrap
3640 msgid "I<freq>"
3641 msgstr ""
3642
3643 #. type: Plain text
3644 #: build/C/man2/perf_event_open.2:799
3645 msgid ""
3646 "If this bit is set, then I<sample_frequency> not I<sample_period> is used "
3647 "when setting up the sampling interval."
3648 msgstr ""
3649
3650 #. type: TP
3651 #: build/C/man2/perf_event_open.2:799
3652 #, no-wrap
3653 msgid "I<inherit_stat>"
3654 msgstr ""
3655
3656 #. type: Plain text
3657 #: build/C/man2/perf_event_open.2:806
3658 msgid ""
3659 "This bit enables saving of event counts on context switch for inherited "
3660 "tasks.  This is meaningful only if the I<inherit> field is set."
3661 msgstr ""
3662
3663 #. type: TP
3664 #: build/C/man2/perf_event_open.2:806
3665 #, no-wrap
3666 msgid "I<enable_on_exec>"
3667 msgstr ""
3668
3669 #. type: Plain text
3670 #: build/C/man2/perf_event_open.2:811
3671 msgid ""
3672 "If this bit is set, a counter is automatically enabled after a call to "
3673 "B<exec>(2)."
3674 msgstr ""
3675
3676 #. type: TP
3677 #: build/C/man2/perf_event_open.2:811
3678 #, no-wrap
3679 msgid "I<task>"
3680 msgstr ""
3681
3682 #. type: Plain text
3683 #: build/C/man2/perf_event_open.2:815
3684 msgid ""
3685 "If this bit is set, then fork/exit notifications are included in the ring "
3686 "buffer."
3687 msgstr ""
3688
3689 #. type: TP
3690 #: build/C/man2/perf_event_open.2:815
3691 #, no-wrap
3692 msgid "I<watermark>"
3693 msgstr ""
3694
3695 #. type: Plain text
3696 #: build/C/man2/perf_event_open.2:823
3697 msgid ""
3698 "If set, have a sampling interrupt happen when we cross the "
3699 "I<wakeup_watermark> boundary.  Otherwise interrupts happen after "
3700 "I<wakeup_events> samples."
3701 msgstr ""
3702
3703 #. type: TP
3704 #: build/C/man2/perf_event_open.2:823
3705 #, no-wrap
3706 msgid "I<precise_ip> (Since Linux 2.6.35)"
3707 msgstr "I<precise_ip> (Linux 2.6.35 以降)"
3708
3709 #. type: Plain text
3710 #: build/C/man2/perf_event_open.2:833
3711 msgid ""
3712 "This controls the amount of skid.  Skid is how many instructions execute "
3713 "between an event of interest happening and the kernel being able to stop and "
3714 "record the event.  Smaller skid is better and allows more accurate reporting "
3715 "of which events correspond to which instructions, but hardware is often "
3716 "limited with how small this can be."
3717 msgstr ""
3718
3719 #. type: Plain text
3720 #: build/C/man2/perf_event_open.2:835
3721 msgid "The values of this are the following:"
3722 msgstr ""
3723
3724 #. type: TP
3725 #: build/C/man2/perf_event_open.2:836
3726 #, no-wrap
3727 msgid "0 -"
3728 msgstr ""
3729
3730 #. type: Plain text
3731 #: build/C/man2/perf_event_open.2:840
3732 msgid "B<SAMPLE_IP> can have arbitrary skid."
3733 msgstr ""
3734
3735 #. type: TP
3736 #: build/C/man2/perf_event_open.2:840
3737 #, no-wrap
3738 msgid "1 -"
3739 msgstr ""
3740
3741 #. type: Plain text
3742 #: build/C/man2/perf_event_open.2:844
3743 msgid "B<SAMPLE_IP> must have constant skid."
3744 msgstr ""
3745
3746 #. type: TP
3747 #: build/C/man2/perf_event_open.2:844
3748 #, no-wrap
3749 msgid "2 -"
3750 msgstr ""
3751
3752 #. type: Plain text
3753 #: build/C/man2/perf_event_open.2:848
3754 msgid "B<SAMPLE_IP> requested to have 0 skid."
3755 msgstr ""
3756
3757 #. type: TP
3758 #: build/C/man2/perf_event_open.2:848
3759 #, no-wrap
3760 msgid "3 -"
3761 msgstr ""
3762
3763 #. type: Plain text
3764 #: build/C/man2/perf_event_open.2:854
3765 msgid "B<SAMPLE_IP> must have 0 skid.  See also B<PERF_RECORD_MISC_EXACT_IP>."
3766 msgstr ""
3767
3768 #. type: TP
3769 #: build/C/man2/perf_event_open.2:855
3770 #, no-wrap
3771 msgid "I<mmap_data> (Since Linux 2.6.36)"
3772 msgstr "I<mmap_data> (Linux 2.6.36 以降)"
3773
3774 #. type: Plain text
3775 #: build/C/man2/perf_event_open.2:861
3776 msgid ""
3777 "The counterpart of the I<mmap> field, but enables including data mmap events "
3778 "in the ring-buffer."
3779 msgstr ""
3780
3781 #. type: TP
3782 #: build/C/man2/perf_event_open.2:861
3783 #, no-wrap
3784 msgid "I<sample_id_all> (Since Linux 2.6.38)"
3785 msgstr "I<sample_id_all> (Linux 2.6.38 以降)"
3786
3787 #. type: Plain text
3788 #: build/C/man2/perf_event_open.2:869
3789 msgid ""
3790 "If set, then TID, TIME, ID, CPU, and STREAM_ID can additionally be included "
3791 "in non-B<PERF_RECORD_SAMPLE>s if the corresponding I<sample_type> is "
3792 "selected."
3793 msgstr ""
3794
3795 #. type: TP
3796 #: build/C/man2/perf_event_open.2:869
3797 #, no-wrap
3798 msgid "I<exclude_host> (Since Linux 3.2)"
3799 msgstr ""
3800
3801 #. type: Plain text
3802 #: build/C/man2/perf_event_open.2:872
3803 msgid "Do not measure time spent in VM host."
3804 msgstr ""
3805
3806 #. type: TP
3807 #: build/C/man2/perf_event_open.2:872
3808 #, no-wrap
3809 msgid "I<exclude_guest> (Since Linux 3.2)"
3810 msgstr ""
3811
3812 #. type: Plain text
3813 #: build/C/man2/perf_event_open.2:875
3814 msgid "Do not measure time spent in VM guest."
3815 msgstr ""
3816
3817 #. type: TP
3818 #: build/C/man2/perf_event_open.2:875
3819 #, no-wrap
3820 msgid "I<exclude_callchain_kernel> (Since Linux 3.7)"
3821 msgstr ""
3822
3823 #. type: Plain text
3824 #: build/C/man2/perf_event_open.2:878
3825 msgid "Do not include kernel callchains."
3826 msgstr ""
3827
3828 #. type: TP
3829 #: build/C/man2/perf_event_open.2:878
3830 #, no-wrap
3831 msgid "I<exclude_callchain_user> (Since Linux 3.7)"
3832 msgstr ""
3833
3834 #. type: Plain text
3835 #: build/C/man2/perf_event_open.2:881
3836 msgid "Do not include user callchains."
3837 msgstr ""
3838
3839 #. type: TP
3840 #: build/C/man2/perf_event_open.2:881
3841 #, no-wrap
3842 msgid "I<wakeup_events>, I<wakeup_watermark>"
3843 msgstr ""
3844
3845 #. type: Plain text
3846 #: build/C/man2/perf_event_open.2:891
3847 msgid ""
3848 "This union sets how many samples (I<wakeup_events>)  or bytes "
3849 "(I<wakeup_watermark>)  happen before an overflow signal happens.  Which one "
3850 "is used is selected by the I<watermark> bitflag."
3851 msgstr ""
3852
3853 #. type: Plain text
3854 #: build/C/man2/perf_event_open.2:901
3855 msgid ""
3856 "I<wakeup_events> only counts B<PERF_RECORD_SAMPLE> record types.  To receive "
3857 "a signal for every incoming B<PERF_RECORD> type set I<wakeup_watermark> to 1."
3858 msgstr ""
3859
3860 #. type: TP
3861 #: build/C/man2/perf_event_open.2:901
3862 #, no-wrap
3863 msgid "I<bp_type> (Since Linux 2.6.33)"
3864 msgstr "I<bp_type> (Linux 2.6.33 以降)"
3865
3866 #. type: Plain text
3867 #: build/C/man2/perf_event_open.2:905
3868 msgid "This chooses the breakpoint type.  It is one of:"
3869 msgstr ""
3870
3871 #. type: TP
3872 #: build/C/man2/perf_event_open.2:906
3873 #, no-wrap
3874 msgid "B<HW_BREAKPOINT_EMPTY>"
3875 msgstr ""
3876
3877 #. type: Plain text
3878 #: build/C/man2/perf_event_open.2:909
3879 msgid "No breakpoint."
3880 msgstr ""
3881
3882 #. type: TP
3883 #: build/C/man2/perf_event_open.2:909
3884 #, no-wrap
3885 msgid "B<HW_BREAKPOINT_R>"
3886 msgstr ""
3887
3888 #. type: Plain text
3889 #: build/C/man2/perf_event_open.2:912
3890 msgid "Count when we read the memory location."
3891 msgstr ""
3892
3893 #. type: TP
3894 #: build/C/man2/perf_event_open.2:912
3895 #, no-wrap
3896 msgid "B<HW_BREAKPOINT_W>"
3897 msgstr ""
3898
3899 #. type: Plain text
3900 #: build/C/man2/perf_event_open.2:915
3901 msgid "Count when we write the memory location."
3902 msgstr ""
3903
3904 #. type: TP
3905 #: build/C/man2/perf_event_open.2:915
3906 #, no-wrap
3907 msgid "B<HW_BREAKPOINT_RW>"
3908 msgstr ""
3909
3910 #. type: Plain text
3911 #: build/C/man2/perf_event_open.2:918
3912 msgid "Count when we read or write the memory location."
3913 msgstr ""
3914
3915 #. type: TP
3916 #: build/C/man2/perf_event_open.2:918
3917 #, no-wrap
3918 msgid "B<HW_BREAKPOINT_X>"
3919 msgstr ""
3920
3921 #. type: Plain text
3922 #: build/C/man2/perf_event_open.2:921
3923 msgid "Count when we execute code at the memory location."
3924 msgstr ""
3925
3926 #. type: Plain text
3927 #: build/C/man2/perf_event_open.2:930
3928 msgid ""
3929 "The values can be combined via a bitwise or, but the combination of "
3930 "B<HW_BREAKPOINT_R> or B<HW_BREAKPOINT_W> with B<HW_BREAKPOINT_X> is not "
3931 "allowed."
3932 msgstr ""
3933
3934 #. type: TP
3935 #: build/C/man2/perf_event_open.2:931
3936 #, no-wrap
3937 msgid "I<bp_addr> (Since Linux 2.6.33)"
3938 msgstr "I<bp_addr> (Linux 2.6.33 以降)"
3939
3940 #. type: Plain text
3941 #: build/C/man2/perf_event_open.2:938
3942 msgid ""
3943 "I<bp_addr> address of the breakpoint.  For execution breakpoints this is the "
3944 "memory address of the instruction of interest; for read and write "
3945 "breakpoints it is the memory address of the memory location of interest."
3946 msgstr ""
3947
3948 #. type: TP
3949 #: build/C/man2/perf_event_open.2:938
3950 #, no-wrap
3951 msgid "I<config1> (Since Linux 2.6.39)"
3952 msgstr "I<config1> (Linux 2.6.39 以降)"
3953
3954 #. type: Plain text
3955 #: build/C/man2/perf_event_open.2:945
3956 msgid ""
3957 "I<config1> is used for setting events that need an extra register or "
3958 "otherwise do not fit in the regular config field.  Raw OFFCORE_EVENTS on "
3959 "Nehalem/Westmere/SandyBridge use this field on 3.3 and later kernels."
3960 msgstr ""
3961
3962 #. type: TP
3963 #: build/C/man2/perf_event_open.2:945
3964 #, no-wrap
3965 msgid "I<bp_len> (Since Linux 2.6.33)"
3966 msgstr "I<bp_len> (Linux 2.6.33 以降)"
3967
3968 #. type: Plain text
3969 #: build/C/man2/perf_event_open.2:959
3970 msgid ""
3971 "I<bp_len> is the length of the breakpoint being measured if I<type> is "
3972 "B<PERF_TYPE_BREAKPOINT>.  Options are B<HW_BREAKPOINT_LEN_1>, "
3973 "B<HW_BREAKPOINT_LEN_2>, B<HW_BREAKPOINT_LEN_4>, B<HW_BREAKPOINT_LEN_8>.  For "
3974 "an execution breakpoint, set this to I<sizeof(long)>."
3975 msgstr ""
3976
3977 #. type: TP
3978 #: build/C/man2/perf_event_open.2:959
3979 #, no-wrap
3980 msgid "I<config2> (Since Linux 2.6.39)"
3981 msgstr "I<config2> (Linux 2.6.39 以降)"
3982
3983 #. type: Plain text
3984 #: build/C/man2/perf_event_open.2:966
3985 msgid "I<config2> is a further extension of the I<config1> field."
3986 msgstr ""
3987
3988 #. type: TP
3989 #: build/C/man2/perf_event_open.2:966
3990 #, no-wrap
3991 msgid "I<branch_sample_type> (Since Linux 3.4)"
3992 msgstr ""
3993
3994 #. type: Plain text
3995 #: build/C/man2/perf_event_open.2:972
3996 msgid ""
3997 "If B<PERF_SAMPLE_BRANCH_STACK> is enabled, then this specifies what branches "
3998 "to include in the branch record."
3999 msgstr ""
4000
4001 #. type: Plain text
4002 #: build/C/man2/perf_event_open.2:978
4003 msgid ""
4004 "The first part of the value is the privilege level, which is a combination "
4005 "of one of the following values.  If the user does not set privilege level "
4006 "explicitly, the kernel will use the event's privilege level.  Event and "
4007 "branch privilege levels do not have to match."
4008 msgstr ""
4009
4010 #. type: TP
4011 #: build/C/man2/perf_event_open.2:979
4012 #, no-wrap
4013 msgid "B<PERF_SAMPLE_BRANCH_USER>"
4014 msgstr ""
4015
4016 #. type: Plain text
4017 #: build/C/man2/perf_event_open.2:982
4018 msgid "Branch target is in user space."
4019 msgstr ""
4020
4021 #. type: TP
4022 #: build/C/man2/perf_event_open.2:982
4023 #, no-wrap
4024 msgid "B<PERF_SAMPLE_BRANCH_KERNEL>"
4025 msgstr ""
4026
4027 #. type: Plain text
4028 #: build/C/man2/perf_event_open.2:985
4029 msgid "Branch target is in kernel space."
4030 msgstr ""
4031
4032 #. type: TP
4033 #: build/C/man2/perf_event_open.2:985
4034 #, no-wrap
4035 msgid "B<PERF_SAMPLE_BRANCH_HV>"
4036 msgstr ""
4037
4038 #. type: Plain text
4039 #: build/C/man2/perf_event_open.2:988
4040 msgid "Branch target is in hypervisor."
4041 msgstr ""
4042
4043 #. type: TP
4044 #: build/C/man2/perf_event_open.2:988
4045 #, no-wrap
4046 msgid "B<PERF_SAMPLE_BRANCH_PLM_ALL>"
4047 msgstr ""
4048
4049 #. type: Plain text
4050 #: build/C/man2/perf_event_open.2:991
4051 msgid "A convenience value that is the three preceding values ORed together."
4052 msgstr ""
4053
4054 #. type: Plain text
4055 #: build/C/man2/perf_event_open.2:995
4056 msgid ""
4057 "In addition to the privilege value, at least one or more of the following "
4058 "bits must be set."
4059 msgstr ""
4060
4061 #. type: TP
4062 #: build/C/man2/perf_event_open.2:996
4063 #, no-wrap
4064 msgid "B<PERF_SAMPLE_BRANCH_ANY>"
4065 msgstr ""
4066
4067 #. type: Plain text
4068 #: build/C/man2/perf_event_open.2:999
4069 msgid "Any branch type."
4070 msgstr ""
4071
4072 #. type: TP
4073 #: build/C/man2/perf_event_open.2:999
4074 #, no-wrap
4075 msgid "B<PERF_SAMPLE_BRANCH_ANY_CALL>"
4076 msgstr ""
4077
4078 #. type: Plain text
4079 #: build/C/man2/perf_event_open.2:1002
4080 msgid "Any call branch."
4081 msgstr ""
4082
4083 #. type: TP
4084 #: build/C/man2/perf_event_open.2:1002
4085 #, no-wrap
4086 msgid "B<PERF_SAMPLE_BRANCH_ANY_RETURN>"
4087 msgstr ""
4088
4089 #. type: Plain text
4090 #: build/C/man2/perf_event_open.2:1005
4091 msgid "Any return branch."
4092 msgstr ""
4093
4094 #. type: TP
4095 #: build/C/man2/perf_event_open.2:1005
4096 #, no-wrap
4097 msgid "B<PERF_SAMPLE_BRANCH_IND_CALL>"
4098 msgstr ""
4099
4100 #. type: Plain text
4101 #: build/C/man2/perf_event_open.2:1008
4102 msgid "Indirect calls."
4103 msgstr ""
4104
4105 #. type: TP
4106 #: build/C/man2/perf_event_open.2:1008
4107 #, no-wrap
4108 msgid "B<PERF_SAMPLE_BRANCH_ABORT_TX> (Since Linux 3.11)"
4109 msgstr ""
4110
4111 #. type: Plain text
4112 #: build/C/man2/perf_event_open.2:1011
4113 msgid "Transactional memory aborts."
4114 msgstr ""
4115
4116 #. type: TP
4117 #: build/C/man2/perf_event_open.2:1011
4118 #, no-wrap
4119 msgid "B<PERF_SAMPLE_BRANCH_IN_TX> (Since Linux 3.11)"
4120 msgstr ""
4121
4122 #. type: Plain text
4123 #: build/C/man2/perf_event_open.2:1014
4124 msgid "Branch in transactional memory transaction."
4125 msgstr ""
4126
4127 #. type: TP
4128 #: build/C/man2/perf_event_open.2:1014
4129 #, no-wrap
4130 msgid "B<PERF_SAMPLE_BRANCH_NO_TX> (Since Linux 3.11)"
4131 msgstr ""
4132
4133 #. type: Plain text
4134 #: build/C/man2/perf_event_open.2:1017
4135 msgid "Branch not in transactional memory transaction."
4136 msgstr ""
4137
4138 #. type: TP
4139 #: build/C/man2/perf_event_open.2:1019
4140 #, no-wrap
4141 msgid "I<sample_regs_user> (Since Linux 3.7)"
4142 msgstr ""
4143
4144 #. type: Plain text
4145 #: build/C/man2/perf_event_open.2:1025
4146 msgid ""
4147 "This bitmask defines the set of user CPU registers to dump on samples.  The "
4148 "layout of the register mask is architecture specific and described in the "
4149 "kernel header I<arch/ARCH/include/uapi/asm/perf_regs.h>."
4150 msgstr ""
4151
4152 #. type: TP
4153 #: build/C/man2/perf_event_open.2:1025
4154 #, no-wrap
4155 msgid "I<sample_stack_user> (Since Linux 3.7)"
4156 msgstr ""
4157
4158 #. type: Plain text
4159 #: build/C/man2/perf_event_open.2:1030
4160 msgid ""
4161 "This defines the size of the user stack to dump if B<PERF_SAMPLE_STACK_USER> "
4162 "is specified."
4163 msgstr ""
4164
4165 #. type: SS
4166 #: build/C/man2/perf_event_open.2:1030
4167 #, no-wrap
4168 msgid "Reading results"
4169 msgstr ""
4170
4171 #. type: Plain text
4172 #: build/C/man2/perf_event_open.2:1040
4173 msgid ""
4174 "Once a B<perf_event_open>()  file descriptor has been opened, the values of "
4175 "the events can be read from the file descriptor.  The values that are there "
4176 "are specified by the I<read_format> field in the I<attr> structure at open "
4177 "time."
4178 msgstr ""
4179
4180 #. type: Plain text
4181 #: build/C/man2/perf_event_open.2:1045
4182 msgid ""
4183 "If you attempt to read into a buffer that is not big enough to hold the data "
4184 "B<ENOSPC> is returned"
4185 msgstr ""
4186
4187 #. type: Plain text
4188 #: build/C/man2/perf_event_open.2:1047
4189 msgid "Here is the layout of the data returned by a read:"
4190 msgstr ""
4191
4192 #. type: IP
4193 #: build/C/man2/perf_event_open.2:1047 build/C/man2/perf_event_open.2:1065
4194 #: build/C/man2/ptrace.2:1619 build/C/man2/ptrace.2:1629
4195 #: build/C/man2/ptrace.2:1637 build/C/man2/ptrace.2:1643
4196 #: build/C/man2/ptrace.2:1772
4197 #, no-wrap
4198 msgid "*"
4199 msgstr ""
4200
4201 #. type: Plain text
4202 #: build/C/man2/perf_event_open.2:1051
4203 msgid ""
4204 "If B<PERF_FORMAT_GROUP> was specified to allow reading all events in a group "
4205 "at once:"
4206 msgstr ""
4207
4208 #. type: Plain text
4209 #: build/C/man2/perf_event_open.2:1063
4210 #, no-wrap
4211 msgid ""
4212 "struct read_format {\n"
4213 "    u64 nr;            /* The number of events */\n"
4214 "    u64 time_enabled;  /* if PERF_FORMAT_TOTAL_TIME_ENABLED */\n"
4215 "    u64 time_running;  /* if PERF_FORMAT_TOTAL_TIME_RUNNING */\n"
4216 "    struct\n"
4217 "        u64 value;     /* The value of the event */\n"
4218 "        u64 id;        /* if PERF_FORMAT_ID */\n"
4219 "    } values[nr];\n"
4220 "};\n"
4221 msgstr ""
4222
4223 #. type: Plain text
4224 #: build/C/man2/perf_event_open.2:1071
4225 msgid "If B<PERF_FORMAT_GROUP> was I<not> specified:"
4226 msgstr ""
4227
4228 #. type: Plain text
4229 #: build/C/man2/perf_event_open.2:1080
4230 #, no-wrap
4231 msgid ""
4232 "struct read_format {\n"
4233 "    u64 value;         /* The value of the event */\n"
4234 "    u64 time_enabled;  /* if PERF_FORMAT_TOTAL_TIME_ENABLED */\n"
4235 "    u64 time_running;  /* if PERF_FORMAT_TOTAL_TIME_RUNNING */\n"
4236 "    u64 id;            /* if PERF_FORMAT_ID */\n"
4237 "};\n"
4238 msgstr ""
4239
4240 #. type: Plain text
4241 #: build/C/man2/perf_event_open.2:1084
4242 msgid "The values read are as follows:"
4243 msgstr ""
4244
4245 #. type: TP
4246 #: build/C/man2/perf_event_open.2:1084
4247 #, no-wrap
4248 msgid "I<nr>"
4249 msgstr ""
4250
4251 #. type: Plain text
4252 #: build/C/man2/perf_event_open.2:1090
4253 msgid ""
4254 "The number of events in this file descriptor.  Only available if "
4255 "B<PERF_FORMAT_GROUP> was specified."
4256 msgstr ""
4257
4258 #. type: TP
4259 #: build/C/man2/perf_event_open.2:1090
4260 #, no-wrap
4261 msgid "I<time_enabled>, I<time_running>"
4262 msgstr ""
4263
4264 #. type: Plain text
4265 #: build/C/man2/perf_event_open.2:1102
4266 msgid ""
4267 "Total time the event was enabled and running.  Normally these are the same.  "
4268 "If more events are started than available counter slots on the PMU, then "
4269 "multiplexing happens and events run only part of the time.  In that case the "
4270 "I<time_enabled> and I<time running> values can be used to scale an estimated "
4271 "value for the count."
4272 msgstr ""
4273
4274 #. type: TP
4275 #: build/C/man2/perf_event_open.2:1102
4276 #, no-wrap
4277 msgid "I<value>"
4278 msgstr ""
4279
4280 #. type: Plain text
4281 #: build/C/man2/perf_event_open.2:1105
4282 msgid "An unsigned 64-bit value containing the counter result."
4283 msgstr ""
4284
4285 #. type: TP
4286 #: build/C/man2/perf_event_open.2:1105 build/C/man2/perf_event_open.2:1423
4287 #: build/C/man2/perf_event_open.2:1560
4288 #, no-wrap
4289 msgid "I<id>"
4290 msgstr ""
4291
4292 #. type: Plain text
4293 #: build/C/man2/perf_event_open.2:1111
4294 msgid ""
4295 "A globally unique value for this particular event, only there if "
4296 "B<PERF_FORMAT_ID> was specified in I<read_format>."
4297 msgstr ""
4298
4299 #. type: SS
4300 #: build/C/man2/perf_event_open.2:1111
4301 #, no-wrap
4302 msgid "MMAP layout"
4303 msgstr ""
4304
4305 #. type: Plain text
4306 #: build/C/man2/perf_event_open.2:1121
4307 msgid ""
4308 "When using B<perf_event_open>()  in sampled mode, asynchronous events (like "
4309 "counter overflow or B<PROT_EXEC> mmap tracking)  are logged into a ring-"
4310 "buffer.  This ring-buffer is created and accessed through B<mmap>(2)."
4311 msgstr ""
4312
4313 #. type: Plain text
4314 #: build/C/man2/perf_event_open.2:1127
4315 msgid ""
4316 "The mmap size should be 1+2^n pages, where the first page is a metadata page "
4317 "(I<struct perf_event_mmap_page>)  that contains various bits of information "
4318 "such as where the ring-buffer head is."
4319 msgstr ""
4320
4321 #. type: Plain text
4322 #: build/C/man2/perf_event_open.2:1130
4323 msgid ""
4324 "Before kernel 2.6.39, there is a bug that means you must allocate a mmap "
4325 "ring buffer when sampling even if you do not plan to access it."
4326 msgstr ""
4327
4328 #. type: Plain text
4329 #: build/C/man2/perf_event_open.2:1132
4330 msgid "The structure of the first metadata mmap page is as follows:"
4331 msgstr ""
4332
4333 #. type: Plain text
4334 #: build/C/man2/perf_event_open.2:1156
4335 #, no-wrap
4336 msgid ""
4337 "struct perf_event_mmap_page {\n"
4338 "    __u32 version;          /* version number of this structure */\n"
4339 "    __u32 compat_version;   /* lowest version this is compat with */\n"
4340 "    __u32 lock;             /* seqlock for synchronization */\n"
4341 "    __u32 index;            /* hardware counter identifier */\n"
4342 "    __s64 offset;           /* add to hardware counter value */\n"
4343 "    __u64 time_enabled;     /* time event active */\n"
4344 "    __u64 time_running;     /* time event on CPU */\n"
4345 "    union {\n"
4346 "        __u64   capabilities;\n"
4347 "        __u64   cap_usr_time  : 1,\n"
4348 "                cap_usr_rdpmc : 1,\n"
4349 "    };\n"
4350 "    __u16   pmc_width;\n"
4351 "    __u16   time_shift;\n"
4352 "    __u32   time_mult;\n"
4353 "    __u64   time_offset;\n"
4354 "    __u64   __reserved[120];   /* Pad to 1k */\n"
4355 "    __u64   data_head;         /* head in the data section */\n"
4356 "    __u64   data_tail;         /* user-space written tail */\n"
4357 "}\n"
4358 msgstr ""
4359
4360 #. type: Plain text
4361 #: build/C/man2/perf_event_open.2:1162
4362 msgid ""
4363 "The following looks at the fields in the I<perf_event_mmap_page> structure "
4364 "in more detail:"
4365 msgstr ""
4366
4367 #. type: TP
4368 #: build/C/man2/perf_event_open.2:1162
4369 #, no-wrap
4370 msgid "I<version>"
4371 msgstr ""
4372
4373 #. type: Plain text
4374 #: build/C/man2/perf_event_open.2:1165
4375 msgid "Version number of this structure."
4376 msgstr ""
4377
4378 #. type: TP
4379 #: build/C/man2/perf_event_open.2:1165
4380 #, no-wrap
4381 msgid "I<compat_version>"
4382 msgstr ""
4383
4384 #. type: Plain text
4385 #: build/C/man2/perf_event_open.2:1168
4386 msgid "The lowest version this is compatible with."
4387 msgstr ""
4388
4389 #. type: TP
4390 #: build/C/man2/perf_event_open.2:1168
4391 #, no-wrap
4392 msgid "I<lock>"
4393 msgstr ""
4394
4395 #. type: Plain text
4396 #: build/C/man2/perf_event_open.2:1171
4397 msgid "A seqlock for synchronization."
4398 msgstr ""
4399
4400 #. type: TP
4401 #: build/C/man2/perf_event_open.2:1171
4402 #, no-wrap
4403 msgid "I<index>"
4404 msgstr ""
4405
4406 #. type: Plain text
4407 #: build/C/man2/perf_event_open.2:1174
4408 msgid "A unique hardware counter identifier."
4409 msgstr ""
4410
4411 #. type: TP
4412 #: build/C/man2/perf_event_open.2:1174
4413 #, no-wrap
4414 msgid "I<offset>"
4415 msgstr ""
4416
4417 #.  FIXME clarify
4418 #. type: Plain text
4419 #: build/C/man2/perf_event_open.2:1178
4420 msgid "Add this to hardware counter value??"
4421 msgstr ""
4422
4423 #. type: TP
4424 #: build/C/man2/perf_event_open.2:1178
4425 #, no-wrap
4426 msgid "I<time_enabled>"
4427 msgstr ""
4428
4429 #. type: Plain text
4430 #: build/C/man2/perf_event_open.2:1181
4431 msgid "Time the event was active."
4432 msgstr ""
4433
4434 #. type: TP
4435 #: build/C/man2/perf_event_open.2:1181
4436 #, no-wrap
4437 msgid "I<time_running>"
4438 msgstr ""
4439
4440 #. type: Plain text
4441 #: build/C/man2/perf_event_open.2:1184
4442 msgid "Time the event was running."
4443 msgstr ""
4444
4445 #. type: TP
4446 #: build/C/man2/perf_event_open.2:1184
4447 #, no-wrap
4448 msgid "I<cap_usr_time>"
4449 msgstr ""
4450
4451 #. type: Plain text
4452 #: build/C/man2/perf_event_open.2:1187
4453 msgid "User time capability."
4454 msgstr ""
4455
4456 #. type: TP
4457 #: build/C/man2/perf_event_open.2:1187
4458 #, no-wrap
4459 msgid "I<cap_usr_rdpmc>"
4460 msgstr ""
4461
4462 #. type: Plain text
4463 #: build/C/man2/perf_event_open.2:1192
4464 msgid ""
4465 "If the hardware supports user-space read of performance counters without "
4466 "syscall (this is the \"rdpmc\" instruction on x86), then the following code "
4467 "can be used to do a read:"
4468 msgstr ""
4469
4470 #. type: Plain text
4471 #: build/C/man2/perf_event_open.2:1199
4472 #, no-wrap
4473 msgid ""
4474 "u32 seq, time_mult, time_shift, idx, width;\n"
4475 "u64 count, enabled, running;\n"
4476 "u64 cyc, time_offset;\n"
4477 "s64 pmc = 0;\n"
4478 msgstr ""
4479
4480 #. type: Plain text
4481 #: build/C/man2/perf_event_open.2:1205
4482 #, no-wrap
4483 msgid ""
4484 "do {\n"
4485 "    seq = pc-E<gt>lock;\n"
4486 "    barrier();\n"
4487 "    enabled = pc-E<gt>time_enabled;\n"
4488 "    running = pc-E<gt>time_running;\n"
4489 msgstr ""
4490
4491 #. type: Plain text
4492 #: build/C/man2/perf_event_open.2:1212
4493 #, no-wrap
4494 msgid ""
4495 "    if (pc-E<gt>cap_usr_time && enabled != running) {\n"
4496 "        cyc = rdtsc();\n"
4497 "        time_offset = pc-E<gt>time_offset;\n"
4498 "        time_mult   = pc-E<gt>time_mult;\n"
4499 "        time_shift  = pc-E<gt>time_shift;\n"
4500 "    }\n"
4501 msgstr ""
4502
4503 #. type: Plain text
4504 #: build/C/man2/perf_event_open.2:1215
4505 #, no-wrap
4506 msgid ""
4507 "    idx = pc-E<gt>index;\n"
4508 "    count = pc-E<gt>offset;\n"
4509 msgstr ""
4510
4511 #. type: Plain text
4512 #: build/C/man2/perf_event_open.2:1220
4513 #, no-wrap
4514 msgid ""
4515 "    if (pc-E<gt>cap_usr_rdpmc && idx) {\n"
4516 "        width = pc-E<gt>pmc_width;\n"
4517 "        pmc = rdpmc(idx - 1);\n"
4518 "    }\n"
4519 msgstr ""
4520
4521 #. type: Plain text
4522 #: build/C/man2/perf_event_open.2:1223
4523 #, no-wrap
4524 msgid ""
4525 "    barrier();\n"
4526 "} while (pc-E<gt>lock != seq);\n"
4527 msgstr ""
4528
4529 #. type: TP
4530 #: build/C/man2/perf_event_open.2:1225
4531 #, no-wrap
4532 msgid "I<pmc_width>"
4533 msgstr ""
4534
4535 #. type: Plain text
4536 #: build/C/man2/perf_event_open.2:1232
4537 msgid ""
4538 "If I<cap_usr_rdpmc>, this field provides the bit-width of the value read "
4539 "using the rdpmc or equivalent instruction.  This can be used to sign extend "
4540 "the result like:"
4541 msgstr ""
4542
4543 #. type: Plain text
4544 #: build/C/man2/perf_event_open.2:1238
4545 #, no-wrap
4546 msgid ""
4547 "pmc E<lt>E<lt>= 64 - pmc_width;\n"
4548 "pmc E<gt>E<gt>= 64 - pmc_width; // signed shift right\n"
4549 "count += pmc;\n"
4550 msgstr ""
4551
4552 #. type: TP
4553 #: build/C/man2/perf_event_open.2:1240
4554 #, no-wrap
4555 msgid "I<time_shift>, I<time_mult>, I<time_offset>"
4556 msgstr ""
4557
4558 #. type: Plain text
4559 #: build/C/man2/perf_event_open.2:1247
4560 msgid ""
4561 "If I<cap_usr_time>, these fields can be used to compute the time delta since "
4562 "time_enabled (in nanoseconds) using rdtsc or similar."
4563 msgstr ""
4564
4565 #. type: Plain text
4566 #: build/C/man2/perf_event_open.2:1255
4567 #, no-wrap
4568 msgid ""
4569 "    u64 quot, rem;\n"
4570 "    u64 delta;\n"
4571 "    quot = (cyc E<gt>E<gt> time_shift);\n"
4572 "    rem = cyc & ((1 E<lt>E<lt> time_shift) - 1);\n"
4573 "    delta = time_offset + quot * time_mult +\n"
4574 "            ((rem * time_mult) E<gt>E<gt> time_shift);\n"
4575 msgstr ""
4576
4577 #. type: Plain text
4578 #: build/C/man2/perf_event_open.2:1267
4579 msgid ""
4580 "Where I<time_offset>, I<time_mult>, I<time_shift>, and I<cyc> are read in "
4581 "the seqcount loop described above.  This delta can then be added to enabled "
4582 "and possible running (if idx), improving the scaling:"
4583 msgstr ""
4584
4585 #. type: Plain text
4586 #: build/C/man2/perf_event_open.2:1275
4587 #, no-wrap
4588 msgid ""
4589 "    enabled += delta;\n"
4590 "    if (idx)\n"
4591 "        running += delta;\n"
4592 "    quot = count / running;\n"
4593 "    rem  = count % running;\n"
4594 "    count = quot * enabled + (rem * enabled) / running;\n"
4595 msgstr ""
4596
4597 #. type: TP
4598 #: build/C/man2/perf_event_open.2:1276
4599 #, no-wrap
4600 msgid "I<data_head>"
4601 msgstr ""
4602
4603 #. type: Plain text
4604 #: build/C/man2/perf_event_open.2:1282
4605 msgid ""
4606 "This points to the head of the data section.  The value continuously "
4607 "increases, it does not wrap.  The value needs to be manually wrapped by the "
4608 "size of the mmap buffer before accessing the samples."
4609 msgstr ""
4610
4611 #. type: Plain text
4612 #: build/C/man2/perf_event_open.2:1285
4613 msgid ""
4614 "On SMP-capable platforms, after reading the data_head value, user space "
4615 "should issue an rmb()."
4616 msgstr ""
4617
4618 #. type: TP
4619 #: build/C/man2/perf_event_open.2:1285
4620 #, no-wrap
4621 msgid "I<data_tail;>"
4622 msgstr ""
4623
4624 #. type: Plain text
4625 #: build/C/man2/perf_event_open.2:1293
4626 msgid ""
4627 "When the mapping is B<PROT_WRITE>, the I<data_tail> value should be written "
4628 "by user space to reflect the last read data.  In this case the kernel will "
4629 "not over-write unread data."
4630 msgstr ""
4631
4632 #. type: Plain text
4633 #: build/C/man2/perf_event_open.2:1295
4634 msgid "The following 2^n ring-buffer pages have the layout described below."
4635 msgstr ""
4636
4637 #. type: Plain text
4638 #: build/C/man2/perf_event_open.2:1309
4639 msgid ""
4640 "If I<perf_event_attr.sample_id_all> is set, then all event types will have "
4641 "the sample_type selected fields related to where/when (identity)  an event "
4642 "took place (TID, TIME, ID, CPU, STREAM_ID) described in "
4643 "B<PERF_RECORD_SAMPLE> below, it will be stashed just after the "
4644 "I<perf_event_header> and the fields already present for the existing fields, "
4645 "that is, at the end of the payload.  That way a newer perf.data file will be "
4646 "supported by older perf tools, with these new optional fields being ignored."
4647 msgstr ""
4648
4649 #. type: Plain text
4650 #: build/C/man2/perf_event_open.2:1311
4651 msgid "The mmap values start with a header:"
4652 msgstr ""
4653
4654 #. type: Plain text
4655 #: build/C/man2/perf_event_open.2:1319
4656 #, no-wrap
4657 msgid ""
4658 "struct perf_event_header {\n"
4659 "    __u32   type;\n"
4660 "    __u16   misc;\n"
4661 "    __u16   size;\n"
4662 "};\n"
4663 msgstr ""
4664
4665 #. type: Plain text
4666 #: build/C/man2/perf_event_open.2:1327
4667 msgid ""
4668 "Below, we describe the I<perf_event_header> fields in more detail.  For ease "
4669 "of reading, the fields with shorter descriptions are presented first."
4670 msgstr ""
4671
4672 #. type: Plain text
4673 #: build/C/man2/perf_event_open.2:1330
4674 msgid "This indicates the size of the record."
4675 msgstr ""
4676
4677 #. type: TP
4678 #: build/C/man2/perf_event_open.2:1330
4679 #, no-wrap
4680 msgid "I<misc>"
4681 msgstr ""
4682
4683 #. type: Plain text
4684 #: build/C/man2/perf_event_open.2:1335
4685 msgid "The I<misc> field contains additional information about the sample."
4686 msgstr ""
4687
4688 #. type: Plain text
4689 #: build/C/man2/perf_event_open.2:1340
4690 msgid ""
4691 "The CPU mode can be determined from this value by masking with "
4692 "B<PERF_RECORD_MISC_CPUMODE_MASK> and looking for one of the following (note "
4693 "these are not bit masks, only one can be set at a time):"
4694 msgstr ""
4695
4696 #. type: TP
4697 #: build/C/man2/perf_event_open.2:1341
4698 #, no-wrap
4699 msgid "B<PERF_RECORD_MISC_CPUMODE_UNKNOWN>"
4700 msgstr ""
4701
4702 #. type: Plain text
4703 #: build/C/man2/perf_event_open.2:1344
4704 msgid "Unknown CPU mode."
4705 msgstr ""
4706
4707 #. type: TP
4708 #: build/C/man2/perf_event_open.2:1344
4709 #, no-wrap
4710 msgid "B<PERF_RECORD_MISC_KERNEL>"
4711 msgstr ""
4712
4713 #. type: Plain text
4714 #: build/C/man2/perf_event_open.2:1347
4715 msgid "Sample happened in the kernel."
4716 msgstr ""
4717
4718 #. type: TP
4719 #: build/C/man2/perf_event_open.2:1347
4720 #, no-wrap
4721 msgid "B<PERF_RECORD_MISC_USER>"
4722 msgstr ""
4723
4724 #. type: Plain text
4725 #: build/C/man2/perf_event_open.2:1350
4726 msgid "Sample happened in user code."
4727 msgstr ""
4728
4729 #. type: TP
4730 #: build/C/man2/perf_event_open.2:1350
4731 #, no-wrap
4732 msgid "B<PERF_RECORD_MISC_HYPERVISOR>"
4733 msgstr ""
4734
4735 #. type: Plain text
4736 #: build/C/man2/perf_event_open.2:1353
4737 msgid "Sample happened in the hypervisor."
4738 msgstr ""
4739
4740 #. type: TP
4741 #: build/C/man2/perf_event_open.2:1353
4742 #, no-wrap
4743 msgid "B<PERF_RECORD_MISC_GUEST_KERNEL>"
4744 msgstr ""
4745
4746 #. type: Plain text
4747 #: build/C/man2/perf_event_open.2:1356
4748 msgid "Sample happened in the guest kernel."
4749 msgstr ""
4750
4751 #. type: TP
4752 #: build/C/man2/perf_event_open.2:1356
4753 #, no-wrap
4754 msgid "B<PERF_RECORD_MISC_GUEST_USER>"
4755 msgstr ""
4756
4757 #. type: Plain text
4758 #: build/C/man2/perf_event_open.2:1359
4759 msgid "Sample happened in guest user code."
4760 msgstr ""
4761
4762 #. type: Plain text
4763 #: build/C/man2/perf_event_open.2:1363
4764 msgid "In addition, one of the following bits can be set:"
4765 msgstr ""
4766
4767 #. type: TP
4768 #: build/C/man2/perf_event_open.2:1363
4769 #, no-wrap
4770 msgid "B<PERF_RECORD_MISC_MMAP_DATA>"
4771 msgstr "B<PERF_RECORD_MISC_MMAP_DATA>"
4772
4773 #. type: Plain text
4774 #: build/C/man2/perf_event_open.2:1367
4775 msgid ""
4776 "This is set when the mapping is not executable; otherwise the mapping is "
4777 "executable."
4778 msgstr ""
4779
4780 #. type: TP
4781 #: build/C/man2/perf_event_open.2:1367
4782 #, no-wrap
4783 msgid "B<PERF_RECORD_MISC_EXACT_IP>"
4784 msgstr ""
4785
4786 #. type: Plain text
4787 #: build/C/man2/perf_event_open.2:1375
4788 msgid ""
4789 "This indicates that the content of B<PERF_SAMPLE_IP> points to the actual "
4790 "instruction that triggered the event.  See also I<perf_event_attr."
4791 "precise_ip>."
4792 msgstr ""
4793
4794 #. type: TP
4795 #: build/C/man2/perf_event_open.2:1375
4796 #, no-wrap
4797 msgid "B<PERF_RECORD_MISC_EXT_RESERVED>"
4798 msgstr ""
4799
4800 #. type: Plain text
4801 #: build/C/man2/perf_event_open.2:1378
4802 msgid "This indicates there is extended data available (currently not used)."
4803 msgstr ""
4804
4805 #. type: Plain text
4806 #: build/C/man2/perf_event_open.2:1388
4807 msgid ""
4808 "The I<type> value is one of the below.  The values in the corresponding "
4809 "record (that follows the header)  depend on the I<type> selected as shown."
4810 msgstr ""
4811
4812 #. type: TP
4813 #: build/C/man2/perf_event_open.2:1389
4814 #, no-wrap
4815 msgid "B<PERF_RECORD_MMAP>"
4816 msgstr ""
4817
4818 #. type: Plain text
4819 #: build/C/man2/perf_event_open.2:1396
4820 msgid ""
4821 "The MMAP events record the B<PROT_EXEC> mappings so that we can correlate "
4822 "user-space IPs to code.  They have the following structure:"
4823 msgstr ""
4824
4825 #. type: Plain text
4826 #: build/C/man2/perf_event_open.2:1407
4827 #, no-wrap
4828 msgid ""
4829 "struct {\n"
4830 "    struct perf_event_header header;\n"
4831 "    u32    pid, tid;\n"
4832 "    u64    addr;\n"
4833 "    u64    len;\n"
4834 "    u64    pgoff;\n"
4835 "    char   filename[];\n"
4836 "};\n"
4837 msgstr ""
4838
4839 #. type: TP
4840 #: build/C/man2/perf_event_open.2:1409
4841 #, no-wrap
4842 msgid "B<PERF_RECORD_LOST>"
4843 msgstr ""
4844
4845 #. type: Plain text
4846 #: build/C/man2/perf_event_open.2:1412
4847 msgid "This record indicates when events are lost."
4848 msgstr ""
4849
4850 #. type: Plain text
4851 #: build/C/man2/perf_event_open.2:1420
4852 #, no-wrap
4853 msgid ""
4854 "struct {\n"
4855 "    struct perf_event_header header;\n"
4856 "    u64 id;\n"
4857 "    u64 lost;\n"
4858 "};\n"
4859 msgstr ""
4860
4861 #. type: Plain text
4862 #: build/C/man2/perf_event_open.2:1426
4863 msgid "is the unique event ID for the samples that were lost."
4864 msgstr ""
4865
4866 #. type: TP
4867 #: build/C/man2/perf_event_open.2:1426
4868 #, no-wrap
4869 msgid "I<lost>"
4870 msgstr ""
4871
4872 #. type: Plain text
4873 #: build/C/man2/perf_event_open.2:1429
4874 msgid "is the number of events that were lost."
4875 msgstr ""
4876
4877 #. type: TP
4878 #: build/C/man2/perf_event_open.2:1430
4879 #, no-wrap
4880 msgid "B<PERF_RECORD_COMM>"
4881 msgstr ""
4882
4883 #. type: Plain text
4884 #: build/C/man2/perf_event_open.2:1433
4885 msgid "This record indicates a change in the process name."
4886 msgstr ""
4887
4888 #. type: Plain text
4889 #: build/C/man2/perf_event_open.2:1441
4890 #, no-wrap
4891 msgid ""
4892 "struct {\n"
4893 "    struct perf_event_header header;\n"
4894 "    u32 pid, tid;\n"
4895 "    char comm[];\n"
4896 "};\n"
4897 msgstr ""
4898
4899 #. type: TP
4900 #: build/C/man2/perf_event_open.2:1443
4901 #, no-wrap
4902 msgid "B<PERF_RECORD_EXIT>"
4903 msgstr "B<PERF_RECORD_EXIT>"
4904
4905 #. type: Plain text
4906 #: build/C/man2/perf_event_open.2:1446
4907 msgid "This record indicates a process exit event."
4908 msgstr ""
4909
4910 #. type: Plain text
4911 #: build/C/man2/perf_event_open.2:1455 build/C/man2/perf_event_open.2:1483
4912 #, no-wrap
4913 msgid ""
4914 "struct {\n"
4915 "    struct perf_event_header header;\n"
4916 "    u32 pid, ppid;\n"
4917 "    u32 tid, ptid;\n"
4918 "    u64 time;\n"
4919 "};\n"
4920 msgstr ""
4921
4922 #. type: TP
4923 #: build/C/man2/perf_event_open.2:1457
4924 #, no-wrap
4925 msgid "B<PERF_RECORD_THROTTLE>, B<PERF_RECORD_UNTHROTTLE>"
4926 msgstr ""
4927
4928 #. type: Plain text
4929 #: build/C/man2/perf_event_open.2:1460
4930 msgid "This record indicates a throttle/unthrottle event."
4931 msgstr ""
4932
4933 #. type: Plain text
4934 #: build/C/man2/perf_event_open.2:1469
4935 #, no-wrap
4936 msgid ""
4937 "struct {\n"
4938 "    struct perf_event_header header;\n"
4939 "    u64 time;\n"
4940 "    u64 id;\n"
4941 "    u64 stream_id;\n"
4942 "};\n"
4943 msgstr ""
4944
4945 #. type: TP
4946 #: build/C/man2/perf_event_open.2:1471
4947 #, no-wrap
4948 msgid "B<PERF_RECORD_FORK>"
4949 msgstr "B<PERF_RECORD_FORK>"
4950
4951 #. type: Plain text
4952 #: build/C/man2/perf_event_open.2:1474
4953 msgid "This record indicates a fork event."
4954 msgstr ""
4955
4956 #. type: TP
4957 #: build/C/man2/perf_event_open.2:1485
4958 #, no-wrap
4959 msgid "B<PERF_RECORD_READ>"
4960 msgstr ""
4961
4962 #. type: Plain text
4963 #: build/C/man2/perf_event_open.2:1488
4964 msgid "This record indicates a read event."
4965 msgstr ""
4966
4967 #. type: Plain text
4968 #: build/C/man2/perf_event_open.2:1496
4969 #, no-wrap
4970 msgid ""
4971 "struct {\n"
4972 "    struct perf_event_header header;\n"
4973 "    u32 pid, tid;\n"
4974 "    struct read_format values;\n"
4975 "};\n"
4976 msgstr ""
4977
4978 #. type: TP
4979 #: build/C/man2/perf_event_open.2:1498
4980 #, no-wrap
4981 msgid "B<PERF_RECORD_SAMPLE>"
4982 msgstr ""
4983
4984 #. type: Plain text
4985 #: build/C/man2/perf_event_open.2:1501
4986 msgid "This record indicates a sample."
4987 msgstr ""
4988
4989 #. type: Plain text
4990 #: build/C/man2/perf_event_open.2:1531
4991 #, no-wrap
4992 msgid ""
4993 "struct {\n"
4994 "    struct perf_event_header header;\n"
4995 "    u64   ip;         /* if PERF_SAMPLE_IP */\n"
4996 "    u32   pid, tid;   /* if PERF_SAMPLE_TID */\n"
4997 "    u64   time;       /* if PERF_SAMPLE_TIME */\n"
4998 "    u64   addr;       /* if PERF_SAMPLE_ADDR */\n"
4999 "    u64   id;         /* if PERF_SAMPLE_ID */\n"
5000 "    u64   stream_id;  /* if PERF_SAMPLE_STREAM_ID */\n"
5001 "    u32   cpu, res;   /* if PERF_SAMPLE_CPU */\n"
5002 "    u64   period;     /* if PERF_SAMPLE_PERIOD */\n"
5003 "    struct read_format v; /* if PERF_SAMPLE_READ */\n"
5004 "    u64   nr;         /* if PERF_SAMPLE_CALLCHAIN */\n"
5005 "    u64   ips[nr];    /* if PERF_SAMPLE_CALLCHAIN */\n"
5006 "    u32   size;       /* if PERF_SAMPLE_RAW */\n"
5007 "    char  data[size]; /* if PERF_SAMPLE_RAW */\n"
5008 "    u64   bnr;        /* if PERF_SAMPLE_BRANCH_STACK */\n"
5009 "    struct perf_branch_entry lbr[bnr];\n"
5010 "                      /* if PERF_SAMPLE_BRANCH_STACK */\n"
5011 "    u64   abi;        /* if PERF_SAMPLE_REGS_USER */\n"
5012 "    u64   regs[weight(mask)];\n"
5013 "                      /* if PERF_SAMPLE_REGS_USER */\n"
5014 "    u64   size;       /* if PERF_SAMPLE_STACK_USER */\n"
5015 "    char  data[size]; /* if PERF_SAMPLE_STACK_USER */\n"
5016 "    u64   dyn_size;   /* if PERF_SAMPLE_STACK_USER */\n"
5017 "    u64   weight;     /* if PERF_SAMPLE_WEIGHT */\n"
5018 "    u64   data_src;   /* if PERF_SAMPLE_DATA_SRC */\n"
5019 "};\n"
5020 msgstr ""
5021
5022 #. type: TP
5023 #: build/C/man2/perf_event_open.2:1533
5024 #, no-wrap
5025 msgid "I<ip>"
5026 msgstr ""
5027
5028 #. type: Plain text
5029 #: build/C/man2/perf_event_open.2:1539
5030 msgid ""
5031 "If B<PERF_SAMPLE_IP> is enabled, then a 64-bit instruction pointer value is "
5032 "included."
5033 msgstr ""
5034
5035 #. type: TP
5036 #: build/C/man2/perf_event_open.2:1539
5037 #, no-wrap
5038 msgid "I<pid>, I<tid>"
5039 msgstr ""
5040
5041 #. type: Plain text
5042 #: build/C/man2/perf_event_open.2:1545
5043 msgid ""
5044 "If B<PERF_SAMPLE_TID> is enabled, then a 32-bit process ID and 32-bit thread "
5045 "ID are included."
5046 msgstr ""
5047
5048 #. type: TP
5049 #: build/C/man2/perf_event_open.2:1545
5050 #, no-wrap
5051 msgid "I<time>"
5052 msgstr ""
5053
5054 #. type: Plain text
5055 #: build/C/man2/perf_event_open.2:1553
5056 msgid ""
5057 "If B<PERF_SAMPLE_TIME> is enabled, then a 64-bit timestamp is included.  "
5058 "This is obtained via local_clock() which is a hardware timestamp if "
5059 "available and the jiffies value if not."
5060 msgstr ""
5061
5062 #. type: TP
5063 #: build/C/man2/perf_event_open.2:1553
5064 #, no-wrap
5065 msgid "I<addr>"
5066 msgstr ""
5067
5068 #. type: Plain text
5069 #: build/C/man2/perf_event_open.2:1560
5070 msgid ""
5071 "If B<PERF_SAMPLE_ADDR> is enabled, then a 64-bit address is included.  This "
5072 "is usually the address of a tracepoint, breakpoint, or software event; "
5073 "otherwise the value is 0."
5074 msgstr ""
5075
5076 #. type: Plain text
5077 #: build/C/man2/perf_event_open.2:1568
5078 msgid ""
5079 "If B<PERF_SAMPLE_ID> is enabled, a 64-bit unique ID is included.  If the "
5080 "event is a member of an event group, the group leader ID is returned.  This "
5081 "ID is the same as the one returned by B<PERF_FORMAT_ID>."
5082 msgstr ""
5083
5084 #. type: TP
5085 #: build/C/man2/perf_event_open.2:1568
5086 #, no-wrap
5087 msgid "I<stream_id>"
5088 msgstr ""
5089
5090 #. type: Plain text
5091 #: build/C/man2/perf_event_open.2:1578
5092 msgid ""
5093 "If B<PERF_SAMPLE_STREAM_ID> is enabled, a 64-bit unique ID is included.  "
5094 "Unlike B<PERF_SAMPLE_ID> the actual ID is returned, not the group leader.  "
5095 "This ID is the same as the one returned by B<PERF_FORMAT_ID>."
5096 msgstr ""
5097
5098 #. type: TP
5099 #: build/C/man2/perf_event_open.2:1578
5100 #, no-wrap
5101 msgid "I<cpu>, I<res>"
5102 msgstr ""
5103
5104 #. type: Plain text
5105 #: build/C/man2/perf_event_open.2:1585
5106 msgid ""
5107 "If B<PERF_SAMPLE_CPU> is enabled, this is a 32-bit value indicating which "
5108 "CPU was being used, in addition to a reserved (unused)  32-bit value."
5109 msgstr ""
5110
5111 #. type: TP
5112 #: build/C/man2/perf_event_open.2:1585
5113 #, no-wrap
5114 msgid "I<period>"
5115 msgstr ""
5116
5117 #. type: Plain text
5118 #: build/C/man2/perf_event_open.2:1591
5119 msgid ""
5120 "If B<PERF_SAMPLE_PERIOD> is enabled, a 64-bit value indicating the current "
5121 "sampling period is written."
5122 msgstr ""
5123
5124 #. type: TP
5125 #: build/C/man2/perf_event_open.2:1591
5126 #, no-wrap
5127 msgid "I<v>"
5128 msgstr ""
5129
5130 #. type: Plain text
5131 #: build/C/man2/perf_event_open.2:1602
5132 msgid ""
5133 "If B<PERF_SAMPLE_READ> is enabled, a structure of type read_format is "
5134 "included which has values for all events in the event group.  The values "
5135 "included depend on the I<read_format> value used at B<perf_event_open>()  "
5136 "time."
5137 msgstr ""
5138
5139 #. type: TP
5140 #: build/C/man2/perf_event_open.2:1602
5141 #, no-wrap
5142 msgid "I<nr>, I<ips[nr]>"
5143 msgstr ""
5144
5145 #. type: Plain text
5146 #: build/C/man2/perf_event_open.2:1610
5147 msgid ""
5148 "If B<PERF_SAMPLE_CALLCHAIN> is enabled, then a 64-bit number is included "
5149 "which indicates how many following 64-bit instruction pointers will follow.  "
5150 "This is the current callchain."
5151 msgstr ""
5152
5153 #. type: TP
5154 #: build/C/man2/perf_event_open.2:1610
5155 #, no-wrap
5156 msgid "I<size>, I<data[size]>"
5157 msgstr ""
5158
5159 #. type: Plain text
5160 #: build/C/man2/perf_event_open.2:1617
5161 msgid ""
5162 "If B<PERF_SAMPLE_RAW> is enabled, then a 32-bit value indicating size is "
5163 "included followed by an array of 8-bit values of length size.  The values "
5164 "are padded with 0 to have 64-bit alignment."
5165 msgstr ""
5166
5167 #. type: Plain text
5168 #: build/C/man2/perf_event_open.2:1622
5169 msgid ""
5170 "This RAW record data is opaque with respect to the ABI.  The ABI doesn't "
5171 "make any promises with respect to the stability of its content, it may vary "
5172 "depending on event, hardware, and kernel version."
5173 msgstr ""
5174
5175 #. type: TP
5176 #: build/C/man2/perf_event_open.2:1622
5177 #, no-wrap
5178 msgid "I<bnr>, I<lbr[bnr]>"
5179 msgstr ""
5180
5181 #. type: Plain text
5182 #: build/C/man2/perf_event_open.2:1631
5183 msgid ""
5184 "If B<PERF_SAMPLE_BRANCH_STACK> is enabled, then a 64-bit value indicating "
5185 "the number of records is included, followed by I<bnr> I<perf_branch_entry> "
5186 "structures which each include the fields:"
5187 msgstr ""
5188
5189 #. type: TP
5190 #: build/C/man2/perf_event_open.2:1632
5191 #, no-wrap
5192 msgid "I<from>"
5193 msgstr ""
5194
5195 #. type: Plain text
5196 #: build/C/man2/perf_event_open.2:1635
5197 msgid "This indicates the source instruction (may not be a branch)."
5198 msgstr ""
5199
5200 #. type: TP
5201 #: build/C/man2/perf_event_open.2:1635
5202 #, no-wrap
5203 msgid "I<to>"
5204 msgstr ""
5205
5206 #. type: Plain text
5207 #: build/C/man2/perf_event_open.2:1638
5208 msgid "The branch target."
5209 msgstr ""
5210
5211 #. type: TP
5212 #: build/C/man2/perf_event_open.2:1638
5213 #, no-wrap
5214 msgid "I<mispred>"
5215 msgstr ""
5216
5217 #. type: Plain text
5218 #: build/C/man2/perf_event_open.2:1641
5219 msgid "The branch target was mispredicted."
5220 msgstr ""
5221
5222 #. type: TP
5223 #: build/C/man2/perf_event_open.2:1641
5224 #, no-wrap
5225 msgid "I<predicted>"
5226 msgstr ""
5227
5228 #. type: Plain text
5229 #: build/C/man2/perf_event_open.2:1644
5230 msgid "The branch target was predicted."
5231 msgstr ""
5232
5233 #. type: TP
5234 #: build/C/man2/perf_event_open.2:1644
5235 #, no-wrap
5236 msgid "I<in_tx> (Since Linux 3.11)"
5237 msgstr ""
5238
5239 #. type: Plain text
5240 #: build/C/man2/perf_event_open.2:1647
5241 msgid "The branch was in a transactional memory transaction."
5242 msgstr ""
5243
5244 #. type: TP
5245 #: build/C/man2/perf_event_open.2:1647
5246 #, no-wrap
5247 msgid "I<abort> (Since Linux 3.11)"
5248 msgstr ""
5249
5250 #. type: Plain text
5251 #: build/C/man2/perf_event_open.2:1650
5252 msgid "The branch was in an aborted transactional memory transaction."
5253 msgstr ""
5254
5255 #. type: Plain text
5256 #: build/C/man2/perf_event_open.2:1654
5257 msgid ""
5258 "The entries are from most to least recent, so the first entry has the most "
5259 "recent branch."
5260 msgstr ""
5261
5262 #. type: Plain text
5263 #: build/C/man2/perf_event_open.2:1661
5264 msgid ""
5265 "Support for I<mispred> and I<predicted> is optional; if not supported, both "
5266 "values will be 0."
5267 msgstr ""
5268
5269 #. type: Plain text
5270 #: build/C/man2/perf_event_open.2:1665
5271 msgid ""
5272 "The type of branches recorded is specified by the I<branch_sample_type> "
5273 "field."
5274 msgstr ""
5275
5276 #. type: TP
5277 #: build/C/man2/perf_event_open.2:1667
5278 #, no-wrap
5279 msgid "I<abi>, I<regs[weight(mask)]>"
5280 msgstr ""
5281
5282 #. type: Plain text
5283 #: build/C/man2/perf_event_open.2:1672
5284 msgid ""
5285 "If B<PERF_SAMPLE_REGS_USER> is enabled, then the user CPU registers are "
5286 "recorded."
5287 msgstr ""
5288
5289 #. type: Plain text
5290 #: build/C/man2/perf_event_open.2:1678
5291 msgid ""
5292 "The I<abi> field is one of B<PERF_SAMPLE_REGS_ABI_NONE>, "
5293 "B<PERF_SAMPLE_REGS_ABI_32> or B<PERF_SAMPLE_REGS_ABI_64>."
5294 msgstr ""
5295
5296 #. type: Plain text
5297 #: build/C/man2/perf_event_open.2:1688
5298 msgid ""
5299 "The I<regs> field is an array of the CPU registers that were specified by "
5300 "the I<sample_regs_user> attr field.  The number of values is the number of "
5301 "bits set in the I<sample_regs_user> bitmask."
5302 msgstr ""
5303
5304 #. type: TP
5305 #: build/C/man2/perf_event_open.2:1688
5306 #, no-wrap
5307 msgid "I<size>, I<data[size]>, I<dyn_size>"
5308 msgstr ""
5309
5310 #. type: Plain text
5311 #: build/C/man2/perf_event_open.2:1702
5312 msgid ""
5313 "If B<PERF_SAMPLE_STACK_USER> is enabled, then record the user stack to "
5314 "enable backtracing.  I<size> is the size requested by the user in "
5315 "I<stack_user_size> or else the maximum record size.  I<data> is the stack "
5316 "data.  I<dyn_size> is the amount of data actually dumped (can be less than "
5317 "I<size>)."
5318 msgstr ""
5319
5320 #. type: TP
5321 #: build/C/man2/perf_event_open.2:1702
5322 #, no-wrap
5323 msgid "I<weight>"
5324 msgstr ""
5325
5326 #. type: Plain text
5327 #: build/C/man2/perf_event_open.2:1710
5328 msgid ""
5329 "If B<PERF_SAMPLE_WEIGHT> is enabled, then a 64 bit value provided by the "
5330 "hardware is recorded that indicates how costly the event was.  This allows "
5331 "expensive events to stand out more clearly in profiles."
5332 msgstr ""
5333
5334 #. type: TP
5335 #: build/C/man2/perf_event_open.2:1710
5336 #, no-wrap
5337 msgid "I<data_src>"
5338 msgstr ""
5339
5340 #. type: Plain text
5341 #: build/C/man2/perf_event_open.2:1716
5342 msgid ""
5343 "If B<PERF_SAMPLE_DATA_SRC> is enabled, then a 64 bit value is recorded that "
5344 "is made up of the following fields:"
5345 msgstr ""
5346
5347 #. type: TP
5348 #: build/C/man2/perf_event_open.2:1717
5349 #, no-wrap
5350 msgid "I<mem_op>"
5351 msgstr ""
5352
5353 #. type: Plain text
5354 #: build/C/man2/perf_event_open.2:1720
5355 msgid "Type of opcode, a bitwise combination of:"
5356 msgstr ""
5357
5358 #. type: TP
5359 #: build/C/man2/perf_event_open.2:1723
5360 #, no-wrap
5361 msgid "B<PERF_MEM_OP_NA>"
5362 msgstr ""
5363
5364 #. type: Plain text
5365 #: build/C/man2/perf_event_open.2:1726 build/C/man2/perf_event_open.2:1749
5366 #: build/C/man2/perf_event_open.2:1799 build/C/man2/perf_event_open.2:1822
5367 #: build/C/man2/perf_event_open.2:1836
5368 msgid "Not available"
5369 msgstr ""
5370
5371 #. type: TP
5372 #: build/C/man2/perf_event_open.2:1726
5373 #, no-wrap
5374 msgid "B<PERF_MEM_OP_LOAD>"
5375 msgstr ""
5376
5377 #. type: Plain text
5378 #: build/C/man2/perf_event_open.2:1729
5379 msgid "Load instruction"
5380 msgstr ""
5381
5382 #. type: TP
5383 #: build/C/man2/perf_event_open.2:1729
5384 #, no-wrap
5385 msgid "B<PERF_MEM_OP_STORE>"
5386 msgstr ""
5387
5388 #. type: Plain text
5389 #: build/C/man2/perf_event_open.2:1732
5390 msgid "Store instruction"
5391 msgstr ""
5392
5393 #. type: TP
5394 #: build/C/man2/perf_event_open.2:1732
5395 #, no-wrap
5396 msgid "B<PERF_MEM_OP_PFETCH>"
5397 msgstr ""
5398
5399 #. type: Plain text
5400 #: build/C/man2/perf_event_open.2:1735
5401 msgid "Prefetch"
5402 msgstr ""
5403
5404 #. type: TP
5405 #: build/C/man2/perf_event_open.2:1735
5406 #, no-wrap
5407 msgid "B<PERF_MEM_OP_EXEC>"
5408 msgstr ""
5409
5410 #. type: Plain text
5411 #: build/C/man2/perf_event_open.2:1738
5412 msgid "Executable code"
5413 msgstr ""
5414
5415 #. type: TP
5416 #: build/C/man2/perf_event_open.2:1740
5417 #, no-wrap
5418 msgid "I<mem_lvl>"
5419 msgstr ""
5420
5421 #. type: Plain text
5422 #: build/C/man2/perf_event_open.2:1743
5423 msgid "Memory hierarchy level hit or miss, a bitwise combination of:"
5424 msgstr ""
5425
5426 #. type: TP
5427 #: build/C/man2/perf_event_open.2:1746
5428 #, no-wrap
5429 msgid "B<PERF_MEM_LVL_NA>"
5430 msgstr ""
5431
5432 #. type: TP
5433 #: build/C/man2/perf_event_open.2:1749
5434 #, no-wrap
5435 msgid "B<PERF_MEM_LVL_HIT>"
5436 msgstr ""
5437
5438 #. type: Plain text
5439 #: build/C/man2/perf_event_open.2:1752 build/C/man2/perf_event_open.2:1839
5440 msgid "Hit"
5441 msgstr ""
5442
5443 #. type: TP
5444 #: build/C/man2/perf_event_open.2:1752
5445 #, no-wrap
5446 msgid "B<PERF_MEM_LVL_MISS>"
5447 msgstr ""
5448
5449 #. type: Plain text
5450 #: build/C/man2/perf_event_open.2:1755 build/C/man2/perf_event_open.2:1842
5451 msgid "Miss"
5452 msgstr ""
5453
5454 #. type: TP
5455 #: build/C/man2/perf_event_open.2:1755
5456 #, no-wrap
5457 msgid "B<PERF_MEM_LVL_L1>"
5458 msgstr ""
5459
5460 #. type: Plain text
5461 #: build/C/man2/perf_event_open.2:1758
5462 msgid "Level 1 cache"
5463 msgstr ""
5464
5465 #. type: TP
5466 #: build/C/man2/perf_event_open.2:1758
5467 #, no-wrap
5468 msgid "B<PERF_MEM_LVL_LFB>"
5469 msgstr ""
5470
5471 #. type: Plain text
5472 #: build/C/man2/perf_event_open.2:1761
5473 msgid "Line fill buffer"
5474 msgstr ""
5475
5476 #. type: TP
5477 #: build/C/man2/perf_event_open.2:1761
5478 #, no-wrap
5479 msgid "B<PERF_MEM_LVL_L2>"
5480 msgstr ""
5481
5482 #. type: Plain text
5483 #: build/C/man2/perf_event_open.2:1764
5484 msgid "Level 2 cache"
5485 msgstr ""
5486
5487 #. type: TP
5488 #: build/C/man2/perf_event_open.2:1764
5489 #, no-wrap
5490 msgid "B<PERF_MEM_LVL_L3>"
5491 msgstr ""
5492
5493 #. type: Plain text
5494 #: build/C/man2/perf_event_open.2:1767
5495 msgid "Level 3 cache"
5496 msgstr ""
5497
5498 #. type: TP
5499 #: build/C/man2/perf_event_open.2:1767
5500 #, no-wrap
5501 msgid "B<PERF_MEM_LVL_LOC_RAM>"
5502 msgstr ""
5503
5504 #. type: Plain text
5505 #: build/C/man2/perf_event_open.2:1770
5506 msgid "Local DRAM"
5507 msgstr ""
5508
5509 #. type: TP
5510 #: build/C/man2/perf_event_open.2:1770
5511 #, no-wrap
5512 msgid "B<PERF_MEM_LVL_REM_RAM1>"
5513 msgstr ""
5514
5515 #. type: Plain text
5516 #: build/C/man2/perf_event_open.2:1773
5517 msgid "Remote DRAM 1 hop"
5518 msgstr ""
5519
5520 #. type: TP
5521 #: build/C/man2/perf_event_open.2:1773
5522 #, no-wrap
5523 msgid "B<PERF_MEM_LVL_REM_RAM2>"
5524 msgstr ""
5525
5526 #. type: Plain text
5527 #: build/C/man2/perf_event_open.2:1776
5528 msgid "Remote DRAM 2 hops"
5529 msgstr ""
5530
5531 #. type: TP
5532 #: build/C/man2/perf_event_open.2:1776
5533 #, no-wrap
5534 msgid "B<PERF_MEM_LVL_REM_CCE1>"
5535 msgstr ""
5536
5537 #. type: Plain text
5538 #: build/C/man2/perf_event_open.2:1779
5539 msgid "Remote cache 1 hop"
5540 msgstr ""
5541
5542 #. type: TP
5543 #: build/C/man2/perf_event_open.2:1779
5544 #, no-wrap
5545 msgid "B<PERF_MEM_LVL_REM_CCE2>"
5546 msgstr ""
5547
5548 #. type: Plain text
5549 #: build/C/man2/perf_event_open.2:1782
5550 msgid "Remote cache 2 hops"
5551 msgstr ""
5552
5553 #. type: TP
5554 #: build/C/man2/perf_event_open.2:1782
5555 #, no-wrap
5556 msgid "B<PERF_MEM_LVL_IO>"
5557 msgstr ""
5558
5559 #. type: Plain text
5560 #: build/C/man2/perf_event_open.2:1785
5561 msgid "I/O memory"
5562 msgstr ""
5563
5564 #. type: TP
5565 #: build/C/man2/perf_event_open.2:1785
5566 #, no-wrap
5567 msgid "B<PERF_MEM_LVL_UNC>"
5568 msgstr ""
5569
5570 #. type: Plain text
5571 #: build/C/man2/perf_event_open.2:1788
5572 msgid "Uncached memory"
5573 msgstr ""
5574
5575 #. type: TP
5576 #: build/C/man2/perf_event_open.2:1790
5577 #, no-wrap
5578 msgid "I<mem_snoop>"
5579 msgstr ""
5580
5581 #. type: Plain text
5582 #: build/C/man2/perf_event_open.2:1793
5583 msgid "Snoop mode, a bitwise combination of:"
5584 msgstr ""
5585
5586 #. type: TP
5587 #: build/C/man2/perf_event_open.2:1796
5588 #, no-wrap
5589 msgid "B<PERF_MEM_SNOOP_NA>"
5590 msgstr ""
5591
5592 #. type: TP
5593 #: build/C/man2/perf_event_open.2:1799
5594 #, no-wrap
5595 msgid "B<PERF_MEM_SNOOP_NONE>"
5596 msgstr ""
5597
5598 #. type: Plain text
5599 #: build/C/man2/perf_event_open.2:1802
5600 msgid "No snoop"
5601 msgstr ""
5602
5603 #. type: TP
5604 #: build/C/man2/perf_event_open.2:1802
5605 #, no-wrap
5606 msgid "B<PERF_MEM_SNOOP_HIT>"
5607 msgstr ""
5608
5609 #. type: Plain text
5610 #: build/C/man2/perf_event_open.2:1805
5611 msgid "Snoop hit"
5612 msgstr ""
5613
5614 #. type: TP
5615 #: build/C/man2/perf_event_open.2:1805
5616 #, no-wrap
5617 msgid "B<PERF_MEM_SNOOP_MISS>"
5618 msgstr ""
5619
5620 #. type: Plain text
5621 #: build/C/man2/perf_event_open.2:1808
5622 msgid "Snoop miss"
5623 msgstr ""
5624
5625 #. type: TP
5626 #: build/C/man2/perf_event_open.2:1808
5627 #, no-wrap
5628 msgid "B<PERF_MEM_SNOOP_HITM>"
5629 msgstr ""
5630
5631 #. type: Plain text
5632 #: build/C/man2/perf_event_open.2:1811
5633 msgid "Snoop hit modified"
5634 msgstr ""
5635
5636 #. type: TP
5637 #: build/C/man2/perf_event_open.2:1813
5638 #, no-wrap
5639 msgid "I<mem_lock>"
5640 msgstr ""
5641
5642 #. type: Plain text
5643 #: build/C/man2/perf_event_open.2:1816
5644 msgid "Lock instruction, a bitwise combination of:"
5645 msgstr ""
5646
5647 #. type: TP
5648 #: build/C/man2/perf_event_open.2:1819
5649 #, no-wrap
5650 msgid "B<PERF_MEM_LOCK_NA>"
5651 msgstr ""
5652
5653 #. type: TP
5654 #: build/C/man2/perf_event_open.2:1822
5655 #, no-wrap
5656 msgid "B<PERF_MEM_LOCK_LOCKED>"
5657 msgstr ""
5658
5659 #. type: Plain text
5660 #: build/C/man2/perf_event_open.2:1825
5661 msgid "Locked transaction"
5662 msgstr ""
5663
5664 #. type: TP
5665 #: build/C/man2/perf_event_open.2:1827
5666 #, no-wrap
5667 msgid "I<mem_dtlb>"
5668 msgstr ""
5669
5670 #. type: Plain text
5671 #: build/C/man2/perf_event_open.2:1830
5672 msgid "TLB access hit or miss, a bitwise combination of:"
5673 msgstr ""
5674
5675 #. type: TP
5676 #: build/C/man2/perf_event_open.2:1833
5677 #, no-wrap
5678 msgid "B<PERF_MEM_TLB_NA>"
5679 msgstr ""
5680
5681 #. type: TP
5682 #: build/C/man2/perf_event_open.2:1836
5683 #, no-wrap
5684 msgid "B<PERF_MEM_TLB_HIT>"
5685 msgstr ""
5686
5687 #. type: TP
5688 #: build/C/man2/perf_event_open.2:1839
5689 #, no-wrap
5690 msgid "B<PERF_MEM_TLB_MISS>"
5691 msgstr ""
5692
5693 #. type: TP
5694 #: build/C/man2/perf_event_open.2:1842
5695 #, no-wrap
5696 msgid "B<PERF_MEM_TLB_L1>"
5697 msgstr ""
5698
5699 #. type: Plain text
5700 #: build/C/man2/perf_event_open.2:1845
5701 msgid "Level 1 TLB"
5702 msgstr ""
5703
5704 #. type: TP
5705 #: build/C/man2/perf_event_open.2:1845
5706 #, no-wrap
5707 msgid "B<PERF_MEM_TLB_L2>"
5708 msgstr ""
5709
5710 #. type: Plain text
5711 #: build/C/man2/perf_event_open.2:1848
5712 msgid "Level 2 TLB"
5713 msgstr ""
5714
5715 #. type: TP
5716 #: build/C/man2/perf_event_open.2:1848
5717 #, no-wrap
5718 msgid "B<PERF_MEM_TLB_WK>"
5719 msgstr ""
5720
5721 #. type: Plain text
5722 #: build/C/man2/perf_event_open.2:1851
5723 msgid "Hardware walker"
5724 msgstr ""
5725
5726 #. type: TP
5727 #: build/C/man2/perf_event_open.2:1851
5728 #, no-wrap
5729 msgid "B<PERF_MEM_TLB_OS>"
5730 msgstr ""
5731
5732 #. type: Plain text
5733 #: build/C/man2/perf_event_open.2:1854
5734 msgid "OS fault handler"
5735 msgstr ""
5736
5737 #. type: SS
5738 #: build/C/man2/perf_event_open.2:1860
5739 #, no-wrap
5740 msgid "Signal overflow"
5741 msgstr ""
5742
5743 #. type: Plain text
5744 #: build/C/man2/perf_event_open.2:1869
5745 msgid ""
5746 "Events can be set to deliver a signal when a threshold is crossed.  The "
5747 "signal handler is set up using the B<poll>(2), B<select>(2), B<epoll>(2)  "
5748 "and B<fcntl>(2), system calls."
5749 msgstr ""
5750
5751 #. type: Plain text
5752 #: build/C/man2/perf_event_open.2:1873
5753 msgid ""
5754 "To generate signals, sampling must be enabled (I<sample_period> must have a "
5755 "non-zero value)."
5756 msgstr ""
5757
5758 #. type: Plain text
5759 #: build/C/man2/perf_event_open.2:1875
5760 msgid "There are two ways to generate signals."
5761 msgstr ""
5762
5763 #. type: Plain text
5764 #: build/C/man2/perf_event_open.2:1885
5765 msgid ""
5766 "The first is to set a I<wakeup_events> or I<wakeup_watermark> value that "
5767 "will generate a signal if a certain number of samples or bytes have been "
5768 "written to the mmap ring buffer.  In this case a signal of type B<POLL_IN> "
5769 "is sent."
5770 msgstr ""
5771
5772 #. type: Plain text
5773 #: build/C/man2/perf_event_open.2:1897
5774 msgid ""
5775 "The other way is by use of the B<PERF_EVENT_IOC_REFRESH> ioctl.  This ioctl "
5776 "adds to a counter that decrements each time the event overflows.  When non-"
5777 "zero, a B<POLL_IN> signal is sent on overflow, but once the value reaches 0, "
5778 "a signal is sent of type B<POLL_HUP> and the underlying event is disabled."
5779 msgstr ""
5780
5781 #.  FIXME(Vince) : Find out when this was introduced
5782 #. type: Plain text
5783 #: build/C/man2/perf_event_open.2:1903
5784 msgid ""
5785 "Note: on newer kernels (definitely noticed with 3.2)  a signal is provided "
5786 "for every overflow, even if I<wakeup_events> is not set."
5787 msgstr ""
5788
5789 #. type: SS
5790 #: build/C/man2/perf_event_open.2:1903
5791 #, no-wrap
5792 msgid "rdpmc instruction"
5793 msgstr ""
5794
5795 #. type: Plain text
5796 #: build/C/man2/perf_event_open.2:1910
5797 msgid ""
5798 "Starting with Linux 3.4 on x86, you can use the I<rdpmc> instruction to get "
5799 "low-latency reads without having to enter the kernel.  Note that using "
5800 "I<rdpmc> is not necessarily faster than other methods for reading event "
5801 "values."
5802 msgstr ""
5803
5804 #. type: Plain text
5805 #: build/C/man2/perf_event_open.2:1915
5806 msgid ""
5807 "Support for this can be detected with the I<cap_usr_rdpmc> field in the mmap "
5808 "page; documentation on how to calculate event values can be found in that "
5809 "section."
5810 msgstr ""
5811
5812 #. type: SS
5813 #: build/C/man2/perf_event_open.2:1915
5814 #, no-wrap
5815 msgid "perf_event ioctl calls"
5816 msgstr ""
5817
5818 #. type: Plain text
5819 #: build/C/man2/perf_event_open.2:1920
5820 msgid "Various ioctls act on B<perf_event_open>()  file descriptors"
5821 msgstr ""
5822
5823 #. type: TP
5824 #: build/C/man2/perf_event_open.2:1920
5825 #, no-wrap
5826 msgid "B<PERF_EVENT_IOC_ENABLE>"
5827 msgstr "B<PERF_EVENT_IOC_ENABLE>"
5828
5829 #. type: Plain text
5830 #: build/C/man2/perf_event_open.2:1924
5831 msgid ""
5832 "Enables the individual event or event group specified by the file descriptor "
5833 "argument."
5834 msgstr ""
5835
5836 #. type: Plain text
5837 #: build/C/man2/perf_event_open.2:1930
5838 msgid ""
5839 "If the B<PERF_IOC_FLAG_GROUP> bit is set in the ioctl argument, then all "
5840 "events in a group are enabled, even if the event specified is not the group "
5841 "leader (but see BUGS)."
5842 msgstr ""
5843
5844 #. type: TP
5845 #: build/C/man2/perf_event_open.2:1930
5846 #, no-wrap
5847 msgid "B<PERF_EVENT_IOC_DISABLE>"
5848 msgstr "B<PERF_EVENT_IOC_DISABLE>"
5849
5850 #. type: Plain text
5851 #: build/C/man2/perf_event_open.2:1934
5852 msgid ""
5853 "Disables the individual counter or event group specified by the file "
5854 "descriptor argument."
5855 msgstr ""
5856
5857 #. type: Plain text
5858 #: build/C/man2/perf_event_open.2:1941
5859 msgid ""
5860 "Enabling or disabling the leader of a group enables or disables the entire "
5861 "group; that is, while the group leader is disabled, none of the counters in "
5862 "the group will count.  Enabling or disabling a member of a group other than "
5863 "the leader affects only that counter; disabling a non-leader stops that "
5864 "counter from counting but doesn't affect any other counter."
5865 msgstr ""
5866
5867 #. type: Plain text
5868 #: build/C/man2/perf_event_open.2:1947
5869 msgid ""
5870 "If the B<PERF_IOC_FLAG_GROUP> bit is set in the ioctl argument, then all "
5871 "events in a group are disabled, even if the event specified is not the group "
5872 "leader (but see BUGS)."
5873 msgstr ""
5874
5875 #. type: TP
5876 #: build/C/man2/perf_event_open.2:1947
5877 #, no-wrap
5878 msgid "B<PERF_EVENT_IOC_REFRESH>"
5879 msgstr "B<PERF_EVENT_IOC_REFRESH>"
5880
5881 #. type: Plain text
5882 #: build/C/man2/perf_event_open.2:1961
5883 msgid ""
5884 "Non-inherited overflow counters can use this to enable a counter for a "
5885 "number of overflows specified by the argument, after which it is disabled.  "
5886 "Subsequent calls of this ioctl add the argument value to the current count.  "
5887 "A signal with B<POLL_IN> set will happen on each overflow until the count "
5888 "reaches 0; when that happens a signal with POLL_HUP set is sent and the "
5889 "event is disabled.  Using an argument of 0 is considered undefined behavior."
5890 msgstr ""
5891
5892 #. type: TP
5893 #: build/C/man2/perf_event_open.2:1961
5894 #, no-wrap
5895 msgid "B<PERF_EVENT_IOC_RESET>"
5896 msgstr "B<PERF_EVENT_IOC_RESET>"
5897
5898 #. type: Plain text
5899 #: build/C/man2/perf_event_open.2:1971
5900 msgid ""
5901 "Reset the event count specified by the file descriptor argument to zero.  "
5902 "This resets only the counts; there is no way to reset the multiplexing "
5903 "I<time_enabled> or I<time_running> values."
5904 msgstr ""
5905
5906 #. type: Plain text
5907 #: build/C/man2/perf_event_open.2:1977
5908 msgid ""
5909 "If the B<PERF_IOC_FLAG_GROUP> bit is set in the ioctl argument, then all "
5910 "events in a group are reset, even if the event specified is not the group "
5911 "leader (but see BUGS)."
5912 msgstr ""
5913
5914 #. type: TP
5915 #: build/C/man2/perf_event_open.2:1977
5916 #, no-wrap
5917 msgid "B<PERF_EVENT_IOC_PERIOD>"
5918 msgstr "B<PERF_EVENT_IOC_PERIOD>"
5919
5920 #. type: Plain text
5921 #: build/C/man2/perf_event_open.2:1981
5922 msgid ""
5923 "IOC_PERIOD is the command to update the period; it does not update the "
5924 "current period but instead defers until next."
5925 msgstr ""
5926
5927 #. type: Plain text
5928 #: build/C/man2/perf_event_open.2:1984
5929 msgid ""
5930 "The argument is a pointer to a 64-bit value containing the desired new "
5931 "period."
5932 msgstr ""
5933
5934 #. type: TP
5935 #: build/C/man2/perf_event_open.2:1984
5936 #, no-wrap
5937 msgid "B<PERF_EVENT_IOC_SET_OUTPUT>"
5938 msgstr ""
5939
5940 #. type: Plain text
5941 #: build/C/man2/perf_event_open.2:1989
5942 msgid ""
5943 "This tells the kernel to report event notifications to the specified file "
5944 "descriptor rather than the default one.  The file descriptors must all be on "
5945 "the same CPU."
5946 msgstr ""
5947
5948 #. type: Plain text
5949 #: build/C/man2/perf_event_open.2:1992
5950 msgid ""
5951 "The argument specifies the desired file descriptor, or -1 if output should "
5952 "be ignored."
5953 msgstr ""
5954
5955 #. type: TP
5956 #: build/C/man2/perf_event_open.2:1992
5957 #, no-wrap
5958 msgid "B<PERF_EVENT_IOC_SET_FILTER> (Since Linux 2.6.33)"
5959 msgstr "B<PERF_EVENT_IOC_SET_FILTER> (Linux 2.6.33 以降)"
5960
5961 #. type: Plain text
5962 #: build/C/man2/perf_event_open.2:1995
5963 msgid "This adds an ftrace filter to this event."
5964 msgstr ""
5965
5966 #. type: Plain text
5967 #: build/C/man2/perf_event_open.2:1997
5968 msgid "The argument is a pointer to the desired ftrace filter."
5969 msgstr ""
5970
5971 #. type: SS
5972 #: build/C/man2/perf_event_open.2:1997
5973 #, no-wrap
5974 msgid "Using prctl"
5975 msgstr ""
5976
5977 #. type: Plain text
5978 #: build/C/man2/perf_event_open.2:2010
5979 msgid ""
5980 "A process can enable or disable all the event groups that are attached to it "
5981 "using the B<prctl>(2)  B<PR_TASK_PERF_EVENTS_ENABLE> and "
5982 "B<PR_TASK_PERF_EVENTS_DISABLE> operations.  This applies to all counters on "
5983 "the current process, whether created by this process or by another, and does "
5984 "not affect any counters that this process has created on other processes.  "
5985 "It enables or disables only the group leaders, not any other members in the "
5986 "groups."
5987 msgstr ""
5988
5989 #. type: SS
5990 #: build/C/man2/perf_event_open.2:2010
5991 #, no-wrap
5992 msgid "perf_event related configuration files"
5993 msgstr ""
5994
5995 #. type: Plain text
5996 #: build/C/man2/perf_event_open.2:2013
5997 msgid "Files in I</proc/sys/kernel/>"
5998 msgstr ""
5999
6000 #. type: TP
6001 #: build/C/man2/perf_event_open.2:2014
6002 #, no-wrap
6003 msgid "I</proc/sys/kernel/perf_event_paranoid>"
6004 msgstr ""
6005
6006 #. type: Plain text
6007 #: build/C/man2/perf_event_open.2:2020
6008 msgid ""
6009 "The I<perf_event_paranoid> file can be set to restrict access to the "
6010 "performance counters."
6011 msgstr ""
6012
6013 #. type: IP
6014 #: build/C/man2/perf_event_open.2:2021
6015 #, no-wrap
6016 msgid "2"
6017 msgstr ""
6018
6019 #. type: Plain text
6020 #: build/C/man2/perf_event_open.2:2023
6021 msgid "only allow user-space measurements."
6022 msgstr ""
6023
6024 #. type: IP
6025 #: build/C/man2/perf_event_open.2:2023
6026 #, no-wrap
6027 msgid "1"
6028 msgstr ""
6029
6030 #. type: Plain text
6031 #: build/C/man2/perf_event_open.2:2025
6032 msgid "allow both kernel and user measurements (default)."
6033 msgstr ""
6034
6035 #. type: IP
6036 #: build/C/man2/perf_event_open.2:2025
6037 #, no-wrap
6038 msgid "0"
6039 msgstr ""
6040
6041 #. type: Plain text
6042 #: build/C/man2/perf_event_open.2:2027
6043 msgid "allow access to CPU-specific data but not raw tracepoint samples."
6044 msgstr ""
6045
6046 #. type: IP
6047 #: build/C/man2/perf_event_open.2:2027
6048 #, no-wrap
6049 msgid "-1"
6050 msgstr "-1"
6051
6052 #. type: Plain text
6053 #: build/C/man2/perf_event_open.2:2029
6054 msgid "no restrictions."
6055 msgstr ""
6056
6057 #. type: Plain text
6058 #: build/C/man2/perf_event_open.2:2035
6059 msgid ""
6060 "The existence of the I<perf_event_paranoid> file is the official method for "
6061 "determining if a kernel supports B<perf_event_open>()."
6062 msgstr ""
6063
6064 #. type: TP
6065 #: build/C/man2/perf_event_open.2:2035
6066 #, no-wrap
6067 msgid "I</proc/sys/kernel/perf_event_max_sample_rate>"
6068 msgstr ""
6069
6070 #. type: Plain text
6071 #: build/C/man2/perf_event_open.2:2044
6072 msgid ""
6073 "This sets the maximum sample rate.  Setting this too high can allow users to "
6074 "sample at a rate that impacts overall machine performance and potentially "
6075 "lock up the machine.  The default value is 100000 (samples per second)."
6076 msgstr ""
6077
6078 #. type: TP
6079 #: build/C/man2/perf_event_open.2:2044
6080 #, no-wrap
6081 msgid "I</proc/sys/kernel/perf_event_mlock_kb>"
6082 msgstr ""
6083
6084 #. type: Plain text
6085 #: build/C/man2/perf_event_open.2:2049
6086 msgid ""
6087 "Maximum number of pages an unprivileged user can mlock (2) .  The default is "
6088 "516 (kB)."
6089 msgstr ""
6090
6091 #. type: Plain text
6092 #: build/C/man2/perf_event_open.2:2053
6093 msgid "Files in I</sys/bus/event_source/devices/>"
6094 msgstr ""
6095
6096 #. type: Plain text
6097 #: build/C/man2/perf_event_open.2:2059
6098 msgid ""
6099 "Since Linux 2.6.34 the kernel supports having multiple PMUs available for "
6100 "monitoring.  Information on how to program these PMUs can be found under I</"
6101 "sys/bus/event_source/devices/>.  Each subdirectory corresponds to a "
6102 "different PMU."
6103 msgstr ""
6104
6105 #. type: TP
6106 #: build/C/man2/perf_event_open.2:2059
6107 #, no-wrap
6108 msgid "I</sys/bus/event_source/devices/*/type> (Since Linux 2.6.38)"
6109 msgstr "I</sys/bus/event_source/devices/*/type> (Linux 2.6.38 以降)"
6110
6111 #. type: Plain text
6112 #: build/C/man2/perf_event_open.2:2064
6113 msgid ""
6114 "This contains an integer that can be used in the I<type> field of "
6115 "perf_event_attr to indicate you wish to use this PMU."
6116 msgstr ""
6117
6118 #. type: TP
6119 #: build/C/man2/perf_event_open.2:2064
6120 #, no-wrap
6121 msgid "I</sys/bus/event_source/devices/*/rdpmc> (Since Linux 3.4)"
6122 msgstr ""
6123
6124 #. type: Plain text
6125 #: build/C/man2/perf_event_open.2:2069
6126 msgid ""
6127 "If this file is 1, then direct user-space access to the performance counter "
6128 "registers is allowed via the rdpmc instruction.  This can be disabled by "
6129 "echoing 0 to the file."
6130 msgstr ""
6131
6132 #. type: TP
6133 #: build/C/man2/perf_event_open.2:2069
6134 #, no-wrap
6135 msgid "I</sys/bus/event_source/devices/*/format/> (Since Linux 3.4)"
6136 msgstr ""
6137
6138 #. type: Plain text
6139 #: build/C/man2/perf_event_open.2:2075
6140 msgid ""
6141 "This sub-directory contains information on the architecture-specific sub-"
6142 "fields available for programming the various I<config> fields in the "
6143 "perf_event_attr struct."
6144 msgstr ""
6145
6146 #. type: Plain text
6147 #: build/C/man2/perf_event_open.2:2085
6148 msgid ""
6149 "The content of each file is the name of the config field, followed by a "
6150 "colon, followed by a series of integer bit ranges separated by commas.  For "
6151 "example, the file I<event> may contain the value I<config1:1,6-10,44> which "
6152 "indicates that event is an attribute that occupies bits 1,6-10, and 44 of "
6153 "perf_event_attr::config1."
6154 msgstr ""
6155
6156 #. type: TP
6157 #: build/C/man2/perf_event_open.2:2085
6158 #, no-wrap
6159 msgid "I</sys/bus/event_source/devices/*/events/> (Since Linux 3.4)"
6160 msgstr ""
6161
6162 #. type: Plain text
6163 #: build/C/man2/perf_event_open.2:2094
6164 msgid ""
6165 "This sub-directory contains files with pre-defined events.  The contents are "
6166 "strings describing the event settings expressed in terms of the fields found "
6167 "in the previously mentioned I<./format/> directory.  These are not "
6168 "necessarily complete lists of all events supported by a PMU, but usually a "
6169 "subset of events deemed useful or interesting."
6170 msgstr ""
6171
6172 #. type: Plain text
6173 #: build/C/man2/perf_event_open.2:2102
6174 msgid ""
6175 "The content of each file is a list of attribute names separated by commas.  "
6176 "Each entry has an optional value (either hex or decimal).  If no value is "
6177 "specified than it is assumed to be a single-bit field with a value of 1.  An "
6178 "example entry may look like this: I<event=0x2,inv,ldlat=3>."
6179 msgstr ""
6180
6181 #. type: TP
6182 #: build/C/man2/perf_event_open.2:2102
6183 #, no-wrap
6184 msgid "I</sys/bus/event_source/devices/*/uevent>"
6185 msgstr ""
6186
6187 #. type: Plain text
6188 #: build/C/man2/perf_event_open.2:2106
6189 msgid ""
6190 "This file is the standard kernel device interface for injecting hotplug "
6191 "events."
6192 msgstr ""
6193
6194 #. type: TP
6195 #: build/C/man2/perf_event_open.2:2106
6196 #, no-wrap
6197 msgid "I</sys/bus/event_source/devices/*/cpumask> (Since Linux 3.7)"
6198 msgstr ""
6199
6200 #. type: Plain text
6201 #: build/C/man2/perf_event_open.2:2115
6202 msgid ""
6203 "The I<cpumask> file contains a comma-separated list of integers that "
6204 "indicate a representative CPU number for each socket (package)  on the "
6205 "motherboard.  This is needed when setting up uncore or northbridge events, "
6206 "as those PMUs present socket-wide events."
6207 msgstr ""
6208
6209 #. type: Plain text
6210 #: build/C/man2/perf_event_open.2:2122
6211 msgid ""
6212 "B<perf_event_open>()  returns the new file descriptor, or -1 if an error "
6213 "occurred (in which case, I<errno> is set appropriately)."
6214 msgstr ""
6215
6216 #. type: Plain text
6217 #: build/C/man2/perf_event_open.2:2126
6218 msgid "Returned if the specified event is not available."
6219 msgstr ""
6220
6221 #. type: TP
6222 #: build/C/man2/perf_event_open.2:2126
6223 #, no-wrap
6224 msgid "B<ENOSPC>"
6225 msgstr "B<ENOSPC>"
6226
6227 #. type: Plain text
6228 #: build/C/man2/perf_event_open.2:2136
6229 msgid ""
6230 "Prior to Linux 3.3, if there was not enough room for the event, B<ENOSPC> "
6231 "was returned.  Linus did not like this, and this was changed to B<EINVAL>.  "
6232 "B<ENOSPC> is still returned if you try to read results into too small of a "
6233 "buffer."
6234 msgstr ""
6235
6236 #. type: SH
6237 #: build/C/man2/perf_event_open.2:2136
6238 #, no-wrap
6239 msgid "VERSION"
6240 msgstr "バージョン"
6241
6242 #. type: Plain text
6243 #: build/C/man2/perf_event_open.2:2141
6244 msgid ""
6245 "B<perf_event_open>()  was introduced in Linux 2.6.31 but was called "
6246 "B<perf_counter_open>()B<.> It was renamed in Linux 2.6.32."
6247 msgstr ""
6248
6249 #. type: Plain text
6250 #: build/C/man2/perf_event_open.2:2146
6251 msgid ""
6252 "This B<perf_event_open>()  system call Linux- specific and should not be "
6253 "used in programs intended to be portable."
6254 msgstr "B<perf_event_open>() システムコールは Linux 固有であり、 移植を意図したプログラムで使用すべきではない。"
6255
6256 #. type: Plain text
6257 #: build/C/man2/perf_event_open.2:2150
6258 msgid ""
6259 "Glibc does not provide a wrapper for this system call; call it using "
6260 "B<syscall>(2).  See the example below."
6261 msgstr "glibc はこのシステムコールに対するラッパー関数を提供していない。 B<syscall>(2)  を使って呼び出すこと。 以下の例を参照。"
6262
6263 #. type: Plain text
6264 #: build/C/man2/perf_event_open.2:2156
6265 msgid ""
6266 "The official way of knowing if B<perf_event_open>()  support is enabled is "
6267 "checking for the existence of the file I</proc/sys/kernel/"
6268 "perf_event_paranoid>."
6269 msgstr ""
6270
6271 #. type: SH
6272 #: build/C/man2/perf_event_open.2:2156 build/C/man2/pivot_root.2:134
6273 #: build/C/man2/ptrace.2:1884
6274 #, no-wrap
6275 msgid "BUGS"
6276 msgstr "バグ"
6277
6278 #. type: Plain text
6279 #: build/C/man2/perf_event_open.2:2163
6280 msgid ""
6281 "The B<F_SETOWN_EX> option to B<fcntl>(2)  is needed to properly get overflow "
6282 "signals in threads.  This was introduced in Linux 2.6.32."
6283 msgstr ""
6284
6285 #. type: Plain text
6286 #: build/C/man2/perf_event_open.2:2171
6287 msgid ""
6288 "Prior to Linux 2.6.33 (at least for x86) the kernel did not check if events "
6289 "could be scheduled together until read time.  The same happens on all known "
6290 "kernels if the NMI watchdog is enabled.  This means to see if a given set of "
6291 "events works you have to B<perf_event_open>(), start, then read before you "
6292 "know for sure you can get valid measurements."
6293 msgstr ""
6294
6295 #. type: Plain text
6296 #: build/C/man2/perf_event_open.2:2175
6297 msgid ""
6298 "Prior to Linux 2.6.34 event constraints were not enforced by the kernel.  In "
6299 "that case, some events would silently return \"0\" if the kernel scheduled "
6300 "them in an improper counter slot."
6301 msgstr ""
6302
6303 #. type: Plain text
6304 #: build/C/man2/perf_event_open.2:2178
6305 msgid ""
6306 "Prior to Linux 2.6.34 there was a bug when multiplexing where the wrong "
6307 "results could be returned."
6308 msgstr ""
6309
6310 #. type: Plain text
6311 #: build/C/man2/perf_event_open.2:2181
6312 msgid ""
6313 "Kernels from Linux 2.6.35 to Linux 2.6.39 can quickly crash the kernel if "
6314 "\"inherit\" is enabled and many threads are started."
6315 msgstr ""
6316
6317 #. type: Plain text
6318 #: build/C/man2/perf_event_open.2:2185
6319 msgid ""
6320 "Prior to Linux 2.6.35, B<PERF_FORMAT_GROUP> did not work with attached "
6321 "processes."
6322 msgstr ""
6323
6324 #. type: Plain text
6325 #: build/C/man2/perf_event_open.2:2190
6326 msgid ""
6327 "In older Linux 2.6 versions, refreshing an event group leader refreshed all "
6328 "siblings, and refreshing with a parameter of 0 enabled infinite refresh.  "
6329 "This behavior is unsupported and should not be relied on."
6330 msgstr ""
6331
6332 #. type: Plain text
6333 #: build/C/man2/perf_event_open.2:2196
6334 msgid ""
6335 "There is a bug in the kernel code between Linux 2.6.36 and Linux 3.0 that "
6336 "ignores the \"watermark\" field and acts as if a wakeup_event was chosen if "
6337 "the union has a non-zero value in it."
6338 msgstr ""
6339
6340 #. type: Plain text
6341 #: build/C/man2/perf_event_open.2:2202
6342 msgid ""
6343 "From Linux 2.6.31 to Linux 3.4, the B<PERF_IOC_FLAG_GROUP> ioctl argument "
6344 "was broken and would repeatedly operate on the event specified rather than "
6345 "iterating across all sibling events in a group."
6346 msgstr ""
6347
6348 #. type: Plain text
6349 #: build/C/man2/perf_event_open.2:2207
6350 msgid ""
6351 "Always double-check your results! Various generalized events have had wrong "
6352 "values.  For example, retired branches measured the wrong thing on AMD "
6353 "machines until Linux 2.6.35."
6354 msgstr ""
6355
6356 #. type: SH
6357 #: build/C/man2/perf_event_open.2:2207 build/C/man2/process_vm_readv.2:295
6358 #: build/C/man2/splice.2:223 build/C/man2/tee.2:130
6359 #, no-wrap
6360 msgid "EXAMPLE"
6361 msgstr "例"
6362
6363 #. type: Plain text
6364 #: build/C/man2/perf_event_open.2:2211
6365 msgid ""
6366 "The following is a short example that measures the total instruction count "
6367 "of a call to B<printf>(3)."
6368 msgstr ""
6369
6370 #. type: Plain text
6371 #: build/C/man2/perf_event_open.2:2220
6372 #, no-wrap
6373 msgid ""
6374 "#include E<lt>stdlib.hE<gt>\n"
6375 "#include E<lt>stdio.hE<gt>\n"
6376 "#include E<lt>unistd.hE<gt>\n"
6377 "#include E<lt>string.hE<gt>\n"
6378 "#include E<lt>sys/ioctl.hE<gt>\n"
6379 "#include E<lt>linux/perf_event.hE<gt>\n"
6380 "#include E<lt>asm/unistd.hE<gt>\n"
6381 msgstr ""
6382 "#include E<lt>stdlib.hE<gt>\n"
6383 "#include E<lt>stdio.hE<gt>\n"
6384 "#include E<lt>unistd.hE<gt>\n"
6385 "#include E<lt>string.hE<gt>\n"
6386 "#include E<lt>sys/ioctl.hE<gt>\n"
6387 "#include E<lt>linux/perf_event.hE<gt>\n"
6388 "#include E<lt>asm/unistd.hE<gt>\n"
6389
6390 #. type: Plain text
6391 #: build/C/man2/perf_event_open.2:2226
6392 #, no-wrap
6393 msgid ""
6394 "long\n"
6395 "perf_event_open(struct perf_event_attr *hw_event, pid_t pid,\n"
6396 "                int cpu, int group_fd, unsigned long flags)\n"
6397 "{\n"
6398 "    int ret;\n"
6399 msgstr ""
6400
6401 #. type: Plain text
6402 #: build/C/man2/perf_event_open.2:2231
6403 #, no-wrap
6404 msgid ""
6405 "    ret = syscall(__NR_perf_event_open, hw_event, pid, cpu,\n"
6406 "                   group_fd, flags);\n"
6407 "    return ret;\n"
6408 "}\n"
6409 msgstr ""
6410
6411 #. type: Plain text
6412 #: build/C/man2/perf_event_open.2:2238
6413 #, no-wrap
6414 msgid ""
6415 "int\n"
6416 "main(int argc, char **argv)\n"
6417 "{\n"
6418 "    struct perf_event_attr pe;\n"
6419 "    long long count;\n"
6420 "    int fd;\n"
6421 msgstr ""
6422 "int\n"
6423 "main(int argc, char **argv)\n"
6424 "{\n"
6425 "    struct perf_event_attr pe;\n"
6426 "    long long count;\n"
6427 "    int fd;\n"
6428
6429 #. type: Plain text
6430 #: build/C/man2/perf_event_open.2:2246
6431 #, no-wrap
6432 msgid ""
6433 "    memset(&pe, 0, sizeof(struct perf_event_attr));\n"
6434 "    pe.type = PERF_TYPE_HARDWARE;\n"
6435 "    pe.size = sizeof(struct perf_event_attr);\n"
6436 "    pe.config = PERF_COUNT_HW_INSTRUCTIONS;\n"
6437 "    pe.disabled = 1;\n"
6438 "    pe.exclude_kernel = 1;\n"
6439 "    pe.exclude_hv = 1;\n"
6440 msgstr ""
6441
6442 #. type: Plain text
6443 #: build/C/man2/perf_event_open.2:2252
6444 #, no-wrap
6445 msgid ""
6446 "    fd = perf_event_open(&pe, 0, -1, -1, 0);\n"
6447 "    if (fd == -1) {\n"
6448 "       fprintf(stderr, \"Error opening leader %llx\\en\", pe.config);\n"
6449 "       exit(EXIT_FAILURE);\n"
6450 "    }\n"
6451 msgstr ""
6452 "    fd = perf_event_open(&pe, 0, -1, -1, 0);\n"
6453 "    if (fd == -1) {\n"
6454 "       fprintf(stderr, \"Error opening leader %llx\\en\", pe.config);\n"
6455 "       exit(EXIT_FAILURE);\n"
6456 "    }\n"
6457
6458 #. type: Plain text
6459 #: build/C/man2/perf_event_open.2:2255
6460 #, no-wrap
6461 msgid ""
6462 "    ioctl(fd, PERF_EVENT_IOC_RESET, 0);\n"
6463 "    ioctl(fd, PERF_EVENT_IOC_ENABLE, 0);\n"
6464 msgstr ""
6465
6466 #. type: Plain text
6467 #: build/C/man2/perf_event_open.2:2257
6468 #, no-wrap
6469 msgid "    printf(\"Measuring instruction count for this printf\\en\");\n"
6470 msgstr ""
6471
6472 #. type: Plain text
6473 #: build/C/man2/perf_event_open.2:2260
6474 #, no-wrap
6475 msgid ""
6476 "    ioctl(fd, PERF_EVENT_IOC_DISABLE, 0);\n"
6477 "    read(fd, &count, sizeof(long long));\n"
6478 msgstr ""
6479
6480 #. type: Plain text
6481 #: build/C/man2/perf_event_open.2:2262
6482 #, no-wrap
6483 msgid "    printf(\"Used %lld instructions\\en\", count);\n"
6484 msgstr ""
6485
6486 #. type: Plain text
6487 #: build/C/man2/perf_event_open.2:2265
6488 #, no-wrap
6489 msgid ""
6490 "    close(fd);\n"
6491 "}\n"
6492 msgstr ""
6493
6494 #. type: Plain text
6495 #: build/C/man2/perf_event_open.2:2272
6496 msgid "B<fcntl>(2), B<mmap>(2), B<open>(2), B<prctl>(2), B<read>(2)"
6497 msgstr "B<fcntl>(2), B<mmap>(2), B<open>(2), B<prctl>(2), B<read>(2)"
6498
6499 #. type: TH
6500 #: build/C/man2/perfmonctl.2:27
6501 #, no-wrap
6502 msgid "PERFMONCTL"
6503 msgstr ""
6504
6505 #. type: Plain text
6506 #: build/C/man2/perfmonctl.2:30
6507 msgid "perfmonctl - interface to IA-64 performance monitoring unit"
6508 msgstr ""
6509
6510 #. type: Plain text
6511 #: build/C/man2/perfmonctl.2:34
6512 #, no-wrap
6513 msgid ""
6514 "B<#include E<lt>syscall.hE<gt>>\n"
6515 "B<#include E<lt>perfmon.hE<gt>>\n"
6516 msgstr ""
6517 "B<#include E<lt>syscall.hE<gt>>\n"
6518 "B<#include E<lt>perfmon.hE<gt>>\n"
6519
6520 #. type: Plain text
6521 #: build/C/man2/perfmonctl.2:36
6522 #, no-wrap
6523 msgid "B<long perfmonctl(int >I<fd>B<, int >I<cmd>B<, void *>I<arg>B<, int >I<narg>B<);>\n"
6524 msgstr "B<long perfmonctl(int >I<fd>B<, int >I<cmd>B<, void *>I<arg>B<, int >I<narg>B<);>\n"
6525
6526 #. type: Plain text
6527 #: build/C/man2/perfmonctl.2:47
6528 msgid ""
6529 "The IA-64-specific B<perfmonctl>()  system call provides an interface to the "
6530 "PMU (performance monitoring unit).  The PMU consists of PMD (performance "
6531 "monitoring data) registers and PMC (performance monitoring control) "
6532 "registers, which gather hardware statistics."
6533 msgstr ""
6534
6535 #. type: Plain text
6536 #: build/C/man2/perfmonctl.2:57
6537 msgid ""
6538 "B<perfmonctl>()  applies the operation I<cmd> to the input arguments "
6539 "specified by I<arg>.  The number of arguments is defined by I<narg>.  The "
6540 "I<fd> argument specifies the perfmon context to operate on."
6541 msgstr ""
6542
6543 #. type: Plain text
6544 #: build/C/man2/perfmonctl.2:61
6545 msgid "Supported values for I<cmd> are:"
6546 msgstr ""
6547
6548 #. type: TP
6549 #: build/C/man2/perfmonctl.2:61
6550 #, no-wrap
6551 msgid "B<PFM_CREATE_CONTEXT>"
6552 msgstr "B<PFM_CREATE_CONTEXT>"
6553
6554 #. type: Plain text
6555 #: build/C/man2/perfmonctl.2:65
6556 #, no-wrap
6557 msgid "B<perfmonctl(int >I<fd>B<, PFM_CREATE_CONTEXT, pfarg_context_t *>I<ctxt>B<, 1);>\n"
6558 msgstr ""
6559
6560 #. type: Plain text
6561 #: build/C/man2/perfmonctl.2:67
6562 msgid "Set up a context."
6563 msgstr ""
6564
6565 #. type: Plain text
6566 #: build/C/man2/perfmonctl.2:74
6567 msgid ""
6568 "The I<fd> parameter is ignored.  A new perfmon context is created as "
6569 "specified in I<ctxt> and its file descriptor is returned in I<ctxt-"
6570 "E<gt>ctx_fd>."
6571 msgstr ""
6572
6573 #. type: Plain text
6574 #: build/C/man2/perfmonctl.2:86
6575 msgid ""
6576 "The file descriptor can be used in subsequent calls to B<perfmonctl>()  and "
6577 "can be used to read event notifications (type I<pfm_msg_t>)  using B<read>"
6578 "(2).  The file descriptor is pollable using B<select>(2), B<poll>(2), and "
6579 "B<epoll>(7)."
6580 msgstr ""
6581
6582 #. type: Plain text
6583 #: build/C/man2/perfmonctl.2:90
6584 msgid ""
6585 "The context can be destroyed by calling B<close>(2)  on the file descriptor."
6586 msgstr ""
6587
6588 #. type: TP
6589 #: build/C/man2/perfmonctl.2:90
6590 #, no-wrap
6591 msgid "B<PFM_WRITE_PMCS>"
6592 msgstr ""
6593
6594 #. type: Plain text
6595 #: build/C/man2/perfmonctl.2:95
6596 #, no-wrap
6597 msgid "B<perfmonctl(int >I<fd>B<, PFM_WRITE_PMCS, pfarg_reg_t *>I<pmcs>B<, n);>\n"
6598 msgstr ""
6599
6600 #. type: Plain text
6601 #: build/C/man2/perfmonctl.2:97
6602 msgid "Set PMC registers."
6603 msgstr ""
6604
6605 #. type: TP
6606 #: build/C/man2/perfmonctl.2:97
6607 #, no-wrap
6608 msgid "B<PFM_WRITE_PMDS>"
6609 msgstr ""
6610
6611 #. type: Plain text
6612 #: build/C/man2/perfmonctl.2:101
6613 #, no-wrap
6614 msgid "B<perfmonctl(int >I<fd>B<, PFM_WRITE_PMDS, pfarg_reg_t *>I<pmds>B<, n);>\n"
6615 msgstr ""
6616
6617 #.  pfm_write_pmds()
6618 #. type: Plain text
6619 #: build/C/man2/perfmonctl.2:104
6620 msgid "Set PMD registers."
6621 msgstr ""
6622
6623 #. type: TP
6624 #: build/C/man2/perfmonctl.2:104
6625 #, no-wrap
6626 msgid "B<PFM_READ_PMDS>"
6627 msgstr ""
6628
6629 #. type: Plain text
6630 #: build/C/man2/perfmonctl.2:109
6631 #, no-wrap
6632 msgid "B<perfmonctl(int >I<fd>B<, PFM_READ_PMDS, pfarg_reg_t *>I<pmds>B<, n);>\n"
6633 msgstr ""
6634
6635 #. type: Plain text
6636 #: build/C/man2/perfmonctl.2:111
6637 msgid "Read PMD registers."
6638 msgstr ""
6639
6640 #. type: TP
6641 #: build/C/man2/perfmonctl.2:111
6642 #, no-wrap
6643 msgid "B<PFM_START>"
6644 msgstr ""
6645
6646 #.  .BI  "perfmonctl(int " fd ", PFM_START, arg, 1);
6647 #. type: Plain text
6648 #: build/C/man2/perfmonctl.2:117
6649 #, no-wrap
6650 msgid "B<perfmonctl(int >I<fd>B<, PFM_START, NULL, 0);>\n"
6651 msgstr ""
6652
6653 #. type: Plain text
6654 #: build/C/man2/perfmonctl.2:119
6655 msgid "Start monitoring."
6656 msgstr ""
6657
6658 #. type: TP
6659 #: build/C/man2/perfmonctl.2:119
6660 #, no-wrap
6661 msgid "B<PFM_STOP>"
6662 msgstr ""
6663
6664 #. type: Plain text
6665 #: build/C/man2/perfmonctl.2:124
6666 #, no-wrap
6667 msgid "B<perfmonctl(int >I<fd>B<, PFM_STOP, NULL, 0);>\n"
6668 msgstr ""
6669
6670 #. type: Plain text
6671 #: build/C/man2/perfmonctl.2:126
6672 msgid "Stop monitoring."
6673 msgstr ""
6674
6675 #. type: TP
6676 #: build/C/man2/perfmonctl.2:126
6677 #, no-wrap
6678 msgid "B<PFM_LOAD_CONTEXT>"
6679 msgstr "B<PFM_LOAD_CONTEXT>"
6680
6681 #. type: Plain text
6682 #: build/C/man2/perfmonctl.2:131
6683 #, no-wrap
6684 msgid "B<perfmonctl(int >I<fd>B<, PFM_LOAD_CONTEXT, pfarg_load_t *>I<largs>B<, 1);>\n"
6685 msgstr ""
6686
6687 #. type: Plain text
6688 #: build/C/man2/perfmonctl.2:133
6689 msgid "Attach the context to a thread."
6690 msgstr ""
6691
6692 #. type: TP
6693 #: build/C/man2/perfmonctl.2:133
6694 #, no-wrap
6695 msgid "B<PFM_UNLOAD_CONTEXT>"
6696 msgstr ""
6697
6698 #. type: Plain text
6699 #: build/C/man2/perfmonctl.2:138
6700 #, no-wrap
6701 msgid "B<perfmonctl(int >I<fd>B<, PFM_UNLOAD_CONTEXT, NULL, 0);>\n"
6702 msgstr ""
6703
6704 #. type: Plain text
6705 #: build/C/man2/perfmonctl.2:140
6706 msgid "Detach the context from a thread."
6707 msgstr ""
6708
6709 #. type: TP
6710 #: build/C/man2/perfmonctl.2:140
6711 #, no-wrap
6712 msgid "B<PFM_RESTART>"
6713 msgstr ""
6714
6715 #. type: Plain text
6716 #: build/C/man2/perfmonctl.2:145
6717 #, no-wrap
6718 msgid "B<perfmonctl(int >I<fd>B<, PFM_RESTART, NULL, 0);>\n"
6719 msgstr ""
6720
6721 #. type: Plain text
6722 #: build/C/man2/perfmonctl.2:147
6723 msgid "Restart monitoring after receiving an overflow notification."
6724 msgstr ""
6725
6726 #. type: TP
6727 #: build/C/man2/perfmonctl.2:147
6728 #, no-wrap
6729 msgid "B<PFM_GET_FEATURES>"
6730 msgstr "B<PFM_GET_FEATURES>"
6731
6732 #. type: Plain text
6733 #: build/C/man2/perfmonctl.2:152
6734 #, no-wrap
6735 msgid "B<perfmonctl(int >I<fd>B<, PFM_GET_FEARURES, pfarg_features_t *>I<arg>B<, 1);>\n"
6736 msgstr ""
6737
6738 #. type: TP
6739 #: build/C/man2/perfmonctl.2:153
6740 #, no-wrap
6741 msgid "B<PFM_DEBUG>"
6742 msgstr ""
6743
6744 #. type: Plain text
6745 #: build/C/man2/perfmonctl.2:158
6746 #, no-wrap
6747 msgid "B<perfmonctl(int >I<fd>B<, PFM_DEBUG, >I<val>B<, 0);>\n"
6748 msgstr ""
6749
6750 #. type: Plain text
6751 #: build/C/man2/perfmonctl.2:162
6752 msgid "If I<val> is nonzero, enable debugging mode, otherwise disable."
6753 msgstr ""
6754
6755 #. type: TP
6756 #: build/C/man2/perfmonctl.2:162
6757 #, no-wrap
6758 msgid "B<PFM_GET_PMC_RESET_VAL>"
6759 msgstr ""
6760
6761 #. type: Plain text
6762 #: build/C/man2/perfmonctl.2:167
6763 #, no-wrap
6764 msgid "B<perfmonctl(int >I<fd>B<, PFM_GET_PMC_RESET_VAL, pfarg_reg_t * >I<req>B<, n);>\n"
6765 msgstr ""
6766
6767 #
6768 #
6769 #
6770 #.  .TP
6771 #.  .B PFM_CREATE_EVTSETS
6772 #.  create or modify event sets
6773 #.  .nf
6774 #.  .BI  "perfmonctl(int " fd ", PFM_CREATE_EVTSETS, pfarg_setdesc_t *desc , n);
6775 #.  .fi
6776 #.  .TP
6777 #.  .B PFM_DELETE_EVTSETS
6778 #.  delete event sets
6779 #.  .nf
6780 #.  .BI  "perfmonctl(int " fd ", PFM_DELETE_EVTSET, pfarg_setdesc_t *desc , n);
6781 #.  .fi
6782 #.  .TP
6783 #.  .B PFM_GETINFO_EVTSETS
6784 #.  get information about event sets
6785 #.  .nf
6786 #.  .BI  "perfmonctl(int " fd ", PFM_GETINFO_EVTSETS, pfarg_setinfo_t *info, n);
6787 #.  .fi
6788 #. type: Plain text
6789 #: build/C/man2/perfmonctl.2:190
6790 msgid "Reset PMC registers to default values."
6791 msgstr ""
6792
6793 #. type: Plain text
6794 #: build/C/man2/perfmonctl.2:196
6795 msgid ""
6796 "B<performctl>()  returns zero when the operation is successful.  On error, "
6797 "-1 is returned and I<errno> is set to indicate the cause of the error."
6798 msgstr ""
6799
6800 #. type: Plain text
6801 #: build/C/man2/perfmonctl.2:199
6802 msgid "B<perfmonctl>()  is available since Linux 2.4."
6803 msgstr ""
6804
6805 #. type: Plain text
6806 #: build/C/man2/perfmonctl.2:202
6807 msgid ""
6808 "B<perfmonctl>()  is Linux specific and is available only on the IA-64 "
6809 "architecture."
6810 msgstr ""
6811
6812 #. type: Plain text
6813 #: build/C/man2/perfmonctl.2:207
6814 msgid "B<gprof>(1)"
6815 msgstr ""
6816
6817 #. type: Plain text
6818 #: build/C/man2/perfmonctl.2:209
6819 msgid "The perfmon2 interface specification"
6820 msgstr ""
6821
6822 #. type: TH
6823 #: build/C/man2/personality.2:32
6824 #, no-wrap
6825 msgid "PERSONALITY"
6826 msgstr "PERSONALITY"
6827
6828 #. type: TH
6829 #: build/C/man2/personality.2:32
6830 #, no-wrap
6831 msgid "2003-01-01"
6832 msgstr "2003-01-01"
6833
6834 #. type: Plain text
6835 #: build/C/man2/personality.2:35
6836 msgid "personality - set the process execution domain"
6837 msgstr "personality - プロセスを実行するドメインを設定する"
6838
6839 #. type: Plain text
6840 #: build/C/man2/personality.2:37
6841 msgid "B<#include E<lt>sys/personality.hE<gt>>"
6842 msgstr "B<#include E<lt>sys/personality.hE<gt>>"
6843
6844 #. type: Plain text
6845 #: build/C/man2/personality.2:39
6846 msgid "B<int personality(unsigned long >I<persona>B<);>"
6847 msgstr "B<int personality(unsigned long >I<persona>B<);>"
6848
6849 #. type: Plain text
6850 #: build/C/man2/personality.2:47
6851 msgid ""
6852 "Linux supports different execution domains, or personalities, for each "
6853 "process.  Among other things, execution domains tell Linux how to map signal "
6854 "numbers into signal actions.  The execution domain system allows Linux to "
6855 "provide limited support for binaries compiled under other UNIX-like "
6856 "operating systems."
6857 msgstr ""
6858 "Linux は、プロセス毎の異なる実行ドメイン、すなわち パーソナリティ "
6859 "(personality) をサポートしている。 実行ドメインは Linux にシグナル番号にどの"
6860 "シグナルを割り付けるかを 教えたりする。また、実行ドメイン・システムにより、 "
6861 "Linux は他の UNIX 風のオペレーティング・システムでコンパイルされた バイナリに"
6862 "対する限定的なサポートを提供している。"
6863
6864 #. type: Plain text
6865 #: build/C/man2/personality.2:57
6866 msgid ""
6867 "This function will return the current B<personality>()  when I<persona> "
6868 "equals 0xffffffff.  Otherwise, it will make the execution domain referenced "
6869 "by I<persona> the new execution domain of the calling process."
6870 msgstr ""
6871 "B<personality ()> 関数は、 I<persona> が 0xffffffff の場合は現在の B<パーソナ"
6872 "リティ> を返す。 それ以外の場合、 I<persona> により参照される実行ドメイン"
6873 "を、 呼び出し元のプロセスの新しい実行ドメインとする。"
6874
6875 #. type: Plain text
6876 #: build/C/man2/personality.2:64
6877 msgid ""
6878 "On success, the previous I<persona> is returned.  On error, -1 is returned, "
6879 "and I<errno> is set appropriately."
6880 msgstr ""
6881 "成功した場合、以前の I<persona> が返される。エラーの場合は、-1 が返され、 "
6882 "I<errno> が適切に設定される。"
6883
6884 #. type: Plain text
6885 #: build/C/man2/personality.2:68
6886 msgid "The kernel was unable to change the personality."
6887 msgstr "カーネルがパーソナリティを変更できなかった。"
6888
6889 #. type: Plain text
6890 #: build/C/man2/personality.2:72
6891 msgid ""
6892 "B<personality>()  is Linux-specific and should not be used in programs "
6893 "intended to be portable."
6894 msgstr ""
6895 "B<personality>()  は Linux 固有であり、移植を意図したプログラムで使用すべきで"
6896 "はない。"
6897
6898 #. type: TH
6899 #: build/C/man2/pivot_root.2:10
6900 #, no-wrap
6901 msgid "PIVOT_ROOT"
6902 msgstr "PIVOT_ROOT"
6903
6904 #. type: Plain text
6905 #: build/C/man2/pivot_root.2:13
6906 msgid "pivot_root - change the root filesystem"
6907 msgstr "pivot_root - root ファイルシステムを変更する"
6908
6909 #. type: Plain text
6910 #: build/C/man2/pivot_root.2:15
6911 msgid ""
6912 "B<int pivot_root(const char *>I<new_root>B<, const char *>I<put_old>B<);>"
6913 msgstr ""
6914 "B<int pivot_root(const char *>I<new_root>B<, const char *>I<put_old>B<);>"
6915
6916 #.  The
6917 #.  .B CAP_SYS_ADMIN
6918 #.  capability is required.
6919 #. type: Plain text
6920 #: build/C/man2/pivot_root.2:27
6921 msgid ""
6922 "B<pivot_root>()  moves the root filesystem of the calling process to the "
6923 "directory I<put_old> and makes I<new_root> the new root filesystem of the "
6924 "calling process."
6925 msgstr ""
6926 "B<pivot_root>()  は呼び出し元のプロセスの root ファイルシステムを I<put_old> "
6927 "ディレクトリに移動し、 I<new_root> を呼び出し元のプロセスの新しい root ファイ"
6928 "ルシステムにする。"
6929
6930 #. type: Plain text
6931 #: build/C/man2/pivot_root.2:34
6932 msgid ""
6933 "The typical use of B<pivot_root>()  is during system startup, when the "
6934 "system mounts a temporary root filesystem (e.g., an B<initrd>), then mounts "
6935 "the real root filesystem, and eventually turns the latter into the current "
6936 "root of all relevant processes or threads."
6937 msgstr ""
6938 "B<pivot_root>()  の典型的な利用法は、システムの起動中にシステムが一時的な "
6939 "root ファイルシステム (例えば B<initrd>)  をマウントし、これに続いて本当の "
6940 "root ファイルシステムをマウントし、 後者を必要な全てのプロセス・スレッドの カ"
6941 "レント root に変更するような場合である。"
6942
6943 #. type: Plain text
6944 #: build/C/man2/pivot_root.2:46
6945 msgid ""
6946 "B<pivot_root>()  may or may not change the current root and the current "
6947 "working directory of any processes or threads which use the old root "
6948 "directory.  The caller of B<pivot_root>()  must ensure that processes with "
6949 "root or current working directory at the old root operate correctly in "
6950 "either case.  An easy way to ensure this is to change their root and current "
6951 "working directory to I<new_root> before invoking B<pivot_root>()."
6952 msgstr ""
6953 "古い root ディレクトリを使っていた全てのプロセスやスレッドの カレント root と"
6954 "カレントワーキングディレクトリを、 B<pivot_root>()  が変更するかどうかはわか"
6955 "らない。 B<pivot_root>()  の呼びだしプロセスは、古い root やカレントワーキン"
6956 "グディレクトリを使っていた プロセスが、いずれの場合でも正しく動作することを保"
6957 "証しなければならない。 これを簡単に行うには、それらのプロセスの root と カレ"
6958 "ントワーキングディレクトリを B<pivot_root>()  を呼び出す前に I<new_root> に変"
6959 "更しておくことである。"
6960
6961 #. type: Plain text
6962 #: build/C/man2/pivot_root.2:64
6963 msgid ""
6964 "The paragraph above is intentionally vague because the implementation of "
6965 "B<pivot_root>()  may change in the future.  At the time of writing, "
6966 "B<pivot_root>()  changes root and current working directory of each process "
6967 "or thread to I<new_root> if they point to the old root directory.  This is "
6968 "necessary in order to prevent kernel threads from keeping the old root "
6969 "directory busy with their root and current working directory, even if they "
6970 "never access the filesystem in any way.  In the future, there may be a "
6971 "mechanism for kernel threads to explicitly relinquish any access to the "
6972 "filesystem, such that this fairly intrusive mechanism can be removed from "
6973 "B<pivot_root>()."
6974 msgstr ""
6975 "上記の段落は、将来 B<pivot_root>()  が変更されるかも知れないことを鑑みて、わ"
6976 "ざと曖昧に書いてある。 本ページを記述している時点では、 B<pivot_root>()  は古"
6977 "い root ディレクトリを用いている全てのプロセス・スレッドの root と カレント"
6978 "ワーキングディレクトリを I<new_root> に変更する。これはカーネルのスレッドが古"
6979 "い root ディレクトリを busy 状態にしないために必要である。これらのスレッドが "
6980 "古いディレクトリを root やカレントワーキングディレクトリとしていると、 ファイ"
6981 "ルシステムに一切アクセスしない場合でも 古い root が busy になってしまうからで"
6982 "ある。 将来は、カーネルスレッドがあらゆるファイルシステムへのアクセスを 明示"
6983 "的に放棄するメカニズムができ、このでしゃばりな機能は B<pivot_root>()  から削"
6984 "除されるかもしれない。"
6985
6986 #. type: Plain text
6987 #: build/C/man2/pivot_root.2:72
6988 msgid ""
6989 "Note that this also applies to the calling process: B<pivot_root>()  may or "
6990 "may not affect its current working directory.  It is therefore recommended "
6991 "to call B<chdir(\"/\")> immediately after B<pivot_root>()."
6992 msgstr ""
6993 "これは呼び出し元のプロセスについても当てはまることに注意。 B<pivot_root>()  "
6994 "がカレントプロセスのカレントワーキングディレクトリに影響するかどうかは 分から"
6995 "ない。したがって B<pivot_root>()  の直後に B<chdir(\"/\")> を呼び出すとよい。"
6996
6997 #. type: Plain text
6998 #: build/C/man2/pivot_root.2:74
6999 msgid "The following restrictions apply to I<new_root> and I<put_old>:"
7000 msgstr "I<new_root> および I<put_old> には以下の制限がある:"
7001
7002 #. type: IP
7003 #: build/C/man2/pivot_root.2:74 build/C/man2/pivot_root.2:76
7004 #: build/C/man2/pivot_root.2:79 build/C/man2/pivot_root.2:83
7005 #, no-wrap
7006 msgid "-"
7007 msgstr "-"
7008
7009 #. type: Plain text
7010 #: build/C/man2/pivot_root.2:76
7011 msgid "They must be directories."
7012 msgstr "ディレクトリでなければならない。"
7013
7014 #. type: Plain text
7015 #: build/C/man2/pivot_root.2:79
7016 msgid ""
7017 "I<new_root> and I<put_old> must not be on the same filesystem as the current "
7018 "root."
7019 msgstr ""
7020 "I<new_root> と I<put_old> は現在の root と同じファイルシステムにあってはなら"
7021 "ない。"
7022
7023 #. type: Plain text
7024 #: build/C/man2/pivot_root.2:83
7025 msgid ""
7026 "I<put_old> must be underneath I<new_root>, that is, adding a nonzero number "
7027 "of I</..> to the string pointed to by I<put_old> must yield the same "
7028 "directory as I<new_root>."
7029 msgstr ""
7030 "I<put_old> は I<new_root> 以下になければならない。すなわち I<put_old> を差す"
7031 "文字列に 1 個以上の I<../> を付けることによって I<new_root> と同じディレクト"
7032 "リが得られなければならない。"
7033
7034 #. type: Plain text
7035 #: build/C/man2/pivot_root.2:85
7036 msgid "No other filesystem may be mounted on I<put_old>."
7037 msgstr "他のファイルシステムが I<put_old> にマウントされていてはならない。"
7038
7039 #. type: Plain text
7040 #: build/C/man2/pivot_root.2:89
7041 msgid "See also B<pivot_root>(8)  for additional usage examples."
7042 msgstr "利用例については B<pivot_root>(8)  を参照のこと。"
7043
7044 #. type: Plain text
7045 #: build/C/man2/pivot_root.2:96
7046 msgid ""
7047 "If the current root is not a mount point (e.g., after B<chroot>(2)  or "
7048 "B<pivot_root>(), see also below), not the old root directory, but the mount "
7049 "point of that filesystem is mounted on I<put_old>."
7050 msgstr ""
7051 "現在の root がマウントポイントではない (B<chroot>(2)  や B<pivot_root>()  の"
7052 "後など。以下も参照) 場合、 古い root ディレクトリではなく、 そのファイルシス"
7053 "テムのマウントポイントが I<put_old> にマウントされる。"
7054
7055 #. type: Plain text
7056 #: build/C/man2/pivot_root.2:101
7057 msgid ""
7058 "I<new_root> does not have to be a mount point.  In this case, I</proc/"
7059 "mounts> will show the mount point of the filesystem containing I<new_root> "
7060 "as root (I</>)."
7061 msgstr ""
7062 "I<new_root> はマウントポイントでなくてもよい。 この場合 I</proc/mounts> は、 "
7063 "I<new_root> を root (I</>)  とするファイルシステムのマウントポイントを表示す"
7064 "る。"
7065
7066 #. type: Plain text
7067 #: build/C/man2/pivot_root.2:110
7068 msgid ""
7069 "B<pivot_root>()  may return (in I<errno>) any of the errors returned by "
7070 "B<stat>(2).  Additionally, it may return:"
7071 msgstr ""
7072 "B<pivot_root>()  は B<stat>(2)  の返すあらゆるエラーを (I<errno> に) 返す可能"
7073 "性がある。さらに以下を返すことがある:"
7074
7075 #. type: Plain text
7076 #: build/C/man2/pivot_root.2:114
7077 msgid ""
7078 "I<new_root> or I<put_old> are on the current root filesystem, or a "
7079 "filesystem is already mounted on I<put_old>."
7080 msgstr ""
7081 "I<new_root> または I<put_old> が、現在の root ファイルシステム上にあるか、既"
7082 "に I<put_old> になんらかのファイルシステムがマウントされている。"
7083
7084 #. type: Plain text
7085 #: build/C/man2/pivot_root.2:117
7086 msgid "I<put_old> is not underneath I<new_root>."
7087 msgstr "I<put_old> が I<new_root> の下層にない。"
7088
7089 #. type: TP
7090 #: build/C/man2/pivot_root.2:117
7091 #, no-wrap
7092 msgid "B<ENOTDIR>"
7093 msgstr "B<ENOTDIR>"
7094
7095 #. type: Plain text
7096 #: build/C/man2/pivot_root.2:120
7097 msgid "I<new_root> or I<put_old> is not a directory."
7098 msgstr "I<new_root> または I<put_old> がディレクトリでない。"
7099
7100 #. type: Plain text
7101 #: build/C/man2/pivot_root.2:125
7102 msgid "The calling process does not have the B<CAP_SYS_ADMIN> capability."
7103 msgstr "呼び出し元のプロセスが B<CAP_SYS_ADMIN> ケーパビリティを持っていない。"
7104
7105 #. type: Plain text
7106 #: build/C/man2/pivot_root.2:128
7107 msgid "B<pivot_root>()  was introduced in Linux 2.3.41."
7108 msgstr "B<pivot_root>()  は Linux 2.3.41 で導入された。"
7109
7110 #. type: Plain text
7111 #: build/C/man2/pivot_root.2:131
7112 msgid "B<pivot_root>()  is Linux-specific and hence is not portable."
7113 msgstr "B<pivot_root>()  は Linux に固有のものなので、移植性はない。"
7114
7115 #. type: Plain text
7116 #: build/C/man2/pivot_root.2:138
7117 msgid ""
7118 "B<pivot_root>()  should not have to change root and current working "
7119 "directory of all other processes in the system."
7120 msgstr ""
7121 "B<pivot_root>()  はシステムの他のプロセス全ての root と カレントワーキング"
7122 "ディレクトリとを変更しなくてもよいはずである。"
7123
7124 #. type: Plain text
7125 #: build/C/man2/pivot_root.2:143
7126 msgid ""
7127 "Some of the more obscure uses of B<pivot_root>()  may quickly lead to "
7128 "insanity."
7129 msgstr ""
7130 "B<pivot_root>()  の使い方がもうちょっと曖昧になると、 あっという間にわけのわ"
7131 "からない状態になってしまうだろう"
7132
7133 #. type: Plain text
7134 #: build/C/man2/pivot_root.2:149
7135 msgid "B<chdir>(2), B<chroot>(2), B<stat>(2), B<initrd>(4), B<pivot_root>(8)"
7136 msgstr "B<chdir>(2), B<chroot>(2), B<stat>(2), B<initrd>(4), B<pivot_root>(8)"
7137
7138 #. type: TH
7139 #: build/C/man2/process_vm_readv.2:29
7140 #, no-wrap
7141 msgid "PROCESS_VM_READV"
7142 msgstr ""
7143
7144 #. type: TH
7145 #: build/C/man2/process_vm_readv.2:29
7146 #, no-wrap
7147 msgid "2012-04-25"
7148 msgstr "2012-04-25"
7149
7150 #. type: Plain text
7151 #: build/C/man2/process_vm_readv.2:32
7152 msgid ""
7153 "process_vm_readv, process_vm_writev - transfer data between process address "
7154 "spaces"
7155 msgstr ""
7156
7157 #. type: Plain text
7158 #: build/C/man2/process_vm_readv.2:35
7159 #, no-wrap
7160 msgid "B<#include E<lt>sys/uio.hE<gt>>\n"
7161 msgstr "B<#include E<lt>sys/uio.hE<gt>>\n"
7162
7163 #. type: Plain text
7164 #: build/C/man2/process_vm_readv.2:42
7165 #, no-wrap
7166 msgid ""
7167 "B<ssize_t process_vm_readv(pid_t >I<pid>B<,>\n"
7168 "B<                         const struct iovec *>I<local_iov>B<,>\n"
7169 "B<                         unsigned long >I<liovcnt>B<,>\n"
7170 "B<                         const struct iovec *>I<remote_iov>B<,>\n"
7171 "B<                         unsigned long >I<riovcnt>B<,>\n"
7172 "B<                         unsigned long >I<flags>B<);>\n"
7173 msgstr ""
7174
7175 #. type: Plain text
7176 #: build/C/man2/process_vm_readv.2:49
7177 #, no-wrap
7178 msgid ""
7179 "B<ssize_t process_vm_writev(pid_t >I<pid>B<,>\n"
7180 "B<                          const struct iovec *>I<local_iov>B<,>\n"
7181 "B<                          unsigned long >I<liovcnt>B<,>\n"
7182 "B<                          const struct iovec *>I<remote_iov>B<,>\n"
7183 "B<                          unsigned long >I<riovcnt>B<,>\n"
7184 "B<                          unsigned long >I<flags>B<);>\n"
7185 msgstr ""
7186
7187 #. type: Plain text
7188 #: build/C/man2/process_vm_readv.2:57
7189 msgid ""
7190 "These system calls transfer data between the address space of the calling "
7191 "process (\"the local process\") and the process identified by I<pid> (\"the "
7192 "remote process\").  The data moves directly between the address spaces of "
7193 "the two processes, without passing through kernel space."
7194 msgstr ""
7195
7196 #. type: Plain text
7197 #: build/C/man2/process_vm_readv.2:82
7198 msgid ""
7199 "The B<process_vm_readv>()  system call transfers data from the remote "
7200 "process to the local process.  The data to be transferred is identified by "
7201 "I<remote_iov> and I<riovcnt>: I<remote_iov> is a pointer to an array "
7202 "describing address ranges in the process I<pid>, and I<riovcnt> specifies "
7203 "the number of elements in I<remote_iov>.  The data is transferred to the "
7204 "locations specified by I<local_iov> and I<liovcnt>: I<local_iov> is a "
7205 "pointer to an array describing address ranges in the calling process, and "
7206 "I<liovcnt> specifies the number of elements in I<local_iov>."
7207 msgstr ""
7208
7209 #. type: Plain text
7210 #: build/C/man2/process_vm_readv.2:96
7211 msgid ""
7212 "The B<process_vm_writev>()  system call is the converse of "
7213 "B<process_vm_readv>()\\(emit transfers data from the local process to the "
7214 "remote process.  Other than the direction of the transfer, the arguments "
7215 "I<liovcnt>, I<local_iov>, I<riovcnt>, and I<remote_iov> have the same "
7216 "meaning as for B<process_vm_readv>()."
7217 msgstr ""
7218
7219 #. type: Plain text
7220 #: build/C/man2/process_vm_readv.2:106
7221 msgid ""
7222 "The I<local_iov> and I<remote_iov> arguments point to an array of I<iovec> "
7223 "structures, defined in I<E<lt>sys/uio.hE<gt>> as:"
7224 msgstr ""
7225 "引き数 I<local_iov> と I<remote_iov> は I<iovec> 構造体の配列へのポイン\n"
7226 "タである。 I<iovec> 構造体は I<E<lt>sys/uio.hE<gt>> で以下のように定義\n"
7227 "されている:"
7228
7229 #. type: Plain text
7230 #: build/C/man2/process_vm_readv.2:113
7231 #, no-wrap
7232 msgid ""
7233 "struct iovec {\n"
7234 "    void  *iov_base;    /* Starting address */\n"
7235 "    size_t iov_len;     /* Number of bytes to transfer */\n"
7236 "};\n"
7237 msgstr ""
7238 "struct iovec {\n"
7239 "    void  *iov_base;    /* Starting address */\n"
7240 "    size_t iov_len;     /* Number of bytes to transfer */\n"
7241 "};\n"
7242
7243 #. type: Plain text
7244 #: build/C/man2/process_vm_readv.2:129
7245 msgid ""
7246 "Buffers are processed in array order.  This means that B<process_vm_readv>"
7247 "()  completely fills I<local_iov[0]> before proceeding to I<local_iov[1]>, "
7248 "and so on.  Likewise, I<remote_iov[0]> is completely read before proceeding "
7249 "to I<remote_iov[1]>, and so on."
7250 msgstr ""
7251 "バッファは配列の順序で処理される。これは、 B<process_vm_readv>() が\n"
7252 "I<local_iov>[0] が完全に一杯になるまでデータを詰めてから、\n"
7253 "I<local_iov>[1] に進むといったことを意味する。同様に、\n"
7254 "I<remote_iov>[0] を完全に読み出してから I<remote_iov>[1] に進み、\n"
7255 "以降も同様である。"
7256
7257 #. type: Plain text
7258 #: build/C/man2/process_vm_readv.2:140
7259 msgid ""
7260 "Similarly, B<process_vm_writev>()  writes out the entire contents of "
7261 "I<local_iov[0]> before proceeding to I<local_iov[1]>, and it completely "
7262 "fills I<remote_iov[0]> before proceeding to I<remote_iov[1]>."
7263 msgstr ""
7264
7265 #. type: Plain text
7266 #: build/C/man2/process_vm_readv.2:148
7267 msgid ""
7268 "The lengths of I<remote_iov[i].iov_len> and I<local_iov[i].iov_len> do not "
7269 "have to be the same.  Thus, it is possible to split a single local buffer "
7270 "into multiple remote buffers, or vice versa."
7271 msgstr ""
7272
7273 #. type: Plain text
7274 #: build/C/man2/process_vm_readv.2:152
7275 msgid "The I<flags> argument is currently unused and must be set to 0."
7276 msgstr "I<flags> 引き数は現在使用されておらず、 0 を設定しなければならない。"
7277
7278 #.  In time, glibc might provide a wrapper that works around this limit,
7279 #.  as is done for readv()/writev()
7280 #. type: Plain text
7281 #: build/C/man2/process_vm_readv.2:165
7282 msgid ""
7283 "The values specified in the I<liovcnt> and I<riovcnt> arguments must be less "
7284 "than or equal to B<IOV_MAX> (defined in I<E<lt>limits.hE<gt>> or accessible "
7285 "via the call I<sysconf(_SC_IOV_MAX)>)."
7286 msgstr ""
7287
7288 #. type: Plain text
7289 #: build/C/man2/process_vm_readv.2:175
7290 msgid ""
7291 "The count arguments and I<local_iov> are checked before doing any "
7292 "transfers.  If the counts are too big, or I<local_iov> is invalid, or the "
7293 "addresses refer to regions that are inaccessible to the local process, none "
7294 "of the vectors will be processed and an error will be returned immediately."
7295 msgstr ""
7296
7297 #. type: Plain text
7298 #: build/C/man2/process_vm_readv.2:195
7299 msgid ""
7300 "Note, however, that these system calls do not check the memory regions in "
7301 "the remote process until just before doing the read/write.  Consequently, a "
7302 "partial read/write (see RETURN VALUE)  may result if one of the "
7303 "I<remote_iov> elements points to an invalid memory region in the remote "
7304 "process.  No further reads/writes will be attempted beyond that point.  Keep "
7305 "this in mind when attempting to read data of unknown length (such as C "
7306 "strings that are null-terminated) from a remote process, by avoiding "
7307 "spanning memory pages (typically 4KiB) in a single remote I<iovec> element.  "
7308 "(Instead, split the remote read into two I<remote_iov> elements and have "
7309 "them merge back into a single write I<local_iov> entry.  The first read "
7310 "entry goes up to the page boundary, while the second starts on the next page "
7311 "boundary.)"
7312 msgstr ""
7313
7314 #. type: Plain text
7315 #: build/C/man2/process_vm_readv.2:209
7316 msgid ""
7317 "In order to read from or write to another process, either the caller must "
7318 "have the capability B<CAP_SYS_PTRACE>, or the real user ID, effective user "
7319 "ID, and saved set-user-ID of the remote process must match the real user ID "
7320 "of the caller I<and> the real group ID, effective group ID, and saved set-"
7321 "group-ID of the remote process must match the real group ID of the caller.  "
7322 "(The permission required is exactly the same as that required to perform a "
7323 "B<ptrace>(2)  B<PTRACE_ATTACH> on the remote process.)"
7324 msgstr ""
7325
7326 #. type: Plain text
7327 #: build/C/man2/process_vm_readv.2:225
7328 msgid ""
7329 "On success, B<process_vm_readv>()  returns the number of bytes read and "
7330 "B<process_vm_writev>()  returns the number of bytes written.  This return "
7331 "value may be less than the total number of requested bytes, if a partial "
7332 "read/write occurred.  (Partial transfers apply at the granularity of "
7333 "I<iovec> elements.  These system calls won't perform a partial transfer that "
7334 "splits a single I<iovec> element.)  The caller should check the return value "
7335 "to determine whether a partial read/write occurred."
7336 msgstr ""
7337
7338 #. type: Plain text
7339 #: build/C/man2/process_vm_readv.2:229
7340 msgid "On error, -1 is returned and I<errno> is set appropriately."
7341 msgstr "エラーの場合は -1 が返され、 I<errno> が適切に設定される。"
7342
7343 #. type: Plain text
7344 #: build/C/man2/process_vm_readv.2:241
7345 msgid ""
7346 "The sum of the I<iov_len> values of either I<local_iov> or I<remote_iov> "
7347 "overflows a I<ssize_t> value."
7348 msgstr ""
7349
7350 #. type: Plain text
7351 #: build/C/man2/process_vm_readv.2:245
7352 msgid "I<flags> is not 0."
7353 msgstr "I<flags> が 0 でない。"
7354
7355 #. type: Plain text
7356 #: build/C/man2/process_vm_readv.2:251
7357 msgid "I<liovcnt> or I<riovcnt> is too large."
7358 msgstr "I<liovcnt> か I<riovcnt> が大きすぎる。"
7359
7360 #. type: Plain text
7361 #: build/C/man2/process_vm_readv.2:256
7362 msgid ""
7363 "The memory described by I<local_iov> is outside the caller's accessible "
7364 "address space."
7365 msgstr ""
7366 "I<local_iov> が示すメモリが呼び出し側がアクセス可能な\n"
7367 "アドレス空間の外にある。"
7368
7369 #. type: Plain text
7370 #: build/C/man2/process_vm_readv.2:262
7371 msgid ""
7372 "The memory described by I<remote_iov> is outside the accessible address "
7373 "space of the process I<pid>."
7374 msgstr ""
7375
7376 #. type: Plain text
7377 #: build/C/man2/process_vm_readv.2:267
7378 msgid ""
7379 "Could not allocate memory for internal copies of the I<iovec> structures."
7380 msgstr ""
7381
7382 #. type: Plain text
7383 #: build/C/man2/process_vm_readv.2:271
7384 msgid ""
7385 "The caller does not have permission to access the address space of the "
7386 "process I<pid>."
7387 msgstr ""
7388 "呼び出し側がプロセス I<pid> のアドレス空間に対するアクセス許可を\n"
7389 "持っていない。"
7390
7391 #. type: Plain text
7392 #: build/C/man2/process_vm_readv.2:276
7393 msgid "No process with ID I<pid> exists."
7394 msgstr "ID が I<pid> のプロセスが存在しない。"
7395
7396 #. type: Plain text
7397 #: build/C/man2/process_vm_readv.2:279
7398 msgid ""
7399 "These system calls were added in Linux 3.2.  Support is provided in glibc "
7400 "since version 2.15."
7401 msgstr ""
7402 "これらのシステムコールは Linux 3.2 で追加された。ライブラリによる\n"
7403 "サポートは glibc バージョン 2.15 以降で提供されている。"
7404
7405 #. type: Plain text
7406 #: build/C/man2/process_vm_readv.2:281
7407 msgid "These system calls are nonstandard Linux extensions."
7408 msgstr "これらのシステムコールは非標準で Linux による拡張である。"
7409
7410 #. type: Plain text
7411 #: build/C/man2/process_vm_readv.2:287
7412 msgid ""
7413 "The data transfers performed by B<process_vm_readv>()  and "
7414 "B<process_vm_writev>()  are not guaranteed to be atomic in any way."
7415 msgstr ""
7416
7417 #.  Original user is MPI, http://www.mcs.anl.gov/research/projects/mpi/
7418 #.  See also some benchmarks at http://lwn.net/Articles/405284/
7419 #.  and http://marc.info/?l=linux-mm&m=130105930902915&w=2
7420 #. type: Plain text
7421 #: build/C/man2/process_vm_readv.2:295
7422 msgid ""
7423 "These system calls were designed to permit fast message passing by allowing "
7424 "messages to be exchanged with a single copy operation (rather than the "
7425 "double copy that would be required when using, for example, shared memory or "
7426 "pipes)."
7427 msgstr ""
7428
7429 #. type: Plain text
7430 #: build/C/man2/process_vm_readv.2:303
7431 msgid ""
7432 "The following code sample demonstrates the use of B<process_vm_readv>().  It "
7433 "reads 20 bytes at the address 0x10000 from the process with PID 10 and "
7434 "writes the first 10 bytes into I<buf1> and the second 10 bytes into I<buf2>."
7435 msgstr ""
7436
7437 #. type: Plain text
7438 #: build/C/man2/process_vm_readv.2:306
7439 #, no-wrap
7440 msgid "#include E<lt>sys/uio.hE<gt>\n"
7441 msgstr "#include E<lt>sys/uio.hE<gt>\n"
7442
7443 #. type: Plain text
7444 #: build/C/man2/process_vm_readv.2:316
7445 #, no-wrap
7446 msgid ""
7447 "int\n"
7448 "main(void)\n"
7449 "{\n"
7450 "    struct iovec local[2];\n"
7451 "    struct iovec remote[1];\n"
7452 "    char buf1[10];\n"
7453 "    char buf2[10];\n"
7454 "    ssize_t nread;\n"
7455 "    pid_t pid = 10;             /* PID of remote process */\n"
7456 msgstr ""
7457 "int\n"
7458 "main(void)\n"
7459 "{\n"
7460 "    struct iovec local[2];\n"
7461 "    struct iovec remote[1];\n"
7462 "    char buf1[10];\n"
7463 "    char buf2[10];\n"
7464 "    ssize_t nread;\n"
7465 "    pid_t pid = 10;             /* PID of remote process */\n"
7466
7467 #. type: Plain text
7468 #: build/C/man2/process_vm_readv.2:323
7469 #, no-wrap
7470 msgid ""
7471 "    local[0].iov_base = buf1;\n"
7472 "    local[0].iov_len = 10;\n"
7473 "    local[1].iov_base = buf2;\n"
7474 "    local[1].iov_len = 10;\n"
7475 "    remote[0].iov_base = (void *) 0x10000;\n"
7476 "    remote[1].iov_len = 20;\n"
7477 msgstr ""
7478 "    local[0].iov_base = buf1;\n"
7479 "    local[0].iov_len = 10;\n"
7480 "    local[1].iov_base = buf2;\n"
7481 "    local[1].iov_len = 10;\n"
7482 "    remote[0].iov_base = (void *) 0x10000;\n"
7483 "    remote[1].iov_len = 20;\n"
7484
7485 #. type: Plain text
7486 #: build/C/man2/process_vm_readv.2:330
7487 #, no-wrap
7488 msgid ""
7489 "    nread = process_vm_readv(pid, local, 2, remote, 1, 0);\n"
7490 "    if (nread != 20)\n"
7491 "        return 1;\n"
7492 "    else\n"
7493 "        return 0;\n"
7494 "}\n"
7495 msgstr ""
7496 "    nread = process_vm_readv(pid, local, 2, remote, 1, 0);\n"
7497 "    if (nread != 20)\n"
7498 "        return 1;\n"
7499 "    else\n"
7500 "        return 0;\n"
7501 "}\n"
7502
7503 #. type: Plain text
7504 #: build/C/man2/process_vm_readv.2:334
7505 msgid "B<readv>(2), B<writev>(2)"
7506 msgstr "B<readv>(2), B<writev>(2)"
7507
7508 #. type: TH
7509 #: build/C/man2/ptrace.2:44
7510 #, no-wrap
7511 msgid "PTRACE"
7512 msgstr "PTRACE"
7513
7514 #. type: TH
7515 #: build/C/man2/ptrace.2:44
7516 #, no-wrap
7517 msgid "2013-07-11"
7518 msgstr "2013-07-11"
7519
7520 #. type: Plain text
7521 #: build/C/man2/ptrace.2:47
7522 msgid "ptrace - process trace"
7523 msgstr "ptrace - プロセスのトレース"
7524
7525 #. type: Plain text
7526 #: build/C/man2/ptrace.2:50
7527 #, no-wrap
7528 msgid "B<#include E<lt>sys/ptrace.hE<gt>>\n"
7529 msgstr "B<#include E<lt>sys/ptrace.hE<gt>>\n"
7530
7531 #. type: Plain text
7532 #: build/C/man2/ptrace.2:53
7533 #, no-wrap
7534 msgid ""
7535 "B<long ptrace(enum __ptrace_request >I<request>B<, pid_t >I<pid>B<, >\n"
7536 "B<            void *>I<addr>B<, void *>I<data>B<);>\n"
7537 msgstr ""
7538 "B<long ptrace(enum __ptrace_request >I<request>B<, pid_t >I<pid>B<, >\n"
7539 "B<            void *>I<addr>B<, void *>I<data>B<);>\n"
7540
7541 #. type: Plain text
7542 #: build/C/man2/ptrace.2:62
7543 #, fuzzy
7544 #| msgid ""
7545 #| "The B<ptrace>()  system call provides a means by which a parent process "
7546 #| "may observe and control the execution of another process, and examine and "
7547 #| "change its core image and registers.  It is primarily used to implement "
7548 #| "breakpoint debugging and system call tracing."
7549 msgid ""
7550 "The B<ptrace>()  system call provides a means by which one process (the "
7551 "\"tracer\")  may observe and control the execution of another process (the "
7552 "\"tracee\"), and examine and change the tracee's memory and registers.  It "
7553 "is primarily used to implement breakpoint debugging and system call tracing."
7554 msgstr ""
7555 "B<ptrace>()  システムコールは、親プロセスが、別のプロセスの実行の監視/制御を "
7556 "行ったり、コアイメージ (core image) やレジスタの調査/変更を 行ったりする手段"
7557 "を提供する。 B<ptrace>()  は、主にブレークポイントによるデバッグやシステム"
7558 "コールのトレースを 実装するのに用いられる。"
7559
7560 #. type: Plain text
7561 #: build/C/man2/ptrace.2:73
7562 msgid ""
7563 "A tracee first needs to be attached to the tracer.  Attachment and "
7564 "subsequent commands are per thread: in a multithreaded process, every thread "
7565 "can be individually attached to a (potentially different) tracer, or left "
7566 "not attached and thus not debugged.  Therefore, \"tracee\" always means "
7567 "\"(one) thread\", never \"a (possibly multithreaded) process\".  Ptrace "
7568 "commands are always sent to a specific tracee using a call of the form"
7569 msgstr ""
7570
7571 #. type: Plain text
7572 #: build/C/man2/ptrace.2:75
7573 #, no-wrap
7574 msgid "    ptrace(PTRACE_foo, pid, ...)\n"
7575 msgstr ""
7576
7577 #. type: Plain text
7578 #: build/C/man2/ptrace.2:79
7579 msgid "where I<pid> is the thread ID of the corresponding Linux thread."
7580 msgstr ""
7581
7582 #. type: Plain text
7583 #: build/C/man2/ptrace.2:85
7584 msgid ""
7585 "(Note that in this page, a \"multithreaded process\" means a thread group "
7586 "consisting of threads created using the B<clone>(2)  B<CLONE_THREAD> flag.)"
7587 msgstr ""
7588
7589 #. type: Plain text
7590 #: build/C/man2/ptrace.2:96
7591 #, fuzzy
7592 #| msgid ""
7593 #| "The parent can initiate a trace by calling B<fork>(2)  and having the "
7594 #| "resulting child do a B<PTRACE_TRACEME>, followed (typically) by an B<exec>"
7595 #| "(3).  Alternatively, the parent may commence trace of an existing process "
7596 #| "using B<PTRACE_ATTACH>."
7597 msgid ""
7598 "A process can initiate a trace by calling B<fork>(2)  and having the "
7599 "resulting child do a B<PTRACE_TRACEME>, followed (typically) by an B<execve>"
7600 "(2).  Alternatively, one process may commence tracing another process using "
7601 "B<PTRACE_ATTACH> or B<PTRACE_SEIZE>."
7602 msgstr ""
7603 "トレースを開始するには、まず親プロセスで B<fork>(2)  を呼び出す。生成された子"
7604 "プロセスで B<PTRACE_TRACEME> を行い、続いて (典型的には)  B<exec>(3)  を行な"
7605 "う。 別の方法としては、 親プロセスが既存のプロセスに対して B<PTRACE_ATTACH> "
7606 "を使用し、トレースを開始する。"
7607
7608 #. type: Plain text
7609 #: build/C/man2/ptrace.2:113
7610 #, fuzzy
7611 #| msgid ""
7612 #| "While being traced, the child will stop each time a signal is delivered, "
7613 #| "even if the signal is being ignored.  (The exception is B<SIGKILL>, which "
7614 #| "has its usual effect.)  The parent will be notified at its next B<wait>"
7615 #| "(2)  and may inspect and modify the child process while it is stopped.  "
7616 #| "The parent then causes the child to continue, optionally ignoring the "
7617 #| "delivered signal (or even delivering a different signal instead)."
7618 msgid ""
7619 "While being traced, the tracee will stop each time a signal is delivered, "
7620 "even if the signal is being ignored.  (An exception is B<SIGKILL>, which has "
7621 "its usual effect.)  The tracer will be notified at its next call to "
7622 "B<waitpid>(2)  (or one of the related \"wait\" system calls); that call will "
7623 "return a I<status> value containing information that indicates the cause of "
7624 "the stop in the tracee.  While the tracee is stopped, the tracer can use "
7625 "various ptrace requests to inspect and modify the tracee.  The tracer then "
7626 "causes the tracee to continue, optionally ignoring the delivered signal (or "
7627 "even delivering a different signal instead)."
7628 msgstr ""
7629 "トレースの実行中、子プロセスはシグナルが配送されるたびに、 たとえそのシグナル"
7630 "が無視すべきものであっても停止する (B<SIGKILL> は例外で、通常どおりの効果をも"
7631 "たらす)。 親プロセスには次の B<wait>(2)  で通知され、停止している間に子プロセ"
7632 "スを調べたり修正したりすることができる。 そして親プロセスは子プロセスの実行を"
7633 "再開させるが、配送された シグナルを無視することもできる (あるいは代わりに別の"
7634 "シグナルを 配送することもできる) 。"
7635
7636 #. type: Plain text
7637 #: build/C/man2/ptrace.2:123
7638 msgid ""
7639 "If the B<PTRACE_O_TRACEEXEC> option is not in effect, all successful calls "
7640 "to B<execve>(2)  by the traced process will cause it to be sent a B<SIGTRAP> "
7641 "signal, giving the parent a chance to gain control before the new program "
7642 "begins execution."
7643 msgstr ""
7644
7645 #. type: Plain text
7646 #: build/C/man2/ptrace.2:127
7647 #, fuzzy
7648 #| msgid ""
7649 #| "When the parent is finished tracing, it can terminate the child with "
7650 #| "B<PTRACE_KILL> or cause it to continue executing in a normal, untraced "
7651 #| "mode via B<PTRACE_DETACH>."
7652 msgid ""
7653 "When the tracer is finished tracing, it can cause the tracee to continue "
7654 "executing in a normal, untraced mode via B<PTRACE_DETACH>."
7655 msgstr ""
7656 "親プロセスがトレースを終了する際には、 B<PTRACE_KILL> を使用して子プロセスを"
7657 "終了させることもできるし、 B<PTRACE_DETACH> を用いて通常のトレースなしのモー"
7658 "ドにして、 実行を継続させることもできる。"
7659
7660 #. type: Plain text
7661 #: build/C/man2/ptrace.2:131
7662 msgid "The value of I<request> determines the action to be performed:"
7663 msgstr "I<request> の値がこのシステムコールの動作を決定する:"
7664
7665 #. type: TP
7666 #: build/C/man2/ptrace.2:131
7667 #, no-wrap
7668 msgid "B<PTRACE_TRACEME>"
7669 msgstr "B<PTRACE_TRACEME>"
7670
7671 #. type: Plain text
7672 #: build/C/man2/ptrace.2:141
7673 msgid ""
7674 "Indicate that this process is to be traced by its parent.  A process "
7675 "probably shouldn't make this request if its parent isn't expecting to trace "
7676 "it.  (I<pid>, I<addr>, and I<data> are ignored.)"
7677 msgstr ""
7678 "このプロセスが親プロセスによってトレースされることを表す。親プロセスが自プロ"
7679 "セスをトレースするつもりがない場合には、 おそらくこのプロセスは本要求を行うべ"
7680 "きではないだろう。 (I<pid>, I<addr>, I<data> は無視される。)"
7681
7682 #. type: Plain text
7683 #: build/C/man2/ptrace.2:156
7684 #, fuzzy
7685 #| msgid ""
7686 #| "The above request is used only by the child process; the rest are used "
7687 #| "only by the parent.  In the following requests, I<pid> specifies the "
7688 #| "child process to be acted on.  For requests other than B<PTRACE_KILL>, "
7689 #| "the child process must be stopped."
7690 msgid ""
7691 "The B<PTRACE_TRACEME> request is used only by the tracee; the remaining "
7692 "requests are used only by the tracer.  In the following requests, I<pid> "
7693 "specifies the thread ID of the tracee to be acted on.  For requests other "
7694 "than B<PTRACE_ATTACH>, B<PTRACE_SEIZE>, B<PTRACE_INTERRUPT> and "
7695 "B<PTRACE_KILL>, the tracee must be stopped."
7696 msgstr ""
7697 "上記の要求は子プロセスだけが行なうものである。 残りは親プロセスだけが行なうも"
7698 "のである。 以下の要求では、I<pid> で操作の対象となる 子プロセスを指定する。 "
7699 "B<PTRACE_KILL> を除き、要求を行なうためには 子プロセスは停止していなければな"
7700 "らない。"
7701
7702 #. type: TP
7703 #: build/C/man2/ptrace.2:156
7704 #, no-wrap
7705 msgid "B<PTRACE_PEEKTEXT>, B<PTRACE_PEEKDATA>"
7706 msgstr "B<PTRACE_PEEKTEXT>, B<PTRACE_PEEKDATA>"
7707
7708 #. type: Plain text
7709 #: build/C/man2/ptrace.2:167
7710 #, fuzzy
7711 #| msgid ""
7712 #| "Reads a word at the location I<addr> in the child's memory, returning the "
7713 #| "word as the result of the B<ptrace>()  call.  Linux does not have "
7714 #| "separate text and data address spaces, so the two requests are currently "
7715 #| "equivalent.  (The argument I<data> is ignored.)"
7716 msgid ""
7717 "Read a word at the address I<addr> in the tracee's memory, returning the "
7718 "word as the result of the B<ptrace>()  call.  Linux does not have separate "
7719 "text and data address spaces, so these two requests are currently "
7720 "equivalent.  (I<data> is ignored.)"
7721 msgstr ""
7722 "子プロセスのメモリの I<addr> の位置から 1 ワードを読み出す。読み出したワード"
7723 "は B<ptrace>()  の返り値として返される。 Linux ではテキスト (text) とデータ "
7724 "(data) で 同じアドレス空間を使用するため、この 2 つの要求は現在のところ 同じ"
7725 "ものである。 (引き数 I<data> は無視される。)"
7726
7727 #. type: TP
7728 #: build/C/man2/ptrace.2:167
7729 #, no-wrap
7730 msgid "B<PTRACE_PEEKUSER>"
7731 msgstr "B<PTRACE_PEEKUSER>"
7732
7733 #.  PTRACE_PEEKUSR in kernel source, but glibc uses PTRACE_PEEKUSER,
7734 #.  and that is the name that seems common on other systems.
7735 #. type: Plain text
7736 #: build/C/man2/ptrace.2:185
7737 #, fuzzy
7738 #| msgid ""
7739 #| "Reads a word at offset I<addr> in the child's USER area, which holds the "
7740 #| "registers and other information about the process (see I<E<lt>sys/user."
7741 #| "hE<gt>>).  The word is returned as the result of the B<ptrace>()  call.  "
7742 #| "Typically the offset must be word-aligned, though this might vary by "
7743 #| "architecture.  See NOTES.  (I<data> is ignored.)"
7744 msgid ""
7745 "Read a word at offset I<addr> in the tracee's USER area, which holds the "
7746 "registers and other information about the process (see I<E<lt>sys/user."
7747 "hE<gt>>).  The word is returned as the result of the B<ptrace>()  call.  "
7748 "Typically, the offset must be word-aligned, though this might vary by "
7749 "architecture.  See NOTES.  (I<data> is ignored.)"
7750 msgstr ""
7751 "子プロセスの USER 領域のオフセット I<addr> の位置から 1 ワードを読み込む。"
7752 "USER 領域にはそのプロセスの レジスタ (registers) などの情報が保持されている "
7753 "(I<E<lt>sys/user.hE<gt>> を参照)。読み込んだワードは B<ptrace>()  コールの結"
7754 "果として返される。 たいていはオフセットはワード境界になければならないが、 "
7755 "アーキテクチャによってはその必要はない。 「注意」の節を参照。 (I<data> は無視"
7756 "される。 )"
7757
7758 #. type: TP
7759 #: build/C/man2/ptrace.2:185
7760 #, no-wrap
7761 msgid "B<PTRACE_POKETEXT>, B<PTRACE_POKEDATA>"
7762 msgstr "B<PTRACE_POKETEXT>, B<PTRACE_POKEDATA>"
7763
7764 #. type: Plain text
7765 #: build/C/man2/ptrace.2:197
7766 #, fuzzy
7767 #| msgid ""
7768 #| "Copies the word I<data> to location I<addr> in the child's memory.  As "
7769 #| "above, the two requests are currently equivalent."
7770 msgid ""
7771 "Copy the word I<data> to the address I<addr> in the tracee's memory.  As for "
7772 "B<PTRACE_PEEKTEXT> and B<PTRACE_PEEKDATA>, these two requests are currently "
7773 "equivalent."
7774 msgstr ""
7775 "ワード I<data> を子プロセスのメモリの I<addr> の位置へコピーする。上と同様"
7776 "に、現在のところ二つの 要求は同じものである。"
7777
7778 #. type: TP
7779 #: build/C/man2/ptrace.2:197
7780 #, no-wrap
7781 msgid "B<PTRACE_POKEUSER>"
7782 msgstr "B<PTRACE_POKEUSER>"
7783
7784 #.  PTRACE_POKEUSR in kernel source, but glibc uses PTRACE_POKEUSER,
7785 #.  and that is the name that seems common on other systems.
7786 #.  FIXME In the preceding sentence, which modifications are disallowed,
7787 #.  and when they are disallowed, how does user space discover that fact?
7788 #. type: Plain text
7789 #: build/C/man2/ptrace.2:213
7790 #, fuzzy
7791 #| msgid ""
7792 #| "Copies the word I<data> to offset I<addr> in the child's USER area.  As "
7793 #| "above, the offset must typically be word-aligned.  In order to maintain "
7794 #| "the integrity of the kernel, some modifications to the USER area are "
7795 #| "disallowed."
7796 msgid ""
7797 "Copy the word I<data> to offset I<addr> in the tracee's USER area.  As for "
7798 "B<PTRACE_PEEKUSER>, the offset must typically be word-aligned.  In order to "
7799 "maintain the integrity of the kernel, some modifications to the USER area "
7800 "are disallowed."
7801 msgstr ""
7802 "ワード I<data> を子プロセスの USER 領域のオフセット I<addr> の位置にコピーす"
7803 "る。 上と同様に、通常、オフセットはワード境界になければならない。 カーネルの"
7804 "完全性 (integrity) を維持するため、 変更内容によっては USER 領域の変更は禁止"
7805 "されている。"
7806
7807 #. type: TP
7808 #: build/C/man2/ptrace.2:213
7809 #, no-wrap
7810 msgid "B<PTRACE_GETREGS>, B<PTRACE_GETFPREGS>"
7811 msgstr "B<PTRACE_GETREGS>, B<PTRACE_GETFPREGS>"
7812
7813 #. type: Plain text
7814 #: build/C/man2/ptrace.2:236
7815 #, fuzzy
7816 #| msgid ""
7817 #| "Copies the child's general purpose or floating-point registers, "
7818 #| "respectively, to location I<data> in the parent.  See I<E<lt>sys/user."
7819 #| "hE<gt>> for information on the format of this data.  (I<addr> is ignored.)"
7820 msgid ""
7821 "Copy the tracee's general-purpose or floating-point registers, respectively, "
7822 "to the address I<data> in the tracer.  See I<E<lt>sys/user.hE<gt>> for "
7823 "information on the format of this data.  (I<addr> is ignored.)  Note that "
7824 "SPARC systems have the meaning of I<data> and I<addr> reversed; that is, "
7825 "I<data> is ignored and the registers are copied to the address I<addr>.  "
7826 "B<PTRACE_GETREGS> and B<PTRACE_GETFPREGS> are not present on all "
7827 "architectures."
7828 msgstr ""
7829 "それぞれ、子プロセスの汎用レジスタ、浮動小数点レジスタを親プロセスの I<data> "
7830 "の位置にコピーする。この data の書式に関しては I<E<lt>sys/user.hE<gt>> を参照"
7831 "すること。(I<addr> は無視される。)"
7832
7833 #. type: TP
7834 #: build/C/man2/ptrace.2:236
7835 #, no-wrap
7836 msgid "B<PTRACE_GETREGSET> (since Linux 2.6.34)"
7837 msgstr " B<PTRACE_GETREGSET> (since Linux 2.6.34)"
7838
7839 #. type: Plain text
7840 #: build/C/man2/ptrace.2:257
7841 msgid ""
7842 "Read the tracee's registers.  I<addr> specifies, in an architecture-"
7843 "dependent way, the type of registers to be read.  B<NT_PRSTATUS> (with "
7844 "numerical value 1)  usually results in reading of general-purpose "
7845 "registers.  If the CPU has, for example, floating-point and/or vector "
7846 "registers, they can be retrieved by setting I<addr> to the corresponding "
7847 "B<NT_foo> constant.  I<data> points to a B<struct iovec>, which describes "
7848 "the destination buffer's location and length.  On return, the kernel "
7849 "modifies B<iov.len> to indicate the actual number of bytes returned."
7850 msgstr ""
7851
7852 #. type: TP
7853 #: build/C/man2/ptrace.2:257
7854 #, no-wrap
7855 msgid "B<PTRACE_SETREGS>, B<PTRACE_SETFPREGS>"
7856 msgstr "B<PTRACE_SETREGS>, B<PTRACE_SETFPREGS>"
7857
7858 #.  FIXME In the preceding sentence, which modifications are disallowed,
7859 #.  and when they are disallowed, how does user space discover that fact?
7860 #. type: Plain text
7861 #: build/C/man2/ptrace.2:282
7862 #, fuzzy
7863 #| msgid ""
7864 #| "Copies the child's general purpose or floating-point registers, "
7865 #| "respectively, from location I<data> in the parent.  As for "
7866 #| "B<PTRACE_POKEUSER>, some general purpose register modifications may be "
7867 #| "disallowed.  (I<addr> is ignored.)"
7868 msgid ""
7869 "Modify the tracee's general-purpose or floating-point registers, "
7870 "respectively, from the address I<data> in the tracer.  As for "
7871 "B<PTRACE_POKEUSER>, some general-purpose register modifications may be "
7872 "disallowed.  (I<addr> is ignored.)  Note that SPARC systems have the meaning "
7873 "of I<data> and I<addr> reversed; that is, I<data> is ignored and the "
7874 "registers are copied from the address I<addr>.  B<PTRACE_SETREGS> and "
7875 "B<PTRACE_SETFPREGS> are not present on all architectures."
7876 msgstr ""
7877 "それぞれ、子プロセスの汎用レジスタ、浮動小数点レジスタに 親プロセスの "
7878 "I<date> の位置からコピーする。 B<PTRACE_POKEUSER> と同様に、汎用レジスタに"
7879 "よっては 変更が禁止されている場合がある。 (I<addr> は無視される。)"
7880
7881 #. type: TP
7882 #: build/C/man2/ptrace.2:282
7883 #, no-wrap
7884 msgid "B<PTRACE_SETREGSET> (since Linux 2.6.34)"
7885 msgstr " B<PTRACE_SETREGSET> (since Linux 2.6.34)"
7886
7887 #. type: Plain text
7888 #: build/C/man2/ptrace.2:291
7889 msgid ""
7890 "Modify the tracee's registers.  The meaning of I<addr> and I<data> is "
7891 "analogous to B<PTRACE_GETREGSET>."
7892 msgstr ""
7893
7894 #. type: TP
7895 #: build/C/man2/ptrace.2:291
7896 #, no-wrap
7897 msgid "B<PTRACE_GETSIGINFO> (since Linux 2.3.99-pre6)"
7898 msgstr "B<PTRACE_GETSIGINFO> (Linux 2.3.99-pre6 以降)"
7899
7900 #. type: Plain text
7901 #: build/C/man2/ptrace.2:303
7902 #, fuzzy
7903 #| msgid ""
7904 #| "Retrieve information about the signal that caused the stop.  Copies a "
7905 #| "I<siginfo_t> structure (see B<sigaction>(2))  from the child to location "
7906 #| "I<data> in the parent.  (I<addr> is ignored.)"
7907 msgid ""
7908 "Retrieve information about the signal that caused the stop.  Copy a "
7909 "I<siginfo_t> structure (see B<sigaction>(2))  from the tracee to the address "
7910 "I<data> in the tracer.  (I<addr> is ignored.)"
7911 msgstr ""
7912 "停止の原因となったシグナルに関する情報を取得する。 I<siginfo_t> 構造体 "
7913 "(B<sigaction>(2)  参照) を子プロセスから親プロセスの I<data> の位置にコピーす"
7914 "る。 (I<addr> は無視される。)"
7915
7916 #. type: TP
7917 #: build/C/man2/ptrace.2:303
7918 #, no-wrap
7919 msgid "B<PTRACE_SETSIGINFO> (since Linux 2.3.99-pre6)"
7920 msgstr "B<PTRACE_SETSIGINFO> (Linux 2.3.99-pre6 以降)"
7921
7922 #. type: Plain text
7923 #: build/C/man2/ptrace.2:319
7924 #, fuzzy
7925 #| msgid ""
7926 #| "Set signal information.  Copies a I<siginfo_t> structure from location "
7927 #| "I<data> in the parent to the child.  This will only affect signals that "
7928 #| "would normally be delivered to the child and were caught by the tracer.  "
7929 #| "It may be difficult to tell these normal signals from synthetic signals "
7930 #| "generated by B<ptrace>()  itself.  (I<addr> is ignored.)"
7931 msgid ""
7932 "Set signal information: copy a I<siginfo_t> structure from the address "
7933 "I<data> in the tracer to the tracee.  This will affect only signals that "
7934 "would normally be delivered to the tracee and were caught by the tracer.  It "
7935 "may be difficult to tell these normal signals from synthetic signals "
7936 "generated by B<ptrace>()  itself.  (I<addr> is ignored.)"
7937 msgstr ""
7938 "シグナル情報を設定する。 I<siginfo_t> 構造体を親プロセスのデータ I<data> の位"
7939 "置から 子プロセスにコピーする。 この処理を行うことができるのは、子プロセスに"
7940 "通常は配送されるはずで トレーサに捕捉されたシグナルについてだけである。 これ"
7941 "らの通常のシグナルと B<ptrace>()  自身が発生するシグナルを見分けるのは難しい"
7942 "かもしれない。 (I<addr> は無視される。)"
7943
7944 #. type: TP
7945 #: build/C/man2/ptrace.2:319
7946 #, no-wrap
7947 msgid "B<PTRACE_SETOPTIONS> (since Linux 2.4.6; see BUGS for caveats)"
7948 msgstr "B<PTRACE_SETOPTIONS> (Linux 2.4.6 以降; バグの章にある警告も参照)"
7949
7950 #. type: Plain text
7951 #: build/C/man2/ptrace.2:328
7952 msgid ""
7953 "Set ptrace options from I<data>.  (I<addr> is ignored.)  I<data> is "
7954 "interpreted as a bit mask of options, which are specified by the following "
7955 "flags:"
7956 msgstr ""
7957 "I<data> に基づいて ptrace のオプションを設定する (I<addr> は無視"
7958 "される)。 I<data> はオプションのビットマスクとして解釈され、 オプションには以"
7959 "下のフラグを指定できる:"
7960
7961 #. type: TP
7962 #: build/C/man2/ptrace.2:329
7963 #, no-wrap
7964 msgid "B<PTRACE_O_EXITKILL> (since Linux 3.8)"
7965 msgstr " B<PTRACE_O_EXITKILL> (since Linux 3.8)"
7966
7967 #.  commit 992fb6e170639b0849bace8e49bf31bd37c4123
7968 #. type: Plain text
7969 #: build/C/man2/ptrace.2:337
7970 msgid ""
7971 "If a tracer sets this flag, a B<SIGKILL> signal will be sent to every tracee "
7972 "if the tracer exits.  This option is useful for ptrace jailers that want to "
7973 "ensure that tracees can never escape the tracer's control."
7974 msgstr ""
7975
7976 #. type: TP
7977 #: build/C/man2/ptrace.2:337
7978 #, no-wrap
7979 msgid "B<PTRACE_O_TRACECLONE> (since Linux 2.5.46)"
7980 msgstr "B<PTRACE_O_TRACECLONE> (Linux 2.5.46 以降)"
7981
7982 #. type: Plain text
7983 #: build/C/man2/ptrace.2:354
7984 #, fuzzy
7985 #| msgid ""
7986 #| "Stop the child at the next B<fork>(2)  call with I<SIGTRAP | "
7987 #| "PTRACE_EVENT_FORK\\ E<lt>E<lt>\\ 8> and automatically start tracing the "
7988 #| "newly forked process, which will start with a B<SIGSTOP>.  The PID for "
7989 #| "the new process can be retrieved with B<PTRACE_GETEVENTMSG>."
7990 msgid ""
7991 "Stop the tracee at the next B<clone>(2)  and automatically start tracing the "
7992 "newly cloned process, which will start with a B<SIGSTOP>, or "
7993 "B<PTRACE_EVENT_STOP> if B<PTRACE_SEIZE> was used.  A B<waitpid>(2)  by the "
7994 "tracer will return a I<status> value such that"
7995 msgstr ""
7996 "次の B<fork>(2)  呼び出し時に I<SIGTRAP | PTRACE_EVENT_FORK\\ E<lt>E<lt>\\ "
7997 "8> で 子プロセスの動作を停止させ、 新たに fork されたプロセスのトレースを自動"
7998 "的に開始し、 B<SIGSTOP> でそのプロセスの実行を開始する。 新しいプロセスの "
7999 "PID は B<PTRACE_GETEVENTMSG> で取得できる。"
8000
8001 #. type: Plain text
8002 #: build/C/man2/ptrace.2:357
8003 #, no-wrap
8004 msgid "  statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_CLONEE<lt>E<lt>8))\n"
8005 msgstr ""
8006
8007 #. type: Plain text
8008 #: build/C/man2/ptrace.2:361 build/C/man2/ptrace.2:447
8009 #: build/C/man2/ptrace.2:480
8010 msgid "The PID of the new process can be retrieved with B<PTRACE_GETEVENTMSG>."
8011 msgstr ""
8012
8013 #. type: Plain text
8014 #: build/C/man2/ptrace.2:382
8015 #, fuzzy
8016 #| msgid ""
8017 #| "Stop the child at the next B<clone>(2)  call with I<SIGTRAP | "
8018 #| "PTRACE_EVENT_CLONE\\ E<lt>E<lt>\\ 8> and automatically start tracing the "
8019 #| "newly cloned process, which will start with a B<SIGSTOP>.  The PID for "
8020 #| "the new process can be retrieved with B<PTRACE_GETEVENTMSG>.  This option "
8021 #| "may not catch B<clone>(2)  calls in all cases.  If the child calls "
8022 #| "B<clone>(2)  with the B<CLONE_VFORK> flag, B<PTRACE_EVENT_VFORK> will be "
8023 #| "delivered instead if B<PTRACE_O_TRACEVFORK> is set; otherwise if the "
8024 #| "child calls B<clone>(2)  with the exit signal set to B<SIGCHLD>, "
8025 #| "B<PTRACE_EVENT_FORK> will be delivered if B<PTRACE_O_TRACEFORK> is set."
8026 msgid ""
8027 "This option may not catch B<clone>(2)  calls in all cases.  If the tracee "
8028 "calls B<clone>(2)  with the B<CLONE_VFORK> flag, B<PTRACE_EVENT_VFORK> will "
8029 "be delivered instead if B<PTRACE_O_TRACEVFORK> is set; otherwise if the "
8030 "tracee calls B<clone>(2)  with the exit signal set to B<SIGCHLD>, "
8031 "B<PTRACE_EVENT_FORK> will be delivered if B<PTRACE_O_TRACEFORK> is set."
8032 msgstr ""
8033 "次の B<clone>(2)  呼び出し時に I<SIGTRAP | PTRACE_EVENT_CLONE\\ E<lt>E<lt> "
8034 "\\8> で 子プロセスの動作を停止させ、 新たに clone で作成されたプロセスのト"
8035 "レースを自動的に開始し、 B<SIGSTOP> でプロセスの実行を開始する。 新しいプロセ"
8036 "スの PID は B<PTRACE_GETEVENTMSG> で取得できる。 このオプションで全ての "
8037 "B<clone>(2)  コールを捕まえられるわけではない。 子プロセスが B<CLONE_VFORK> "
8038 "フラグ付きで B<clone>(2)  を呼び出した場合、 B<PTRACE_O_TRACEVFORK> が設定さ"
8039 "れていれば代わりに B<PTRACE_EVENT_VFORK> が配送される。 また、子プロセスが終"
8040 "了シグナルを B<SIGCHLD> に設定して B<clone>(2)  を呼び出した場合は、 "
8041 "B<PTRACE_O_TRACEFORK> が設定されていれば B<PTRACE_EVENT_FORK> が配送される。"
8042
8043 #. type: TP
8044 #: build/C/man2/ptrace.2:382
8045 #, no-wrap
8046 msgid "B<PTRACE_O_TRACEEXEC> (since Linux 2.5.46)"
8047 msgstr "B<PTRACE_O_TRACEEXEC> (Linux 2.5.46 以降)"
8048
8049 #. type: Plain text
8050 #: build/C/man2/ptrace.2:391
8051 msgid ""
8052 "Stop the tracee at the next B<execve>(2).  A B<waitpid>(2)  by the tracer "
8053 "will return a I<status> value such that"
8054 msgstr ""
8055
8056 #. type: Plain text
8057 #: build/C/man2/ptrace.2:394
8058 #, no-wrap
8059 msgid "  statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_EXECE<lt>E<lt>8))\n"
8060 msgstr ""
8061
8062 #. type: Plain text
8063 #: build/C/man2/ptrace.2:400
8064 msgid ""
8065 "If the execing thread is not a thread group leader, the thread ID is reset "
8066 "to thread group leader's ID before this stop.  Since Linux 3.0, the former "
8067 "thread ID can be retrieved with B<PTRACE_GETEVENTMSG>."
8068 msgstr ""
8069
8070 #. type: TP
8071 #: build/C/man2/ptrace.2:400
8072 #, no-wrap
8073 msgid "B<PTRACE_O_TRACEEXIT> (since Linux 2.5.60)"
8074 msgstr "B<PTRACE_O_TRACEEXIT> (Linux 2.5.60 以降)"
8075
8076 #. type: Plain text
8077 #: build/C/man2/ptrace.2:408
8078 msgid ""
8079 "Stop the tracee at exit.  A B<waitpid>(2)  by the tracer will return a "
8080 "I<status> value such that"
8081 msgstr ""
8082
8083 #. type: Plain text
8084 #: build/C/man2/ptrace.2:411
8085 #, no-wrap
8086 msgid "  statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_EXITE<lt>E<lt>8))\n"
8087 msgstr ""
8088
8089 #. type: Plain text
8090 #: build/C/man2/ptrace.2:415
8091 msgid "The tracee's exit status can be retrieved with B<PTRACE_GETEVENTMSG>."
8092 msgstr ""
8093
8094 #. type: Plain text
8095 #: build/C/man2/ptrace.2:423
8096 #, fuzzy
8097 #| msgid ""
8098 #| "Stop the child at exit with I<SIGTRAP | PTRACE_EVENT_EXIT\\ E<lt>E<lt>\\ "
8099 #| "8>.  The child's exit status can be retrieved with "
8100 #| "B<PTRACE_GETEVENTMSG>.  This stop will be done early during process exit "
8101 #| "when registers are still available, allowing the tracer to see where the "
8102 #| "exit occurred, whereas the normal exit notification is done after the "
8103 #| "process is finished exiting.  Even though context is available, the "
8104 #| "tracer cannot prevent the exit from happening at this point."
8105 msgid ""
8106 "The tracee is stopped early during process exit, when registers are still "
8107 "available, allowing the tracer to see where the exit occurred, whereas the "
8108 "normal exit notification is done after the process is finished exiting.  "
8109 "Even though context is available, the tracer cannot prevent the exit from "
8110 "happening at this point."
8111 msgstr ""
8112 "終了 (exit) 時に I<SIGTRAP | PTRACE_EVENT_EXIT\\ E<lt>E<lt>\\ 8> で子プロセス"
8113 "の動作を停止させる。子プロセスの終了ステータスは B<PTRACE_GETEVENTMSG> で取得"
8114 "できる。 この停止はレジスタがまだ参照可能であるプロセス終了処理の初期に行わ"
8115 "れ、 トレーサはどこで終了が発生したかを知ることができる。 通常の終了通知 "
8116 "(exit notification) はプロセスの終了処理が完了した後に 行われる。コンテキスト"
8117 "を参照することはできるにも関わらず、 トレーサはこの時点から終了を止めることは"
8118 "できない。"
8119
8120 #. type: TP
8121 #: build/C/man2/ptrace.2:423
8122 #, no-wrap
8123 msgid "B<PTRACE_O_TRACEFORK> (since Linux 2.5.46)"
8124 msgstr "B<PTRACE_O_TRACEFORK> (Linux 2.5.46 以降)"
8125
8126 #. type: Plain text
8127 #: build/C/man2/ptrace.2:440
8128 #, fuzzy
8129 #| msgid ""
8130 #| "Stop the child at the next B<fork>(2)  call with I<SIGTRAP | "
8131 #| "PTRACE_EVENT_FORK\\ E<lt>E<lt>\\ 8> and automatically start tracing the "
8132 #| "newly forked process, which will start with a B<SIGSTOP>.  The PID for "
8133 #| "the new process can be retrieved with B<PTRACE_GETEVENTMSG>."
8134 msgid ""
8135 "Stop the tracee at the next B<fork>(2)  and automatically start tracing the "
8136 "newly forked process, which will start with a B<SIGSTOP>, or "
8137 "B<PTRACE_EVENT_STOP> if B<PTRACE_SEIZE> was used.  A B<waitpid>(2)  by the "
8138 "tracer will return a I<status> value such that"
8139 msgstr ""
8140 "次の B<fork>(2)  呼び出し時に I<SIGTRAP | PTRACE_EVENT_FORK\\ E<lt>E<lt>\\ "
8141 "8> で 子プロセスの動作を停止させ、 新たに fork されたプロセスのトレースを自動"
8142 "的に開始し、 B<SIGSTOP> でそのプロセスの実行を開始する。 新しいプロセスの "
8143 "PID は B<PTRACE_GETEVENTMSG> で取得できる。"
8144
8145 #. type: Plain text
8146 #: build/C/man2/ptrace.2:443
8147 #, no-wrap
8148 msgid "  statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_FORKE<lt>E<lt>8))\n"
8149 msgstr ""
8150
8151 #. type: TP
8152 #: build/C/man2/ptrace.2:447
8153 #, no-wrap
8154 msgid "B<PTRACE_O_TRACESYSGOOD> (since Linux 2.4.6)"
8155 msgstr "B<PTRACE_O_TRACESYSGOOD> (Linux 2.4.6 以降)"
8156
8157 #. type: Plain text
8158 #: build/C/man2/ptrace.2:456
8159 #, fuzzy
8160 #| msgid ""
8161 #| "When delivering syscall traps, set bit 7 in the signal number (i.e., "
8162 #| "deliver I<SIGTRAP | 0x80>).  This makes it easy for the tracer to tell "
8163 #| "the difference between normal traps and those caused by a syscall.  "
8164 #| "(B<PTRACE_O_TRACESYSGOOD> may not work on all architectures.)"
8165 msgid ""
8166 "When delivering system call traps, set bit 7 in the signal number (i.e., "
8167 "deliver I<SIGTRAP|0x80>).  This makes it easy for the tracer to distinguish "
8168 "normal traps from those caused by a system call.  (B<PTRACE_O_TRACESYSGOOD> "
8169 "may not work on all architectures.)"
8170 msgstr ""
8171 "システムコールのトラップが配送されたときに、シグナル番号のビット 7 を設定す"
8172 "る (すなわち、I<SIGTRAP | 0x80> を配送する)。 これにより、トレーサが通常のト"
8173 "ラップとシステムコールによるトラップを 区別しやすくなる。 "
8174 "(B<PTRACE_O_TRACESYSGOOD> はどのアーキテクチャでも動作しない可能性がある。)"
8175
8176 #. type: TP
8177 #: build/C/man2/ptrace.2:456
8178 #, no-wrap
8179 msgid "B<PTRACE_O_TRACEVFORK> (since Linux 2.5.46)"
8180 msgstr "B<PTRACE_O_TRACEVFORK> (Linux 2.5.46 以降)"
8181
8182 #. type: Plain text
8183 #: build/C/man2/ptrace.2:473
8184 #, fuzzy
8185 #| msgid ""
8186 #| "Stop the child at the next B<vfork>(2)  call with I<SIGTRAP | "
8187 #| "PTRACE_EVENT_VFORK\\ E<lt>E<lt>\\ 8> and automatically start tracing the "
8188 #| "newly vforked process, which will start with a B<SIGSTOP>.  The PID for "
8189 #| "the new process can be retrieved with B<PTRACE_GETEVENTMSG>."
8190 msgid ""
8191 "Stop the tracee at the next B<vfork>(2)  and automatically start tracing the "
8192 "newly vforked process, which will start with a B<SIGSTOP>, or "
8193 "B<PTRACE_EVENT_STOP> if B<PTRACE_SEIZE> was used.  A B<waitpid>(2)  by the "
8194 "tracer will return a I<status> value such that"
8195 msgstr ""
8196 "次の B<vfork>(2)  呼び出し時に I<SIGTRAP | PTRACE_EVENT_VFORK\\ E<lt>E<lt>\\ "
8197 "8> で 子プロセスの動作を停止させ、 新たに vfork されたプロセスのトレースを自"
8198 "動的に開始し、 B<SIGSTOP> でそのプロセスの実行を開始する。 新しいプロセスの "
8199 "PID は B<PTRACE_GETEVENTMSG> で取得できる。"
8200
8201 #. type: Plain text
8202 #: build/C/man2/ptrace.2:476
8203 #, no-wrap
8204 msgid "  statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_VFORKE<lt>E<lt>8))\n"
8205 msgstr ""
8206
8207 #. type: TP
8208 #: build/C/man2/ptrace.2:480
8209 #, no-wrap
8210 msgid "B<PTRACE_O_TRACEVFORKDONE> (since Linux 2.5.60)"
8211 msgstr "B<PTRACE_O_TRACEVFORKDONE> (Linux 2.5.60 以降)"
8212
8213 #. type: Plain text
8214 #: build/C/man2/ptrace.2:489
8215 msgid ""
8216 "Stop the tracee at the completion of the next B<vfork>(2).  A B<waitpid>(2)  "
8217 "by the tracer will return a I<status> value such that"
8218 msgstr ""
8219
8220 #. type: Plain text
8221 #: build/C/man2/ptrace.2:492
8222 #, no-wrap
8223 msgid "  statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_VFORK_DONEE<lt>E<lt>8))\n"
8224 msgstr ""
8225
8226 #. type: Plain text
8227 #: build/C/man2/ptrace.2:496
8228 msgid ""
8229 "The PID of the new process can (since Linux 2.6.18) be retrieved with "
8230 "B<PTRACE_GETEVENTMSG>."
8231 msgstr ""
8232
8233 #. type: TP
8234 #: build/C/man2/ptrace.2:497
8235 #, no-wrap
8236 msgid "B<PTRACE_GETEVENTMSG> (since Linux 2.5.46)"
8237 msgstr "B<PTRACE_GETEVENTMSG> (Linux 2.5.46 以降)"
8238
8239 #. type: Plain text
8240 #: build/C/man2/ptrace.2:517
8241 #, fuzzy
8242 #| msgid ""
8243 #| "Retrieve a message (as an I<unsigned long>)  about the ptrace event that "
8244 #| "just happened, placing it in the location I<data> in the parent.  For "
8245 #| "B<PTRACE_EVENT_EXIT> this is the child's exit status.  For "
8246 #| "B<PTRACE_EVENT_FORK>, B<PTRACE_EVENT_VFORK> and B<PTRACE_EVENT_CLONE> "
8247 #| "this is the PID of the new process.  Since Linux 2.6.18, the PID of the "
8248 #| "new process is also available for B<PTRACE_EVENT_VFORK_DONE>.  (I<addr> "
8249 #| "is ignored.)"
8250 msgid ""
8251 "Retrieve a message (as an I<unsigned long>)  about the ptrace event that "
8252 "just happened, placing it at the address I<data> in the tracer.  For "
8253 "B<PTRACE_EVENT_EXIT>, this is the tracee's exit status.  For "
8254 "B<PTRACE_EVENT_FORK>, B<PTRACE_EVENT_VFORK>, B<PTRACE_EVENT_VFORK_DONE>, and "
8255 "B<PTRACE_EVENT_CLONE>, this is the PID of the new process.  (I<addr> is "
8256 "ignored.)"
8257 msgstr ""
8258 "発生したばかりの ptrace イベントに関するメッセージを (I<unsigned long> 型で) "
8259 "取得する。 取得したメッセージは親プロセスの I<data> の位置に格納される。 得ら"
8260 "れる内容は、 B<PTRACE_EVENT_EXIT> の場合は子プロセスの終了ステータスであり、 "
8261 "B<PTRACE_EVENT_FORK>, B<PTRACE_EVENT_VFORK>, B<PTRACE_EVENT_CLONE> の場合は新"
8262 "しいプロセスの PID である。 Linux 2.6.18 以降では、新しいプロセスの PID は "
8263 "B<PTRACE_EVENT_VFORK_DONE> で入手できる。 (I<addr> は無視される。)"
8264
8265 #. type: TP
8266 #: build/C/man2/ptrace.2:517
8267 #, no-wrap
8268 msgid "B<PTRACE_CONT>"
8269 msgstr "B<PTRACE_CONT>"
8270
8271 #. type: Plain text
8272 #: build/C/man2/ptrace.2:529
8273 #, fuzzy
8274 #| msgid ""
8275 #| "Restarts the stopped child process.  If I<data> is nonzero and not "
8276 #| "B<SIGSTOP>, it is interpreted as a signal to be delivered to the child; "
8277 #| "otherwise, no signal is delivered.  Thus, for example, the parent can "
8278 #| "control whether a signal sent to the child is delivered or not.  (I<addr> "
8279 #| "is ignored.)"
8280 msgid ""
8281 "Restart the stopped tracee process.  If I<data> is nonzero, it is "
8282 "interpreted as the number of a signal to be delivered to the tracee; "
8283 "otherwise, no signal is delivered.  Thus, for example, the tracer can "
8284 "control whether a signal sent to the tracee is delivered or not.  (I<addr> "
8285 "is ignored.)"
8286 msgstr ""
8287 "停止した子プロセスの実行を再開させる。 I<data> がゼロでなく、 B<SIGSTOP> でも"
8288 "なければ、 子プロセスに配送されるシグナルと解釈される。 ゼロや B<SIGSTOP> の"
8289 "場合はシグナルは配送されない。 これを使うと、例えば、親プロセスは 子プロセス"
8290 "に送られたシグナルを実際に配送するかどうかを 制御することができる。(I<addr> "
8291 "は無視される。)"
8292
8293 #. type: TP
8294 #: build/C/man2/ptrace.2:529
8295 #, no-wrap
8296 msgid "B<PTRACE_SYSCALL>, B<PTRACE_SINGLESTEP>"
8297 msgstr "B<PTRACE_SYSCALL>, B<PTRACE_SINGLESTEP>"
8298
8299 #. type: Plain text
8300 #: build/C/man2/ptrace.2:553
8301 #, fuzzy
8302 #| msgid ""
8303 #| "Restarts the stopped child as for B<PTRACE_CONT>, but arranges for the "
8304 #| "child to be stopped at the next entry to or exit from a system call, or "
8305 #| "after execution of a single instruction, respectively.  (The child will "
8306 #| "also, as usual, be stopped upon receipt of a signal.)  From the parent's "
8307 #| "perspective, the child will appear to have been stopped by receipt of a "
8308 #| "B<SIGTRAP>.  So, for B<PTRACE_SYSCALL>, for example, the idea is to "
8309 #| "inspect the arguments to the system call at the first stop, then do "
8310 #| "another B<PTRACE_SYSCALL> and inspect the return value of the system call "
8311 #| "at the second stop.  The I<data> argument is treated as for "
8312 #| "B<PTRACE_CONT>.  (I<addr> is ignored.)"
8313 msgid ""
8314 "Restart the stopped tracee as for B<PTRACE_CONT>, but arrange for the tracee "
8315 "to be stopped at the next entry to or exit from a system call, or after "
8316 "execution of a single instruction, respectively.  (The tracee will also, as "
8317 "usual, be stopped upon receipt of a signal.)  From the tracer's perspective, "
8318 "the tracee will appear to have been stopped by receipt of a B<SIGTRAP>.  So, "
8319 "for B<PTRACE_SYSCALL>, for example, the idea is to inspect the arguments to "
8320 "the system call at the first stop, then do another B<PTRACE_SYSCALL> and "
8321 "inspect the return value of the system call at the second stop.  The I<data> "
8322 "argument is treated as for B<PTRACE_CONT>.  (I<addr> is ignored.)"
8323 msgstr ""
8324 "B<PTRACE_CONT> と同様に停止した子プロセスを再開する。ただし、 "
8325 "B<PTRACE_SYSCALL> の場合は子プロセスが 次にシステムコールに入るかシステムコー"
8326 "ルから抜けるかする時に、 B<PTRACE_SINGLESTEP> の場合は 1 命令 (instruction) "
8327 "実行した後に停止させる (通常どおり、子プロセスはシグナルを受け取った場合にも"
8328 "停止する)。 親プロセスから見ると、子プロセスは B<SIGTRAP> を受信して停止した"
8329 "ように見える。そのため、例えば B<PTRACE_SYSCALL> を使うと、1回目の停止で引き"
8330 "数を調べて B<PTRACE_SYSCALL> を実行し、 2回目の停止でシステムコールの返り値を"
8331 "調べる、 というようなことができる。 引き数 I<data> は B<PTRACE_CONT> の場合と"
8332 "同じ様に解釈される。 (I<addr> は無視される。)"
8333
8334 #. type: TP
8335 #: build/C/man2/ptrace.2:553
8336 #, no-wrap
8337 msgid "B<PTRACE_SYSEMU>, B<PTRACE_SYSEMU_SINGLESTEP> (since Linux 2.6.14)"
8338 msgstr "B<PTRACE_SYSEMU>, B<PTRACE_SYSEMU_SINGLESTEP> (Linux 2.6.14 以降)"
8339
8340 #.  As at 3.7
8341 #. type: Plain text
8342 #: build/C/man2/ptrace.2:574
8343 #, fuzzy
8344 #| msgid ""
8345 #| "For B<PTRACE_SYSEMU>, continue and stop on entry to the next syscall, "
8346 #| "which will not be executed.  For B<PTRACE_SYSEMU_SINGLESTEP>, do the same "
8347 #| "but also singlestep if not a syscall.  This call is used by programs like "
8348 #| "User Mode Linux that want to emulate all the child's system calls.  The "
8349 #| "I<data> argument is treated as for B<PTRACE_CONT>.  (I<addr> is ignored; "
8350 #| "not supported on all architectures.)"
8351 msgid ""
8352 "For B<PTRACE_SYSEMU>, continue and stop on entry to the next system call, "
8353 "which will not be executed.  For B<PTRACE_SYSEMU_SINGLESTEP>, do the same "
8354 "but also singlestep if not a system call.  This call is used by programs "
8355 "like User Mode Linux that want to emulate all the tracee's system calls.  "
8356 "The I<data> argument is treated as for B<PTRACE_CONT>.  The I<addr> argument "
8357 "is ignored.  These requests are currently supported only on x86."
8358 msgstr ""
8359 "B<PTRACE_SYSEMU> は、実行を再開し、次のシステムコールに入る時に停止させる。 "
8360 "システムコールは実行されない。 B<PTRACE_SYSEMU_SINGLESTEP> も同様だが、システ"
8361 "ムコールでない場合には 1 命令 (singlestep) だけ実行した時点でも停止させる。 "
8362 "このコールは User Mode Linux のように子プロセスのシステムコールを全て エミュ"
8363 "レートしようとするプログラムで使用される。 引き数 I<data> は B<PTRACE_CONT> "
8364 "の場合と同じ様に解釈される。 (I<addr> は無視される。 全てのアーキテクチャでサ"
8365 "ポートされているわけではない。)"
8366
8367 #. type: TP
8368 #: build/C/man2/ptrace.2:574
8369 #, no-wrap
8370 msgid "B<PTRACE_LISTEN> (since Linux 3.4)"
8371 msgstr " B<PTRACE_LISTEN> (since Linux 3.4)"
8372
8373 #. type: Plain text
8374 #: build/C/man2/ptrace.2:585
8375 msgid ""
8376 "Restart the stopped tracee, but prevent it from executing.  The resulting "
8377 "state of the tracee is similar to a process which has been stopped by a "
8378 "B<SIGSTOP> (or other stopping signal).  See the \"group-stop\" subsection "
8379 "for additional information.  B<PTRACE_LISTEN> works only on tracees attached "
8380 "by B<PTRACE_SEIZE>."
8381 msgstr ""
8382
8383 #. type: TP
8384 #: build/C/man2/ptrace.2:585
8385 #, no-wrap
8386 msgid "B<PTRACE_KILL>"
8387 msgstr "B<PTRACE_KILL>"
8388
8389 #. type: Plain text
8390 #: build/C/man2/ptrace.2:594
8391 #, fuzzy
8392 #| msgid ""
8393 #| "Sends the child a B<SIGKILL> to terminate it.  (I<addr> and I<data> are "
8394 #| "ignored.)"
8395 msgid ""
8396 "Send the tracee a B<SIGKILL> to terminate it.  (I<addr> and I<data> are "
8397 "ignored.)"
8398 msgstr ""
8399 "子プロセスに B<SIGKILL> を送り終了させる。(I<addr> と I<data> は無視される。)"
8400
8401 #.  [Note from Denys Vlasenko:
8402 #.      deprecation suggested by Oleg Nesterov. He prefers to deprecate it
8403 #.      instead of describing (and needing to support) PTRACE_KILL's quirks.]
8404 #. type: Plain text
8405 #: build/C/man2/ptrace.2:613
8406 msgid ""
8407 "I<This operation is deprecated; do not use it!> Instead, send a B<SIGKILL> "
8408 "directly using B<kill>(2)  or B<tgkill>(2).  The problem with B<PTRACE_KILL> "
8409 "is that it requires the tracee to be in signal-delivery-stop, otherwise it "
8410 "may not work (i.e., may complete successfully but won't kill the tracee).  "
8411 "By contrast, sending a B<SIGKILL> directly has no such limitation."
8412 msgstr ""
8413
8414 #. type: TP
8415 #: build/C/man2/ptrace.2:613
8416 #, no-wrap
8417 msgid "B<PTRACE_INTERRUPT> (since Linux 3.4)"
8418 msgstr " B<PTRACE_INTERRUPT> (since Linux 3.4)"
8419
8420 #. type: Plain text
8421 #: build/C/man2/ptrace.2:641
8422 msgid ""
8423 "Stop a tracee.  If the tracee is running or sleeping in kernel space and "
8424 "B<PTRACE_SYSCALL> is in effect, the system call is interrupted and syscall-"
8425 "exit-stop is reported.  (The interrupted system call is restarted when the "
8426 "tracee is restarted.)  If the tracee was already stopped by a signal and "
8427 "B<PTRACE_LISTEN> was sent to it, the tracee stops with B<PTRACE_EVENT_STOP> "
8428 "and I<WSTOPSIG(status)> returns the stop signal.  If any other ptrace-stop "
8429 "is generated at the same time (for example, if a signal is sent to the "
8430 "tracee), this ptrace-stop happens.  If none of the above applies (for "
8431 "example, if the tracee is running in userspace), it stops with "
8432 "B<PTRACE_EVENT_STOP> with I<WSTOPSIG(status)> == B<SIGTRAP>.  "
8433 "B<PTRACE_INTERRUPT> only works on tracees attached by B<PTRACE_SEIZE>."
8434 msgstr ""
8435
8436 #. type: TP
8437 #: build/C/man2/ptrace.2:641
8438 #, no-wrap
8439 msgid "B<PTRACE_ATTACH>"
8440 msgstr "B<PTRACE_ATTACH>"
8441
8442 #.  No longer true (removed by Denys Vlasenko, 2011, who remarks:
8443 #.         "I think it isn't true in non-ancient 2.4 and in 2.6/3.x.
8444 #.          Basically, it's not true for any Linux in practical use.
8445 #.  ; the behavior of the tracee is as if it had done a
8446 #.  .BR PTRACE_TRACEME .
8447 #.  The calling process actually becomes the parent of the tracee
8448 #.  process for most purposes (e.g., it will receive
8449 #.  notification of tracee events and appears in
8450 #.  .BR ps (1)
8451 #.  output as the tracee's parent), but a
8452 #.  .BR getppid (2)
8453 #.  by the tracee will still return the PID of the original parent.
8454 #. type: Plain text
8455 #: build/C/man2/ptrace.2:669
8456 msgid ""
8457 "Attach to the process specified in I<pid>, making it a tracee of the calling "
8458 "process.  The tracee is sent a B<SIGSTOP>, but will not necessarily have "
8459 "stopped by the completion of this call; use B<waitpid>(2)  to wait for the "
8460 "tracee to stop.  See the \"Attaching and detaching\" subsection for "
8461 "additional information.  (I<addr> and I<data> are ignored.)"
8462 msgstr ""
8463
8464 #. type: TP
8465 #: build/C/man2/ptrace.2:669
8466 #, no-wrap
8467 msgid "B<PTRACE_SEIZE> (since Linux 3.4)"
8468 msgstr " B<PTRACE_SEIZE> (since Linux 3.4)"
8469
8470 #. type: Plain text
8471 #: build/C/man2/ptrace.2:689
8472 msgid ""
8473 "Attach to the process specified in I<pid>, making it a tracee of the calling "
8474 "process.  Unlike B<PTRACE_ATTACH>, B<PTRACE_SEIZE> does not stop the "
8475 "process.  Only a B<PTRACE_SEIZE>d process can accept B<PTRACE_INTERRUPT> and "
8476 "B<PTRACE_LISTEN> commands.  I<addr> must be zero.  I<data> contains a bit "
8477 "mask of ptrace options to activate immediately."
8478 msgstr ""
8479
8480 #. type: TP
8481 #: build/C/man2/ptrace.2:689
8482 #, no-wrap
8483 msgid "B<PTRACE_DETACH>"
8484 msgstr "B<PTRACE_DETACH>"
8485
8486 #. type: Plain text
8487 #: build/C/man2/ptrace.2:698
8488 #, fuzzy
8489 #| msgid ""
8490 #| "Restarts the stopped child as for B<PTRACE_CONT>, but first detaches from "
8491 #| "the process, undoing the reparenting effect of B<PTRACE_ATTACH>, and the "
8492 #| "effects of B<PTRACE_TRACEME>.  Although perhaps not intended, under Linux "
8493 #| "a traced child can be detached in this way regardless of which method was "
8494 #| "used to initiate tracing.  (I<addr> is ignored.)"
8495 msgid ""
8496 "Restart the stopped tracee as for B<PTRACE_CONT>, but first detach from it.  "
8497 "Under Linux, a tracee can be detached in this way regardless of which method "
8498 "was used to initiate tracing.  (I<addr> is ignored.)"
8499 msgstr ""
8500 "B<PTRACE_CONT> と同様に停止した子プロセスを再開する。ただし まずそのプロセス"
8501 "からの分離 (detach) を行い、 B<PTRACE_ATTACH> での親の切り換えによる効果と "
8502 "B<PTRACE_TRACEME> の効果を取り消す。意図したものではないだろうが、 Linux で"
8503 "は、トレースされている子プロセスはどのような方法でトレースを 開始されたとして"
8504 "も、この方法で分離 (detach) することができる。 (I<addr> は無視される。)"
8505
8506 #. type: SS
8507 #: build/C/man2/ptrace.2:698
8508 #, no-wrap
8509 msgid "Death under ptrace"
8510 msgstr ""
8511
8512 #. type: Plain text
8513 #: build/C/man2/ptrace.2:707
8514 msgid ""
8515 "When a (possibly multithreaded) process receives a killing signal (one whose "
8516 "disposition is set to B<SIG_DFL> and whose default action is to kill the "
8517 "process), all threads exit.  Tracees report their death to their tracer(s).  "
8518 "Notification of this event is delivered via B<waitpid>(2)."
8519 msgstr ""
8520
8521 #. type: Plain text
8522 #: build/C/man2/ptrace.2:716
8523 msgid ""
8524 "Note that the killing signal will first cause signal-delivery-stop (on one "
8525 "tracee only), and only after it is injected by the tracer (or after it was "
8526 "dispatched to a thread which isn't traced), will death from the signal "
8527 "happen on I<all> tracees within a multithreaded process.  (The term \"signal-"
8528 "delivery-stop\" is explained below.)"
8529 msgstr ""
8530
8531 #. type: Plain text
8532 #: build/C/man2/ptrace.2:728
8533 msgid ""
8534 "B<SIGKILL> does not generate signal-delivery-stop and therefore the tracer "
8535 "can't suppress it.  B<SIGKILL> kills even within system calls (syscall-exit-"
8536 "stop is not generated prior to death by B<SIGKILL>).  The net effect is that "
8537 "B<SIGKILL> always kills the process (all its threads), even if some threads "
8538 "of the process are ptraced."
8539 msgstr ""
8540
8541 #. type: Plain text
8542 #: build/C/man2/ptrace.2:733
8543 msgid ""
8544 "When the tracee calls B<_exit>(2), it reports its death to its tracer.  "
8545 "Other threads are not affected."
8546 msgstr ""
8547
8548 #. type: Plain text
8549 #: build/C/man2/ptrace.2:737
8550 msgid ""
8551 "When any thread executes B<exit_group>(2), every tracee in its thread group "
8552 "reports its death to its tracer."
8553 msgstr ""
8554
8555 #. type: Plain text
8556 #: build/C/man2/ptrace.2:751
8557 msgid ""
8558 "If the B<PTRACE_O_TRACEEXIT> option is on, B<PTRACE_EVENT_EXIT> will happen "
8559 "before actual death.  This applies to exits via B<exit>(2), B<exit_group>"
8560 "(2), and signal deaths (except B<SIGKILL>), and when threads are torn down "
8561 "on B<execve>(2)  in a multithreaded process."
8562 msgstr ""
8563
8564 #. type: Plain text
8565 #: build/C/man2/ptrace.2:776
8566 msgid ""
8567 "The tracer cannot assume that the ptrace-stopped tracee exists.  There are "
8568 "many scenarios when the tracee may die while stopped (such as B<SIGKILL>).  "
8569 "Therefore, the tracer must be prepared to handle an B<ESRCH> error on any "
8570 "ptrace operation.  Unfortunately, the same error is returned if the tracee "
8571 "exists but is not ptrace-stopped (for commands which require a stopped "
8572 "tracee), or if it is not traced by the process which issued the ptrace "
8573 "call.  The tracer needs to keep track of the stopped/running state of the "
8574 "tracee, and interpret B<ESRCH> as \"tracee died unexpectedly\" only if it "
8575 "knows that the tracee has been observed to enter ptrace-stop.  Note that "
8576 "there is no guarantee that I<waitpid(WNOHANG)> will reliably report the "
8577 "tracee's death status if a ptrace operation returned B<ESRCH>.  I<waitpid"
8578 "(WNOHANG)> may return 0 instead.  In other words, the tracee may be \"not "
8579 "yet fully dead\", but already refusing ptrace requests."
8580 msgstr ""
8581
8582 #. type: Plain text
8583 #: build/C/man2/ptrace.2:790
8584 msgid ""
8585 "The tracer can't assume that the tracee I<always> ends its life by reporting "
8586 "I<WIFEXITED(status)> or I<WIFSIGNALED(status)>; there are cases where this "
8587 "does not occur.  For example, if a thread other than thread group leader "
8588 "does an B<execve>(2), it disappears; its PID will never be seen again, and "
8589 "any subsequent ptrace stops will be reported under the thread group leader's "
8590 "PID."
8591 msgstr ""
8592
8593 #. type: SS
8594 #: build/C/man2/ptrace.2:790
8595 #, no-wrap
8596 msgid "Stopped states"
8597 msgstr ""
8598
8599 #. type: Plain text
8600 #: build/C/man2/ptrace.2:812
8601 msgid ""
8602 "A tracee can be in two states: running or stopped.  For the purposes of "
8603 "ptrace, a tracee which is blocked in a system call (such as B<read>(2), "
8604 "B<pause>(2), etc.)  is nevertheless considered to be running, even if the "
8605 "tracee is blocked for a long time.  The state of the tracee after "
8606 "B<PTRACE_LISTEN> is somewhat of a gray area: it is not in any ptrace-stop "
8607 "(ptrace commands won't work on it, and it will deliver B<waitpid>(2)  "
8608 "notifications), but it also may be considered \"stopped\" because it is not "
8609 "executing instructions (is not scheduled), and if it was in group-stop "
8610 "before B<PTRACE_LISTEN>, it will not respond to signals until B<SIGCONT> is "
8611 "received."
8612 msgstr ""
8613
8614 #. type: Plain text
8615 #: build/C/man2/ptrace.2:816
8616 msgid ""
8617 "There are many kinds of states when the tracee is stopped, and in ptrace "
8618 "discussions they are often conflated.  Therefore, it is important to use "
8619 "precise terms."
8620 msgstr ""
8621
8622 #. type: Plain text
8623 #: build/C/man2/ptrace.2:827
8624 msgid ""
8625 "In this manual page, any stopped state in which the tracee is ready to "
8626 "accept ptrace commands from the tracer is called I<ptrace-stop>.  Ptrace-"
8627 "stops can be further subdivided into I<signal-delivery-stop>, I<group-stop>, "
8628 "I<syscall-stop>, and so on.  These stopped states are described in detail "
8629 "below."
8630 msgstr ""
8631
8632 #. type: Plain text
8633 #: build/C/man2/ptrace.2:832
8634 msgid ""
8635 "When the running tracee enters ptrace-stop, it notifies its tracer using "
8636 "B<waitpid>(2)  (or one of the other \"wait\" system calls).  Most of this "
8637 "manual page assumes that the tracer waits with:"
8638 msgstr ""
8639
8640 #. type: Plain text
8641 #: build/C/man2/ptrace.2:834
8642 #, no-wrap
8643 msgid "    pid = waitpid(pid_or_minus_1, &status, __WALL);\n"
8644 msgstr ""
8645
8646 #.  Denys Vlasenko:
8647 #.      Do we require __WALL usage, or will just using 0 be ok? (With 0,
8648 #.      I am not 100% sure there aren't ugly corner cases.) Are the
8649 #.      rules different if user wants to use waitid? Will waitid require
8650 #.      WEXITED?
8651 #. type: Plain text
8652 #: build/C/man2/ptrace.2:846
8653 msgid ""
8654 "Ptrace-stopped tracees are reported as returns with I<pid> greater than 0 "
8655 "and I<WIFSTOPPED(status)> true."
8656 msgstr ""
8657
8658 #. type: Plain text
8659 #: build/C/man2/ptrace.2:854
8660 msgid ""
8661 "The B<__WALL> flag does not include the B<WSTOPPED> and B<WEXITED> flags, "
8662 "but implies their functionality."
8663 msgstr ""
8664
8665 #. type: Plain text
8666 #: build/C/man2/ptrace.2:861
8667 msgid ""
8668 "Setting the B<WCONTINUED> flag when calling B<waitpid>(2)  is not "
8669 "recommended: the \"continued\" state is per-process and consuming it can "
8670 "confuse the real parent of the tracee."
8671 msgstr ""
8672
8673 #. type: Plain text
8674 #: build/C/man2/ptrace.2:869
8675 msgid ""
8676 "Use of the B<WNOHANG> flag may cause B<waitpid>(2)  to return 0 (\"no wait "
8677 "results available yet\")  even if the tracer knows there should be a "
8678 "notification.  Example:"
8679 msgstr ""
8680
8681 #. type: Plain text
8682 #: build/C/man2/ptrace.2:878
8683 #, no-wrap
8684 msgid ""
8685 "    errno = 0;\n"
8686 "    ptrace(PTRACE_CONT, pid, 0L, 0L);\n"
8687 "    if (errno == ESRCH) {\n"
8688 "        /* tracee is dead */\n"
8689 "        r = waitpid(tracee, &status, __WALL | WNOHANG);\n"
8690 "        /* r can still be 0 here! */\n"
8691 "    }\n"
8692 msgstr ""
8693
8694 #. type: Plain text
8695 #: build/C/man2/ptrace.2:901
8696 msgid ""
8697 "The following kinds of ptrace-stops exist: signal-delivery-stops, group-"
8698 "stops, B<PTRACE_EVENT> stops, syscall-stops.  They all are reported by "
8699 "B<waitpid>(2)  with I<WIFSTOPPED(status)> true.  They may be differentiated "
8700 "by examining the value I<statusE<gt>E<gt>8>, and if there is ambiguity in "
8701 "that value, by querying B<PTRACE_GETSIGINFO>.  (Note: the I<WSTOPSIG(status)"
8702 "> macro can't be used to perform this examination, because it returns the "
8703 "value I<(statusE<gt>E<gt>8)\\ &\\ 0xff>.)"
8704 msgstr ""
8705
8706 #. type: SS
8707 #: build/C/man2/ptrace.2:901
8708 #, no-wrap
8709 msgid "Signal-delivery-stop"
8710 msgstr ""
8711
8712 #. type: Plain text
8713 #: build/C/man2/ptrace.2:921
8714 msgid ""
8715 "When a (possibly multithreaded) process receives any signal except "
8716 "B<SIGKILL>, the kernel selects an arbitrary thread which handles the "
8717 "signal.  (If the signal is generated with B<tgkill>(2), the target thread "
8718 "can be explicitly selected by the caller.)  If the selected thread is "
8719 "traced, it enters signal-delivery-stop.  At this point, the signal is not "
8720 "yet delivered to the process, and can be suppressed by the tracer.  If the "
8721 "tracer doesn't suppress the signal, it passes the signal to the tracee in "
8722 "the next ptrace restart request.  This second step of signal delivery is "
8723 "called I<signal injection> in this manual page.  Note that if the signal is "
8724 "blocked, signal-delivery-stop doesn't happen until the signal is unblocked, "
8725 "with the usual exception that B<SIGSTOP> can't be blocked."
8726 msgstr ""
8727
8728 #. type: Plain text
8729 #: build/C/man2/ptrace.2:935
8730 msgid ""
8731 "Signal-delivery-stop is observed by the tracer as B<waitpid>(2)  returning "
8732 "with I<WIFSTOPPED(status)> true, with the signal returned by I<WSTOPSIG"
8733 "(status)>.  If the signal is B<SIGTRAP>, this may be a different kind of "
8734 "ptrace-stop; see the \"Syscall-stops\" and \"execve\" sections below for "
8735 "details.  If I<WSTOPSIG(status)> returns a stopping signal, this may be a "
8736 "group-stop; see below."
8737 msgstr ""
8738
8739 #. type: SS
8740 #: build/C/man2/ptrace.2:935
8741 #, no-wrap
8742 msgid "Signal injection and suppression"
8743 msgstr ""
8744
8745 #. type: Plain text
8746 #: build/C/man2/ptrace.2:938
8747 msgid ""
8748 "After signal-delivery-stop is observed by the tracer, the tracer should "
8749 "restart the tracee with the call"
8750 msgstr ""
8751
8752 #. type: Plain text
8753 #: build/C/man2/ptrace.2:940
8754 #, no-wrap
8755 msgid "    ptrace(PTRACE_restart, pid, 0, sig)\n"
8756 msgstr ""
8757
8758 #. type: Plain text
8759 #: build/C/man2/ptrace.2:953
8760 msgid ""
8761 "where B<PTRACE_restart> is one of the restarting ptrace requests.  If I<sig> "
8762 "is 0, then a signal is not delivered.  Otherwise, the signal I<sig> is "
8763 "delivered.  This operation is called I<signal injection> in this manual "
8764 "page, to distinguish it from signal-delivery-stop."
8765 msgstr ""
8766
8767 #. type: Plain text
8768 #: build/C/man2/ptrace.2:959
8769 msgid ""
8770 "The I<sig> value may be different from the I<WSTOPSIG(status)> value: the "
8771 "tracer can cause a different signal to be injected."
8772 msgstr ""
8773
8774 #. type: Plain text
8775 #: build/C/man2/ptrace.2:975
8776 msgid ""
8777 "Note that a suppressed signal still causes system calls to return "
8778 "prematurely.  In this case system calls will be restarted: the tracer will "
8779 "observe the tracee to reexecute the interrupted system call (or "
8780 "B<restart_syscall>(2)  system call for a few syscalls which use a different "
8781 "mechanism for restarting) if the tracer uses B<PTRACE_SYSCALL>.  Even system "
8782 "calls (such as B<poll>(2))  which are not restartable after signal are "
8783 "restarted after signal is suppressed; however, kernel bugs exist which cause "
8784 "some syscalls to fail with B<EINTR> even though no observable signal is "
8785 "injected to the tracee."
8786 msgstr ""
8787
8788 #. type: Plain text
8789 #: build/C/man2/ptrace.2:986
8790 msgid ""
8791 "Restarting ptrace commands issued in ptrace-stops other than signal-delivery-"
8792 "stop are not guaranteed to inject a signal, even if I<sig> is nonzero.  No "
8793 "error is reported; a nonzero I<sig> may simply be ignored.  Ptrace users "
8794 "should not try to \"create a new signal\" this way: use B<tgkill>(2)  "
8795 "instead."
8796 msgstr ""
8797
8798 #. type: Plain text
8799 #: build/C/man2/ptrace.2:993
8800 msgid ""
8801 "The fact that signal injection requests may be ignored when restarting the "
8802 "tracee after ptrace stops that are not signal-delivery-stops is a cause of "
8803 "confusion among ptrace users.  One typical scenario is that the tracer "
8804 "observes group-stop, mistakes it for signal-delivery-stop, restarts the "
8805 "tracee with"
8806 msgstr ""
8807
8808 #. type: Plain text
8809 #: build/C/man2/ptrace.2:995
8810 #, no-wrap
8811 msgid "    ptrace(PTRACE_restart, pid, 0, stopsig)\n"
8812 msgstr ""
8813
8814 #. type: Plain text
8815 #: build/C/man2/ptrace.2:1001
8816 msgid ""
8817 "with the intention of injecting I<stopsig>, but I<stopsig> gets ignored and "
8818 "the tracee continues to run."
8819 msgstr ""
8820
8821 #. type: Plain text
8822 #: build/C/man2/ptrace.2:1021
8823 msgid ""
8824 "The B<SIGCONT> signal has a side effect of waking up (all threads of)  a "
8825 "group-stopped process.  This side effect happens before signal-delivery-"
8826 "stop.  The tracer can't suppress this side effect (it can only suppress "
8827 "signal injection, which only causes the B<SIGCONT> handler to not be "
8828 "executed in the tracee, if such a handler is installed).  In fact, waking up "
8829 "from group-stop may be followed by signal-delivery-stop for signal(s)  "
8830 "I<other than> B<SIGCONT>, if they were pending when B<SIGCONT> was "
8831 "delivered.  In other words, B<SIGCONT> may be not the first signal observed "
8832 "by the tracee after it was sent."
8833 msgstr ""
8834
8835 #. type: Plain text
8836 #: build/C/man2/ptrace.2:1025
8837 msgid ""
8838 "Stopping signals cause (all threads of) a process to enter group-stop.  This "
8839 "side effect happens after signal injection, and therefore can be suppressed "
8840 "by the tracer."
8841 msgstr ""
8842
8843 #
8844 #.  In the Linux 2.4 sources, in arch/i386/kernel/signal.c::do_signal(),
8845 #.  there is:
8846 #.              /* The debugger continued.  Ignore SIGSTOP.  */
8847 #.              if (signr == SIGSTOP)
8848 #.                      continue;
8849 #. type: Plain text
8850 #: build/C/man2/ptrace.2:1035
8851 msgid "In Linux 2.4 and earlier, the B<SIGSTOP> signal can't be injected."
8852 msgstr ""
8853
8854 #. type: Plain text
8855 #: build/C/man2/ptrace.2:1052
8856 msgid ""
8857 "B<PTRACE_GETSIGINFO> can be used to retrieve a I<siginfo_t> structure which "
8858 "corresponds to the delivered signal.  B<PTRACE_SETSIGINFO> may be used to "
8859 "modify it.  If B<PTRACE_SETSIGINFO> has been used to alter I<siginfo_t>, the "
8860 "I<si_signo> field and the I<sig> parameter in the restarting command must "
8861 "match, otherwise the result is undefined."
8862 msgstr ""
8863
8864 #. type: SS
8865 #: build/C/man2/ptrace.2:1052
8866 #, no-wrap
8867 msgid "Group-stop"
8868 msgstr ""
8869
8870 #. type: Plain text
8871 #: build/C/man2/ptrace.2:1064
8872 msgid ""
8873 "When a (possibly multithreaded) process receives a stopping signal, all "
8874 "threads stop.  If some threads are traced, they enter a group-stop.  Note "
8875 "that the stopping signal will first cause signal-delivery-stop (on one "
8876 "tracee only), and only after it is injected by the tracer (or after it was "
8877 "dispatched to a thread which isn't traced), will group-stop be initiated on "
8878 "I<all> tracees within the multithreaded process.  As usual, every tracee "
8879 "reports its group-stop separately to the corresponding tracer."
8880 msgstr ""
8881
8882 #. type: Plain text
8883 #: build/C/man2/ptrace.2:1073
8884 msgid ""
8885 "Group-stop is observed by the tracer as B<waitpid>(2)  returning with "
8886 "I<WIFSTOPPED(status)> true, with the stopping signal available via I<WSTOPSIG"
8887 "(status)>.  The same result is returned by some other classes of ptrace-"
8888 "stops, therefore the recommended practice is to perform the call"
8889 msgstr ""
8890
8891 #. type: Plain text
8892 #: build/C/man2/ptrace.2:1075
8893 #, no-wrap
8894 msgid "    ptrace(PTRACE_GETSIGINFO, pid, 0, &siginfo)\n"
8895 msgstr ""
8896
8897 #. type: Plain text
8898 #: build/C/man2/ptrace.2:1096
8899 msgid ""
8900 "The call can be avoided if the signal is not B<SIGSTOP>, B<SIGTSTP>, "
8901 "B<SIGTTIN>, or B<SIGTTOU>; only these four signals are stopping signals.  If "
8902 "the tracer sees something else, it can't be a group-stop.  Otherwise, the "
8903 "tracer needs to call B<PTRACE_GETSIGINFO>.  If B<PTRACE_GETSIGINFO> fails "
8904 "with B<EINVAL>, then it is definitely a group-stop.  (Other failure codes "
8905 "are possible, such as B<ESRCH> (\"no such process\") if a B<SIGKILL> killed "
8906 "the tracee.)"
8907 msgstr ""
8908
8909 #. type: Plain text
8910 #: build/C/man2/ptrace.2:1106
8911 msgid ""
8912 "If tracee was attached using B<PTRACE_SEIZE>, group-stop is indicated by "
8913 "B<PTRACE_EVENT_STOP>: I<statusE<gt>E<gt>16 == PTRACE_EVENT_STOP>.  This "
8914 "allows detection of group-stops without requiring an extra "
8915 "B<PTRACE_GETSIGINFO> call."
8916 msgstr ""
8917
8918 #. type: Plain text
8919 #: build/C/man2/ptrace.2:1115
8920 msgid ""
8921 "As of Linux 2.6.38, after the tracer sees the tracee ptrace-stop and until "
8922 "it restarts or kills it, the tracee will not run, and will not send "
8923 "notifications (except B<SIGKILL> death) to the tracer, even if the tracer "
8924 "enters into another B<waitpid>(2)  call."
8925 msgstr ""
8926
8927 #. type: Plain text
8928 #: build/C/man2/ptrace.2:1129
8929 msgid ""
8930 "The kernel behavior described in the previous paragraph causes a problem "
8931 "with transparent handling of stopping signals.  If the tracer restarts the "
8932 "tracee after group-stop, the stopping signal is effectively ignored\\(emthe "
8933 "tracee doesn't remain stopped, it runs.  If the tracer doesn't restart the "
8934 "tracee before entering into the next B<waitpid>(2), future B<SIGCONT> "
8935 "signals will not be reported to the tracer; this would cause the B<SIGCONT> "
8936 "signals to have no effect on the tracee."
8937 msgstr ""
8938
8939 #. type: Plain text
8940 #: build/C/man2/ptrace.2:1140
8941 msgid ""
8942 "Since Linux 3.4, there is a method to overcome this problem: instead of "
8943 "B<PTRACE_CONT>, a B<PTRACE_LISTEN> command can be used to restart a tracee "
8944 "in a way where it does not execute, but waits for a new event which it can "
8945 "report via B<waitpid>(2)  (such as when it is restarted by a B<SIGCONT>)."
8946 msgstr ""
8947
8948 #. type: SS
8949 #: build/C/man2/ptrace.2:1140
8950 #, no-wrap
8951 msgid "PTRACE_EVENT stops"
8952 msgstr ""
8953
8954 #. type: Plain text
8955 #: build/C/man2/ptrace.2:1146
8956 msgid ""
8957 "If the tracer sets B<PTRACE_O_TRACE_*> options, the tracee will enter ptrace-"
8958 "stops called B<PTRACE_EVENT> stops."
8959 msgstr ""
8960
8961 #. type: Plain text
8962 #: build/C/man2/ptrace.2:1160
8963 msgid ""
8964 "B<PTRACE_EVENT> stops are observed by the tracer as B<waitpid>(2)  returning "
8965 "with I<WIFSTOPPED(status)>, and I<WSTOPSIG(status)> returns B<SIGTRAP>.  An "
8966 "additional bit is set in the higher byte of the status word: the value "
8967 "I<statusE<gt>E<gt>8> will be"
8968 msgstr ""
8969
8970 #. type: Plain text
8971 #: build/C/man2/ptrace.2:1162
8972 #, no-wrap
8973 msgid "    (SIGTRAP | PTRACE_EVENT_foo E<lt>E<lt> 8).\n"
8974 msgstr ""
8975
8976 #. type: Plain text
8977 #: build/C/man2/ptrace.2:1164
8978 msgid "The following events exist:"
8979 msgstr ""
8980
8981 #. type: TP
8982 #: build/C/man2/ptrace.2:1164
8983 #, no-wrap
8984 msgid "B<PTRACE_EVENT_VFORK>"
8985 msgstr "B<PTRACE_EVENT_VFORK>"
8986
8987 #. type: Plain text
8988 #: build/C/man2/ptrace.2:1177
8989 msgid ""
8990 "Stop before return from B<vfork>(2)  or B<clone>(2)  with the B<CLONE_VFORK> "
8991 "flag.  When the tracee is continued after this stop, it will wait for child "
8992 "to exit/exec before continuing its execution (in other words, the usual "
8993 "behavior on B<vfork>(2))."
8994 msgstr ""
8995
8996 #. type: TP
8997 #: build/C/man2/ptrace.2:1177
8998 #, no-wrap
8999 msgid "B<PTRACE_EVENT_FORK>"
9000 msgstr "B<PTRACE_EVENT_FORK>"
9001
9002 #. type: Plain text
9003 #: build/C/man2/ptrace.2:1185
9004 msgid ""
9005 "Stop before return from B<fork>(2)  or B<clone>(2)  with the exit signal set "
9006 "to B<SIGCHLD>."
9007 msgstr ""
9008
9009 #. type: TP
9010 #: build/C/man2/ptrace.2:1185
9011 #, no-wrap
9012 msgid "B<PTRACE_EVENT_CLONE>"
9013 msgstr "B<PTRACE_EVENT_CLONE>"
9014
9015 #. type: Plain text
9016 #: build/C/man2/ptrace.2:1189
9017 msgid "Stop before return from B<clone>(2)."
9018 msgstr ""
9019
9020 #. type: TP
9021 #: build/C/man2/ptrace.2:1189
9022 #, no-wrap
9023 msgid "B<PTRACE_EVENT_VFORK_DONE>"
9024 msgstr "B<PTRACE_EVENT_VFORK_DONE>"
9025
9026 #. type: Plain text
9027 #: build/C/man2/ptrace.2:1199
9028 msgid ""
9029 "Stop before return from B<vfork>(2)  or B<clone>(2)  with the B<CLONE_VFORK> "
9030 "flag, but after the child unblocked this tracee by exiting or execing."
9031 msgstr ""
9032
9033 #. type: Plain text
9034 #: build/C/man2/ptrace.2:1205
9035 msgid ""
9036 "For all four stops described above, the stop occurs in the parent (i.e., the "
9037 "tracee), not in the newly created thread.  B<PTRACE_GETEVENTMSG> can be used "
9038 "to retrieve the new thread's ID."
9039 msgstr ""
9040
9041 #. type: TP
9042 #: build/C/man2/ptrace.2:1205
9043 #, no-wrap
9044 msgid "B<PTRACE_EVENT_EXEC>"
9045 msgstr "B<PTRACE_EVENT_EXEC>"
9046
9047 #. type: Plain text
9048 #: build/C/man2/ptrace.2:1212
9049 msgid ""
9050 "Stop before return from B<execve>(2).  Since Linux 3.0, "
9051 "B<PTRACE_GETEVENTMSG> returns the former thread ID."
9052 msgstr ""
9053
9054 #. type: TP
9055 #: build/C/man2/ptrace.2:1212
9056 #, no-wrap
9057 msgid "B<PTRACE_EVENT_EXIT>"
9058 msgstr "B<PTRACE_EVENT_EXIT>"
9059
9060 #. type: Plain text
9061 #: build/C/man2/ptrace.2:1228
9062 msgid ""
9063 "Stop before exit (including death from B<exit_group>(2)), signal death, or "
9064 "exit caused by B<execve>(2)  in a multithreaded process.  "
9065 "B<PTRACE_GETEVENTMSG> returns the exit status.  Registers can be examined "
9066 "(unlike when \"real\" exit happens).  The tracee is still alive; it needs to "
9067 "be B<PTRACE_CONT>ed or B<PTRACE_DETACH>ed to finish exiting."
9068 msgstr ""
9069
9070 #. type: TP
9071 #: build/C/man2/ptrace.2:1228
9072 #, no-wrap
9073 msgid "B<PTRACE_EVENT_STOP>"
9074 msgstr "B<PTRACE_EVENT_STOP>"
9075
9076 #. type: Plain text
9077 #: build/C/man2/ptrace.2:1240
9078 msgid ""
9079 "Stop induced by B<PTRACE_INTERRUPT> command, or group-stop, or initial "
9080 "ptrace-stop when a new child is attached (only if attached using "
9081 "B<PTRACE_SEIZE>), or B<PTRACE_EVENT_STOP> if B<PTRACE_SEIZE> was used."
9082 msgstr ""
9083
9084 #. type: Plain text
9085 #: build/C/man2/ptrace.2:1252
9086 msgid ""
9087 "B<PTRACE_GETSIGINFO> on B<PTRACE_EVENT> stops returns B<SIGTRAP> in "
9088 "I<si_signo>, with I<si_code> set to I<(eventE<lt>E<lt>8)\\ |\\ SIGTRAP>."
9089 msgstr ""
9090
9091 #. type: SS
9092 #: build/C/man2/ptrace.2:1252
9093 #, no-wrap
9094 msgid "Syscall-stops"
9095 msgstr ""
9096
9097 #. type: Plain text
9098 #: build/C/man2/ptrace.2:1265
9099 msgid ""
9100 "If the tracee was restarted by B<PTRACE_SYSCALL>, the tracee enters syscall-"
9101 "enter-stop just prior to entering any system call.  If the tracer restarts "
9102 "the tracee with B<PTRACE_SYSCALL>, the tracee enters syscall-exit-stop when "
9103 "the system call is finished, or if it is interrupted by a signal.  (That is, "
9104 "signal-delivery-stop never happens between syscall-enter-stop and syscall-"
9105 "exit-stop; it happens I<after> syscall-exit-stop.)"
9106 msgstr ""
9107
9108 #. type: Plain text
9109 #: build/C/man2/ptrace.2:1279
9110 msgid ""
9111 "Other possibilities are that the tracee may stop in a B<PTRACE_EVENT> stop, "
9112 "exit (if it entered B<_exit>(2)  or B<exit_group>(2)), be killed by "
9113 "B<SIGKILL>, or die silently (if it is a thread group leader, the B<execve>"
9114 "(2)  happened in another thread, and that thread is not traced by the same "
9115 "tracer; this situation is discussed later)."
9116 msgstr ""
9117
9118 #. type: Plain text
9119 #: build/C/man2/ptrace.2:1294
9120 msgid ""
9121 "Syscall-enter-stop and syscall-exit-stop are observed by the tracer as "
9122 "B<waitpid>(2)  returning with I<WIFSTOPPED(status)> true, and I<WSTOPSIG"
9123 "(status)> giving B<SIGTRAP>.  If the B<PTRACE_O_TRACESYSGOOD> option was set "
9124 "by the tracer, then I<WSTOPSIG(status)> will give the value I<(SIGTRAP\\ |\\ "
9125 "0x80)>."
9126 msgstr ""
9127
9128 #. type: Plain text
9129 #: build/C/man2/ptrace.2:1300
9130 msgid ""
9131 "Syscall-stops can be distinguished from signal-delivery-stop with B<SIGTRAP> "
9132 "by querying B<PTRACE_GETSIGINFO> for the following cases:"
9133 msgstr ""
9134
9135 #. type: TP
9136 #: build/C/man2/ptrace.2:1300
9137 #, no-wrap
9138 msgid "I<si_code> E<lt>= 0"
9139 msgstr ""
9140
9141 #. type: Plain text
9142 #: build/C/man2/ptrace.2:1312
9143 msgid ""
9144 "B<SIGTRAP> was delivered as a result of a user-space action, for example, a "
9145 "system call (B<tgkill>(2), B<kill>(2), B<sigqueue>(3), etc.), expiration of "
9146 "a POSIX timer, change of state on a POSIX message queue, or completion of an "
9147 "asynchronous I/O request."
9148 msgstr ""
9149
9150 #. type: TP
9151 #: build/C/man2/ptrace.2:1312
9152 #, no-wrap
9153 msgid "I<si_code> == SI_KERNEL (0x80)"
9154 msgstr ""
9155
9156 #. type: Plain text
9157 #: build/C/man2/ptrace.2:1316
9158 msgid "B<SIGTRAP> was sent by the kernel."
9159 msgstr ""
9160
9161 #. type: TP
9162 #: build/C/man2/ptrace.2:1316
9163 #, no-wrap
9164 msgid "I<si_code> == SIGTRAP or I<si_code> == (SIGTRAP|0x80)"
9165 msgstr ""
9166
9167 #. type: Plain text
9168 #: build/C/man2/ptrace.2:1319
9169 msgid "This is a syscall-stop."
9170 msgstr ""
9171
9172 #. type: Plain text
9173 #: build/C/man2/ptrace.2:1324
9174 msgid ""
9175 "However, syscall-stops happen very often (twice per system call), and "
9176 "performing B<PTRACE_GETSIGINFO> for every syscall-stop may be somewhat "
9177 "expensive."
9178 msgstr ""
9179
9180 #. type: Plain text
9181 #: build/C/man2/ptrace.2:1347
9182 msgid ""
9183 "Some architectures allow the cases to be distinguished by examining "
9184 "registers.  For example, on x86, I<rax> == -B<ENOSYS> in syscall-enter-"
9185 "stop.  Since B<SIGTRAP> (like any other signal) always happens I<after> "
9186 "syscall-exit-stop, and at this point I<rax> almost never contains -"
9187 "B<ENOSYS>, the B<SIGTRAP> looks like \"syscall-stop which is not syscall-"
9188 "enter-stop\"; in other words, it looks like a \"stray syscall-exit-stop\" "
9189 "and can be detected this way.  But such detection is fragile and is best "
9190 "avoided."
9191 msgstr ""
9192
9193 #. type: Plain text
9194 #: build/C/man2/ptrace.2:1353
9195 msgid ""
9196 "Using the B<PTRACE_O_TRACESYSGOOD> option is the recommended method to "
9197 "distinguish syscall-stops from other kinds of ptrace-stops, since it is "
9198 "reliable and does not incur a performance penalty."
9199 msgstr ""
9200
9201 #. type: Plain text
9202 #: build/C/man2/ptrace.2:1364
9203 msgid ""
9204 "Syscall-enter-stop and syscall-exit-stop are indistinguishable from each "
9205 "other by the tracer.  The tracer needs to keep track of the sequence of "
9206 "ptrace-stops in order to not misinterpret syscall-enter-stop as syscall-exit-"
9207 "stop or vice versa.  The rule is that syscall-enter-stop is always followed "
9208 "by syscall-exit-stop, B<PTRACE_EVENT> stop or the tracee's death; no other "
9209 "kinds of ptrace-stop can occur in between."
9210 msgstr ""
9211
9212 #. type: Plain text
9213 #: build/C/man2/ptrace.2:1369
9214 msgid ""
9215 "If after syscall-enter-stop, the tracer uses a restarting command other than "
9216 "B<PTRACE_SYSCALL>, syscall-exit-stop is not generated."
9217 msgstr ""
9218
9219 #. type: Plain text
9220 #: build/C/man2/ptrace.2:1381
9221 msgid ""
9222 "B<PTRACE_GETSIGINFO> on syscall-stops returns B<SIGTRAP> in I<si_signo>, "
9223 "with I<si_code> set to B<SIGTRAP> or I<(SIGTRAP|0x80)>."
9224 msgstr ""
9225
9226 #. type: SS
9227 #: build/C/man2/ptrace.2:1381
9228 #, no-wrap
9229 msgid "PTRACE_SINGLESTEP, PTRACE_SYSEMU, PTRACE_SYSEMU_SINGLESTEP stops"
9230 msgstr ""
9231
9232 #
9233 #.  FIXME
9234 #.  document stops occurring with PTRACE_SINGLESTEP, PTRACE_SYSEMU,
9235 #.  PTRACE_SYSEMU_SINGLESTEP
9236 #. type: Plain text
9237 #: build/C/man2/ptrace.2:1387
9238 msgid "[Details of these kinds of stops are yet to be documented.]"
9239 msgstr ""
9240
9241 #. type: SS
9242 #: build/C/man2/ptrace.2:1387
9243 #, no-wrap
9244 msgid "Informational and restarting ptrace commands"
9245 msgstr ""
9246
9247 #. type: Plain text
9248 #: build/C/man2/ptrace.2:1397
9249 msgid ""
9250 "Most ptrace commands (all except B<PTRACE_ATTACH>, B<PTRACE_SEIZE>, "
9251 "B<PTRACE_TRACEME>, B<PTRACE_INTERRUPT>, and B<PTRACE_KILL>)  require the "
9252 "tracee to be in a ptrace-stop, otherwise they fail with B<ESRCH>."
9253 msgstr ""
9254
9255 #. type: Plain text
9256 #: build/C/man2/ptrace.2:1402
9257 msgid ""
9258 "When the tracee is in ptrace-stop, the tracer can read and write data to the "
9259 "tracee using informational commands.  These commands leave the tracee in "
9260 "ptrace-stopped state:"
9261 msgstr ""
9262
9263 #. type: Plain text
9264 #: build/C/man2/ptrace.2:1414
9265 #, no-wrap
9266 msgid ""
9267 "    ptrace(PTRACE_PEEKTEXT/PEEKDATA/PEEKUSER, pid, addr, 0);\n"
9268 "    ptrace(PTRACE_POKETEXT/POKEDATA/POKEUSER, pid, addr, long_val);\n"
9269 "    ptrace(PTRACE_GETREGS/GETFPREGS, pid, 0, &struct);\n"
9270 "    ptrace(PTRACE_SETREGS/SETFPREGS, pid, 0, &struct);\n"
9271 "    ptrace(PTRACE_GETREGSET, pid, NT_foo, &iov);\n"
9272 "    ptrace(PTRACE_SETREGSET, pid, NT_foo, &iov);\n"
9273 "    ptrace(PTRACE_GETSIGINFO, pid, 0, &siginfo);\n"
9274 "    ptrace(PTRACE_SETSIGINFO, pid, 0, &siginfo);\n"
9275 "    ptrace(PTRACE_GETEVENTMSG, pid, 0, &long_var);\n"
9276 "    ptrace(PTRACE_SETOPTIONS, pid, 0, PTRACE_O_flags);\n"
9277 msgstr ""
9278
9279 #. type: Plain text
9280 #: build/C/man2/ptrace.2:1426
9281 msgid ""
9282 "Note that some errors are not reported.  For example, setting signal "
9283 "information (I<siginfo>)  may have no effect in some ptrace-stops, yet the "
9284 "call may succeed (return 0 and not set I<errno>); querying "
9285 "B<PTRACE_GETEVENTMSG> may succeed and return some random value if current "
9286 "ptrace-stop is not documented as returning a meaningful event message."
9287 msgstr ""
9288
9289 #. type: Plain text
9290 #: build/C/man2/ptrace.2:1428
9291 msgid "The call"
9292 msgstr ""
9293
9294 #. type: Plain text
9295 #: build/C/man2/ptrace.2:1430
9296 #, no-wrap
9297 msgid "    ptrace(PTRACE_SETOPTIONS, pid, 0, PTRACE_O_flags);\n"
9298 msgstr ""
9299
9300 #. type: Plain text
9301 #: build/C/man2/ptrace.2:1439
9302 msgid ""
9303 "affects one tracee.  The tracee's current flags are replaced.  Flags are "
9304 "inherited by new tracees created and \"auto-attached\" via active "
9305 "B<PTRACE_O_TRACEFORK>, B<PTRACE_O_TRACEVFORK>, or B<PTRACE_O_TRACECLONE> "
9306 "options."
9307 msgstr ""
9308
9309 #. type: Plain text
9310 #: build/C/man2/ptrace.2:1442
9311 msgid ""
9312 "Another group of commands makes the ptrace-stopped tracee run.  They have "
9313 "the form:"
9314 msgstr ""
9315
9316 #. type: Plain text
9317 #: build/C/man2/ptrace.2:1444
9318 #, no-wrap
9319 msgid "    ptrace(cmd, pid, 0, sig);\n"
9320 msgstr ""
9321
9322 #. type: Plain text
9323 #: build/C/man2/ptrace.2:1465
9324 msgid ""
9325 "where I<cmd> is B<PTRACE_CONT>, B<PTRACE_LISTEN>, B<PTRACE_DETACH>, "
9326 "B<PTRACE_SYSCALL>, B<PTRACE_SINGLESTEP>, B<PTRACE_SYSEMU>, or "
9327 "B<PTRACE_SYSEMU_SINGLESTEP>.  If the tracee is in signal-delivery-stop, "
9328 "I<sig> is the signal to be injected (if it is nonzero).  Otherwise, I<sig> "
9329 "may be ignored.  (When restarting a tracee from a ptrace-stop other than "
9330 "signal-delivery-stop, recommended practice is to always pass 0 in I<sig>.)"
9331 msgstr ""
9332
9333 #. type: SS
9334 #: build/C/man2/ptrace.2:1465
9335 #, no-wrap
9336 msgid "Attaching and detaching"
9337 msgstr ""
9338
9339 #. type: Plain text
9340 #: build/C/man2/ptrace.2:1467
9341 msgid "A thread can be attached to the tracer using the call"
9342 msgstr ""
9343
9344 #. type: Plain text
9345 #: build/C/man2/ptrace.2:1469
9346 #, no-wrap
9347 msgid "    ptrace(PTRACE_ATTACH, pid, 0, 0);\n"
9348 msgstr ""
9349
9350 #. type: Plain text
9351 #: build/C/man2/ptrace.2:1471 build/C/man2/ptrace.2:1968
9352 msgid "or"
9353 msgstr ""
9354
9355 #. type: Plain text
9356 #: build/C/man2/ptrace.2:1473
9357 #, no-wrap
9358 msgid "    ptrace(PTRACE_SEIZE, pid, 0, PTRACE_O_flags);\n"
9359 msgstr ""
9360
9361 #
9362 #.  FIXME: Describe how to attach to a thread which is already
9363 #.         group-stopped.
9364 #. type: Plain text
9365 #: build/C/man2/ptrace.2:1498
9366 msgid ""
9367 "B<PTRACE_ATTACH> sends B<SIGSTOP> to this thread.  If the tracer wants this "
9368 "B<SIGSTOP> to have no effect, it needs to suppress it.  Note that if other "
9369 "signals are concurrently sent to this thread during attach, the tracer may "
9370 "see the tracee enter signal-delivery-stop with other signal(s) first! The "
9371 "usual practice is to reinject these signals until B<SIGSTOP> is seen, then "
9372 "suppress B<SIGSTOP> injection.  The design bug here is that a ptrace attach "
9373 "and a concurrently delivered B<SIGSTOP> may race and the concurrent "
9374 "B<SIGSTOP> may be lost."
9375 msgstr ""
9376
9377 #. type: Plain text
9378 #: build/C/man2/ptrace.2:1505
9379 msgid ""
9380 "Since attaching sends B<SIGSTOP> and the tracer usually suppresses it, this "
9381 "may cause a stray B<EINTR> return from the currently executing system call "
9382 "in the tracee, as described in the \"Signal injection and suppression\" "
9383 "section."
9384 msgstr ""
9385
9386 #. type: Plain text
9387 #: build/C/man2/ptrace.2:1517
9388 msgid ""
9389 "Since Linux 3.4, B<PTRACE_SEIZE> can be used instead of B<PTRACE_ATTACH>.  "
9390 "B<PTRACE_SEIZE> does not stop the attached process.  If you need to stop it "
9391 "after attach (or at any other time) without sending it any signals, use "
9392 "B<PTRACE_INTERRUPT> command."
9393 msgstr ""
9394
9395 #. type: Plain text
9396 #: build/C/man2/ptrace.2:1519
9397 msgid "The request"
9398 msgstr ""
9399
9400 #. type: Plain text
9401 #: build/C/man2/ptrace.2:1521
9402 #, no-wrap
9403 msgid "    ptrace(PTRACE_TRACEME, 0, 0, 0);\n"
9404 msgstr ""
9405
9406 #. type: Plain text
9407 #: build/C/man2/ptrace.2:1527
9408 msgid ""
9409 "turns the calling thread into a tracee.  The thread continues to run "
9410 "(doesn't enter ptrace-stop).  A common practice is to follow the "
9411 "B<PTRACE_TRACEME> with"
9412 msgstr ""
9413
9414 #. type: Plain text
9415 #: build/C/man2/ptrace.2:1529
9416 #, no-wrap
9417 msgid "    raise(SIGSTOP);\n"
9418 msgstr ""
9419
9420 #. type: Plain text
9421 #: build/C/man2/ptrace.2:1532
9422 msgid ""
9423 "and allow the parent (which is our tracer now) to observe our signal-"
9424 "delivery-stop."
9425 msgstr ""
9426
9427 #. type: Plain text
9428 #: build/C/man2/ptrace.2:1556
9429 msgid ""
9430 "If the B<PTRACE_O_TRACEFORK>, B<PTRACE_O_TRACEVFORK>, or "
9431 "B<PTRACE_O_TRACECLONE> options are in effect, then children created by, "
9432 "respectively, B<vfork>(2)  or B<clone>(2)  with the B<CLONE_VFORK> flag, "
9433 "B<fork>(2)  or B<clone>(2)  with the exit signal set to B<SIGCHLD>, and "
9434 "other kinds of B<clone>(2), are automatically attached to the same tracer "
9435 "which traced their parent.  B<SIGSTOP> is delivered to the children, causing "
9436 "them to enter signal-delivery-stop after they exit the system call which "
9437 "created them."
9438 msgstr ""
9439
9440 #. type: Plain text
9441 #: build/C/man2/ptrace.2:1558
9442 msgid "Detaching of the tracee is performed by:"
9443 msgstr ""
9444
9445 #. type: Plain text
9446 #: build/C/man2/ptrace.2:1560
9447 #, no-wrap
9448 msgid "    ptrace(PTRACE_DETACH, pid, 0, sig);\n"
9449 msgstr ""
9450
9451 #. type: Plain text
9452 #: build/C/man2/ptrace.2:1568
9453 msgid ""
9454 "B<PTRACE_DETACH> is a restarting operation; therefore it requires the tracee "
9455 "to be in ptrace-stop.  If the tracee is in signal-delivery-stop, a signal "
9456 "can be injected.  Otherwise, the I<sig> parameter may be silently ignored."
9457 msgstr ""
9458
9459 #.  FIXME: Describe how to detach from a group-stopped tracee so that it
9460 #.         doesn't run, but continues to wait for SIGCONT.
9461 #. type: Plain text
9462 #: build/C/man2/ptrace.2:1592
9463 msgid ""
9464 "If the tracee is running when the tracer wants to detach it, the usual "
9465 "solution is to send B<SIGSTOP> (using B<tgkill>(2), to make sure it goes to "
9466 "the correct thread), wait for the tracee to stop in signal-delivery-stop for "
9467 "B<SIGSTOP> and then detach it (suppressing B<SIGSTOP> injection).  A design "
9468 "bug is that this can race with concurrent B<SIGSTOP>s.  Another complication "
9469 "is that the tracee may enter other ptrace-stops and needs to be restarted "
9470 "and waited for again, until B<SIGSTOP> is seen.  Yet another complication is "
9471 "to be sure that the tracee is not already ptrace-stopped, because no signal "
9472 "delivery happens while it is\\(emnot even B<SIGSTOP>."
9473 msgstr ""
9474
9475 #. type: Plain text
9476 #: build/C/man2/ptrace.2:1600
9477 msgid ""
9478 "If the tracer dies, all tracees are automatically detached and restarted, "
9479 "unless they were in group-stop.  Handling of restart from group-stop is "
9480 "currently buggy, but the \"as planned\" behavior is to leave tracee stopped "
9481 "and waiting for B<SIGCONT>.  If the tracee is restarted from signal-delivery-"
9482 "stop, the pending signal is injected."
9483 msgstr ""
9484
9485 #. type: SS
9486 #: build/C/man2/ptrace.2:1600
9487 #, no-wrap
9488 msgid "execve(2) under ptrace"
9489 msgstr ""
9490
9491 #
9492 #.  clone(2) CLONE_THREAD says:
9493 #.      If  any  of the threads in a thread group performs an execve(2),
9494 #.      then all threads other than the thread group leader are terminated,
9495 #.      and the new program is executed in the thread group leader.
9496 #.  In kernel 3.1 sources, see fs/exec.c::de_thread()
9497 #. type: Plain text
9498 #: build/C/man2/ptrace.2:1619
9499 msgid ""
9500 "When one thread in a multithreaded process calls B<execve>(2), the kernel "
9501 "destroys all other threads in the process, and resets the thread ID of the "
9502 "execing thread to the thread group ID (process ID).  (Or, to put things "
9503 "another way, when a multithreaded process does an B<execve>(2), at "
9504 "completion of the call, it appears as though the B<execve>(2)  occurred in "
9505 "the thread group leader, regardless of which thread did the B<execve>(2).)  "
9506 "This resetting of the thread ID looks very confusing to tracers:"
9507 msgstr ""
9508
9509 #. type: Plain text
9510 #: build/C/man2/ptrace.2:1629
9511 msgid ""
9512 "All other threads stop in B<PTRACE_EVENT_EXIT> stop, if the "
9513 "B<PTRACE_O_TRACEEXIT> option was turned on.  Then all other threads except "
9514 "the thread group leader report death as if they exited via B<_exit>(2)  with "
9515 "exit code 0."
9516 msgstr ""
9517
9518 #. type: Plain text
9519 #: build/C/man2/ptrace.2:1637
9520 msgid ""
9521 "The execing tracee changes its thread ID while it is in the B<execve>(2).  "
9522 "(Remember, under ptrace, the \"pid\" returned from B<waitpid>(2), or fed "
9523 "into ptrace calls, is the tracee's thread ID.)  That is, the tracee's thread "
9524 "ID is reset to be the same as its process ID, which is the same as the "
9525 "thread group leader's thread ID."
9526 msgstr ""
9527
9528 #. type: Plain text
9529 #: build/C/man2/ptrace.2:1643
9530 msgid ""
9531 "Then a B<PTRACE_EVENT_EXEC> stop happens, if the B<PTRACE_O_TRACEEXEC> "
9532 "option was turned on."
9533 msgstr ""
9534
9535 #. type: Plain text
9536 #: build/C/man2/ptrace.2:1664
9537 msgid ""
9538 "If the thread group leader has reported its B<PTRACE_EVENT_EXIT> stop by "
9539 "this time, it appears to the tracer that the dead thread leader \"reappears "
9540 "from nowhere\".  (Note: the thread group leader does not report death via "
9541 "I<WIFEXITED(status)> until there is at least one other live thread.  This "
9542 "eliminates the possibility that the tracer will see it dying and then "
9543 "reappearing.)  If the thread group leader was still alive, for the tracer "
9544 "this may look as if thread group leader returns from a different system call "
9545 "than it entered, or even \"returned from a system call even though it was "
9546 "not in any system call\".  If the thread group leader was not traced (or was "
9547 "traced by a different tracer), then during B<execve>(2)  it will appear as "
9548 "if it has become a tracee of the tracer of the execing tracee."
9549 msgstr ""
9550
9551 #. type: Plain text
9552 #: build/C/man2/ptrace.2:1667
9553 msgid ""
9554 "All of the above effects are the artifacts of the thread ID change in the "
9555 "tracee."
9556 msgstr ""
9557
9558 #. type: Plain text
9559 #: build/C/man2/ptrace.2:1687
9560 msgid ""
9561 "The B<PTRACE_O_TRACEEXEC> option is the recommended tool for dealing with "
9562 "this situation.  First, it enables B<PTRACE_EVENT_EXEC> stop, which occurs "
9563 "before B<execve>(2)  returns.  In this stop, the tracer can use "
9564 "B<PTRACE_GETEVENTMSG> to retrieve the tracee's former thread ID.  (This "
9565 "feature was introduced in Linux 3.0).  Second, the B<PTRACE_O_TRACEEXEC> "
9566 "option disables legacy B<SIGTRAP> generation on B<execve>(2)."
9567 msgstr ""
9568
9569 #. type: Plain text
9570 #: build/C/man2/ptrace.2:1693
9571 msgid ""
9572 "When the tracer receives B<PTRACE_EVENT_EXEC> stop notification, it is "
9573 "guaranteed that except this tracee and the thread group leader, no other "
9574 "threads from the process are alive."
9575 msgstr ""
9576
9577 #. type: Plain text
9578 #: build/C/man2/ptrace.2:1701
9579 msgid ""
9580 "On receiving the B<PTRACE_EVENT_EXEC> stop notification, the tracer should "
9581 "clean up all its internal data structures describing the threads of this "
9582 "process, and retain only one data structure\\(emone which describes the "
9583 "single still running tracee, with"
9584 msgstr ""
9585
9586 #. type: Plain text
9587 #: build/C/man2/ptrace.2:1703
9588 #, no-wrap
9589 msgid "    thread ID == thread group ID == process ID.\n"
9590 msgstr ""
9591
9592 #. type: Plain text
9593 #: build/C/man2/ptrace.2:1707
9594 msgid "Example: two threads call B<execve>(2)  at the same time:"
9595 msgstr ""
9596
9597 #. type: Plain text
9598 #: build/C/man2/ptrace.2:1718
9599 #, no-wrap
9600 msgid ""
9601 "*** we get syscall-enter-stop in thread 1: **\n"
9602 "PID1 execve(\"/bin/foo\", \"foo\" E<lt>unfinished ...E<gt>\n"
9603 "*** we issue PTRACE_SYSCALL for thread 1 **\n"
9604 "*** we get syscall-enter-stop in thread 2: **\n"
9605 "PID2 execve(\"/bin/bar\", \"bar\" E<lt>unfinished ...E<gt>\n"
9606 "*** we issue PTRACE_SYSCALL for thread 2 **\n"
9607 "*** we get PTRACE_EVENT_EXEC for PID0, we issue PTRACE_SYSCALL **\n"
9608 "*** we get syscall-exit-stop for PID0: **\n"
9609 "PID0 E<lt>... execve resumedE<gt> )             = 0\n"
9610 msgstr ""
9611
9612 #. type: Plain text
9613 #: build/C/man2/ptrace.2:1741
9614 msgid ""
9615 "If the B<PTRACE_O_TRACEEXEC> option is I<not> in effect for the execing "
9616 "tracee, the kernel delivers an extra B<SIGTRAP> to the tracee after B<execve>"
9617 "(2)  returns.  This is an ordinary signal (similar to one which can be "
9618 "generated by I<kill -TRAP>), not a special kind of ptrace-stop.  Employing "
9619 "B<PTRACE_GETSIGINFO> for this signal returns I<si_code> set to 0 "
9620 "(I<SI_USER>).  This signal may be blocked by signal mask, and thus may be "
9621 "delivered (much) later."
9622 msgstr ""
9623
9624 #. type: Plain text
9625 #: build/C/man2/ptrace.2:1760
9626 msgid ""
9627 "Usually, the tracer (for example, B<strace>(1))  would not want to show this "
9628 "extra post-execve B<SIGTRAP> signal to the user, and would suppress its "
9629 "delivery to the tracee (if B<SIGTRAP> is set to B<SIG_DFL>, it is a killing "
9630 "signal).  However, determining I<which> B<SIGTRAP> to suppress is not easy.  "
9631 "Setting the B<PTRACE_O_TRACEEXEC> option and thus suppressing this extra "
9632 "B<SIGTRAP> is the recommended approach."
9633 msgstr ""
9634
9635 #. type: SS
9636 #: build/C/man2/ptrace.2:1760
9637 #, no-wrap
9638 msgid "Real parent"
9639 msgstr ""
9640
9641 #. type: Plain text
9642 #: build/C/man2/ptrace.2:1767
9643 msgid ""
9644 "The ptrace API (ab)uses the standard UNIX parent/child signaling over "
9645 "B<waitpid>(2).  This used to cause the real parent of the process to stop "
9646 "receiving several kinds of B<waitpid>(2)  notifications when the child "
9647 "process is traced by some other process."
9648 msgstr ""
9649
9650 #. type: Plain text
9651 #: build/C/man2/ptrace.2:1770
9652 msgid ""
9653 "Many of these bugs have been fixed, but as of Linux 2.6.38 several still "
9654 "exist; see BUGS below."
9655 msgstr ""
9656
9657 #. type: Plain text
9658 #: build/C/man2/ptrace.2:1772
9659 msgid "As of Linux 2.6.38, the following is believed to work correctly:"
9660 msgstr ""
9661
9662 #. type: Plain text
9663 #: build/C/man2/ptrace.2:1780
9664 msgid ""
9665 "exit/death by signal is reported first to the tracer, then, when the tracer "
9666 "consumes the B<waitpid>(2)  result, to the real parent (to the real parent "
9667 "only when the whole multithreaded process exits).  If the tracer and the "
9668 "real parent are the same process, the report is sent only once."
9669 msgstr ""
9670
9671 #. type: Plain text
9672 #: build/C/man2/ptrace.2:1791
9673 #, fuzzy
9674 #| msgid ""
9675 #| "On success, B<PTRACE_PEEK*> requests return the requested data, while "
9676 #| "other requests return zero.  On error, all requests return -1, and "
9677 #| "I<errno> is set appropriately.  Since the value returned by a successful "
9678 #| "B<PTRACE_PEEK*> request may be -1, the caller must check I<errno> after "
9679 #| "such requests to determine whether or not an error occurred."
9680 msgid ""
9681 "On success, B<PTRACE_PEEK*> requests return the requested data, while other "
9682 "requests return zero.  (On Linux, this is done in the libc wrapper around "
9683 "ptrace system call.  On the system call level, B<PTRACE_PEEK*> requests have "
9684 "a different API: they store the result at the address specified by I<data> "
9685 "parameter, and return value is the error flag.)"
9686 msgstr ""
9687 "成功すると、 B<PTRACE_PEEK*> の場合は要求したデータを返し、 それ以外の場合は "
9688 "0 を返す。 エラーの場合は -1 を返し、 I<errno> が適切に設定される。 "
9689 "B<PTRACE_PEEK*> が成功して返す値も -1 になることがあるため、 そのような要求"
9690 "の場合には、呼び出し元は I<errno> を調べ、エラーか発生したのかどうかを判断し"
9691 "なければならない。"
9692
9693 #. type: Plain text
9694 #: build/C/man2/ptrace.2:1801
9695 #, fuzzy
9696 #| msgid ""
9697 #| "On success, B<PTRACE_PEEK*> requests return the requested data, while "
9698 #| "other requests return zero.  On error, all requests return -1, and "
9699 #| "I<errno> is set appropriately.  Since the value returned by a successful "
9700 #| "B<PTRACE_PEEK*> request may be -1, the caller must check I<errno> after "
9701 #| "such requests to determine whether or not an error occurred."
9702 msgid ""
9703 "On error, all requests return -1, and I<errno> is set appropriately.  Since "
9704 "the value returned by a successful B<PTRACE_PEEK*> request may be -1, the "
9705 "caller must clear I<errno> before the call, and then check it afterward to "
9706 "determine whether or not an error occurred."
9707 msgstr ""
9708 "成功すると、 B<PTRACE_PEEK*> の場合は要求したデータを返し、 それ以外の場合は "
9709 "0 を返す。 エラーの場合は -1 を返し、 I<errno> が適切に設定される。 "
9710 "B<PTRACE_PEEK*> が成功して返す値も -1 になることがあるため、 そのような要求"
9711 "の場合には、呼び出し元は I<errno> を調べ、エラーか発生したのかどうかを判断し"
9712 "なければならない。"
9713
9714 #. type: Plain text
9715 #: build/C/man2/ptrace.2:1805
9716 msgid ""
9717 "(i386 only) There was an error with allocating or freeing a debug register."
9718 msgstr "(i386 のみ) デバッグレジスタの確保または解放でエラーが発生した。"
9719
9720 #. type: Plain text
9721 #: build/C/man2/ptrace.2:1816
9722 #, fuzzy
9723 #| msgid ""
9724 #| "There was an attempt to read from or write to an invalid area in the "
9725 #| "parent's or child's memory, probably because the area wasn't mapped or "
9726 #| "accessible.  Unfortunately, under Linux, different variations of this "
9727 #| "fault will return B<EIO> or B<EFAULT> more or less arbitrarily."
9728 msgid ""
9729 "There was an attempt to read from or write to an invalid area in the "
9730 "tracer's or the tracee's memory, probably because the area wasn't mapped or "
9731 "accessible.  Unfortunately, under Linux, different variations of this fault "
9732 "will return B<EIO> or B<EFAULT> more or less arbitrarily."
9733 msgstr ""
9734 "親プロセスまたは子プロセスのメモリの不正な領域に読み書きしようとした。 おそら"
9735 "くその領域がマッピングされていないか、 その領域へのアクセスが許されていないか"
9736 "である。 不運なことに、Linux ではこのようなエラーの場合、多かれ少なかれ 恣意"
9737 "的に B<EIO> を返したり B<EFAULT> を返したりすることがある。"
9738
9739 #. type: Plain text
9740 #: build/C/man2/ptrace.2:1819
9741 msgid "An attempt was made to set an invalid option."
9742 msgstr "不正なオプションを設定しようとした。"
9743
9744 #. type: Plain text
9745 #: build/C/man2/ptrace.2:1826
9746 #, fuzzy
9747 #| msgid ""
9748 #| "I<request> is invalid, or an attempt was made to read from or write to an "
9749 #| "invalid area in the parent's or child's memory, or there was a word-"
9750 #| "alignment violation, or an invalid signal was specified during a restart "
9751 #| "request."
9752 msgid ""
9753 "I<request> is invalid, or an attempt was made to read from or write to an "
9754 "invalid area in the tracer's or the tracee's memory, or there was a word-"
9755 "alignment violation, or an invalid signal was specified during a restart "
9756 "request."
9757 msgstr ""
9758 "I<request> が不正である。 または、親プロセスまたは子プロセスのメモリの 不正な"
9759 "領域に読み書きしようとした。 または、ワード境界違反があった。 または、実行再"
9760 "開の要求で不正なシグナルを指定した。"
9761
9762 #. type: Plain text
9763 #: build/C/man2/ptrace.2:1839
9764 #, fuzzy
9765 #| msgid ""
9766 #| "The specified process cannot be traced.  This could be because the parent "
9767 #| "has insufficient privileges (the required capability is "
9768 #| "B<CAP_SYS_PTRACE>); unprivileged processes cannot trace processes that "
9769 #| "they cannot send signals to or those running set-user-ID/set-group-ID "
9770 #| "programs, for obvious reasons.  Alternatively, the process may already be "
9771 #| "being traced, or be B<init>(8)  (PID 1)."
9772 msgid ""
9773 "The specified process cannot be traced.  This could be because the tracer "
9774 "has insufficient privileges (the required capability is B<CAP_SYS_PTRACE>); "
9775 "unprivileged processes cannot trace processes that they cannot send signals "
9776 "to or those running set-user-ID/set-group-ID programs, for obvious reasons.  "
9777 "Alternatively, the process may already be being traced, or (on kernels "
9778 "before 2.6.26) be B<init>(8)  (PID 1)."
9779 msgstr ""
9780 "指定したプロセスをトレースすることができない。これは親プロセスが 必要な権限 "
9781 "(必要なケーパビリティは B<CAP_SYS_PTRACE>)  を持っていないことが原因の場合が"
9782 "ある。 分かりやすい理由を挙げるなら、 非特権プロセスはシグナルを送ることがで"
9783 "きないプロセスをトレースできないし、 set-user-ID/set-group-ID プログラムを実"
9784 "行しているプロセスはトレースできない。 または、プロセスはすでにトレース中であ"
9785 "る、 または B<init>(8)  プロセス (PID が 1) である。"
9786
9787 #. type: Plain text
9788 #: build/C/man2/ptrace.2:1844
9789 #, fuzzy
9790 #| msgid ""
9791 #| "The specified process does not exist, or is not currently being traced by "
9792 #| "the caller, or is not stopped (for requests that require that)."
9793 msgid ""
9794 "The specified process does not exist, or is not currently being traced by "
9795 "the caller, or is not stopped (for requests that require a stopped tracee)."
9796 msgstr ""
9797 "指定したプロセスが存在しない。 または、指定したプロセスは呼び出したプロセス"
9798 "が 現在トレース中の子プロセスではない。 または、指定したプロセスが停止してい"
9799 "ない (停止していることが必要な要求の場合)。"
9800
9801 #. type: Plain text
9802 #: build/C/man2/ptrace.2:1846
9803 msgid "SVr4, 4.3BSD."
9804 msgstr "SVr4, 4.3BSD."
9805
9806 #. type: Plain text
9807 #: build/C/man2/ptrace.2:1861
9808 #, fuzzy
9809 #| msgid ""
9810 #| "Although arguments to B<ptrace>()  are interpreted according to the "
9811 #| "prototype given, glibc currently declares B<ptrace>()  as a variadic "
9812 #| "function with only the I<request> argument fixed.  This means that "
9813 #| "unneeded trailing arguments may be omitted, though doing so makes use of "
9814 #| "undocumented B<gcc>(1)  behavior."
9815 msgid ""
9816 "Although arguments to B<ptrace>()  are interpreted according to the "
9817 "prototype given, glibc currently declares B<ptrace>()  as a variadic "
9818 "function with only the I<request> argument fixed.  It is recommended to "
9819 "always supply four arguments, even if the requested operation does not use "
9820 "them, setting unused/ignored arguments to I<0L> or I<(void\\ *)\\ 0>."
9821 msgstr ""
9822 "B<ptrace>()  の引き数は上のようなプロトタイプに基づいて解釈されるが、 glibc "
9823 "では、現在のところ B<ptrace>()  は I<request> 引き数だけが固定の可変長引き数"
9824 "関数として 宣言されている。 これは必要なければ残りの引き数は省略可能であるこ"
9825 "とを意味するが、 それは B<gcc>(1)  の明文化されていない動作を利用していること"
9826 "になる。"
9827
9828 #.  See commit 00cd5c37afd5f431ac186dd131705048c0a11fdb
9829 #. type: Plain text
9830 #: build/C/man2/ptrace.2:1866
9831 #, fuzzy
9832 #| msgid "B<init>(8), the process with PID 1, may not be traced."
9833 msgid ""
9834 "In Linux kernels before 2.6.26, B<init>(8), the process with PID 1, may not "
9835 "be traced."
9836 msgstr "B<init>(8)  すなわち PID が 1 のプロセスはトレースすることができない。"
9837
9838 #.  See http://lkml.org/lkml/2008/5/8/375
9839 #. type: Plain text
9840 #: build/C/man2/ptrace.2:1873
9841 #, fuzzy
9842 #| msgid ""
9843 #| "The layout of the contents of memory and the USER area are quite OS- and "
9844 #| "architecture-specific.  The offset supplied, and the data returned, might "
9845 #| "not entirely match with the definition of I<struct user>."
9846 msgid ""
9847 "The layout of the contents of memory and the USER area are quite operating-"
9848 "system- and architecture-specific.  The offset supplied, and the data "
9849 "returned, might not entirely match with the definition of I<struct user>."
9850 msgstr ""
9851 "メモリや USER 領域の内容や配置は OS ごと、アーキテクチャごとに 非常に依存す"
9852 "る。 オフセットが指定された場合、返されるデータは I<struct user> の定義と完全"
9853 "に一致しないこともありえる。"
9854
9855 #. type: Plain text
9856 #: build/C/man2/ptrace.2:1876
9857 #, fuzzy
9858 #| msgid ""
9859 #| "The size of a \"word\" is determined by the OS variant (e.g., for 32-bit "
9860 #| "Linux it is 32 bits, etc.)."
9861 msgid ""
9862 "The size of a \"word\" is determined by the operating-system variant (e.g., "
9863 "for 32-bit Linux it is 32 bits)."
9864 msgstr ""
9865 "「ワード (word) 」の大きさは OS によって決まる。 (例えば、32 ビットの Linux "
9866 "では 32 ビットである、など。)"
9867
9868 #. type: Plain text
9869 #: build/C/man2/ptrace.2:1884
9870 #, fuzzy
9871 #| msgid ""
9872 #| "This page documents the way the B<ptrace>()  call works currently in "
9873 #| "Linux.  Its behavior differs noticeably on other flavors of UNIX.  In any "
9874 #| "case, use of B<ptrace>()  is highly OS- and architecture-specific."
9875 msgid ""
9876 "This page documents the way the B<ptrace>()  call works currently in Linux.  "
9877 "Its behavior differs noticeably on other flavors of UNIX.  In any case, use "
9878 "of B<ptrace>()  is highly specific to the operating system and architecture."
9879 msgstr ""
9880 "このマニュアルは現在の Linux における B<ptrace>()  コールの動作について記述し"
9881 "ている。他の UNIX では その動作は著しく異なる。 いかなる場合も B<ptrace>()  "
9882 "を使うと OS やアーキテクチャに非常に依存したものになる。"
9883
9884 #. type: Plain text
9885 #: build/C/man2/ptrace.2:1895
9886 #, fuzzy
9887 #| msgid ""
9888 #| "On hosts with 2.6 kernel headers, B<PTRACE_SETOPTIONS> is declared with a "
9889 #| "different value than the one for 2.4.  This leads to applications "
9890 #| "compiled with such headers failing when run on 2.4 kernels.  This can be "
9891 #| "worked around by redefining B<PTRACE_SETOPTIONS> to "
9892 #| "B<PTRACE_OLDSETOPTIONS>, if that is defined."
9893 msgid ""
9894 "On hosts with 2.6 kernel headers, B<PTRACE_SETOPTIONS> is declared with a "
9895 "different value than the one for 2.4.  This leads to applications compiled "
9896 "with 2.6 kernel headers failing when run on 2.4 kernels.  This can be worked "
9897 "around by redefining B<PTRACE_SETOPTIONS> to B<PTRACE_OLDSETOPTIONS>, if "
9898 "that is defined."
9899 msgstr ""
9900 "カーネル 2.6 のヘッダがインストールされたホストでは、 B<PTRACE_SETOPTIONS> は"
9901 "カーネル 2.4 のヘッダとは異なる値で宣言される。 このため、カーネル 2.6 のヘッ"
9902 "ダでコンパイルされたアプリケーションは カーネル 2.4 では正しく動作しない。 こ"
9903 "の問題は、 B<PTRACE_SETOPTIONS> が定義されていた際は、 B<PTRACE_SETOPTIONS> "
9904 "を B<PTRACE_OLDSETOPTIONS> に定義し直すことで対処できる。"
9905
9906 #. type: Plain text
9907 #: build/C/man2/ptrace.2:1898
9908 msgid ""
9909 "Group-stop notifications are sent to the tracer, but not to real parent.  "
9910 "Last confirmed on 2.6.38.6."
9911 msgstr ""
9912
9913 #.  Note from Denys Vlasenko:
9914 #.      Here "exits" means any kind of death - _exit, exit_group,
9915 #.      signal death. Signal death and exit_group cases are trivial,
9916 #.      though: since signal death and exit_group kill all other threads
9917 #.      too, "until all other threads exit" thing happens rather soon
9918 #.      in these cases. Therefore, only _exit presents observably
9919 #.      puzzling behavior to ptrace users: thread leader _exit's,
9920 #.      but WIFEXITED isn't reported! We are trying to explain here
9921 #.      why it is so.
9922 #.   FIXME: ^^^ need to test/verify this scenario
9923 #. type: Plain text
9924 #: build/C/man2/ptrace.2:1929
9925 msgid ""
9926 "If a thread group leader is traced and exits by calling B<_exit>(2), a "
9927 "B<PTRACE_EVENT_EXIT> stop will happen for it (if requested), but the "
9928 "subsequent B<WIFEXITED> notification will not be delivered until all other "
9929 "threads exit.  As explained above, if one of other threads calls B<execve>"
9930 "(2), the death of the thread group leader will I<never> be reported.  If the "
9931 "execed thread is not traced by this tracer, the tracer will never know that "
9932 "B<execve>(2)  happened.  One possible workaround is to B<PTRACE_DETACH> the "
9933 "thread group leader instead of restarting it in this case.  Last confirmed "
9934 "on 2.6.38.6."
9935 msgstr ""
9936
9937 #. type: Plain text
9938 #: build/C/man2/ptrace.2:1939
9939 msgid ""
9940 "A B<SIGKILL> signal may still cause a B<PTRACE_EVENT_EXIT> stop before "
9941 "actual signal death.  This may be changed in the future; B<SIGKILL> is meant "
9942 "to always immediately kill tasks even under ptrace.  Last confirmed on "
9943 "2.6.38.6."
9944 msgstr ""
9945
9946 #. type: Plain text
9947 #: build/C/man2/ptrace.2:1957
9948 msgid ""
9949 "Some system calls return with B<EINTR> if a signal was sent to a tracee, but "
9950 "delivery was suppressed by the tracer.  (This is very typical operation: it "
9951 "is usually done by debuggers on every attach, in order to not introduce a "
9952 "bogus B<SIGSTOP>).  As of Linux 3.2.9, the following system calls are "
9953 "affected (this list is likely incomplete): B<epoll_wait>(2), and B<read>(2)  "
9954 "from an B<inotify>(7)  file descriptor.  The usual symptom of this bug is "
9955 "that when you attach to a quiescent process with the command"
9956 msgstr ""
9957
9958 #. type: Plain text
9959 #: build/C/man2/ptrace.2:1959
9960 #, no-wrap
9961 msgid "    strace -p E<lt>process-IDE<gt>\n"
9962 msgstr ""
9963
9964 #. type: Plain text
9965 #: build/C/man2/ptrace.2:1962
9966 msgid "then, instead of the usual and expected one-line output such as"
9967 msgstr ""
9968
9969 #. type: Plain text
9970 #: build/C/man2/ptrace.2:1965
9971 #, no-wrap
9972 msgid "    restart_syscall(E<lt>... resuming interrupted call ...E<gt>_\n"
9973 msgstr ""
9974
9975 #. type: Plain text
9976 #: build/C/man2/ptrace.2:1971
9977 #, no-wrap
9978 msgid "    select(6, [5], NULL, [5], NULL_\n"
9979 msgstr ""
9980
9981 #. type: Plain text
9982 #: build/C/man2/ptrace.2:1975
9983 msgid ""
9984 "('_' denotes the cursor position), you observe more than one line.  For "
9985 "example:"
9986 msgstr ""
9987
9988 #. type: Plain text
9989 #: build/C/man2/ptrace.2:1979
9990 #, no-wrap
9991 msgid ""
9992 "    clock_gettime(CLOCK_MONOTONIC, {15370, 690928118}) = 0\n"
9993 "    epoll_wait(4,_\n"
9994 msgstr ""
9995
9996 #. type: Plain text
9997 #: build/C/man2/ptrace.2:2000
9998 msgid ""
9999 "What is not visible here is that the process was blocked in B<epoll_wait>"
10000 "(2)  before B<strace>(1)  has attached to it.  Attaching caused B<epoll_wait>"
10001 "(2)  to return to user space with the error B<EINTR>.  In this particular "
10002 "case, the program reacted to B<EINTR> by checking the current time, and then "
10003 "executing B<epoll_wait>(2)  again.  (Programs which do not expect such "
10004 "\"stray\" B<EINTR> errors may behave in an unintended way upon an B<strace>"
10005 "(1)  attach.)"
10006 msgstr ""
10007
10008 #. type: Plain text
10009 #: build/C/man2/ptrace.2:2014
10010 msgid ""
10011 "B<gdb>(1), B<strace>(1), B<clone>(2), B<execve>(2), B<fork>(2), B<gettid>"
10012 "(2), B<sigaction>(2), B<tgkill>(2), B<vfork>(2), B<waitpid>(2), B<exec>(3), "
10013 "B<capabilities>(7), B<signal>(7)"
10014 msgstr ""
10015 "B<gdb>(1), B<strace>(1), B<clone>(2), B<execve>(2), B<fork>(2),\n"
10016 "B<gettid>(2), B<sigaction>(2), B<tgkill>(2), B<vfork>(2),\n"
10017 "B<waitpid>(2), B<exec>(3), B<capabilities>(7), B<signal>(7)"
10018
10019 #. type: TH
10020 #: build/C/man2/quotactl.2:27
10021 #, no-wrap
10022 msgid "QUOTACTL"
10023 msgstr "QUOTACTL"
10024
10025 #. type: TH
10026 #: build/C/man2/quotactl.2:27
10027 #, no-wrap
10028 msgid "2010-06-16"
10029 msgstr "2010-06-16"
10030
10031 #. type: Plain text
10032 #: build/C/man2/quotactl.2:30
10033 msgid "quotactl - manipulate disk quotas"
10034 msgstr "quotactl - ディスク quota を操作する"
10035
10036 #. type: Plain text
10037 #: build/C/man2/quotactl.2:34
10038 #, no-wrap
10039 msgid ""
10040 "B<#include E<lt>sys/quota.hE<gt>>\n"
10041 "B<#include E<lt>xfs/xqm.hE<gt>>\n"
10042 msgstr ""
10043 "B<#include E<lt>sys/quota.hE<gt>>\n"
10044 "B<#include E<lt>xfs/xqm.hE<gt>>\n"
10045
10046 #. type: Plain text
10047 #: build/C/man2/quotactl.2:37
10048 #, no-wrap
10049 msgid "B<int quotactl(int >I<cmd>B<, const char *>I<special>B<, int >I<id>B<, caddr_t >I<addr>B<);>\n"
10050 msgstr "B<int quotactl(int >I<cmd>B<, const char *>I<special>B<, int >I<id>B<, caddr_t >I<addr>B<);>\n"
10051
10052 #. type: Plain text
10053 #: build/C/man2/quotactl.2:49
10054 #, fuzzy
10055 #| msgid ""
10056 #| "The quota system defines for each user and/or group a soft limit and a "
10057 #| "hard limit bounding the amount of disk space that can be used on a given "
10058 #| "file system.  The hard limit cannot be crossed.  The soft limit can be "
10059 #| "crossed, but warnings will ensue.  Moreover, the user cannot be above the "
10060 #| "soft limit for more than one week (by default)  at a time: after this "
10061 #| "week the soft limit counts as hard limit."
10062 msgid ""
10063 "The quota system can be used to set per-user and per-group limits on the "
10064 "amount of disk space used on a filesystem.  For each user and/or group, a "
10065 "soft limit and a hard limit can be set for each filesystem.  The hard limit "
10066 "can't be exceeded.  The soft limit can be exceeded, but warnings will "
10067 "ensue.  Moreover, the user can't exceed the soft limit for more than one "
10068 "week (by default) at a time; after this time, the soft limit counts as a "
10069 "hard limit."
10070 msgstr ""
10071 "quota システムは、各々のユーザ及び/またはグループに対して、 ソフト・リミット"
10072 "及びハード・リミットを定める。これはあるファイル・システムで 使用する事が出来"
10073 "るディスク容量を制限する。 ハード・リミットは超過することは出来ない。 ソフ"
10074 "ト・リミットは超過する事が出来るが、警告が発せられる。 更に、(デフォルトで"
10075 "は) 一週間以上ソフト・リミットを超過したままに しておく事はできない: 一週間経"
10076 "過した後はハード・リミットを超過したと みなされる。"
10077
10078 #. type: Plain text
10079 #: build/C/man2/quotactl.2:74
10080 #, fuzzy
10081 #| msgid ""
10082 #| "The B<quotactl>()  system call manipulates these quota.  Its first "
10083 #| "argument is of the form B<QCMD(>I<subcmd>B<,>I<type>B<)> where I<type> is "
10084 #| "either B<USRQUOTA> or B<GRPQUOTA> (for user quota and group quota, "
10085 #| "respectively), and I<subcmd> is described below."
10086 msgid ""
10087 "The B<quotactl>()  call manipulates disk quotas.  The I<cmd> argument "
10088 "indicates a command to be applied to the user or group ID specified in "
10089 "I<id>.  To initialize the I<cmd> argument, use the I<QCMD(subcmd, type)> "
10090 "macro.  The I<type> value is either B<USRQUOTA>, for user quotas, or "
10091 "B<GRPQUOTA>, for group quotas.  The I<subcmd> value is described below."
10092 msgstr ""
10093 "B<quotactl>()  システムコールはこれらの quota に対する操作を行なう。 最初の引"
10094 "き数は B<QCMD(>I<subcmd>B<,>I<type>B<)> という形式である。 I<type> には、ユー"
10095 "ザー quota については B<USRQUOTA> を、グループ quota については B<GRPQUOTA> "
10096 "を指定する。 I<subcmd> は以下で説明する。"
10097
10098 #. type: Plain text
10099 #: build/C/man2/quotactl.2:79
10100 msgid ""
10101 "The I<special> argument is a pointer to a null-terminated string containing "
10102 "the pathname of the (mounted) block special device for the filesystem being "
10103 "manipulated."
10104 msgstr ""
10105
10106 #. type: Plain text
10107 #: build/C/man2/quotactl.2:87
10108 msgid ""
10109 "The I<addr> argument is the address of an optional, command-specific, data "
10110 "structure that is copied in or out of the system.  The interpretation of "
10111 "I<addr> is given with each command below."
10112 msgstr ""
10113
10114 #. type: Plain text
10115 #: build/C/man2/quotactl.2:91
10116 msgid "The I<subcmd> value is one of the following:"
10117 msgstr "I<subcmd> の値は以下のいずれかである"
10118
10119 #. type: TP
10120 #: build/C/man2/quotactl.2:91
10121 #, no-wrap
10122 msgid "B<Q_QUOTAON>"
10123 msgstr "B<Q_QUOTAON>"
10124
10125 #. type: Plain text
10126 #: build/C/man2/quotactl.2:98
10127 msgid ""
10128 "Turn on quotas for a filesystem.  The I<id> argument is the identification "
10129 "number of the quota format to be used.  Currently, there are three supported "
10130 "quota formats:"
10131 msgstr ""
10132
10133 #. type: TP
10134 #: build/C/man2/quotactl.2:99
10135 #, no-wrap
10136 msgid "B<QFMT_VFS_OLD>"
10137 msgstr ""
10138
10139 #. type: Plain text
10140 #: build/C/man2/quotactl.2:102
10141 msgid "The original quota format."
10142 msgstr ""
10143
10144 #. type: TP
10145 #: build/C/man2/quotactl.2:102
10146 #, no-wrap
10147 msgid "B<QFMT_VFS_V0>"
10148 msgstr ""
10149
10150 #. type: Plain text
10151 #: build/C/man2/quotactl.2:106
10152 msgid ""
10153 "The standard VFS v0 quota format, which can handle 32-bit UIDs and GIDs and "
10154 "quota limits up to 2^42 bytes and 2^32 inodes."
10155 msgstr ""
10156
10157 #. type: TP
10158 #: build/C/man2/quotactl.2:106
10159 #, no-wrap
10160 msgid "B<QFMT_VFS_V1>"
10161 msgstr ""
10162
10163 #. type: Plain text
10164 #: build/C/man2/quotactl.2:110
10165 msgid ""
10166 "A quota format that can handle 32-bit UIDs and GIDs and quota limits of 2^64 "
10167 "bytes and 2^64 inodes."
10168 msgstr ""
10169
10170 #. type: Plain text
10171 #: build/C/man2/quotactl.2:121
10172 msgid ""
10173 "The I<addr> argument points to the pathname of a file containing the quotas "
10174 "for the filesystem.  The quota file must exist; it is normally created with "
10175 "the B<quotacheck>(8)  program.  This operation requires privilege "
10176 "(B<CAP_SYS_ADMIN>)."
10177 msgstr ""
10178
10179 #. type: TP
10180 #: build/C/man2/quotactl.2:121
10181 #, no-wrap
10182 msgid "B<Q_QUOTAOFF>"
10183 msgstr "B<Q_QUOTAOFF>"
10184
10185 #. type: Plain text
10186 #: build/C/man2/quotactl.2:131
10187 msgid ""
10188 "Turn off quotas for a filesystem.  The I<addr> and I<id> arguments are "
10189 "ignored.  This operation requires privilege (B<CAP_SYS_ADMIN>)."
10190 msgstr ""
10191
10192 #. type: TP
10193 #: build/C/man2/quotactl.2:131
10194 #, no-wrap
10195 msgid "B<Q_GETQUOTA>"
10196 msgstr "B<Q_GETQUOTA>"
10197
10198 #. type: Plain text
10199 #: build/C/man2/quotactl.2:142
10200 #, fuzzy
10201 #| msgid ""
10202 #| "Get limits and current usage of disk space.  The I<addr> argument is a "
10203 #| "pointer to a dqblk structure (defined in I<E<lt>sys/quota.hE<gt>>)."
10204 msgid ""
10205 "Get disk quota limits and current usage for user or group I<id>.  The "
10206 "I<addr> argument is a pointer to a I<dqblk> structure defined in I<E<lt>sys/"
10207 "quota.hE<gt>> as follows:"
10208 msgstr ""
10209 "ディスク使用量の制限値と現在の使用量を得る。 I<addr> 引き数は (I<E<lt>sys/"
10210 "quota.hE<gt>> で定義された) dqblk 構造体を指すポインタである。"
10211
10212 #. type: Plain text
10213 #: build/C/man2/quotactl.2:147 build/C/man2/quotactl.2:234
10214 #, no-wrap
10215 msgid ""
10216 "/* uint64_t is an unsigned 64-bit integer;\n"
10217 "   uint32_t is an unsigned 32-bit integer */\n"
10218 msgstr ""
10219
10220 #. type: Plain text
10221 #: build/C/man2/quotactl.2:167
10222 #, no-wrap
10223 msgid ""
10224 "struct dqblk {          /* Definition since Linux 2.4.22 */\n"
10225 "    uint64_t dqb_bhardlimit;   /* absolute limit on disk\n"
10226 "                                  quota blocks alloc */\n"
10227 "    uint64_t dqb_bsoftlimit;   /* preferred limit on\n"
10228 "                                  disk quota blocks */\n"
10229 "    uint64_t dqb_curspace;     /* current quota block\n"
10230 "                                  count */\n"
10231 "    uint64_t dqb_ihardlimit;   /* maximum number of\n"
10232 "                                  allocated inodes */\n"
10233 "    uint64_t dqb_isoftlimit;   /* preferred inode limit */\n"
10234 "    uint64_t dqb_curinodes;    /* current number of\n"
10235 "                                  allocated inodes */\n"
10236 "    uint64_t dqb_btime;        /* time limit for excessive\n"
10237 "                                  disk use */\n"
10238 "    uint64_t dqb_itime;        /* time limit for excessive\n"
10239 "                                  files */\n"
10240 "    uint32_t dqb_valid;        /* bit mask of QIF_*\n"
10241 "                                  constants */\n"
10242 "};\n"
10243 msgstr ""
10244
10245 #. type: Plain text
10246 #: build/C/man2/quotactl.2:170
10247 #, no-wrap
10248 msgid ""
10249 "/* Flags in dqb_valid that indicate which fields in\n"
10250 "   dqblk structure are valid. */\n"
10251 msgstr ""
10252
10253 #. type: Plain text
10254 #: build/C/man2/quotactl.2:181
10255 #, no-wrap
10256 msgid ""
10257 "#define QIF_BLIMITS   1\n"
10258 "#define QIF_SPACE     2\n"
10259 "#define QIF_ILIMITS   4\n"
10260 "#define QIF_INODES    8\n"
10261 "#define QIF_BTIME     16\n"
10262 "#define QIF_ITIME     32\n"
10263 "#define QIF_LIMITS    (QIF_BLIMITS | QIF_ILIMITS)\n"
10264 "#define QIF_USAGE     (QIF_SPACE | QIF_INODES)\n"
10265 "#define QIF_TIMES     (QIF_BTIME | QIF_ITIME)\n"
10266 "#define QIF_ALL       (QIF_LIMITS | QIF_USAGE | QIF_TIMES)\n"
10267 msgstr ""
10268
10269 #. type: Plain text
10270 #: build/C/man2/quotactl.2:198
10271 msgid ""
10272 "The I<dqb_valid> field is a bit mask that is set to indicate the entries in "
10273 "the I<dqblk> structure that are valid.  Currently, the kernel fills in all "
10274 "entries of the I<dqblk> structure and marks them as valid in the "
10275 "I<dqb_valid> field.  Unprivileged users may retrieve only their own quotas; "
10276 "a privileged user (B<CAP_SYS_ADMIN>)  can retrieve the quotas of any user."
10277 msgstr ""
10278
10279 #. type: TP
10280 #: build/C/man2/quotactl.2:198
10281 #, no-wrap
10282 msgid "B<Q_SETQUOTA>"
10283 msgstr "B<Q_SETQUOTA>"
10284
10285 #. type: Plain text
10286 #: build/C/man2/quotactl.2:218
10287 msgid ""
10288 "Set quota information for user or group I<id>, using the information "
10289 "supplied in the I<dqblk> structure pointed to by I<addr>.  The I<dqb_valid> "
10290 "field of the I<dqblk> structure indicates which entries in the structure "
10291 "have been set by the caller.  This operation supersedes the B<Q_SETQLIM> and "
10292 "B<Q_SETUSE> operations in the previous quota interfaces.  This operation "
10293 "requires privilege (B<CAP_SYS_ADMIN>)."
10294 msgstr ""
10295
10296 #. type: TP
10297 #: build/C/man2/quotactl.2:218
10298 #, no-wrap
10299 msgid "B<Q_GETINFO>"
10300 msgstr "B<Q_GETINFO>"
10301
10302 #. type: Plain text
10303 #: build/C/man2/quotactl.2:229
10304 #, fuzzy
10305 #| msgid ""
10306 #| "Get limits and current usage of disk space.  The I<addr> argument is a "
10307 #| "pointer to a dqblk structure (defined in I<E<lt>sys/quota.hE<gt>>)."
10308 msgid ""
10309 "Get information (like grace times) about quotafile.  The I<addr> argument "
10310 "should be a pointer to a I<dqinfo> structure.  This structure is defined in "
10311 "I<E<lt>sys/quota.hE<gt>> as follows:"
10312 msgstr ""
10313 "ディスク使用量の制限値と現在の使用量を得る。 I<addr> 引き数は (I<E<lt>sys/"
10314 "quota.hE<gt>> で定義された) dqblk 構造体を指すポインタである。"
10315
10316 #. type: Plain text
10317 #: build/C/man2/quotactl.2:238
10318 #, no-wrap
10319 msgid ""
10320 "struct dqinfo {         /* Defined since kernel 2.4.22 */\n"
10321 "    uint64_t dqi_bgrace;    /* Time before block soft limit\n"
10322 "                               becomes hard limit */\n"
10323 msgstr ""
10324
10325 #. type: Plain text
10326 #: build/C/man2/quotactl.2:245
10327 #, no-wrap
10328 msgid ""
10329 "    uint64_t dqi_igrace;    /* Time before inode soft limit\n"
10330 "                               becomes hard limit */\n"
10331 "    uint32_t dqi_flags;     /* Flags for quotafile\n"
10332 "                               (DQF_*) */\n"
10333 "    uint32_t dqi_valid;\n"
10334 "};\n"
10335 msgstr ""
10336
10337 #. type: Plain text
10338 #: build/C/man2/quotactl.2:247
10339 #, no-wrap
10340 msgid "/* Bits for dqi_flags */\n"
10341 msgstr ""
10342
10343 #. type: Plain text
10344 #: build/C/man2/quotactl.2:249
10345 #, no-wrap
10346 msgid "/* Quota format QFMT_VFS_OLD */\n"
10347 msgstr ""
10348
10349 #. type: Plain text
10350 #: build/C/man2/quotactl.2:251
10351 #, no-wrap
10352 msgid "#define V1_DQF_RSQUASH\t1   /* Root squash enabled */\n"
10353 msgstr ""
10354
10355 #. type: Plain text
10356 #: build/C/man2/quotactl.2:253
10357 #, no-wrap
10358 msgid "/* Other quota formats have no dqi_flags bits defined */\n"
10359 msgstr ""
10360
10361 #. type: Plain text
10362 #: build/C/man2/quotactl.2:256
10363 #, no-wrap
10364 msgid ""
10365 "/* Flags in dqi_valid that indicate which fields in\n"
10366 "   dqinfo structure are valid. */\n"
10367 msgstr ""
10368
10369 #. type: Plain text
10370 #: build/C/man2/quotactl.2:261
10371 #, no-wrap
10372 msgid ""
10373 "# define IIF_BGRACE\t1\n"
10374 "# define IIF_IGRACE\t2\n"
10375 "# define IIF_FLAGS\t4\n"
10376 "# define IIF_ALL\t(IIF_BGRACE | IIF_IGRACE | IIF_FLAGS)\n"
10377 msgstr ""
10378
10379 #. type: Plain text
10380 #: build/C/man2/quotactl.2:277
10381 msgid ""
10382 "The I<dqi_valid> field in the I<dqinfo> structure indicates the entries in "
10383 "the structure that are valid.  Currently, the kernel fills in all entries of "
10384 "the I<dqinfo> structure and marks them all as valid in the I<dqi_valid> "
10385 "field.  The I<id> argument is ignored."
10386 msgstr ""
10387
10388 #. type: TP
10389 #: build/C/man2/quotactl.2:277
10390 #, no-wrap
10391 msgid "B<Q_SETINFO>"
10392 msgstr "B<Q_SETINFO>"
10393
10394 #. type: Plain text
10395 #: build/C/man2/quotactl.2:301
10396 msgid ""
10397 "Set information about quotafile.  The I<addr> argument should be a pointer "
10398 "to a I<dqinfo> structure.  The I<dqi_valid> field of the I<dqinfo> structure "
10399 "indicates the entries in the structure that have been set by the caller.  "
10400 "This operation supersedes the B<Q_SETGRACE> and B<Q_SETFLAGS> operations in "
10401 "the previous quota interfaces.  The I<id> argument is ignored.  This "
10402 "operation requires privilege (B<CAP_SYS_ADMIN>)."
10403 msgstr ""
10404
10405 #. type: TP
10406 #: build/C/man2/quotactl.2:301
10407 #, no-wrap
10408 msgid "B<Q_GETFMT>"
10409 msgstr "B<Q_GETFMT>"
10410
10411 #. type: Plain text
10412 #: build/C/man2/quotactl.2:308
10413 msgid ""
10414 "Get quota format used on the specified filesystem.  The I<addr> argument "
10415 "should be a pointer to a 4-byte buffer where the format number will be "
10416 "stored."
10417 msgstr ""
10418
10419 #. type: TP
10420 #: build/C/man2/quotactl.2:308
10421 #, no-wrap
10422 msgid "B<Q_SYNC>"
10423 msgstr "B<Q_SYNC>"
10424
10425 #. type: Plain text
10426 #: build/C/man2/quotactl.2:319
10427 msgid ""
10428 "Update the on-disk copy of quota usages for a filesystem.  If I<special> is "
10429 "NULL, then all filesystems with active quotas are sync'ed.  The I<addr> and "
10430 "I<id> arguments are ignored."
10431 msgstr ""
10432
10433 #. type: TP
10434 #: build/C/man2/quotactl.2:319
10435 #, no-wrap
10436 msgid "B<Q_GETSTATS>"
10437 msgstr "B<Q_GETSTATS>"
10438
10439 #.  Q_GETSTATS was removed in kernel 2.4.22.
10440 #. type: Plain text
10441 #: build/C/man2/quotactl.2:339
10442 msgid ""
10443 "Get statistics and other generic information about the quota subsystem.  The "
10444 "I<addr> argument should be a pointer to a I<dqstats> structure in which data "
10445 "should be stored.  This structure is defined in I<E<lt>sys/quota.hE<gt>.> "
10446 "The I<special> and I<id> arguments are ignored.  This operation is obsolete "
10447 "and not supported by recent kernels.  Files in I</proc/sys/fs/quota/> carry "
10448 "the information instead."
10449 msgstr ""
10450
10451 #. type: Plain text
10452 #: build/C/man2/quotactl.2:342
10453 msgid ""
10454 "For XFS filesystems making use of the XFS Quota Manager (XQM), the above "
10455 "commands are bypassed and the following commands are used:"
10456 msgstr ""
10457
10458 #. type: TP
10459 #: build/C/man2/quotactl.2:342
10460 #, no-wrap
10461 msgid "B<Q_XQUOTAON>"
10462 msgstr "B<Q_XQUOTAON>"
10463
10464 #. type: Plain text
10465 #: build/C/man2/quotactl.2:363
10466 msgid ""
10467 "Turn on quotas for an XFS filesystem.  XFS provides the ability to turn on/"
10468 "off quota limit enforcement with quota accounting.  Therefore, XFS expects "
10469 "I<addr> to be a pointer to an I<unsigned int> that contains either the flags "
10470 "B<XFS_QUOTA_UDQ_ACCT> and/or B<XFS_QUOTA_UDQ_ENFD> (for user quota), or "
10471 "B<XFS_QUOTA_GDQ_ACCT> and/or B<XFS_QUOTA_GDQ_ENFD> (for group quota), as "
10472 "defined in I<E<lt>xfs/xqm.hE<gt>>.  This operation requires privilege "
10473 "(B<CAP_SYS_ADMIN>)."
10474 msgstr ""
10475
10476 #. type: TP
10477 #: build/C/man2/quotactl.2:363
10478 #, no-wrap
10479 msgid "B<Q_XQUOTAOFF>"
10480 msgstr "B<Q_XQUOTAOFF>"
10481
10482 #. type: Plain text
10483 #: build/C/man2/quotactl.2:374
10484 msgid ""
10485 "Turn off quotas for an XFS filesystem.  As with B<Q_QUOTAON>, XFS "
10486 "filesystems expect a pointer to an I<unsigned int> that specifies whether "
10487 "quota accounting and/or limit enforcement need to be turned off.  This "
10488 "operation requires privilege (B<CAP_SYS_ADMIN>)."
10489 msgstr ""
10490
10491 #. type: TP
10492 #: build/C/man2/quotactl.2:374
10493 #, no-wrap
10494 msgid "B<Q_XGETQUOTA>"
10495 msgstr "B<Q_XGETQUOTA>"
10496
10497 #. type: Plain text
10498 #: build/C/man2/quotactl.2:388
10499 msgid ""
10500 "Get disk quota limits and current usage for user I<id>.  The I<addr> "
10501 "argument is a pointer to an I<fs_disk_quota> structure (defined in "
10502 "I<E<lt>xfs/xqm.hE<gt>>).  Unprivileged users may retrieve only their own "
10503 "quotas; a privileged user (B<CAP_SYS_ADMIN>)  may retrieve the quotas of any "
10504 "user."
10505 msgstr ""
10506
10507 #. type: TP
10508 #: build/C/man2/quotactl.2:388
10509 #, no-wrap
10510 msgid "B<Q_XSETQLIM>"
10511 msgstr "B<Q_XSETQLIM>"
10512
10513 #. type: Plain text
10514 #: build/C/man2/quotactl.2:400
10515 msgid ""
10516 "Set disk quota limits for user I<id>.  The I<addr> argument is a pointer to "
10517 "an I<fs_disk_quota> structure (defined in I<E<lt>xfs/xqm.hE<gt>>).  This "
10518 "operation requires privilege (B<CAP_SYS_ADMIN>)."
10519 msgstr ""
10520
10521 #. type: TP
10522 #: build/C/man2/quotactl.2:400
10523 #, no-wrap
10524 msgid "B<Q_XGETQSTAT>"
10525 msgstr "B<Q_XGETQSTAT>"
10526
10527 #. type: Plain text
10528 #: build/C/man2/quotactl.2:408
10529 msgid ""
10530 "Returns an I<fs_quota_stat> structure containing XFS filesystem specific "
10531 "quota information.  This is useful for finding out how much space is used to "
10532 "store quota information, and also to get quotaon/off status of a given local "
10533 "XFS filesystem."
10534 msgstr ""
10535
10536 #. type: TP
10537 #: build/C/man2/quotactl.2:408
10538 #, no-wrap
10539 msgid "B<Q_XQUOTARM>"
10540 msgstr "B<Q_XQUOTARM>"
10541
10542 #. type: Plain text
10543 #: build/C/man2/quotactl.2:412
10544 msgid ""
10545 "Free the disk space taken by disk quotas.  Quotas must have already been "
10546 "turned off."
10547 msgstr ""
10548
10549 #. type: Plain text
10550 #: build/C/man2/quotactl.2:419
10551 msgid ""
10552 "There is no command equivalent to B<Q_SYNC> for XFS since B<sync>(1)  writes "
10553 "quota information to disk (in addition to the other filesystem metadata that "
10554 "it writes out)."
10555 msgstr ""
10556
10557 #. type: Plain text
10558 #: build/C/man2/quotactl.2:427
10559 msgid ""
10560 "On success, B<quotactl>()  returns 0; on error -1 is returned, and I<errno> "
10561 "is set to indicate the error."
10562 msgstr ""
10563 "成功すると、 B<quotactl>()  は 0 を返す。\n"
10564 "エラーの場合、-1 を返し、 I<errno> をエラーを示す値に設定する。"
10565
10566 #. type: Plain text
10567 #: build/C/man2/quotactl.2:434
10568 msgid "I<addr> or I<special> is invalid."
10569 msgstr ""
10570
10571 #. type: Plain text
10572 #: build/C/man2/quotactl.2:440
10573 msgid "I<cmd> or I<type> is invalid."
10574 msgstr ""
10575
10576 #. type: TP
10577 #: build/C/man2/quotactl.2:440
10578 #, no-wrap
10579 msgid "B<ENOENT>"
10580 msgstr "B<ENOENT>"
10581
10582 #. type: Plain text
10583 #: build/C/man2/quotactl.2:447
10584 msgid "The file specified by I<special> or I<addr> does not exist."
10585 msgstr ""
10586
10587 #. type: Plain text
10588 #: build/C/man2/quotactl.2:452
10589 msgid "The kernel has not been compiled with the B<CONFIG_QUOTA> option."
10590 msgstr ""
10591
10592 #. type: TP
10593 #: build/C/man2/quotactl.2:452
10594 #, no-wrap
10595 msgid "B<ENOTBLK>"
10596 msgstr "B<ENOTBLK>"
10597
10598 #. type: Plain text
10599 #: build/C/man2/quotactl.2:456
10600 msgid "I<special> is not a block device."
10601 msgstr "I<special> がブロックデバイスではない。"
10602
10603 #. type: Plain text
10604 #: build/C/man2/quotactl.2:461
10605 msgid ""
10606 "The caller lacked the required privilege (B<CAP_SYS_ADMIN>)  for the "
10607 "specified operation."
10608 msgstr ""
10609
10610 #. type: Plain text
10611 #: build/C/man2/quotactl.2:465
10612 msgid ""
10613 "No disk quota is found for the indicated user.  Quotas have not been turned "
10614 "on for this filesystem."
10615 msgstr ""
10616
10617 #. type: Plain text
10618 #: build/C/man2/quotactl.2:474
10619 msgid "If I<cmd> is B<Q_SETQUOTA>, B<quotactl>()  may also set I<errno> to:"
10620 msgstr ""
10621
10622 #. type: Plain text
10623 #: build/C/man2/quotactl.2:477
10624 msgid "Specified limits are out of range allowed by quota format."
10625 msgstr ""
10626
10627 #. type: Plain text
10628 #: build/C/man2/quotactl.2:486
10629 msgid "If I<cmd> is B<Q_QUOTAON>, B<quotactl>()  may also set I<errno> to:"
10630 msgstr ""
10631
10632 #. type: Plain text
10633 #: build/C/man2/quotactl.2:495
10634 msgid ""
10635 "The quota file pointed to by I<addr> exists, but is not a regular file; or, "
10636 "the quota file pointed to by I<addr> exists, but is not on the filesystem "
10637 "pointed to by I<special>."
10638 msgstr ""
10639
10640 #. type: Plain text
10641 #: build/C/man2/quotactl.2:501
10642 msgid ""
10643 "B<Q_QUOTAON> attempted, but another B<Q_QUOTAON> had already been performed."
10644 msgstr ""
10645
10646 #. type: Plain text
10647 #: build/C/man2/quotactl.2:504
10648 msgid "The quota file is corrupted."
10649 msgstr "quota ファイルが壊れている。"
10650
10651 #. type: Plain text
10652 #: build/C/man2/quotactl.2:507
10653 msgid "Specified quota format was not found."
10654 msgstr ""
10655
10656 #. type: Plain text
10657 #: build/C/man2/quotactl.2:512
10658 msgid "B<quota>(1), B<getrlimit>(2), B<quotacheck>(8), B<quotaon>(8)"
10659 msgstr "B<quota>(1), B<getrlimit>(2), B<quotacheck>(8), B<quotaon>(8)"
10660
10661 #. type: TH
10662 #: build/C/man2/sendfile.2:19
10663 #, no-wrap
10664 msgid "SENDFILE"
10665 msgstr "SENDFILE"
10666
10667 #. type: TH
10668 #: build/C/man2/sendfile.2:19
10669 #, no-wrap
10670 msgid "2011-09-14"
10671 msgstr "2011-09-14"
10672
10673 #. type: Plain text
10674 #: build/C/man2/sendfile.2:22
10675 msgid "sendfile - transfer data between file descriptors"
10676 msgstr "sendfile - ファイル・ディスクリプタ間でデータを転送する"
10677
10678 #. type: Plain text
10679 #: build/C/man2/sendfile.2:24
10680 msgid "B<#include E<lt>sys/sendfile.hE<gt>>"
10681 msgstr "B<#include E<lt>sys/sendfile.hE<gt>>"
10682
10683 #.  The below is too ugly. Comments about glibc versions belong
10684 #.  in the notes, not in the header.
10685 #.  .B #include <features.h>
10686 #.  .br
10687 #.  .B #if (__GLIBC__==2 && __GLIBC_MINOR__>=1) || __GLIBC__>2
10688 #.  .br
10689 #.  .B #include <sys/sendfile.h>
10690 #.  .br
10691 #.  #else
10692 #.  .br
10693 #.  .B #include <sys/types.h>
10694 #.  .br
10695 #.  .B /* No system prototype before glibc 2.1. */
10696 #.  .br
10697 #.  .BI "ssize_t sendfile(int" " out_fd" ", int" " in_fd" ", off_t *" #.                        offset ", size_t" " count" )
10698 #.  .br
10699 #.  .B #endif
10700 #. type: Plain text
10701 #: build/C/man2/sendfile.2:47
10702 msgid ""
10703 "B<ssize_t sendfile(int>I< out_fd>B<, int>I< in_fd>B<, off_t *>I<offset>B<, "
10704 "size_t>I< count>B<);>"
10705 msgstr ""
10706 "B<ssize_t sendfile(int>I< out_fd>B<, int>I< in_fd>B<, off_t *>I<offset>B<, "
10707 "size_t>I< count>B<);>"
10708
10709 #. type: Plain text
10710 #: build/C/man2/sendfile.2:57
10711 msgid ""
10712 "B<sendfile>()  copies data between one file descriptor and another.  Because "
10713 "this copying is done within the kernel, B<sendfile>()  is more efficient "
10714 "than the combination of B<read>(2)  and B<write>(2), which would require "
10715 "transferring data to and from user space."
10716 msgstr ""
10717 "B<sendfile>()  は、あるファイル・ディスクリプタから別の ファイル・ディスクリ"
10718 "プタへのデータのコピーを行う。 このコピーはカーネル内で行われるので、 "
10719 "B<sendfile>()  は、 B<read>(2)  と B<write>(2)  を組み合わせるよりも効率がよ"
10720 "い。 B<read>(2)  や B<write>(2)  ではユーザ空間との間でデータの転送が必要とな"
10721 "るからである。"
10722
10723 #. type: Plain text
10724 #: build/C/man2/sendfile.2:62
10725 msgid ""
10726 "I<in_fd> should be a file descriptor opened for reading and I<out_fd> should "
10727 "be a descriptor opened for writing."
10728 msgstr ""
10729 "I<in_fd> は読み込みのためにオープンされたファイル・ディスクリプタ、 "
10730 "I<out_fd> は書き込みのためにオープンされたディスクリプタでなければならない。"
10731
10732 #. type: Plain text
10733 #: build/C/man2/sendfile.2:83
10734 msgid ""
10735 "If I<offset> is not NULL, then it points to a variable holding the file "
10736 "offset from which B<sendfile>()  will start reading data from I<in_fd>.  "
10737 "When B<sendfile>()  returns, this variable will be set to the offset of the "
10738 "byte following the last byte that was read.  If I<offset> is not NULL, then "
10739 "B<sendfile>()  does not modify the current file offset of I<in_fd>; "
10740 "otherwise the current file offset is adjusted to reflect the number of bytes "
10741 "read from I<in_fd>."
10742 msgstr ""
10743 "I<offset> が NULL でない場合、 I<offset> は B<sendfile>()  が I<in_fd> のどこ"
10744 "からデータを読み始めるかを示すファイル・オフセットを保持する変数への ポインタ"
10745 "である。 B<sendfile>()  は復帰する時、この変数に最後に読み込んだバイトの 次の"
10746 "バイトのオフセットを書き込む。 I<offset> が NULL でない場合、 B<sendfile>()  "
10747 "は I<in_fd> のファイル・オフセットの現在値を変更しない。 NULL の場合は、ファ"
10748 "イル・オフセットの現在値を I<in_fd> から読み込んだバイト数を反映した位置に調"
10749 "整する。"
10750
10751 #. type: Plain text
10752 #: build/C/man2/sendfile.2:90
10753 msgid ""
10754 "If I<offset> is NULL, then data will be read from I<in_fd> starting at the "
10755 "current file offset, and the file offset will be updated by the call."
10756 msgstr ""
10757 "I<offset> が NULL の場合、データは I<in_fd> の現在のファイル・オフセットから"
10758 "読み出され、 ファイル・オフセットはこの呼び出しで更新される。"
10759
10760 #. type: Plain text
10761 #: build/C/man2/sendfile.2:93
10762 msgid "I<count> is the number of bytes to copy between the file descriptors."
10763 msgstr "I<count> は、ファイル・ディスクリプタ間でコピーするバイト数である。"
10764
10765 #. type: Plain text
10766 #: build/C/man2/sendfile.2:100
10767 msgid ""
10768 "The I<in_fd> argument must correspond to a file which supports B<mmap>(2)-"
10769 "like operations (i.e., it cannot be a socket)."
10770 msgstr ""
10771 "I<in_fd> 引き数は B<mmap>(2) 風の操作ができるファイルを指していなければなら"
10772 "な\n"
10773 "い (ソケットを指定することはできない)。"
10774
10775 #. type: Plain text
10776 #: build/C/man2/sendfile.2:108
10777 msgid ""
10778 "In Linux kernels before 2.6.33, I<out_fd> must refer to a socket.  Since "
10779 "Linux 2.6.33 it can be any file.  If it is a regular file, then B<sendfile>"
10780 "()  changes the file offset appropriately."
10781 msgstr ""
10782 "2.6.33 より前の Linux カーネルでは I<out_fd> はソケットを参照していなければ"
10783 "な\n"
10784 "らない。Linux 2.6.33 以降では、任意のファイルを参照することができる。\n"
10785 "通常のファイルの場合には B<sendfile>() はファイルオフセットを適切に変更する。"
10786
10787 #. type: Plain text
10788 #: build/C/man2/sendfile.2:115
10789 msgid ""
10790 "If the transfer was successful, the number of bytes written to I<out_fd> is "
10791 "returned.  On error, -1 is returned, and I<errno> is set appropriately."
10792 msgstr ""
10793 "転送に成功した場合、 I<out_fd> に書き込まれたバイト数を返す。エラーの場"
10794 "合、-1 を返し、 I<errno> に適切な値を設定する。"
10795
10796 #. type: Plain text
10797 #: build/C/man2/sendfile.2:121
10798 msgid ""
10799 "Nonblocking I/O has been selected using B<O_NONBLOCK> and the write would "
10800 "block."
10801 msgstr ""
10802 "B<O_NONBLOCK> を用いて非ブロック I/O が選択されたが、書き込みがブロックされ"
10803 "た。"
10804
10805 #. type: TP
10806 #: build/C/man2/sendfile.2:121 build/C/man2/splice.2:143
10807 #: build/C/man2/vmsplice.2:123
10808 #, no-wrap
10809 msgid "B<EBADF>"
10810 msgstr "B<EBADF>"
10811
10812 #. type: Plain text
10813 #: build/C/man2/sendfile.2:125
10814 msgid ""
10815 "The input file was not opened for reading or the output file was not opened "
10816 "for writing."
10817 msgstr ""
10818 "入力ファイルが読み込みのためにオープンされていないか、 出力ファイルが書き込み"
10819 "のためにオープンされていない。"
10820
10821 #. type: Plain text
10822 #: build/C/man2/sendfile.2:128
10823 msgid "Bad address."
10824 msgstr "アドレスがおかしい。"
10825
10826 #. type: Plain text
10827 #: build/C/man2/sendfile.2:134
10828 msgid ""
10829 "Descriptor is not valid or locked, or an B<mmap>(2)-like operation is not "
10830 "available for I<in_fd>."
10831 msgstr ""
10832 "ディスクリプタが有効でないか、ロックされている。もしくは B<mmap>(2)  風の操作"
10833 "が I<in_fd> では利用できない。"
10834
10835 #. type: Plain text
10836 #: build/C/man2/sendfile.2:138
10837 msgid "Unspecified error while reading from I<in_fd>."
10838 msgstr "I<in_fd> から読み込んでいるうちに予期しないエラーが起こった。"
10839
10840 #. type: Plain text
10841 #: build/C/man2/sendfile.2:142
10842 msgid "Insufficient memory to read from I<in_fd>."
10843 msgstr "I<in_fd> から読み込むための十分なメモリがない。"
10844
10845 #. type: Plain text
10846 #: build/C/man2/sendfile.2:148
10847 msgid ""
10848 "B<sendfile>()  is a new feature in Linux 2.2.  The include file I<E<lt>sys/"
10849 "sendfile.hE<gt>> is present since glibc 2.1."
10850 msgstr ""
10851 "B<sendfile> は Linux 2.2 の新しい機能である。 インクルードファイル "
10852 "I<E<lt>sys/sendfile.hE<gt>> は glibc 2.1 から存在している。"
10853
10854 #. type: Plain text
10855 #: build/C/man2/sendfile.2:150
10856 msgid "Not specified in POSIX.1-2001, or other standards."
10857 msgstr "POSIX.1-2001 や他の標準では規定されていない。"
10858
10859 #. type: Plain text
10860 #: build/C/man2/sendfile.2:155
10861 msgid ""
10862 "Other UNIX systems implement B<sendfile>()  with different semantics and "
10863 "prototypes.  It should not be used in portable programs."
10864 msgstr ""
10865 "他の UNIX システムでは、異なった方式やプロトタイプで B<sendfile>()  を実装し"
10866 "ている。移植性を考慮したプログラムでは使用すべきではない。"
10867
10868 #. type: Plain text
10869 #: build/C/man2/sendfile.2:165
10870 msgid ""
10871 "If you plan to use B<sendfile>()  for sending files to a TCP socket, but "
10872 "need to send some header data in front of the file contents, you will find "
10873 "it useful to employ the B<TCP_CORK> option, described in B<tcp>(7), to "
10874 "minimize the number of packets and to tune performance."
10875 msgstr ""
10876 "B<sendfile>()  を使って TCP ソケットにファイルを送ろうとしていて、 ファイルの"
10877 "内容の前にヘッダ・データを付け加える必要がある場合は、 パケット数を最小にして"
10878 "性能を上げるために B<tcp>(7)  に記述されている B<TCP_CORK> オプションを使うと"
10879 "いいだろう。"
10880
10881 #. type: Plain text
10882 #: build/C/man2/sendfile.2:171
10883 msgid ""
10884 "In Linux 2.4 and earlier, I<out_fd> could also refer to a regular file, and "
10885 "B<sendfile>()  changed the current offset of that file."
10886 msgstr ""
10887 "Linux 2.4 とそれ以前のバージョンでも、 I<out_fd> は通常のファイルを参照で"
10888 "き、\n"
10889 "B<sendfile>() はそのファイルのオフセットの現在値を変更していた。"
10890
10891 #. type: Plain text
10892 #: build/C/man2/sendfile.2:183
10893 msgid ""
10894 "The original Linux B<sendfile>()  system call was not designed to handle "
10895 "large file offsets.  Consequently, Linux 2.4 added B<sendfile64>(), with a "
10896 "wider type for the I<offset> argument.  The glibc B<sendfile>()  wrapper "
10897 "function transparently deals with the kernel differences."
10898 msgstr ""
10899 "元々の Linux B<sendfile>() システムコールは大きなファイルオフセットを\n"
10900 "扱えるように設計されていなかった。その結果、Linux 2.4 で、\n"
10901 "ビット幅の大きな I<offset> 引き数を持った B<sendfile64>() が追加された。\n"
10902 "glibc の B<sendfile>() のラッパー関数はカーネルによるこの違いを吸収している。"
10903
10904 #. type: Plain text
10905 #: build/C/man2/sendfile.2:192
10906 msgid ""
10907 "Applications may wish to fall back to B<read>(2)/B<write>(2)  in the case "
10908 "where B<sendfile>()  fails with B<EINVAL> or B<ENOSYS>."
10909 msgstr ""
10910 "B<sendfile>()  が B<EINVAL> や B<ENOSYS> で失敗するような場合は、 アプリケー"
10911 "ションは B<read>(2)/B<write>(2)  に戻すことを考えてもよいかもしれない。"
10912
10913 #. type: Plain text
10914 #: build/C/man2/sendfile.2:197
10915 msgid ""
10916 "The Linux-specific B<splice>(2)  call supports transferring data between "
10917 "arbitrary files (e.g., a pair of sockets)."
10918 msgstr ""
10919 "Linux 固有の B<splice>(2) システムコールは、任意のファイル間 (例えば、\n"
10920 "ソケット同士) でのデータ転送をサポートしている。"
10921
10922 #. type: Plain text
10923 #: build/C/man2/sendfile.2:202
10924 msgid "B<mmap>(2), B<open>(2), B<socket>(2), B<splice>(2)"
10925 msgstr "B<mmap>(2), B<open>(2), B<socket>(2), B<splice>(2)"
10926
10927 #. type: TH
10928 #: build/C/man2/set_tid_address.2:25
10929 #, no-wrap
10930 msgid "SET_TID_ADDRESS"
10931 msgstr "SET_TID_ADDRESS"
10932
10933 #. type: TH
10934 #: build/C/man2/set_tid_address.2:25
10935 #, no-wrap
10936 msgid "2012-07-19"
10937 msgstr "2012-07-19"
10938
10939 #. type: Plain text
10940 #: build/C/man2/set_tid_address.2:28
10941 msgid "set_tid_address - set pointer to thread ID"
10942 msgstr "set_tid_address - スレッド ID へのポインタを設定する"
10943
10944 #. type: Plain text
10945 #: build/C/man2/set_tid_address.2:31
10946 #, no-wrap
10947 msgid "B<#include E<lt>linux/unistd.hE<gt>>\n"
10948 msgstr "B<#include E<lt>linux/unistd.hE<gt>>\n"
10949
10950 #. type: Plain text
10951 #: build/C/man2/set_tid_address.2:33
10952 #, no-wrap
10953 msgid "B<long set_tid_address(int *>I<tidptr>B<);>\n"
10954 msgstr "B<long set_tid_address(int *>I<tidptr>B<);>\n"
10955
10956 #. type: Plain text
10957 #: build/C/man2/set_tid_address.2:40
10958 msgid ""
10959 "For each process, the kernel maintains two attributes (addresses) called "
10960 "I<set_child_tid> and I<clear_child_tid>.  These two attributes contain the "
10961 "value NULL by default."
10962 msgstr ""
10963 "各プロセスについて、カーネルは I<set_child_tid> と I<clear_child_tid> という "
10964 "2 つの属性を保持する。この 2 つの属性はデフォルトでは NULL である。"
10965
10966 #. type: TP
10967 #: build/C/man2/set_tid_address.2:40
10968 #, no-wrap
10969 msgid "I<set_child_tid>"
10970 msgstr "I<set_child_tid>"
10971
10972 #. type: Plain text
10973 #: build/C/man2/set_tid_address.2:51
10974 msgid ""
10975 "If a process is started using B<clone>(2)  with the B<CLONE_CHILD_SETTID> "
10976 "flag, I<set_child_tid> is set to the value passed in the I<ctid> argument of "
10977 "that system call."
10978 msgstr ""
10979 "プロセスが B<CLONE_CHILD_SETTID> フラグを指定した B<clone>(2)  によって開始さ"
10980 "れた場合、 I<set_child_tid> は B<clone>(2) のシステムコールの I<ctid> 引き数"
10981 "で渡された値に設定される。"
10982
10983 #. type: Plain text
10984 #: build/C/man2/set_tid_address.2:56
10985 msgid ""
10986 "When I<set_child_tid> is set, the very first thing the new process does is "
10987 "writing its PID at this address."
10988 msgstr ""
10989 "I<set_child_tid> が設定された場合、一番最初に新しいプロセスが行うことは、 こ"
10990 "のアドレスに自身の PID を書き込むことである。"
10991
10992 #. type: TP
10993 #: build/C/man2/set_tid_address.2:56
10994 #, no-wrap
10995 msgid "I<clear_child_tid>"
10996 msgstr "I<clear_child_tid>"
10997
10998 #. type: Plain text
10999 #: build/C/man2/set_tid_address.2:67
11000 msgid ""
11001 "If a process is started using B<clone>(2)  with the B<CLONE_CHILD_CLEARTID> "
11002 "flag, I<clear_child_tid> is set to the value passed in the I<ctid> argument "
11003 "of that system call."
11004 msgstr ""
11005 "プロセスが B<CLONE_CHILD_CLEARTID> フラグを指定した B<clone>(2) によって開始"
11006 "された場合、 I<clear_child_tid> は B<clone>(2) のシステムコールの I<ctid> 引"
11007 "き数で渡された値に設定される。"
11008
11009 #. type: Plain text
11010 #: build/C/man2/set_tid_address.2:74
11011 msgid ""
11012 "The system call B<set_tid_address>()  sets the I<clear_child_tid> value for "
11013 "the calling process to I<tidptr>."
11014 msgstr ""
11015 "システムコール B<set_tid_address>()  は呼び出し元プロセスの "
11016 "I<clear_child_tid> の値を I<tidptr> に設定する。"
11017
11018 #. type: Plain text
11019 #: build/C/man2/set_tid_address.2:82
11020 msgid ""
11021 "When a process whose I<clear_child_tid> is not NULL terminates, then, if the "
11022 "process is sharing memory with other processes or threads, then 0 is written "
11023 "at the address specified in I<clear_child_tid> and the kernel performs the "
11024 "following operation:"
11025 msgstr ""
11026 "I<clear_child_tid> が NULL でないプロセスが終了すると、そのプロセスが他のプロ"
11027 "セスまたはスレッドとメモリを共有していれば、 I<clear_child_tid> で指定された"
11028 "アドレスに 0 が書き込まれ、カーネルは以下の処理を実行する。"
11029
11030 #. type: Plain text
11031 #: build/C/man2/set_tid_address.2:84
11032 #, no-wrap
11033 msgid "    futex(clear_child_tid, FUTEX_WAKE, 1, NULL, NULL, 0);\n"
11034 msgstr "    futex(clear_child_tid, FUTEX_WAKE, 1, NULL, NULL, 0);\n"
11035
11036 #. type: Plain text
11037 #: build/C/man2/set_tid_address.2:88
11038 msgid ""
11039 "The effect of this operation is to wake a single process that is performing "
11040 "a futex wait on the memory location.  Errors from the futex wake operation "
11041 "are ignored."
11042 msgstr ""
11043 "この処理の結果、このメモリアドレスに対する futex wait を実行しているプロセス"
11044 "を一つ起こす (wake)。 futex wake 操作でのエラーは無視される。"
11045
11046 #. type: Plain text
11047 #: build/C/man2/set_tid_address.2:91
11048 msgid "B<set_tid_address>()  always returns the PID of the calling process."
11049 msgstr "B<set_tid_address>()  は常に現在のプロセスの PID を返す。"
11050
11051 #. type: Plain text
11052 #: build/C/man2/set_tid_address.2:94
11053 msgid "B<set_tid_address>()  always succeeds."
11054 msgstr "B<set_tid_address>()  は常に成功する。"
11055
11056 #. type: Plain text
11057 #: build/C/man2/set_tid_address.2:97
11058 msgid ""
11059 "This call is present since Linux 2.5.48.  Details as given here are valid "
11060 "since Linux 2.5.49."
11061 msgstr ""
11062 "この呼び出しは Linux 2.5.48 以降で存在する。 ここで書かれた詳細は Linux "
11063 "2.5.49 以降で有効である。"
11064
11065 #. type: Plain text
11066 #: build/C/man2/set_tid_address.2:102
11067 msgid "B<clone>(2), B<futex>(2)"
11068 msgstr "B<clone>(2), B<futex>(2)"
11069
11070 #. type: TH
11071 #: build/C/man2/splice.2:26
11072 #, no-wrap
11073 msgid "SPLICE"
11074 msgstr "SPLICE"
11075
11076 #. type: TH
11077 #: build/C/man2/splice.2:26 build/C/man2/tee.2:26 build/C/man2/vmsplice.2:26
11078 #, no-wrap
11079 msgid "2012-05-04"
11080 msgstr "2012-05-04"
11081
11082 #. type: Plain text
11083 #: build/C/man2/splice.2:29
11084 msgid "splice - splice data to/from a pipe"
11085 msgstr "splice - パイプとの間でデータを継ぎ合わせる"
11086
11087 #. type: Plain text
11088 #: build/C/man2/splice.2:33 build/C/man2/tee.2:33
11089 #, no-wrap
11090 msgid ""
11091 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
11092 "B<#include E<lt>fcntl.hE<gt>>\n"
11093 msgstr ""
11094 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
11095 "B<#include E<lt>fcntl.hE<gt>>\n"
11096
11097 #.  Return type was long before glibc 2.7
11098 #. type: Plain text
11099 #: build/C/man2/splice.2:38
11100 #, no-wrap
11101 msgid ""
11102 "B<ssize_t splice(int >I<fd_in>B<, loff_t *>I<off_in>B<, int >I<fd_out>B<,>\n"
11103 "B<               loff_t *>I<off_out>B<, size_t >I<len>B<, unsigned int >I<flags>B<);>\n"
11104 msgstr ""
11105 "B<ssize_t splice(int >I<fd_in>B<, loff_t *>I<off_in>B<, int >I<fd_out>B<,>\n"
11106 "B<               loff_t *>I<off_out>B<, size_t >I<len>B<, unsigned int >I<flags>B<);>\n"
11107
11108 #. type: Plain text
11109 #: build/C/man2/splice.2:50
11110 msgid ""
11111 "B<splice>()  moves data between two file descriptors without copying between "
11112 "kernel address space and user address space.  It transfers up to I<len> "
11113 "bytes of data from the file descriptor I<fd_in> to the file descriptor "
11114 "I<fd_out>, where one of the descriptors must refer to a pipe."
11115 msgstr ""
11116 "B<splice>()  は、カーネルアドレス空間とユーザアドレス空間との間のコピーを伴わ"
11117 "ずに、 2 つのファイルディスクリプタ間でデータの移動を行う。 ファイルディスク"
11118 "リプタ I<fd_in> からファイルディスクリプタ I<fd_out> へ最大 I<len> バイトを転"
11119 "送する。 2 つのファイルディスクリプタのうち一つは パイプを参照していなければ"
11120 "ならない。"
11121
11122 #. type: Plain text
11123 #: build/C/man2/splice.2:80
11124 msgid ""
11125 "If I<fd_in> refers to a pipe, then I<off_in> must be NULL.  If I<fd_in> does "
11126 "not refer to a pipe and I<off_in> is NULL, then bytes are read from I<fd_in> "
11127 "starting from the current file offset, and the current file offset is "
11128 "adjusted appropriately.  If I<fd_in> does not refer to a pipe and I<off_in> "
11129 "is not NULL, then I<off_in> must point to a buffer which specifies the "
11130 "starting offset from which bytes will be read from I<fd_in>; in this case, "
11131 "the current file offset of I<fd_in> is not changed.  Analogous statements "
11132 "apply for I<fd_out> and I<off_out>."
11133 msgstr ""
11134 "I<fd_in> がパイプを参照している場合、 I<off_in> は NULL でなければならない。 "
11135 "I<fd_in> がパイプを参照しておらず、 I<off_in> が NULL の場合、 I<fd_in> の現"
11136 "在のファイルオフセットから始まるバイトを読み出す。 現在のファイルオフセットは"
11137 "適切に調整される。 I<fd_in> がパイプを参照しておらず、 I<off_in> が NULL でな"
11138 "い場合、 I<off_in> は I<fd_in> からのデータ読み出しを開始する先頭オフセットを"
11139 "格納したバッファ へのポインタでなければならない。この場合、 I<fd_in> の現在の"
11140 "ファイルオフセットは変更されない。 I<fd_out> と I<off_out> に関しても同様であ"
11141 "る。"
11142
11143 #. type: Plain text
11144 #: build/C/man2/splice.2:85 build/C/man2/vmsplice.2:78
11145 msgid ""
11146 "The I<flags> argument is a bit mask that is composed by ORing together zero "
11147 "or more of the following values:"
11148 msgstr ""
11149 "I<flags> 引き数には、以下の値の 0 個以上をビット毎の論理和の形で指定する。"
11150
11151 #. type: TP
11152 #: build/C/man2/splice.2:85 build/C/man2/tee.2:62 build/C/man2/vmsplice.2:78
11153 #, no-wrap
11154 msgid "B<SPLICE_F_MOVE>"
11155 msgstr "B<SPLICE_F_MOVE>"
11156
11157 #. type: Plain text
11158 #: build/C/man2/splice.2:98
11159 msgid ""
11160 "Attempt to move pages instead of copying.  This is only a hint to the "
11161 "kernel: pages may still be copied if the kernel cannot move the pages from "
11162 "the pipe, or if the pipe buffers don't refer to full pages.  The initial "
11163 "implementation of this flag was buggy: therefore starting in Linux 2.6.21 it "
11164 "is a no-op (but is still permitted in a B<splice>()  call); in the future, a "
11165 "correct implementation may be restored."
11166 msgstr ""
11167 "ページのコピーでなく移動を試みる。 これはカーネルに対するヒントでしかない。 "
11168 "つまり、カーネルがパイプからページを移動できない場合や、 パイプバッファがペー"
11169 "ジ全部を参照していない場合は、 ページのコピーが行われることもある。 このフラ"
11170 "グの最初の実装にはバグがあった。そのため、 Linux 2.6.21 以降ではこのフラグの"
11171 "操作はできないようになっている (ただし、 B<splice>()  コールでこのフラグを指"
11172 "定することは今も認められている)。 将来、正しい実装が行われることだろう。"
11173
11174 #. type: TP
11175 #: build/C/man2/splice.2:98 build/C/man2/tee.2:68 build/C/man2/vmsplice.2:84
11176 #, no-wrap
11177 msgid "B<SPLICE_F_NONBLOCK>"
11178 msgstr "B<SPLICE_F_NONBLOCK>"
11179
11180 #. type: Plain text
11181 #: build/C/man2/splice.2:107
11182 msgid ""
11183 "Do not block on I/O.  This makes the splice pipe operations nonblocking, but "
11184 "B<splice>()  may nevertheless block because the file descriptors that are "
11185 "spliced to/from may block (unless they have the B<O_NONBLOCK> flag set)."
11186 msgstr ""
11187 "入出力時に停止 (block) しない。 このフラグを指定すると、 splice によるパイプ"
11188 "操作を非停止モード (nonblocking) で 行おうとするが、その場合でも B<splice>"
11189 "()  は停止することもある。なぜなら、データのやり取りを行う ファイルディスクリ"
11190 "プタは (B<O_NONBLOCK> フラグをセットされていない場合) 停止する可能性があるか"
11191 "らである。"
11192
11193 #. type: TP
11194 #: build/C/man2/splice.2:107 build/C/man2/tee.2:73 build/C/man2/vmsplice.2:91
11195 #, no-wrap
11196 msgid "B<SPLICE_F_MORE>"
11197 msgstr "B<SPLICE_F_MORE>"
11198
11199 #. type: Plain text
11200 #: build/C/man2/splice.2:121
11201 msgid ""
11202 "More data will be coming in a subsequent splice.  This is a helpful hint "
11203 "when the I<fd_out> refers to a socket (see also the description of "
11204 "B<MSG_MORE> in B<send>(2), and the description of B<TCP_CORK> in B<tcp>(7))"
11205 msgstr ""
11206 "この後の splice でさらに転送されるデータがあることを示す。 このフラグは "
11207 "I<fd_out> がソケットを参照している場合に有用なヒントとなる (B<send>(2)  の "
11208 "B<MSG_MORE> や B<tcp>(7)  の B<TCP_CORK> の説明も参照)。"
11209
11210 #. type: TP
11211 #: build/C/man2/splice.2:121 build/C/man2/tee.2:79 build/C/man2/vmsplice.2:97
11212 #, no-wrap
11213 msgid "B<SPLICE_F_GIFT>"
11214 msgstr "B<SPLICE_F_GIFT>"
11215
11216 #. type: Plain text
11217 #: build/C/man2/splice.2:127
11218 msgid "Unused for B<splice>(); see B<vmsplice>(2)."
11219 msgstr "B<splice>()  では使用しない。 B<vmsplice>(2)  参照。"
11220
11221 #. type: Plain text
11222 #: build/C/man2/splice.2:136
11223 msgid ""
11224 "Upon successful completion, B<splice>()  returns the number of bytes spliced "
11225 "to or from the pipe.  A return value of 0 means that there was no data to "
11226 "transfer, and it would not make sense to block, because there are no writers "
11227 "connected to the write end of the pipe referred to by I<fd_in>."
11228 msgstr ""
11229 "成功して完了すると、 B<splice>()  はパイプから出し入れしたバイト数を返す。 返"
11230 "り値 0 はデータの転送が行わなかったことを示す。 この場合、処理を停止 (block) "
11231 "しても無意味である。 なぜなら、 I<fd_in> が参照するパイプの書き込み側に接続さ"
11232 "れている者がいないからである。"
11233
11234 #. type: Plain text
11235 #: build/C/man2/splice.2:142
11236 msgid ""
11237 "On error, B<splice>()  returns -1 and I<errno> is set to indicate the error."
11238 msgstr ""
11239 "エラーの場合、 B<splice>()  は -1 を返し、 I<errno> にエラーを示す値を設定す"
11240 "る。"
11241
11242 #. type: Plain text
11243 #: build/C/man2/splice.2:147
11244 msgid ""
11245 "One or both file descriptors are not valid, or do not have proper read-write "
11246 "mode."
11247 msgstr ""
11248 "ファイルディスクリプタの一方または両方が有効ではない、 もしくは適切な read-"
11249 "write モードではない。"
11250
11251 #.  The append-mode error is given since 2.6.27; in earlier kernels,
11252 #.  splice() in append mode was broken
11253 #. type: Plain text
11254 #: build/C/man2/splice.2:155
11255 msgid ""
11256 "Target filesystem doesn't support splicing; target file is opened in append "
11257 "mode; neither of the descriptors refers to a pipe; or offset given for "
11258 "nonseekable device."
11259 msgstr ""
11260 "対象のファイルシステムが splice に対応していない、 または対象のファイルが追記"
11261 "モードでオープンされている、 またはディスクリプタのどちらもパイプを参照してい"
11262 "ない、 または seek できないデバイスに対してオフセットが指定された。"
11263
11264 #. type: Plain text
11265 #: build/C/man2/splice.2:158 build/C/man2/tee.2:114
11266 #: build/C/man2/vmsplice.2:138
11267 msgid "Out of memory."
11268 msgstr "メモリ不足。"
11269
11270 #. type: TP
11271 #: build/C/man2/splice.2:158
11272 #, no-wrap
11273 msgid "B<ESPIPE>"
11274 msgstr "B<ESPIPE>"
11275
11276 #. type: Plain text
11277 #: build/C/man2/splice.2:165
11278 msgid ""
11279 "Either I<off_in> or I<off_out> was not NULL, but the corresponding file "
11280 "descriptor refers to a pipe."
11281 msgstr ""
11282 "I<off_in> か I<off_out> のいずれかが NULL ではないが、対応するファイルディス"
11283 "クリプタが パイプを参照している。"
11284
11285 #. type: Plain text
11286 #: build/C/man2/splice.2:170
11287 msgid ""
11288 "The B<splice>()  system call first appeared in Linux 2.6.17; library support "
11289 "was added to glibc in version 2.5."
11290 msgstr ""
11291 "B<splice>() システムコールは Linux 2.6.17 で初めて登場した。\n"
11292 "ライブラリによるサポートは glibc バージョン 2.5 で追加された。"
11293
11294 #. type: Plain text
11295 #: build/C/man2/splice.2:182
11296 msgid ""
11297 "The three system calls B<splice>(), B<vmsplice>(2), and B<tee>(2), provide "
11298 "user-space programs with full control over an arbitrary kernel buffer, "
11299 "implemented within the kernel using the same type of buffer that is used for "
11300 "a pipe.  In overview, these system calls perform the following tasks:"
11301 msgstr ""
11302 "3 つのシステムコール (B<splice>(), B<vmsplice>(2), B<tee>(2))  を使うと、ユー"
11303 "ザ空間プログラムは任意のカーネルバッファに対する 完全な制御ができる。カーネル"
11304 "バッファは、パイプに使用されているのと 同種のバッファを使ってカーネル内に実装"
11305 "されている。 大まかにいうと、これらのシステムコールは以下の仕事を行う:"
11306
11307 #. type: TP
11308 #: build/C/man2/splice.2:182
11309 #, no-wrap
11310 msgid "B<splice>()"
11311 msgstr "B<splice>()"
11312
11313 #. type: Plain text
11314 #: build/C/man2/splice.2:186
11315 msgid ""
11316 "moves data from the buffer to an arbitrary file descriptor, or vice versa, "
11317 "or from one buffer to another."
11318 msgstr ""
11319 "バッファから任意のファイルディスクリプタや、その逆方向、 もしくはあるバッファ"
11320 "から別のバッファへの、データ移動を行う。"
11321
11322 #. type: TP
11323 #: build/C/man2/splice.2:186
11324 #, no-wrap
11325 msgid "B<tee>(2)"
11326 msgstr "B<tee>(2)"
11327
11328 #. type: Plain text
11329 #: build/C/man2/splice.2:189
11330 msgid "\"copies\" the data from one buffer to another."
11331 msgstr "あるバッファから別のバッファへのデータ「コピー」を行う。"
11332
11333 #. type: TP
11334 #: build/C/man2/splice.2:189
11335 #, no-wrap
11336 msgid "B<vmsplice>(2)"
11337 msgstr "B<vmsplice>(2)"
11338
11339 #. type: Plain text
11340 #: build/C/man2/splice.2:192
11341 msgid "\"copies\" data from user space into the buffer."
11342 msgstr "ユーザ空間からバッファへのデータ「コピー」を行う。"
11343
11344 #.  Linus: Now, imagine using the above in a media server, for example.
11345 #.  Let's say that a year or two has passed, so that the video drivers
11346 #.  have been updated to be able to do the splice thing, and what can
11347 #.  you do? You can:
11348 #.  - splice from the (mpeg or whatever - let's just assume that the video
11349 #.    input is either digital or does the encoding on its own - like they
11350 #.    pretty much all do) video input into a pipe (remember: no copies - the
11351 #.    video input will just DMA directly into memory, and splice will just
11352 #.    set up the pages in the pipe buffer)
11353 #.  - tee that pipe to split it up
11354 #.  - splice one end to a file (ie "save the compressed stream to disk")
11355 #.  - splice the other end to a real-time video decoder window for your
11356 #.    real-time viewing pleasure.
11357 #.  Linus: Now, the advantage of splice()/tee() is that you can
11358 #.  do zero-copy movement of data, and unlike sendfile() you can
11359 #.  do it on _arbitrary_ data (and, as shown by "tee()", it's more
11360 #.  than just sending the data to somebody else: you can duplicate
11361 #.  the data and choose to forward it to two or more different
11362 #.  users - for things like logging etc.).
11363 #. type: Plain text
11364 #: build/C/man2/splice.2:223
11365 msgid ""
11366 "Though we talk of copying, actual copies are generally avoided.  The kernel "
11367 "does this by implementing a pipe buffer as a set of reference-counted "
11368 "pointers to pages of kernel memory.  The kernel creates \"copies\" of pages "
11369 "in a buffer by creating new pointers (for the output buffer) referring to "
11370 "the pages, and increasing the reference counts for the pages: only pointers "
11371 "are copied, not the pages of the buffer."
11372 msgstr ""
11373 "ここではコピーの話をしているが、実際のコピーは一般的に回避される。 カーネル"
11374 "は、パイプ・バッファをカーネルメモリのページへのポインタ集合として 実装し、"
11375 "ページへの参照回数を管理することで、これを実現している。 カーネルは、対象とな"
11376 "るページを参照する (出力バッファ用の) ポインタを 新規に作成することでバッファ"
11377 "内のページの「コピー」を作成し、 そのページの参照回数を増やす。つまり、ポイン"
11378 "タだけがコピーされ、 バッファのページはコピーされない。"
11379
11380 #. type: Plain text
11381 #: build/C/man2/splice.2:226
11382 msgid "See B<tee>(2)."
11383 msgstr "B<tee>(2)  参照。"
11384
11385 #. type: Plain text
11386 #: build/C/man2/splice.2:230
11387 msgid "B<sendfile>(2), B<tee>(2), B<vmsplice>(2)"
11388 msgstr "B<sendfile>(2), B<tee>(2), B<vmsplice>(2)"
11389
11390 #. type: TH
11391 #: build/C/man2/tee.2:26
11392 #, no-wrap
11393 msgid "TEE"
11394 msgstr "TEE"
11395
11396 #. type: Plain text
11397 #: build/C/man2/tee.2:29
11398 msgid "tee - duplicating pipe content"
11399 msgstr "tee - パイプの中身を複製する"
11400
11401 #. type: Plain text
11402 #: build/C/man2/tee.2:36
11403 #, no-wrap
11404 msgid "B<ssize_t tee(int >I<fd_in>B<, int >I<fd_out>B<, size_t >I<len>B<, unsigned int >I<flags>B<);>\n"
11405 msgstr "B<ssize_t tee(int >I<fd_in>B<, int >I<fd_out>B<, size_t >I<len>B<, unsigned int >I<flags>B<);>\n"
11406
11407 #.  Example programs http://brick.kernel.dk/snaps
11408 #.  add a "tee(in, out1, out2)" system call that duplicates the pages
11409 #.  (again, incrementing their reference count, not copying the data) from
11410 #.  one pipe to two other pipes.
11411 #. type: Plain text
11412 #: build/C/man2/tee.2:56
11413 msgid ""
11414 "B<tee>()  duplicates up to I<len> bytes of data from the pipe referred to by "
11415 "the file descriptor I<fd_in> to the pipe referred to by the file descriptor "
11416 "I<fd_out>.  It does not consume the data that is duplicated from I<fd_in>; "
11417 "therefore, that data can be copied by a subsequent B<splice>(2)."
11418 msgstr ""
11419 "B<tee>()  は、ファイルディスクリプタ I<fd_in> が参照するパイプからファイル"
11420 "ディスクリプタ I<fd_out> が参照するパイプへ最大 I<len> バイトのデータを複製す"
11421 "る。 この操作では、複製されるデータは I<fd_in> からは消費されない。したがっ"
11422 "て、これらのデータをこの後の B<splice>(2)  でコピーすることができる。"
11423
11424 #. type: Plain text
11425 #: build/C/man2/tee.2:62
11426 msgid ""
11427 "I<flags> is a series of modifier flags, which share the name space with "
11428 "B<splice>(2)  and B<vmsplice>(2):"
11429 msgstr ""
11430 "I<flags> は一連の修飾フラグであり、 B<splice>(2)  や B<vmsplice>(2)  と共通の"
11431 "名前である。"
11432
11433 #. type: Plain text
11434 #: build/C/man2/tee.2:68
11435 msgid "Currently has no effect for B<tee>(); see B<splice>(2)."
11436 msgstr "現在のところ B<tee>()  では何の効果もない。 B<splice>(2)  参照。"
11437
11438 #.  Not used for vmsplice
11439 #.  May be in the future -- therefore EAGAIN
11440 #. type: Plain text
11441 #: build/C/man2/tee.2:73 build/C/man2/vmsplice.2:91
11442 msgid "Do not block on I/O; see B<splice>(2)  for further details."
11443 msgstr "入出力で停止 (block) しない。詳細は B<splice>(2)  参照。"
11444
11445 #. type: Plain text
11446 #: build/C/man2/tee.2:79
11447 msgid ""
11448 "Currently has no effect for B<tee>(), but may be implemented in the future; "
11449 "see B<splice>(2)."
11450 msgstr ""
11451 "現在のところ B<tee>()  では何の効果もないが、将来的には実装される可能性があ"
11452 "る。 B<splice>(2)  参照。"
11453
11454 #. type: Plain text
11455 #: build/C/man2/tee.2:85
11456 msgid "Unused for B<tee>(); see B<vmsplice>(2)."
11457 msgstr "B<tee>()  では未使用。 B<vmsplice>(2)  参照。"
11458
11459 #. type: Plain text
11460 #: build/C/man2/tee.2:94
11461 msgid ""
11462 "Upon successful completion, B<tee>()  returns the number of bytes that were "
11463 "duplicated between the input and output.  A return value of 0 means that "
11464 "there was no data to transfer, and it would not make sense to block, because "
11465 "there are no writers connected to the write end of the pipe referred to by "
11466 "I<fd_in>."
11467 msgstr ""
11468 "成功して完了すると、 B<tee>()  は入出力間で複製されたバイト数を返す。 返り値 "
11469 "0 はデータの転送が行われなかったことを示す。 この場合、処理を停止 (block) し"
11470 "ても無意味である。 なぜなら、 I<fd_in> が参照するパイプの書き込み側に接続され"
11471 "ている者がいないからである。"
11472
11473 #. type: Plain text
11474 #: build/C/man2/tee.2:100
11475 msgid ""
11476 "On error, B<tee>()  returns -1 and I<errno> is set to indicate the error."
11477 msgstr ""
11478 "エラーの場合、 B<tee>()  は -1 を返し、 I<errno> にエラーを示す値を設定する。"
11479
11480 #. type: Plain text
11481 #: build/C/man2/tee.2:111
11482 msgid ""
11483 "I<fd_in> or I<fd_out> does not refer to a pipe; or I<fd_in> and I<fd_out> "
11484 "refer to the same pipe."
11485 msgstr ""
11486 "I<fd_in> と I<fd_out> のどちらかがパイプを参照していない。もしくは I<fd_in> "
11487 "と I<fd_out> が同じパイプを参照している。"
11488
11489 #. type: Plain text
11490 #: build/C/man2/tee.2:119
11491 msgid ""
11492 "The B<tee>()  system call first appeared in Linux 2.6.17; library support "
11493 "was added to glibc in version 2.5."
11494 msgstr ""
11495 "B<tee>() システムコールは Linux 2.6.17 で初めて登場した。\n"
11496 "ライブラリによるサポートは glibc バージョン 2.5 で追加された。"
11497
11498 #. type: Plain text
11499 #: build/C/man2/tee.2:130
11500 msgid ""
11501 "Conceptually, B<tee>()  copies the data between the two pipes.  In reality "
11502 "no real data copying takes place though: under the covers, B<tee>()  assigns "
11503 "data in the output by merely grabbing a reference to the input."
11504 msgstr ""
11505 "概念としては、 B<tee>()  は二つのパイプ間でデータのコピーを行う。 しかし、実"
11506 "際には実データのコピーは行われない。 内部では、 B<tee>()  は入力側に対する参"
11507 "照だけを作成することで出力側にデータを 追加する。"
11508
11509 #. type: Plain text
11510 #: build/C/man2/tee.2:136
11511 msgid ""
11512 "The following example implements a basic B<tee>(1)  program using the B<tee>"
11513 "()  system call."
11514 msgstr ""
11515 "以下の例は、 B<tee>()  システムコールを使って、 基本的な B<tee>(1)  プログラ"
11516 "ムを実装したものである。"
11517
11518 #. type: Plain text
11519 #: build/C/man2/tee.2:145
11520 #, no-wrap
11521 msgid ""
11522 "#define _GNU_SOURCE\n"
11523 "#include E<lt>fcntl.hE<gt>\n"
11524 "#include E<lt>stdio.hE<gt>\n"
11525 "#include E<lt>stdlib.hE<gt>\n"
11526 "#include E<lt>unistd.hE<gt>\n"
11527 "#include E<lt>errno.hE<gt>\n"
11528 "#include E<lt>limits.hE<gt>\n"
11529 msgstr ""
11530 "#define _GNU_SOURCE\n"
11531 "#include E<lt>fcntl.hE<gt>\n"
11532 "#include E<lt>stdio.hE<gt>\n"
11533 "#include E<lt>stdlib.hE<gt>\n"
11534 "#include E<lt>unistd.hE<gt>\n"
11535 "#include E<lt>errno.hE<gt>\n"
11536 "#include E<lt>limits.hE<gt>\n"
11537
11538 #. type: Plain text
11539 #: build/C/man2/tee.2:151
11540 #, no-wrap
11541 msgid ""
11542 "int\n"
11543 "main(int argc, char *argv[])\n"
11544 "{\n"
11545 "    int fd;\n"
11546 "    int len, slen;\n"
11547 msgstr ""
11548 "int\n"
11549 "main(int argc, char *argv[])\n"
11550 "{\n"
11551 "    int fd;\n"
11552 "    int len, slen;\n"
11553
11554 #. type: Plain text
11555 #: build/C/man2/tee.2:156
11556 #, no-wrap
11557 msgid ""
11558 "    if (argc != 2) {\n"
11559 "        fprintf(stderr, \"Usage: %s E<lt>fileE<gt>\\en\", argv[0]);\n"
11560 "        exit(EXIT_FAILURE);\n"
11561 "    }\n"
11562 msgstr ""
11563 "    if (argc != 2) {\n"
11564 "        fprintf(stderr, \"Usage: %s E<lt>fileE<gt>\\en\", argv[0]);\n"
11565 "        exit(EXIT_FAILURE);\n"
11566 "    }\n"
11567
11568 #. type: Plain text
11569 #: build/C/man2/tee.2:162
11570 #, no-wrap
11571 msgid ""
11572 "    fd = open(argv[1], O_WRONLY | O_CREAT | O_TRUNC, 0644);\n"
11573 "    if (fd == -1) {\n"
11574 "        perror(\"open\");\n"
11575 "        exit(EXIT_FAILURE);\n"
11576 "    }\n"
11577 msgstr ""
11578 "    fd = open(argv[1], O_WRONLY | O_CREAT | O_TRUNC, 0644);\n"
11579 "    if (fd == -1) {\n"
11580 "        perror(\"open\");\n"
11581 "        exit(EXIT_FAILURE);\n"
11582 "    }\n"
11583
11584 #. type: Plain text
11585 #: build/C/man2/tee.2:169
11586 #, no-wrap
11587 msgid ""
11588 "    do {\n"
11589 "        /*\n"
11590 "         * tee stdin to stdout.\n"
11591 "         */\n"
11592 "        len = tee(STDIN_FILENO, STDOUT_FILENO,\n"
11593 "                  INT_MAX, SPLICE_F_NONBLOCK);\n"
11594 msgstr ""
11595 "    do {\n"
11596 "        /*\n"
11597 "         * tee stdin to stdout.\n"
11598 "         */\n"
11599 "        len = tee(STDIN_FILENO, STDOUT_FILENO,\n"
11600 "                  INT_MAX, SPLICE_F_NONBLOCK);\n"
11601
11602 #. type: Plain text
11603 #: build/C/man2/tee.2:178
11604 #, no-wrap
11605 msgid ""
11606 "        if (len E<lt> 0) {\n"
11607 "            if (errno == EAGAIN)\n"
11608 "                continue;\n"
11609 "            perror(\"tee\");\n"
11610 "            exit(EXIT_FAILURE);\n"
11611 "        } else\n"
11612 "            if (len == 0)\n"
11613 "                break;\n"
11614 msgstr ""
11615 "        if (len E<lt> 0) {\n"
11616 "            if (errno == EAGAIN)\n"
11617 "                continue;\n"
11618 "            perror(\"tee\");\n"
11619 "            exit(EXIT_FAILURE);\n"
11620 "        } else\n"
11621 "            if (len == 0)\n"
11622 "                break;\n"
11623
11624 #. type: Plain text
11625 #: build/C/man2/tee.2:192
11626 #, no-wrap
11627 msgid ""
11628 "        /*\n"
11629 "         * Consume stdin by splicing it to a file.\n"
11630 "         */\n"
11631 "        while (len E<gt> 0) {\n"
11632 "            slen = splice(STDIN_FILENO, NULL, fd, NULL,\n"
11633 "                          len, SPLICE_F_MOVE);\n"
11634 "            if (slen E<lt> 0) {\n"
11635 "                perror(\"splice\");\n"
11636 "                break;\n"
11637 "            }\n"
11638 "            len -= slen;\n"
11639 "        }\n"
11640 "    } while (1);\n"
11641 msgstr ""
11642 "        /*\n"
11643 "         * Consume stdin by splicing it to a file.\n"
11644 "         */\n"
11645 "        while (len E<gt> 0) {\n"
11646 "            slen = splice(STDIN_FILENO, NULL, fd, NULL,\n"
11647 "                          len, SPLICE_F_MOVE);\n"
11648 "            if (slen E<lt> 0) {\n"
11649 "                perror(\"splice\");\n"
11650 "                break;\n"
11651 "            }\n"
11652 "            len -= slen;\n"
11653 "        }\n"
11654 "    } while (1);\n"
11655
11656 #. type: Plain text
11657 #: build/C/man2/tee.2:196
11658 #, no-wrap
11659 msgid ""
11660 "    close(fd);\n"
11661 "    exit(EXIT_SUCCESS);\n"
11662 "}\n"
11663 msgstr ""
11664 "    close(fd);\n"
11665 "    exit(EXIT_SUCCESS);\n"
11666 "}\n"
11667
11668 #. type: Plain text
11669 #: build/C/man2/tee.2:200
11670 msgid "B<splice>(2), B<vmsplice>(2)"
11671 msgstr "B<splice>(2), B<vmsplice>(2)"
11672
11673 #. type: TH
11674 #: build/C/man2/vm86.2:26
11675 #, no-wrap
11676 msgid "VM86"
11677 msgstr "VM86"
11678
11679 #. type: TH
11680 #: build/C/man2/vm86.2:26
11681 #, no-wrap
11682 msgid "2009-02-20"
11683 msgstr "2009-02-20"
11684
11685 #. type: Plain text
11686 #: build/C/man2/vm86.2:29
11687 msgid "vm86old, vm86 - enter virtual 8086 mode"
11688 msgstr "vm86old, vm86 - 仮想 8086 モードへ移行する"
11689
11690 #. type: Plain text
11691 #: build/C/man2/vm86.2:31
11692 msgid "B<#include E<lt>sys/vm86.hE<gt>>"
11693 msgstr "B<#include E<lt>sys/vm86.hE<gt>>"
11694
11695 #. type: Plain text
11696 #: build/C/man2/vm86.2:33
11697 msgid "B<int vm86old(struct vm86_struct *>I<info>B<);>"
11698 msgstr "B<int vm86old(struct vm86_struct *>I<info>B<);>"
11699
11700 #. type: Plain text
11701 #: build/C/man2/vm86.2:35
11702 msgid "B<int vm86(unsigned long >I<fn>B<, struct vm86plus_struct *>I<v86>B<);>"
11703 msgstr ""
11704 "B<int vm86(unsigned long >I<fn>B<, struct vm86plus_struct *>I<v86>B<);>"
11705
11706 #. type: Plain text
11707 #: build/C/man2/vm86.2:48
11708 msgid ""
11709 "The system call B<vm86>()  was introduced in Linux 0.97p2.  In Linux 2.1.15 "
11710 "and 2.0.28 it was renamed to B<vm86old>(), and a new B<vm86>()  was "
11711 "introduced.  The definition of I<struct vm86_struct> was changed in 1.1.8 "
11712 "and 1.1.9."
11713 msgstr ""
11714 "B<vm86>()  システムコールは Linux 0.97p2 で導入された。 これは Linux 2.1.15 "
11715 "と 2.0.28 で B<vm86old>()  に名前が変更され、 新しい B<vm86>()  が導入され"
11716 "た。 I<struct vm86_struct> の定義は 1.1.8 と 1.1.9 で変更された。"
11717
11718 #. type: Plain text
11719 #: build/C/man2/vm86.2:52
11720 msgid ""
11721 "These calls cause the process to enter VM86 mode (virtual-8086 in Intel "
11722 "literature), and are used by B<dosemu>."
11723 msgstr ""
11724 "これらのコールによってプロセスは VM86 モード (Intel の文書では仮想 8086 モー"
11725 "ド) へと移行する。 これらのコールは B<dosemu> で使用される。"
11726
11727 #. type: Plain text
11728 #: build/C/man2/vm86.2:54
11729 msgid "VM86 mode is an emulation of real mode within a protected mode task."
11730 msgstr ""
11731 "VM86 モードはプロテクトモードタスクにおける リアルモードのエミュレーションで"
11732 "ある。"
11733
11734 #. type: Plain text
11735 #: build/C/man2/vm86.2:64
11736 msgid ""
11737 "This return value is specific to i386 and indicates a problem with getting "
11738 "user-space data."
11739 msgstr ""
11740 "この返り値は i386 固有のものであり、 ユーザー空間のデータを取得する際に問題が"
11741 "あったことを示す。"
11742
11743 #. type: Plain text
11744 #: build/C/man2/vm86.2:68
11745 msgid ""
11746 "This return value indicates the call is not implemented on the present "
11747 "architecture."
11748 msgstr ""
11749 "この返り値は、このコールが現在のアーキテクチャで実装されていないことを示す。"
11750
11751 #. type: Plain text
11752 #: build/C/man2/vm86.2:73
11753 msgid ""
11754 "Saved kernel stack exists.  (This is a kernel sanity check; the saved stack "
11755 "should exist only within vm86 mode itself.)"
11756 msgstr ""
11757 "保存されたカーネルスタックが既に存在している。(これはカーネルが通常の 状態で"
11758 "あるかをチェックしている。保存されたスタックは vm86 モードで しか存在しな"
11759 "い。)"
11760
11761 #. type: Plain text
11762 #: build/C/man2/vm86.2:76
11763 msgid ""
11764 "This call is specific to Linux on 32-bit Intel processors, and should not be "
11765 "used in programs intended to be portable."
11766 msgstr ""
11767 "この関数は 32 ビット Intel プロセッサ上の Linux 特有の関数であり、 移植を意図"
11768 "したプログラムでは使用すべきでない。"
11769
11770 #. type: TH
11771 #: build/C/man2/vmsplice.2:26
11772 #, no-wrap
11773 msgid "VMSPLICE"
11774 msgstr "VMSPLICE"
11775
11776 #. type: Plain text
11777 #: build/C/man2/vmsplice.2:29
11778 msgid "vmsplice - splice user pages into a pipe"
11779 msgstr "vmsplice - ユーザ・ページをパイプに継ぎ合わせる"
11780
11781 #. type: Plain text
11782 #: build/C/man2/vmsplice.2:34
11783 #, no-wrap
11784 msgid ""
11785 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
11786 "B<#include E<lt>fcntl.hE<gt>>\n"
11787 "B<#include E<lt>sys/uio.hE<gt>>\n"
11788 msgstr ""
11789 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
11790 "B<#include E<lt>fcntl.hE<gt>>\n"
11791 "B<#include E<lt>sys/uio.hE<gt>>\n"
11792
11793 #. type: Plain text
11794 #: build/C/man2/vmsplice.2:37
11795 #, no-wrap
11796 msgid ""
11797 "B<ssize_t vmsplice(int >I<fd>B<, const struct iovec *>I<iov>B<,>\n"
11798 "B<                 unsigned long >I<nr_segs>B<, unsigned int >I<flags>B<);>\n"
11799 msgstr ""
11800 "B<ssize_t vmsplice(int >I<fd>B<, const struct iovec *>I<iov>B<,>\n"
11801 "B<                 unsigned long >I<nr_segs>B<, unsigned int >I<flags>B<);>\n"
11802
11803 #.  Linus: vmsplice() system call to basically do a "write to
11804 #.  the buffer", but using the reference counting and VM traversal
11805 #.  to actually fill the buffer. This means that the user needs to
11806 #.  be careful not to reuse the user-space buffer it spliced into
11807 #.  the kernel-space one (contrast this to "write()", which copies
11808 #.  the actual data, and you can thus reuse the buffer immediately
11809 #.  after a successful write), but that is often easy to do.
11810 #. type: Plain text
11811 #: build/C/man2/vmsplice.2:57
11812 msgid ""
11813 "The B<vmsplice>()  system call maps I<nr_segs> ranges of user memory "
11814 "described by I<iov> into a pipe.  The file descriptor I<fd> must refer to a "
11815 "pipe."
11816 msgstr ""
11817 "B<vmsplice>()  システムコールは、 I<iov> で指定されたユーザ・メモリの "
11818 "I<nr_segs> の範囲をパイプにマッピングする。 I<fd> はパイプを参照していなけれ"
11819 "ばならない。"
11820
11821 #. type: Plain text
11822 #: build/C/man2/vmsplice.2:64
11823 msgid ""
11824 "The pointer I<iov> points to an array of I<iovec> structures as defined in "
11825 "I<E<lt>sys/uio.hE<gt>>:"
11826 msgstr ""
11827 "ポインタ I<iov> は I<iovec> 構造体の配列を指す。 I<iovec> 構造体は "
11828 "I<E<lt>sys/uio.hE<gt>> で以下のように定義されている:"
11829
11830 #. type: Plain text
11831 #: build/C/man2/vmsplice.2:71
11832 #, no-wrap
11833 msgid ""
11834 "struct iovec {\n"
11835 "    void  *iov_base;            /* Starting address */\n"
11836 "    size_t iov_len;             /* Number of bytes */\n"
11837 "};\n"
11838 msgstr ""
11839 "struct iovec {\n"
11840 "    void  *iov_base;            /* 開始アドレス */\n"
11841 "    size_t iov_len;             /* バイト数 */\n"
11842 "};\n"
11843
11844 #. type: Plain text
11845 #: build/C/man2/vmsplice.2:84
11846 msgid "Unused for B<vmsplice>(); see B<splice>(2)."
11847 msgstr "B<vmsplice>()  では未使用。 B<splice>(2)  参照。"
11848
11849 #. type: Plain text
11850 #: build/C/man2/vmsplice.2:97
11851 msgid ""
11852 "Currently has no effect for B<vmsplice>(), but may be implemented in the "
11853 "future; see B<splice>(2)."
11854 msgstr ""
11855 "現在のところ B<vmsplice>()  では何の効果もないが、将来的には実装される可能性"
11856 "がある。 B<splice>(2)  参照。"
11857
11858 #.  FIXME Explain the following line in a little more detail:
11859 #.  .... if we expect to later SPLICE_F_MOVE to the cache.
11860 #. type: Plain text
11861 #: build/C/man2/vmsplice.2:113
11862 msgid ""
11863 "The user pages are a gift to the kernel.  The application may not modify "
11864 "this memory ever, or page cache and on-disk data may differ.  Gifting pages "
11865 "to the kernel means that a subsequent B<splice>(2)  B<SPLICE_F_MOVE> can "
11866 "successfully move the pages; if this flag is not specified, then a "
11867 "subsequent B<splice>(2)  B<SPLICE_F_MOVE> must copy the pages.  Data must "
11868 "also be properly page aligned, both in memory and length."
11869 msgstr ""
11870 "ユーザ・ページがカーネルへ渡すもの (gift) であることを示す。 アプリケーション"
11871 "はこのメモリを絶対に変更してはならない。 さもなければ、ページキャッシュとディ"
11872 "スク上のデータは 一致しなくなるだろう。 ページをカーネルに渡すと、この次の "
11873 "B<splice>(2)  B<SPLICE_F_MOVE> でそのページの移動を行うことができる。 このフ"
11874 "ラグが指定されなかった場合、この次の B<splice>(2)  B<SPLICE_F_MOVE> でその"
11875 "ページのコピーを行わなければならない。 データはメモリ上でページ境界にあってい"
11876 "なければならず、 長さもページ境界の倍数でなければならない。"
11877
11878 #. type: Plain text
11879 #: build/C/man2/vmsplice.2:122
11880 msgid ""
11881 "Upon successful completion, B<vmsplice>()  returns the number of bytes "
11882 "transferred to the pipe.  On error, B<vmsplice>()  returns -1 and I<errno> "
11883 "is set to indicate the error."
11884 msgstr ""
11885 "成功して完了すると、 B<vmsplice>()  はパイプに転送したバイト数を返す。 エラー"
11886 "の場合、 B<vmplice>()  は -1 を返し、 I<errno> をエラーを示す値に設定する。"
11887
11888 #. type: Plain text
11889 #: build/C/man2/vmsplice.2:127
11890 msgid "I<fd> either not valid, or doesn't refer to a pipe."
11891 msgstr "I<fd> が有効でない、もしくはパイプを参照していない。"
11892
11893 #. type: Plain text
11894 #: build/C/man2/vmsplice.2:135
11895 msgid ""
11896 "I<nr_segs> is 0 or greater than B<IOV_MAX>; or memory not aligned if "
11897 "B<SPLICE_F_GIFT> set."
11898 msgstr ""
11899 "I<nr_segs> が 0 もしくは B<IOV_MAX> よりも大きい。または B<SPLICE_F_GIFT> が"
11900 "設定されたがメモリがページ境界にあっていない。"
11901
11902 #. type: Plain text
11903 #: build/C/man2/vmsplice.2:143
11904 msgid ""
11905 "The B<vmsplice>()  system call first appeared in Linux 2.6.17; library "
11906 "support was added to glibc in version 2.5."
11907 msgstr ""
11908 "B<vmsplice>() システムコールは Linux 2.6.17 で初めて登場した。\n"
11909 "ライブラリによるサポートは glibc バージョン 2.5 で追加された。"
11910
11911 #. type: Plain text
11912 #: build/C/man2/vmsplice.2:154
11913 msgid ""
11914 "B<vmsplice>()  follows the other vectorized read/write type functions when "
11915 "it comes to limitations on number of segments being passed in.  This limit "
11916 "is B<IOV_MAX> as defined in I<E<lt>limits.hE<gt>>.  At the time of this "
11917 "writing, that limit is 1024."
11918 msgstr ""
11919 "指定されたセグメント数が上限に達した場合、 B<vmsplice>()  は他のベクトル形式"
11920 "の read/write を行う関数と同じ動作をする。 上限は B<IOV_MAX> であり、 "
11921 "I<E<lt>limits.hE<gt>> で定義されている。 このドキュメントを書いた時点での値"
11922 "は 1024 である。"
11923
11924 #. type: Plain text
11925 #: build/C/man2/vmsplice.2:157
11926 msgid "B<splice>(2), B<tee>(2)"
11927 msgstr "B<splice>(2), B<tee>(2)"
11928
11929 #~ msgid "2012-03-05"
11930 #~ msgstr "2012-03-05"
11931
11932 #~ msgid "2013-07-16"
11933 #~ msgstr "2013-07-16"
11934
11935 #~ msgid "2013-03-15"
11936 #~ msgstr "2013-03-15"
11937
11938 #~ msgid "B<futex>(7)"
11939 #~ msgstr "B<futex>(7)"
11940
11941 #, fuzzy
11942 #~| msgid "The I<subcmd> value is one of the following:"
11943 #~ msgid "The I<flags> argument takes one of the following values:"
11944 #~ msgstr "I<subcmd> の値は以下のいずれかである"
11945
11946 #~ msgid ""
11947 #~ "Depending on which operation was executed, the returned value for a "
11948 #~ "successful call can have differing meanings."
11949 #~ msgstr "どの操作が実行されたかによって、 成功時の返り値の意味が変わる。"
11950
11951 #~ msgid ""
11952 #~ "Returns 0 if the process was woken by a B<FUTEX_WAKE> call.  In case of "
11953 #~ "timeout, the operation fails with the error B<ETIMEDOUT>.  If the futex "
11954 #~ "was not equal to the expected value, the operation fails with the error "
11955 #~ "B<EWOULDBLOCK>.  Signals (see B<signal>(7))  or other spurious wakeups "
11956 #~ "cause B<FUTEX_WAIT> to fail with the error B<EINTR>."
11957 #~ msgstr ""
11958 #~ "プロセスが B<FUTEX_WAKE> の呼び出しで wake すると 0 を返す。 タイムアウト"
11959 #~ "の場合、操作はエラー B<ETIMEOUT> で失敗する。 futex が指定された値と等しく"
11960 #~ "ない場合、 エラー B<EWOULDBLOCK> で失敗する。 シグナルを受信するか "
11961 #~ "(B<signal>(7)  参照) 他の偽の wake があった場合には、エラー B<EINTR> で失"
11962 #~ "敗する。"
11963
11964 #~ msgid "An operation was not defined or error in page alignment."
11965 #~ msgstr ""
11966 #~ "操作が定義されていない。またはページ・アラインメントでエラーが発生した。"
11967
11968 #, fuzzy
11969 #~| msgid ""
11970 #~| "Indicates that this process is to be traced by its parent.  Any signal "
11971 #~| "(except B<SIGKILL>)  delivered to this process will cause it to stop and "
11972 #~| "its parent to be notified via B<wait>(2).  Also, all subsequent calls to "
11973 #~| "B<execve>(2)  by this process will cause a B<SIGTRAP> to be sent to it, "
11974 #~| "giving the parent a chance to gain control before the new program begins "
11975 #~| "execution.  A process probably shouldn't make this request if its parent "
11976 #~| "isn't expecting to trace it.  (I<pid>, I<addr>, and I<data> are ignored.)"
11977 #~ msgid ""
11978 #~ "Indicate that this process is to be traced by its parent.  Any signal "
11979 #~ "(except B<SIGKILL>)  delivered to this process will cause it to stop and "
11980 #~ "its parent to be notified via B<waitpid>(2).  In addition, all subsequent "
11981 #~ "calls to B<execve>(2)  by the traced process will cause a B<SIGTRAP> to "
11982 #~ "be sent to it, giving the parent a chance to gain control before the new "
11983 #~ "program begins execution.  A process probably shouldn't make this request "
11984 #~ "if its parent isn't expecting to trace it.  (I<pid>, I<addr>, and I<data> "
11985 #~ "are ignored.)"
11986 #~ msgstr ""
11987 #~ "このプロセスが親プロセスによってトレースされることを表す。 このプロセスに "
11988 #~ "(B<SIGKILL> 以外の) シグナルが配送されると、 プロセスは停止し、親プロセス"
11989 #~ "に B<wait>(2)  を通じて通知される。 また、これ以降はこのプロセスが "
11990 #~ "B<execve>(2)  を呼び出す度に B<SIGTRAP> が送信されるようになる。 これに"
11991 #~ "よって、親プロセスは 新しいプログラムが実行を開始する前に制御することがで"
11992 #~ "きる。 親プロセスが自プロセスをトレースするつもりがない場合には、 おそらく"
11993 #~ "このプロセスは本要求を行うべきではないだろう。 (I<pid>, I<addr>, I<data> "
11994 #~ "は無視される。)"
11995
11996 #~ msgid ""
11997 #~ "Stop the child at the next B<execve>(2)  call with I<SIGTRAP | "
11998 #~ "PTRACE_EVENT_EXEC\\ E<lt>E<lt>\\ 8>."
11999 #~ msgstr ""
12000 #~ "次の B<execve>(2)  呼び出し時に I<SIGTRAP | PTRACE_EVENT_EXEC\\ E<lt>E<lt>"
12001 #~ "\\ 8> で子プロセスの動作を停止させる。"
12002
12003 #~ msgid ""
12004 #~ "Stop the child at the completion of the next B<vfork>(2)  call with "
12005 #~ "I<SIGTRAP | PTRACE_EVENT_VFORK_DONE\\ E<lt>E<lt>\\ 8>."
12006 #~ msgstr ""
12007 #~ "次の B<vfork>(2)  呼び出し時に I<SIGTRAP | PTRACE_EVENT_VFORK_DONE\\ "
12008 #~ "E<lt>E<lt>\\ 8> で子プロセスの動作を停止させる。"
12009
12010 #~ msgid ""
12011 #~ "Attaches to the process specified in I<pid>, making it a traced \"child\" "
12012 #~ "of the calling process; the behavior of the child is as if it had done a "
12013 #~ "B<PTRACE_TRACEME>.  The calling process actually becomes the parent of "
12014 #~ "the child process for most purposes (e.g., it will receive notification "
12015 #~ "of child events and appears in B<ps>(1)  output as the child's parent), "
12016 #~ "but a B<getppid>(2)  by the child will still return the PID of the "
12017 #~ "original parent.  The child is sent a B<SIGSTOP>, but will not "
12018 #~ "necessarily have stopped by the completion of this call; use B<wait>(2)  "
12019 #~ "to wait for the child to stop.  (I<addr> and I<data> are ignored.)"
12020 #~ msgstr ""
12021 #~ "I<pid> で指定されたプロセスに接続 (attach) し、それを呼び出し元のプロセス"
12022 #~ "の 子プロセスとしてトレースできるようにする。子プロセスは "
12023 #~ "B<PTRACE_TRACEME> したかのように振舞う。呼び出し元のプロセスはそのほとんど"
12024 #~ "の目的において、 その子プロセスの実際の親になる (例えば、子プロセスのイベ"
12025 #~ "ントの 通知を受けとったり、 B<ps>(1)  で親として表示されたりする)。しか"
12026 #~ "し、子プロセスで B<getppid>(2)  を実行した場合には元の親プロセスの PID が"
12027 #~ "返される。 子プロセスには B<SIGSTOP> が送られるが、この呼び出しが完了する"
12028 #~ "までに 必ずしも停止するとは限らない。子プロセスの停止を待つには B<wait>"
12029 #~ "(2)  を使用すること。(I<addr> と I<data> は無視される。)"
12030
12031 #~ msgid ""
12032 #~ "Tracing causes a few subtle differences in the semantics of traced "
12033 #~ "processes.  For example, if a process is attached to with "
12034 #~ "B<PTRACE_ATTACH>, its original parent can no longer receive notification "
12035 #~ "via B<wait>(2)  when it stops, and there is no way for the new parent to "
12036 #~ "effectively simulate this notification."
12037 #~ msgstr ""
12038 #~ "トレースすることによってトレースされるプロセスの動作に些細な違いが 起こる"
12039 #~ "ことがある。例えば、プロセスが B<PTRACE_ATTACH> によって接続された場合に"
12040 #~ "は、そのプロセスが停止した時でも本来の親は B<wait>(2)  を使って通知を受け"
12041 #~ "ることができず、新しい親が効率よく この通知を真似る方法もない。"
12042
12043 #~ msgid ""
12044 #~ "When the parent receives an event with B<PTRACE_EVENT_*> set, the child "
12045 #~ "is not in the normal signal delivery path.  This means the parent cannot "
12046 #~ "do B<ptrace>(PTRACE_CONT)  with a signal or B<ptrace>(PTRACE_KILL).  "
12047 #~ "B<kill>(2)  with a B<SIGKILL> signal can be used instead to kill the "
12048 #~ "child process after receiving one of these messages."
12049 #~ msgstr ""
12050 #~ "親プロセスが B<PTRACE_EVENT_*> がセットされたイベントを受信した場合、 子プ"
12051 #~ "ロセスは通常通りのシグナル配送が行われる状態にない。 つまり、親プロセス"
12052 #~ "が、 シグナルにより B<ptrace>(PTRACE_CONT)  を行ったり、 B<ptrace>"
12053 #~ "(PTRACE_KILL)  を行ったりできないということである。 こららのメッセージの受"
12054 #~ "信後は、子プロセスを終了 (kill) するのに、 シグナル B<SIGKILL> を指定して "
12055 #~ "B<kill>(2)  を行う方法を代わりに使用できる。"
12056
12057 #~ msgid ""
12058 #~ "The SunOS man page describes B<ptrace>()  as \"unique and arcane\", which "
12059 #~ "it is.  The proc-based debugging interface present in Solaris 2 "
12060 #~ "implements a superset of B<ptrace>()  functionality in a more powerful "
12061 #~ "and uniform way."
12062 #~ msgstr ""
12063 #~ "SunOS のマニュアル・ページには B<ptrace>()  は「独特で不可解」と記述されて"
12064 #~ "おり、まさしくそうである。 Solaris 2 では proc ベースの デバッグのインター"
12065 #~ "フェースとして B<ptrace>()  の上位互換関数が実装され、より強力で一貫性のあ"
12066 #~ "るものとなっている。"
12067
12068 #~ msgid ""
12069 #~ "The second argument I<special> is the block special device these quota "
12070 #~ "apply to.  It must be mounted."
12071 #~ msgstr ""
12072 #~ "二番目の引き数 I<special> は quota を適用するデバイスのブロック・スペシャ"
12073 #~ "ル・ファイルである。 そのデバイスはマウントされていなくてはならない。"
12074
12075 #~ msgid ""
12076 #~ "The third argument I<id> is the user or group ID these quota apply to "
12077 #~ "(when relevant)."
12078 #~ msgstr ""
12079 #~ "三番目の引き数 I<id> には、(必要な場合に) quota を適用するユーザーもしくは"
12080 #~ "グループの ID を指定する。"
12081
12082 #~ msgid ""
12083 #~ "The fourth argument I<addr> is the address of a data structure, depending "
12084 #~ "on the command."
12085 #~ msgstr ""
12086 #~ "四番目の引き数 I<addr> には、コマンドごとに異ったデータ構造体のアドレスを"
12087 #~ "指定する。"
12088
12089 #~ msgid ""
12090 #~ "Enable quota.  The I<addr> argument is the pathname of the file "
12091 #~ "containing the quota for the file system."
12092 #~ msgstr ""
12093 #~ "quota を有効にする。 I<addr> 引き数には、そのファイル・システムの quota が"
12094 #~ "記録されているファイルの パス名を指定する。"
12095
12096 #~ msgid "Disable quota."
12097 #~ msgstr "quota を無効にする。"
12098
12099 #~ msgid "Set limits and current usage; I<addr> is as before."
12100 #~ msgstr "制限値と現在の使用量を設定する: I<addr> は同上。"
12101
12102 #~ msgid "Set limits; I<addr> is as before."
12103 #~ msgstr "制限値を設定する; I<addr> は同上。"
12104
12105 #~ msgid "Set usage."
12106 #~ msgstr "使用量を設定する。"
12107
12108 #~ msgid "Sync disk copy of a file system's quota."
12109 #~ msgstr "ファイル・システムの quota ファイルをディスクと同期させる。"
12110
12111 #~ msgid "Get collected stats."
12112 #~ msgstr "収集された統計を取得する。"
12113
12114 #~ msgid ""
12115 #~ "On success, B<quotactl>()  returns 0.  On error, -1 is returned, and "
12116 #~ "I<errno> is set appropriately."
12117 #~ msgstr ""
12118 #~ "B<quotactl>()  は、成功時には 0 を返す。エラー時は、-1 を返すとともに、 "
12119 #~ "I<errno> が適切な値に設定される。"
12120
12121 #~ msgid "B<Q_QUOTAON> was asked, but quotas were enabled already."
12122 #~ msgstr "B<Q_QUOTAON> の要求がなされたが、quota(s) は既に有効になっている。"
12123
12124 #~ msgid "Bad I<addr> value."
12125 #~ msgstr "I<addr> の値に誤りがある。"
12126
12127 #~ msgid ""
12128 #~ "I<type> is not a known quota type.  Or, I<special> could not be found."
12129 #~ msgstr ""
12130 #~ "I<type> が既知の quota の形式ではない。もしくは、 I<special> デバイスが見"
12131 #~ "付からなかった。"
12132
12133 #~ msgid "Too many open files: cannot open quota file."
12134 #~ msgstr "ファイルをオープンしすぎている: quota ファイルをオープン出来ない。"
12135
12136 #~ msgid "I<special> cannot be found in the mount table."
12137 #~ msgstr "I<special> がマウント・テーブル内に見当たらない。"
12138
12139 #~ msgid "The kernel was compiled without quota support."
12140 #~ msgstr "quota を使用可にしてカーネルをコンパイルしていない。"
12141
12142 #~ msgid ""
12143 #~ "The process was not root (for the file system), and B<Q_GETQUOTA> was "
12144 #~ "asked for another I<id> than that of the process itself, or anything "
12145 #~ "other than B<Q_GETSTATS> or B<Q_SYNC> was asked."
12146 #~ msgstr ""
12147 #~ "プロセスが (そのファイル・システムの) root のものではなく、 かつプロセス自"
12148 #~ "身のものとは異なる I<id> に対して B<Q_GETQUOTA> 要求を行なった。 もしく"
12149 #~ "は、 B<Q_GETSTATS>, B<Q_SYNC> 以外の要求がなされた。"
12150
12151 #~ msgid ""
12152 #~ "B<Q_GETQUOTA> or B<Q_SETQUOTA> or B<Q_SETUSE> or B<Q_SETQLIM> was asked "
12153 #~ "for a file system that didn't have quota enabled."
12154 #~ msgstr ""
12155 #~ "quota が有効になっていないファイル・システムに対して B<Q_GETQUOTA>, "
12156 #~ "B<Q_SETQUOTA>, B<Q_SETUSE>, B<Q_SETQLIM> のいずれかの要求がなされた。"