OSDN Git Service

b0770156c551311958734ddb416e9264cb6c3b78
[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: 2014-06-03 01:29+0900\n"
10 "PO-Revision-Date: 2014-06-03 07:37+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:70
122 #: build/C/man2/get_robust_list.2:45 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:66 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:216
208 #: build/C/man2/get_robust_list.2:78 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:2371
212 #: build/C/man2/perfmonctl.2:190 build/C/man2/personality.2:62
213 #: build/C/man2/pivot_root.2:101 build/C/man2/process_vm_readv.2:225
214 #: build/C/man2/ptrace.2:1853 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:241
233 #: build/C/man2/get_robust_list.2:85 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:2377 build/C/man2/personality.2:69
237 #: build/C/man2/pivot_root.2:105 build/C/man2/process_vm_readv.2:245
238 #: build/C/man2/ptrace.2:1868 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:256
248 #: build/C/man2/get_robust_list.2:112 build/C/man2/lookup_dcookie.2:51
249 #: build/C/man2/modify_ldt.2:109 build/C/man2/perf_event_open.2:2423
250 #: build/C/man2/process_vm_readv.2:267 build/C/man2/process_vm_readv.2:272
251 #: build/C/man2/ptrace.2:1872 build/C/man2/quotactl.2:428
252 #: build/C/man2/sendfile.2:125 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:268
268 #: build/C/man2/get_robust_list.2:89 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:2428
271 #: build/C/man2/personality.2:70 build/C/man2/pivot_root.2:114
272 #: build/C/man2/process_vm_readv.2:246 build/C/man2/process_vm_readv.2:257
273 #: build/C/man2/process_vm_readv.2:261 build/C/man2/ptrace.2:1883
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:99
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/perf_event_open.2:2495
290 #: build/C/man2/pivot_root.2:120 build/C/man2/process_vm_readv.2:283
291 #: build/C/man2/ptrace.2:1893 build/C/man2/quotactl.2:456
292 #: build/C/man2/vm86.2:68
293 #, no-wrap
294 msgid "B<EPERM>"
295 msgstr "B<EPERM>"
296
297 #.  .SH AUTHOR
298 #.  Man page written by Andi Kleen.
299 #. type: Plain text
300 #: build/C/man2/arch_prctl.2:103
301 msgid "I<addr> is outside the process address space."
302 msgstr "I<addr> がプロセスのアドレス空間の外にある。"
303
304 #. type: SH
305 #: build/C/man2/arch_prctl.2:103 build/C/man2/futex.2:303
306 #: build/C/man2/getunwind.2:96 build/C/man2/kexec_load.2:142
307 #: build/C/man2/lookup_dcookie.2:78 build/C/man2/modify_ldt.2:130
308 #: build/C/man2/nfsservctl.2:58 build/C/man2/outb.2:87
309 #: build/C/man2/pciconfig_read.2:112 build/C/man2/perf_event_open.2:2516
310 #: build/C/man2/perfmonctl.2:199 build/C/man2/personality.2:73
311 #: build/C/man2/pivot_root.2:128 build/C/man2/process_vm_readv.2:295
312 #: build/C/man2/ptrace.2:1911 build/C/man2/sendfile.2:148
313 #: build/C/man2/set_tid_address.2:97 build/C/man2/splice.2:170
314 #: build/C/man2/tee.2:119 build/C/man2/vm86.2:73 build/C/man2/vmsplice.2:143
315 #, no-wrap
316 msgid "CONFORMING TO"
317 msgstr "準拠"
318
319 #. type: Plain text
320 #: build/C/man2/arch_prctl.2:107
321 msgid ""
322 "B<arch_prctl>()  is a Linux/x86-64 extension and should not be used in "
323 "programs intended to be portable."
324 msgstr ""
325 "B<arch_prctl>()  は Linux/x86-64 拡張であり、移植性を意図したプログラムでは使"
326 "うべきでない。"
327
328 #. type: SH
329 #: build/C/man2/arch_prctl.2:107 build/C/man2/futex.2:305
330 #: build/C/man2/get_robust_list.2:120 build/C/man2/getunwind.2:99
331 #: build/C/man2/kexec_load.2:144 build/C/man2/lookup_dcookie.2:81
332 #: build/C/man2/modify_ldt.2:133 build/C/man2/perf_event_open.2:2521
333 #: build/C/man2/perfmonctl.2:202 build/C/man2/pivot_root.2:131
334 #: build/C/man2/process_vm_readv.2:297 build/C/man2/ptrace.2:1913
335 #: build/C/man2/sendfile.2:155 build/C/man2/splice.2:172
336 #: build/C/man2/tee.2:121 build/C/man2/vmsplice.2:145
337 #, no-wrap
338 msgid "NOTES"
339 msgstr "注意"
340
341 #. type: Plain text
342 #: build/C/man2/arch_prctl.2:110
343 msgid ""
344 "B<arch_prctl>()  is supported only on Linux/x86-64 for 64-bit programs "
345 "currently."
346 msgstr ""
347 "B<arch_prctl>()  は現在のところ Linux/x86-64 上の 64 ビットプログラムでのみサ"
348 "ポートされている。"
349
350 #. type: Plain text
351 #: build/C/man2/arch_prctl.2:112
352 msgid "The 64-bit base changes when a new 32-bit segment selector is loaded."
353 msgstr ""
354 "新しい 32 ビットセグメントセレクタがロードされた場合、 64 ビットベースは変更"
355 "される。"
356
357 #. type: Plain text
358 #: build/C/man2/arch_prctl.2:115
359 msgid "B<ARCH_SET_GS> is disabled in some kernels."
360 msgstr "B<ARCH_SET_GS> が無効にされているカーネルもある。"
361
362 #. type: Plain text
363 #: build/C/man2/arch_prctl.2:130
364 msgid ""
365 "Context switches for 64-bit segment bases are rather expensive.  It may be a "
366 "faster alternative to set a 32-bit base using a segment selector by setting "
367 "up an LDT with B<modify_ldt>(2)  or using the B<set_thread_area>(2)  system "
368 "call in kernel 2.5 or later.  B<arch_prctl>()  is needed only when you want "
369 "to set bases that are larger than 4GB.  Memory in the first 2GB of address "
370 "space can be allocated by using B<mmap>(2)  with the B<MAP_32BIT> flag."
371 msgstr ""
372 "64 ビットセグメントベースのコンテキストスイッチは、やや高価である。 LDT を "
373 "B<modify_ldt>(2)  で設定してセグメントセレクタを使うか、 (カーネル 2.5 以降"
374 "の)  B<set_thread_area>(2)  システムコールを使うことにより、 32 ビットベース"
375 "を設定するという高速な代替手段もある。 4GB より大きなベースを設定したい場合に"
376 "のみ、 B<arch_prctl>()  が必要である。 アドレス空間の最初の 2GB にあるメモリ"
377 "は、 B<mmap>(2)  に B<MAP_32BIT> フラグを指定して割り当てることができる。"
378
379 #. type: Plain text
380 #: build/C/man2/arch_prctl.2:135
381 msgid ""
382 "As of version 2.7, glibc provides no prototype for B<arch_prctl>().  You "
383 "have to declare it yourself for now.  This may be fixed in future glibc "
384 "versions."
385 msgstr ""
386 "バージョン 2.7 時点では、glibc には B<arch_prctl>()  のプロトタイプがない。 "
387 "今のところユーザは自分自身で宣言する必要がある。 これは将来の glibc のバー"
388 "ジョンで修正されるかもしれない。"
389
390 #. type: Plain text
391 #: build/C/man2/arch_prctl.2:138
392 msgid "I<FS> may be already used by the threading library."
393 msgstr "I<FS> はスレッドライブラリで既に使われているかもしれない。"
394
395 #. type: SH
396 #: build/C/man2/arch_prctl.2:138 build/C/man2/futex.2:319
397 #: build/C/man2/get_robust_list.2:129 build/C/man2/getunwind.2:111
398 #: build/C/man2/kexec_load.2:159 build/C/man2/modify_ldt.2:136
399 #: build/C/man2/outb.2:96 build/C/man2/pciconfig_read.2:114
400 #: build/C/man2/perf_event_open.2:2652 build/C/man2/perfmonctl.2:205
401 #: build/C/man2/pivot_root.2:143 build/C/man2/process_vm_readv.2:347
402 #: build/C/man2/ptrace.2:2079 build/C/man2/quotactl.2:507
403 #: build/C/man2/sendfile.2:197 build/C/man2/set_tid_address.2:99
404 #: build/C/man2/splice.2:226 build/C/man2/tee.2:197
405 #: build/C/man2/vmsplice.2:154
406 #, no-wrap
407 msgid "SEE ALSO"
408 msgstr "関連項目"
409
410 #. type: Plain text
411 #: build/C/man2/arch_prctl.2:143
412 msgid "B<mmap>(2), B<modify_ldt>(2), B<prctl>(2), B<set_thread_area>(2)"
413 msgstr "B<mmap>(2), B<modify_ldt>(2), B<prctl>(2), B<set_thread_area>(2)"
414
415 #. type: Plain text
416 #: build/C/man2/arch_prctl.2:145
417 msgid "AMD X86-64 Programmer's manual"
418 msgstr "AMD X86-64 Programmer's manual"
419
420 #. type: SH
421 #: build/C/man2/arch_prctl.2:145 build/C/man2/futex.2:333
422 #: build/C/man2/get_robust_list.2:138 build/C/man2/getunwind.2:113
423 #: build/C/man2/kexec_load.2:162 build/C/man2/lookup_dcookie.2:88
424 #: build/C/man2/modify_ldt.2:138 build/C/man2/nfsservctl.2:60
425 #: build/C/man2/outb.2:99 build/C/man2/pciconfig_read.2:116
426 #: build/C/man2/perf_event_open.2:2658 build/C/man2/perfmonctl.2:209
427 #: build/C/man2/personality.2:77 build/C/man2/pivot_root.2:149
428 #: build/C/man2/process_vm_readv.2:350 build/C/man2/ptrace.2:2093
429 #: build/C/man2/quotactl.2:512 build/C/man2/sendfile.2:203
430 #: build/C/man2/set_tid_address.2:102 build/C/man2/splice.2:230
431 #: build/C/man2/tee.2:200 build/C/man2/vm86.2:76 build/C/man2/vmsplice.2:157
432 #, no-wrap
433 msgid "COLOPHON"
434 msgstr "この文書について"
435
436 #. type: Plain text
437 #: build/C/man2/arch_prctl.2:153 build/C/man2/futex.2:341
438 #: build/C/man2/get_robust_list.2:146 build/C/man2/getunwind.2:121
439 #: build/C/man2/kexec_load.2:170 build/C/man2/lookup_dcookie.2:96
440 #: build/C/man2/modify_ldt.2:146 build/C/man2/nfsservctl.2:68
441 #: build/C/man2/outb.2:107 build/C/man2/pciconfig_read.2:124
442 #: build/C/man2/perf_event_open.2:2666 build/C/man2/perfmonctl.2:217
443 #: build/C/man2/personality.2:85 build/C/man2/pivot_root.2:157
444 #: build/C/man2/process_vm_readv.2:358 build/C/man2/ptrace.2:2101
445 #: build/C/man2/quotactl.2:520 build/C/man2/sendfile.2:211
446 #: build/C/man2/set_tid_address.2:110 build/C/man2/splice.2:238
447 #: build/C/man2/tee.2:208 build/C/man2/vm86.2:84 build/C/man2/vmsplice.2:165
448 msgid ""
449 "This page is part of release 3.67 of the Linux I<man-pages> project.  A "
450 "description of the project, information about reporting bugs, and the latest "
451 "version of this page, can be found at \\%http://www.kernel.org/doc/man-"
452 "pages/."
453 msgstr ""
454 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.67 の一部\n"
455 "である。プロジェクトの説明とバグ報告に関する情報は\n"
456 "http://www.kernel.org/doc/man-pages/ に書かれている。"
457
458 #. type: TH
459 #: build/C/man2/futex.2:53
460 #, no-wrap
461 msgid "FUTEX"
462 msgstr "FUTEX"
463
464 #. type: TH
465 #: build/C/man2/futex.2:53
466 #, no-wrap
467 msgid "2014-05-21"
468 msgstr "2014-05-21"
469
470 #. type: Plain text
471 #: build/C/man2/futex.2:56
472 msgid "futex - fast user-space locking"
473 msgstr "futex - 高速ユーザ空間ロック"
474
475 #. type: Plain text
476 #: build/C/man2/futex.2:61
477 #, no-wrap
478 msgid ""
479 "B<#include E<lt>linux/futex.hE<gt>>\n"
480 "B<#include E<lt>sys/time.hE<gt>>\n"
481 msgstr ""
482 "B<#include E<lt>linux/futex.hE<gt>>\n"
483 "B<#include E<lt>sys/time.hE<gt>>\n"
484
485 #. type: Plain text
486 #: build/C/man2/futex.2:64
487 #, no-wrap
488 msgid "B<int futex(int *>I<uaddr>B<, int >I<op>B<, int >I<val>B<, const struct timespec *>I<timeout>B<,>\n"
489 msgstr "B<int futex(int *>I<uaddr>B<, int >I<op>B<, int >I<val>B<, const struct timespec *>I<timeout>B<,>\n"
490
491 #.  int *? void *? u32 *?
492 #. type: Plain text
493 #: build/C/man2/futex.2:67
494 #, no-wrap
495 msgid "B<          int *>I<uaddr2>B<, int >I<val3>B<);>\n"
496 msgstr "B<          int *>I<uaddr2>B<, int >I<val3>B<);>\n"
497
498 #. type: Plain text
499 #: build/C/man2/futex.2:70 build/C/man2/getunwind.2:40
500 #: build/C/man2/kexec_load.2:39 build/C/man2/modify_ldt.2:36
501 #: build/C/man2/perf_event_open.2:42 build/C/man2/perfmonctl.2:39
502 #: build/C/man2/pivot_root.2:18
503 msgid "I<Note>: There is no glibc wrapper for this system call; see NOTES."
504 msgstr ""
505 "I<注>: このシステムコールには glibc のラッパー関数は存在しない。「注意」の節"
506 "を参照。"
507
508 #. type: Plain text
509 #: build/C/man2/futex.2:86
510 msgid ""
511 "The B<futex>()  system call provides a method for a program to wait for a "
512 "value at a given address to change, and a method to wake up anyone waiting "
513 "on a particular address (while the addresses for the same memory in separate "
514 "processes may not be equal, the kernel maps them internally so the same "
515 "memory mapped in different locations will correspond for B<futex>()  "
516 "calls).  This system call is typically used to implement the contended case "
517 "of a lock in shared memory, as described in B<futex>(7)."
518 msgstr ""
519 "B<futex>()  システムコールは、 指定したアドレスの値が変更されるのをプログラム"
520 "が待つ手段や 特定のアドレスに対して待機中のプロセスを wake (起床) させる手段"
521 "を提供する (プロセスが異なれば同じメモリに対するアドレスも同じではないかもし"
522 "れないが、 カーネルは異なる位置にマップされた同じメモリを B<futex>()  で使え"
523 "るよう内部でマップする)。 通常は、このシステムコールは B<futex>(7)  に書かれ"
524 "ているように、 共有メモリ中のロックが競合する場合の処理を実装するのに用いられ"
525 "る。"
526
527 #. type: Plain text
528 #: build/C/man2/futex.2:93
529 msgid ""
530 "When a B<futex>(7)  operation did not finish uncontended in user space, a "
531 "call needs to be made to the kernel to arbitrate.  Arbitration can either "
532 "mean putting the calling process to sleep or, conversely, waking a waiting "
533 "process."
534 msgstr ""
535 "B<futex>(7)  の操作がユーザ空間で競合なく完了しなかった場合、 カーネルに仲裁"
536 "させるためにシステムコールを呼ぶ必要がある。 仲裁というのは、呼び出しプロセス"
537 "を sleep (起床待ち) させたり、反対に 待ちプロセスを wake させたりすることを意"
538 "味する。"
539
540 #. type: Plain text
541 #: build/C/man2/futex.2:100
542 msgid ""
543 "Callers of this function are expected to adhere to the semantics as set out "
544 "in B<futex>(7).  As these semantics involve writing nonportable assembly "
545 "instructions, this in turn probably means that most users will in fact be "
546 "library authors and not general application developers."
547 msgstr ""
548 "この関数を呼び出すプロセスは B<futex>(7)  に記述されているセマンティクスに忠"
549 "実であることが要求される。 このセマンティクスには移植不可能なアセンブリ命令を"
550 "書くことが含まれる。 このことは言い換えると futex のユーザのほとんどは実際は"
551 "ライブラリの作者であり、 一般アプリケーションの開発者ではないということであ"
552 "る。"
553
554 #. type: Plain text
555 #: build/C/man2/futex.2:108
556 msgid ""
557 "The I<uaddr> argument needs to point to an aligned integer which stores the "
558 "counter.  The operation to execute is passed via the I<op> argument, along "
559 "with a value I<val>."
560 msgstr ""
561 "I<uaddr> 引き数は、カウンタを格納する、 アラインメントの揃った int 型変数を指"
562 "している必要がある。 実行する操作は I<op> 引き数を介して、値 I<val> とともに"
563 "渡される。"
564
565 #. type: Plain text
566 #: build/C/man2/futex.2:110
567 msgid "Five operations are currently defined:"
568 msgstr "現在のところ 5 つの操作が定義されている:"
569
570 #. type: TP
571 #: build/C/man2/futex.2:110 build/C/man2/futex.2:223
572 #, no-wrap
573 msgid "B<FUTEX_WAIT>"
574 msgstr "B<FUTEX_WAIT>"
575
576 #. type: Plain text
577 #: build/C/man2/futex.2:133
578 msgid ""
579 "This operation atomically verifies that the futex address I<uaddr> still "
580 "contains the value I<val>, and sleeps awaiting B<FUTEX_WAKE> on this futex "
581 "address.  If the I<timeout> argument is non-NULL, its contents specify the "
582 "duration of the wait.  (This interval will be rounded up to the system clock "
583 "granularity, and kernel scheduling delays mean that the blocking interval "
584 "may overrun by a small amount.)  If I<timeout> is NULL, the call blocks "
585 "indefinitely.  The arguments I<uaddr2> and I<val3> are ignored."
586 msgstr ""
587 "この操作は futex アドレス I<uaddr> に指定された値 I<val> がまだ格納されている"
588 "かどうかを不可分操作で検証し、 sleep 状態で この futex アドレスに対して "
589 "B<FUTEX_WAKE> が実行されるのを待つ。 I<timeout> 引き数が NULL でない場合、そ"
590 "の内容は待ち時間の最大値を表す (この停止時間はシステムクロックの粒度に切り上"
591 "げられ、 カーネルのスケジューリング遅延により少しだけ長くなる可能性がある)。 "
592 "NULL の場合、 呼び出しは無限に停止する。 引き数 I<uaddr2> と I<val3> は無視さ"
593 "れる。"
594
595 #. type: Plain text
596 #: build/C/man2/futex.2:141
597 msgid ""
598 "For B<futex>(7), this call is executed if decrementing the count gave a "
599 "negative value (indicating contention), and will sleep until another process "
600 "releases the futex and executes the B<FUTEX_WAKE> operation."
601 msgstr ""
602 "B<futex>(7)  に照らし合わせると、この呼び出しは カウントのデクリメントで負の"
603 "値 (競合を表す) になった場合に実行され、 別のプロセスがその futex を解放し "
604 "B<FUTEX_WAKE> の操作を実行するまで sleep する。"
605
606 #. type: TP
607 #: build/C/man2/futex.2:141 build/C/man2/futex.2:229
608 #, no-wrap
609 msgid "B<FUTEX_WAKE>"
610 msgstr "B<FUTEX_WAKE>"
611
612 #. type: Plain text
613 #: build/C/man2/futex.2:152
614 msgid ""
615 "This operation wakes at most I<val> processes waiting on this futex address "
616 "(i.e., inside B<FUTEX_WAIT>).  The arguments I<timeout>, I<uaddr2> and "
617 "I<val3> are ignored."
618 msgstr ""
619 "この操作では指定した futex アドレスに対して待ち状態の (すなわち "
620 "B<FUTEX_WAIT> 中の) 最大 I<val> 個のプロセスを wake させる。 引き数 "
621 "I<timeout>, I<uaddr2>, I<val3> は無視される。"
622
623 #. type: Plain text
624 #: build/C/man2/futex.2:158
625 msgid ""
626 "For B<futex>(7), this is executed if incrementing the count showed that "
627 "there were waiters, once the futex value has been set to 1 (indicating that "
628 "it is available)."
629 msgstr ""
630 "B<futex>(4) に照らし合わせると、 この操作は カウントのインクリメントで待ちプ"
631 "ロセスがあると判明し、 futex 値が 1 に設定された (利用可能であることを表す) "
632 "場合に実行される。"
633
634 #. type: TP
635 #: build/C/man2/futex.2:158
636 #, no-wrap
637 msgid "B<FUTEX_FD> (present up to and including Linux 2.6.25)"
638 msgstr "B<FUTEX_FD> (Linux 2.6.25 以前)"
639
640 #.  , suitable for .BR poll (2).
641 #. type: Plain text
642 #: build/C/man2/futex.2:174
643 msgid ""
644 "To support asynchronous wakeups, this operation associates a file descriptor "
645 "with a futex.  If another process executes a B<FUTEX_WAKE>, the process will "
646 "receive the signal number that was passed in I<val>.  The calling process "
647 "must close the returned file descriptor after use.  The arguments "
648 "I<timeout>, I<uaddr2> and I<val3> are ignored."
649 msgstr ""
650 "非同期の wake に対応するため、この操作はファイルディスクリプタを futex に 関"
651 "連づける。 別のプロセスが B<FUTEX_WAKE> を実行すると、プロセスは I<val> で渡"
652 "されたシグナル番号のシグナルを受信する。 呼び出しプロセスは使用後、返された"
653 "ファイルディスクリプタを クローズしなければならない。 引き数 I<timeout>, "
654 "I<uaddr2>, I<val3> は無視される。"
655
656 #. type: Plain text
657 #: build/C/man2/futex.2:179
658 msgid ""
659 "To prevent race conditions, the caller should test if the futex has been "
660 "upped after B<FUTEX_FD> returns."
661 msgstr ""
662 "競合状態を防止するため、呼び出しプロセスは B<FUTEX_FD> が返ったあと futex が "
663 "up されたかどうかを確認しなければならない。"
664
665 #. type: Plain text
666 #: build/C/man2/futex.2:183
667 msgid ""
668 "Because it was inherently racy, B<FUTEX_FD> has been removed from Linux "
669 "2.6.26 onward."
670 msgstr ""
671 "B<FUTEX_FD> はもともと競合が起きやすかったため、 Linux 2.6.26 以降で削除され"
672 "ている。"
673
674 #. type: TP
675 #: build/C/man2/futex.2:183
676 #, no-wrap
677 msgid "B<FUTEX_REQUEUE> (since Linux 2.5.70)"
678 msgstr "B<FUTEX_REQUEUE> (Linux 2.5.70 以降)"
679
680 #. type: Plain text
681 #: build/C/man2/futex.2:198
682 msgid ""
683 "This operation was introduced in order to avoid a \"thundering herd\" effect "
684 "when B<FUTEX_WAKE> is used and all processes woken up need to acquire "
685 "another futex.  This call wakes up I<val> processes, and requeues all other "
686 "waiters on the futex at address I<uaddr2>.  The arguments I<timeout> and "
687 "I<val3> are ignored."
688 msgstr ""
689 "この操作は、 B<FUTEX_WAKE> が使われていて、かつ wake されている全てのプロセス"
690 "が 他の futex を取得する必要がある場合に、 「獣の群れの暴走 (thundering "
691 "herd)」効果を避けるために導入された。 この呼び出しは I<val> 個のプロセスを "
692 "wake し、アドレス I<uaddr2> で futex を待っている他の全てのプロセスを再度"
693 "キューにいれる。 引き数 I<timeout> と I<val3> は無視される。"
694
695 #. type: TP
696 #: build/C/man2/futex.2:198
697 #, no-wrap
698 msgid "B<FUTEX_CMP_REQUEUE> (since Linux 2.6.7)"
699 msgstr "B<FUTEX_CMP_REQUEUE> (Linux 2.6.7 以降)"
700
701 #. type: Plain text
702 #: build/C/man2/futex.2:216
703 msgid ""
704 "There was a race in the intended use of B<FUTEX_REQUEUE>, so "
705 "B<FUTEX_CMP_REQUEUE> was introduced.  This is similar to B<FUTEX_REQUEUE>, "
706 "but first checks whether the location I<uaddr> still contains the value "
707 "I<val3>.  If not, the operation fails with the error B<EAGAIN>.  The "
708 "argument I<timeout> is ignored."
709 msgstr ""
710 "故意に B<FUTEX_REQUEUE> を使う場合に競合が起こるため、 B<FUTEX_CMP_REQUEUE> "
711 "が導入された。これは B<FUTEX_REQUEUE> と似ているが、場所 I<uaddr> に値 "
712 "I<val3> がまだ保持されているかを最初にチェックする。 保持されていない場合、操"
713 "作はエラー B<EAGAIN> で失敗する。引き数 I<timeout> は無視される。"
714
715 #. type: Plain text
716 #: build/C/man2/futex.2:223
717 msgid ""
718 "In the event of an error, all operations return -1, and set I<errno> to "
719 "indicate the error.  The return value on success depends on the operation, "
720 "as described in the following list:"
721 msgstr ""
722 "エラーの場合、全ての操作で -1 が返り、 I<errno> がエラーの内容を示す値に設定"
723 "される。成功時の返り値は操作によって異なり、以下のリストに書かれている通りで"
724 "ある。"
725
726 #. type: Plain text
727 #: build/C/man2/futex.2:229
728 msgid ""
729 "Returns 0 if the process was woken by a B<FUTEX_WAKE> call.  See ERRORS for "
730 "the various possible error returns."
731 msgstr ""
732 "そのプロセスが B<FUTEX_WAKE> により wake された場合 0 を返す。発生する可能性"
733 "があるエラーについては「エラー」の節を参照。"
734
735 #. type: Plain text
736 #: build/C/man2/futex.2:232 build/C/man2/futex.2:238 build/C/man2/futex.2:241
737 msgid "Returns the number of processes woken up."
738 msgstr "wake したプロセスの数を返す。"
739
740 #. type: TP
741 #: build/C/man2/futex.2:232
742 #, no-wrap
743 msgid "B<FUTEX_FD>"
744 msgstr "B<FUTEX_FD>"
745
746 #. type: Plain text
747 #: build/C/man2/futex.2:235
748 msgid "Returns the new file descriptor associated with the futex."
749 msgstr "futex に関連づけられた新たなファイルディスクリプタを返す。"
750
751 #. type: TP
752 #: build/C/man2/futex.2:235
753 #, no-wrap
754 msgid "B<FUTEX_REQUEUE>"
755 msgstr "B<FUTEX_REQUEUE>"
756
757 #. type: TP
758 #: build/C/man2/futex.2:238
759 #, no-wrap
760 msgid "B<FUTEX_CMP_REQUEUE>"
761 msgstr "B<FUTEX_CMP_REQUEUE>"
762
763 #. type: TP
764 #: build/C/man2/futex.2:242 build/C/man2/perf_event_open.2:2399
765 #: build/C/man2/quotactl.2:486
766 #, no-wrap
767 msgid "B<EACCES>"
768 msgstr "B<EACCES>"
769
770 #. type: Plain text
771 #: build/C/man2/futex.2:245
772 msgid "No read access to futex memory."
773 msgstr "futex メモリに読み込みアクセス権がなかった。"
774
775 #. type: TP
776 #: build/C/man2/futex.2:245 build/C/man2/sendfile.2:116
777 #, no-wrap
778 msgid "B<EAGAIN>"
779 msgstr "B<EAGAIN>"
780
781 #. type: Plain text
782 #: build/C/man2/futex.2:256
783 msgid ""
784 "B<FUTEX_CMP_REQUEUE> detected that the value pointed to by I<uaddr> is not "
785 "equal to the expected value I<val3>.  (This probably indicates a race; use "
786 "the safe B<FUTEX_WAKE> now.)"
787 msgstr ""
788 "B<FUTEX_CMP_REQUEUE> で、I<uaddr> が指す値が期待値 I<val3> と異なる状況が検出"
789 "された。 (これは競合を示しているかもしれない。この場合は安全な B<FUTEX_WAKE> "
790 "を使うこと。)"
791
792 #. type: Plain text
793 #: build/C/man2/futex.2:261
794 msgid "Error retrieving I<timeout> information from user space."
795 msgstr "ユーザ空間から I<timeout> の情報を取得する際にエラーが発生した。"
796
797 #. type: TP
798 #: build/C/man2/futex.2:261
799 #, no-wrap
800 msgid "B<EINTR>"
801 msgstr "B<EINTR>"
802
803 #. type: Plain text
804 #: build/C/man2/futex.2:268
805 msgid ""
806 "A B<FUTEX_WAIT> operation was interrupted by a signal (see B<signal>(7))  or "
807 "a spurious wakeup."
808 msgstr ""
809 "B<FUTEX_WAIT> 操作がシグナル (B<signal>(7) 参照) もしくは偽の wakeup により中"
810 "断された。"
811
812 #. type: Plain text
813 #: build/C/man2/futex.2:271
814 msgid "Invalid argument."
815 msgstr "無効な引き数。"
816
817 #. type: TP
818 #: build/C/man2/futex.2:271
819 #, no-wrap
820 msgid "B<ENFILE>"
821 msgstr "B<ENFILE>"
822
823 #. type: Plain text
824 #: build/C/man2/futex.2:274
825 msgid "The system limit on the total number of open files has been reached."
826 msgstr "オープンされているファイルの総数がシステムの制限に達した。"
827
828 #. type: TP
829 #: build/C/man2/futex.2:274 build/C/man2/modify_ldt.2:126
830 #: build/C/man2/pciconfig_read.2:93 build/C/man2/perf_event_open.2:2481
831 #: build/C/man2/quotactl.2:447 build/C/man2/vm86.2:64
832 #, no-wrap
833 msgid "B<ENOSYS>"
834 msgstr "B<ENOSYS>"
835
836 #. type: Plain text
837 #: build/C/man2/futex.2:278
838 msgid "Invalid operation specified in I<op>."
839 msgstr "I<op> に無効な操作が指定された。"
840
841 #. type: TP
842 #: build/C/man2/futex.2:278
843 #, no-wrap
844 msgid "B<ETIMEDOUT>"
845 msgstr "B<ETIMEDOUT>"
846
847 #. type: Plain text
848 #: build/C/man2/futex.2:283
849 msgid "Timeout during the B<FUTEX_WAIT> operation."
850 msgstr "B<FUTEX_WAIT> 操作でタイムアウトが発生した。"
851
852 #. type: TP
853 #: build/C/man2/futex.2:283
854 #, no-wrap
855 msgid "B<EWOULDBLOCK>"
856 msgstr "B<EWOULDBLOCK>"
857
858 #. type: Plain text
859 #: build/C/man2/futex.2:293
860 msgid ""
861 "I<op> was B<FUTEX_WAIT> and the value pointed to by I<uaddr> was not equal "
862 "to the expected value I<val> at the time of the call."
863 msgstr ""
864 "I<op> が B<FUTEX_WAIT> で、その呼び出しにおいて I<uaddr> が指す値が期待値 "
865 "I<val> と異なっていた。"
866
867 #. type: SH
868 #: build/C/man2/futex.2:293 build/C/man2/get_robust_list.2:116
869 #: build/C/man2/getunwind.2:94 build/C/man2/kexec_load.2:138
870 #: build/C/man2/lookup_dcookie.2:73 build/C/man2/perfmonctl.2:196
871 #: build/C/man2/pivot_root.2:125 build/C/man2/process_vm_readv.2:292
872 #: build/C/man2/sendfile.2:142 build/C/man2/set_tid_address.2:94
873 #: build/C/man2/splice.2:165 build/C/man2/tee.2:114
874 #: build/C/man2/vmsplice.2:138
875 #, no-wrap
876 msgid "VERSIONS"
877 msgstr "バージョン"
878
879 #. type: Plain text
880 #: build/C/man2/futex.2:303
881 msgid ""
882 "Initial futex support was merged in Linux 2.5.7 but with different semantics "
883 "from what was described above.  A 4-argument system call with the semantics "
884 "described in this page was introduced in Linux 2.5.40.  In Linux 2.5.70, one "
885 "argument was added.  In Linux 2.6.7, a sixth argument was added\\(emmessy, "
886 "especially on the s390 architecture."
887 msgstr ""
888 "最初の futex 対応は Linux 2.5.7 で組み込まれたが、 上記のセマンティクスとは異"
889 "なる。 4 つの引き数のここに書かれているセマンティクスを持つ システムコール"
890 "は、Linux 2.5.40 で導入された。 Linux 2.5.70 では 1 つの引き数が追加された。 "
891 "Linux 2.6.7 では 6 番目の引き数が追加された。 これは汚く、s390 アーキテクチャ"
892 "上の特別のものである。"
893
894 #. type: Plain text
895 #: build/C/man2/futex.2:305 build/C/man2/kexec_load.2:144
896 #: build/C/man2/set_tid_address.2:99 build/C/man2/splice.2:172
897 #: build/C/man2/tee.2:121 build/C/man2/vmsplice.2:145
898 msgid "This system call is Linux-specific."
899 msgstr "このシステムコールは Linux 固有である。"
900
901 #.  .SH "AUTHORS"
902 #.  .PP
903 #.  Futexes were designed and worked on by
904 #.  Hubertus Franke (IBM Thomas J. Watson Research Center),
905 #.  Matthew Kirkwood, Ingo Molnar (Red Hat)
906 #.  and Rusty Russell (IBM Linux Technology Center).
907 #.  This page written by bert hubert.
908 #. type: Plain text
909 #: build/C/man2/futex.2:319
910 msgid ""
911 "To reiterate, bare futexes are not intended as an easy-to-use abstraction "
912 "for end-users.  (There is no wrapper function for this system call in "
913 "glibc.)  Implementors are expected to be assembly literate and to have read "
914 "the sources of the futex user-space library referenced below."
915 msgstr ""
916 "繰り返すが、裸の futex はエンドユーザが容易に使うことのできる概念として 意図"
917 "されたものではない (glibc にはこのシステムコールに対するラッパー関数はな"
918 "い)。 実装者は、アセンブリ言語に慣れており、以下に挙げる futex ユーザ空間ライ"
919 "ブラリの ソースを読み終えていることが要求される。"
920
921 #. type: Plain text
922 #: build/C/man2/futex.2:322
923 msgid "B<restart_syscall>(2), B<futex>(7)"
924 msgstr "B<restart_syscall>(2), B<futex>(7)"
925
926 #. type: Plain text
927 #: build/C/man2/futex.2:325
928 msgid ""
929 "I<Fuss, Futexes and Furwocks: Fast Userlevel Locking in Linux> (proceedings "
930 "of the Ottawa Linux Symposium 2002), online at"
931 msgstr ""
932 "I<Fuss, Futexes and Furwocks: Fast Userlevel Locking in Linux> (proceedings "
933 "of the Ottawa Linux Symposium 2002), online at"
934
935 #. type: Plain text
936 #: build/C/man2/futex.2:328
937 msgid ""
938 "E<.UR http://kernel.org\\:/doc\\:/ols\\:/2002\\:/ols2002-pages-479-495.pdf> "
939 "E<.UE>"
940 msgstr ""
941 "E<.UR http://kernel.org\\:/doc\\:/ols\\:/2002\\:/ols2002-pages-479-495.pdf> "
942 "E<.UE>"
943
944 #. type: Plain text
945 #: build/C/man2/futex.2:330
946 msgid "Futex example library, futex-*.tar.bz2 at"
947 msgstr "futex の使用例ライブラリ, futex-*.tar.bz2"
948
949 #. type: Plain text
950 #: build/C/man2/futex.2:333
951 msgid ""
952 "E<.UR ftp://ftp.kernel.org\\:/pub\\:/linux\\:/kernel\\:/people\\:/rusty/> E<."
953 "UE>"
954 msgstr ""
955 "E<.UR ftp://ftp.kernel.org\\:/pub\\:/linux\\:/kernel\\:/people\\:/rusty/> E<."
956 "UE>"
957
958 #. type: TH
959 #: build/C/man2/get_robust_list.2:29
960 #, no-wrap
961 msgid "GET_ROBUST_LIST"
962 msgstr "GET_ROBUST_LIST"
963
964 #. type: TH
965 #: build/C/man2/get_robust_list.2:29
966 #, no-wrap
967 msgid "2014-05-10"
968 msgstr "2014-05-10"
969
970 #. type: TH
971 #: build/C/man2/get_robust_list.2:29
972 #, no-wrap
973 msgid "Linux System Calls"
974 msgstr "Linux System Calls"
975
976 #. type: Plain text
977 #: build/C/man2/get_robust_list.2:32
978 msgid "get_robust_list, set_robust_list - get/set list of robust futexes"
979 msgstr ""
980
981 #. type: Plain text
982 #: build/C/man2/get_robust_list.2:37
983 #, no-wrap
984 msgid ""
985 "B<#include E<lt>linux/futex.hE<gt>>\n"
986 "B<#include E<lt>sys/types.hE<gt>>\n"
987 "B<#include E<lt>syscall.hE<gt>>\n"
988 msgstr ""
989 "B<#include E<lt>linux/futex.hE<gt>>\n"
990 "B<#include E<lt>sys/types.hE<gt>>\n"
991 "B<#include E<lt>syscall.hE<gt>>\n"
992
993 #. type: Plain text
994 #: build/C/man2/get_robust_list.2:41
995 #, no-wrap
996 msgid ""
997 "B<long get_robust_list(int >I<pid>B<, struct robust_list_head **>I<head_ptr>B<,>\n"
998 "B<                     size_t *>I<len_ptr>B<);>\n"
999 "B<long set_robust_list(struct robust_list_head *>I<head>B<, size_t >I<len>B<);>\n"
1000 msgstr ""
1001
1002 #. type: Plain text
1003 #: build/C/man2/get_robust_list.2:45
1004 msgid "I<Note>: There are no glibc wrappers for these system calls; see NOTES."
1005 msgstr ""
1006 "I<注意>: これらのシステムコールには glibc ラッパー関数は存在しない。 「注意」"
1007 "の節を参照。"
1008
1009 #. type: Plain text
1010 #: build/C/man2/get_robust_list.2:50
1011 msgid ""
1012 "The robust futex implementation needs to maintain per-thread lists of robust "
1013 "futexes which are unlocked when the thread exits.  These lists are managed "
1014 "in user space; the kernel is notified about only the location of the head of "
1015 "the list."
1016 msgstr ""
1017
1018 #. type: Plain text
1019 #: build/C/man2/get_robust_list.2:66
1020 msgid ""
1021 "The B<get_robust_list>()  system call returns the head of the robust futex "
1022 "list of the thread whose thread ID is specified in I<pid>.  If I<pid> is 0, "
1023 "the head of the list for the calling thread is returned.  The list head is "
1024 "stored in the location pointed to by I<head_ptr>.  The size of the object "
1025 "pointed to by I<**head_ptr> is stored in I<len_ptr>."
1026 msgstr ""
1027
1028 #. type: Plain text
1029 #: build/C/man2/get_robust_list.2:78
1030 msgid ""
1031 "The B<set_robust_list>()  system call requests the kernel to record the head "
1032 "of the list of robust futexes owned by the calling thread.  The I<head> "
1033 "argument is the list head to record.  The I<len> argument should be "
1034 "I<sizeof(*head)>."
1035 msgstr ""
1036
1037 #. type: Plain text
1038 #: build/C/man2/get_robust_list.2:85
1039 msgid ""
1040 "The B<set_robust_list>()  and B<get_robust_list>()  system calls return zero "
1041 "when the operation is successful, an error code otherwise."
1042 msgstr ""
1043
1044 #. type: Plain text
1045 #: build/C/man2/get_robust_list.2:89
1046 msgid ""
1047 "The B<set_robust_list>()  system call can fail with the following error:"
1048 msgstr ""
1049
1050 #. type: Plain text
1051 #: build/C/man2/get_robust_list.2:95
1052 msgid ""
1053 "I<len> does not match the size of structure B<struct robust_list_head> "
1054 "expected by kernel."
1055 msgstr ""
1056
1057 #. type: Plain text
1058 #: build/C/man2/get_robust_list.2:99
1059 msgid ""
1060 "The B<get_robust_list>()  system call can fail with the following errors:"
1061 msgstr ""
1062
1063 #. type: Plain text
1064 #: build/C/man2/get_robust_list.2:107
1065 msgid ""
1066 "The calling process does not have permission to see the robust futex list of "
1067 "the thread with the thread ID I<pid>, and does not have the "
1068 "B<CAP_SYS_PTRACE> capability."
1069 msgstr ""
1070
1071 #. type: TP
1072 #: build/C/man2/get_robust_list.2:107 build/C/man2/perf_event_open.2:2508
1073 #: build/C/man2/process_vm_readv.2:287 build/C/man2/ptrace.2:1906
1074 #: build/C/man2/quotactl.2:461 build/C/man2/quotactl.2:504
1075 #, no-wrap
1076 msgid "B<ESRCH>"
1077 msgstr "B<ESRCH>"
1078
1079 #. type: Plain text
1080 #: build/C/man2/get_robust_list.2:112
1081 msgid "No thread with the thread ID I<pid> could be found."
1082 msgstr ""
1083
1084 #. type: Plain text
1085 #: build/C/man2/get_robust_list.2:116
1086 msgid ""
1087 "The head of the robust futex list can't be stored at the location I<head>."
1088 msgstr ""
1089
1090 #. type: Plain text
1091 #: build/C/man2/get_robust_list.2:120
1092 msgid ""
1093 "These system calls were added in Linux 2.6.17.  No library support is "
1094 "provided; use B<syscall>(2)."
1095 msgstr ""
1096 "これらのシステムコールは Linux 2.6.17 で追加された。ライブラリによる\n"
1097 "サポートは提供されていない。 B<syscall>(2) を使うこと。"
1098
1099 #. type: Plain text
1100 #: build/C/man2/get_robust_list.2:125
1101 msgid ""
1102 "These system calls are not needed by normal applications.  No support for "
1103 "them is provided in glibc.  In the unlikely event that you want to call them "
1104 "directly, use B<syscall>(2)."
1105 msgstr ""
1106 "通常のアプリケーションでは、これらのシステムコールは必要ではない。 glibc によ"
1107 "るサポートは提供されていない。おそらくないと思うが、このシステムコールを直接"
1108 "呼び出したい場合は B<syscall>(2) を使うこと。"
1109
1110 #. type: Plain text
1111 #: build/C/man2/get_robust_list.2:129
1112 msgid ""
1113 "A thread can have only one robust futex list; therefore applications that "
1114 "wish to use this functionality should use the robust mutexes provided by "
1115 "glibc."
1116 msgstr ""
1117
1118 #.  .BR pthread_mutexattr_setrobust_np (3)
1119 #. type: Plain text
1120 #: build/C/man2/get_robust_list.2:132
1121 msgid "B<futex>(2)"
1122 msgstr "B<futex>(2)"
1123
1124 #.  http://lwn.net/Articles/172149/
1125 #. type: Plain text
1126 #: build/C/man2/get_robust_list.2:138
1127 msgid ""
1128 "I<Documentation/robust-futexes.txt> and I<Documentation/robust-futex-ABI."
1129 "txt> in the Linux kernel source tree"
1130 msgstr ""
1131
1132 #. type: TH
1133 #: build/C/man2/getunwind.2:27
1134 #, no-wrap
1135 msgid "GETUNWIND"
1136 msgstr ""
1137
1138 #. type: TH
1139 #: build/C/man2/getunwind.2:27 build/C/man2/perfmonctl.2:27
1140 #, no-wrap
1141 msgid "2013-02-13"
1142 msgstr "2013-02-13"
1143
1144 #. type: Plain text
1145 #: build/C/man2/getunwind.2:30
1146 msgid "getunwind - copy the unwind data to caller's buffer"
1147 msgstr ""
1148
1149 #. type: Plain text
1150 #: build/C/man2/getunwind.2:34
1151 #, no-wrap
1152 msgid ""
1153 "B<#include E<lt>syscall.hE<gt>>\n"
1154 "B<#include E<lt>linux/unwind.hE<gt>>\n"
1155 msgstr ""
1156 "B<#include E<lt>syscall.hE<gt>>\n"
1157 "B<#include E<lt>linux/unwind.hE<gt>>\n"
1158
1159 #. type: Plain text
1160 #: build/C/man2/getunwind.2:36
1161 #, no-wrap
1162 msgid "B<long getunwind(void >I<*buf>B<, size_t >I<buf_size>B<);>\n"
1163 msgstr ""
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 "    u64 start;      (64-bit address of start of function)\n"
1202 "    u64 end;        (64-bit address of end of function)\n"
1203 "    u64 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: TH
1269 #: build/C/man2/kexec_load.2:26 build/C/man2/modify_ldt.2:24
1270 #: build/C/man2/pivot_root.2:10
1271 #, no-wrap
1272 msgid "2012-07-13"
1273 msgstr "2012-07-13"
1274
1275 #. type: Plain text
1276 #: build/C/man2/kexec_load.2:29
1277 msgid "kexec_load - load a new kernel for later execution"
1278 msgstr "kexec_load - 新しいカーネルを後で実行するためにロードする"
1279
1280 #. type: Plain text
1281 #: build/C/man2/kexec_load.2:31
1282 msgid "B<#include E<lt>linux/kexec.hE<gt>>"
1283 msgstr "B<#include E<lt>linux/kexec.hE<gt>>"
1284
1285 #. type: Plain text
1286 #: build/C/man2/kexec_load.2:33
1287 msgid ""
1288 "B<long kexec_load(unsigned long >I<entry>B<, unsigned long >I<nr_segments>B<,"
1289 ">"
1290 msgstr ""
1291 "B<long kexec_load(unsigned long >I<entry>B<, unsigned long >I<nr_segments>B<,"
1292 ">"
1293
1294 #. type: Plain text
1295 #: build/C/man2/kexec_load.2:36
1296 msgid "B< struct kexec_segment *>I<segments>B<, unsigned long >I<flags>B<);>"
1297 msgstr "B< struct kexec_segment *>I<segments>B<, unsigned long >I<flags>B<);>"
1298
1299 #. type: Plain text
1300 #: build/C/man2/kexec_load.2:44
1301 msgid ""
1302 "The B<kexec_load>()  system call loads a new kernel that can be executed "
1303 "later by B<reboot>(2)."
1304 msgstr ""
1305 "B<kexec_load>() システムコールは、新しいカーネルをロードし、\n"
1306 "その後の B<reboot>(2) で実行できるようにする。"
1307
1308 #. type: Plain text
1309 #: build/C/man2/kexec_load.2:50
1310 msgid ""
1311 "The I<flags> argument is a mask whose high-order bits control the operation "
1312 "of the call.  The following values can be specified in I<flags>:"
1313 msgstr ""
1314 "I<flags> 引き数はマスクビットで、\n"
1315 "その上位ビットでシステムコールの呼び出しの動作を制御する。\n"
1316 "I<flags> には以下の値を指定できる。"
1317
1318 #. type: TP
1319 #: build/C/man2/kexec_load.2:50
1320 #, no-wrap
1321 msgid "B<KEXEC_ON_CRASH> (since Linux 2.6.13)"
1322 msgstr "B<KEXEC_ON_CRASH> (Linux 2.6.13 以降)"
1323
1324 #.  FIXME figure out how this is really used
1325 #. type: Plain text
1326 #: build/C/man2/kexec_load.2:54
1327 msgid "Execute the new kernel automatically on a system crash."
1328 msgstr "システムのクラッシュ時に、新しいカーネルを自動的に実行する。"
1329
1330 #. type: TP
1331 #: build/C/man2/kexec_load.2:54
1332 #, no-wrap
1333 msgid "B<KEXEC_PRESERVE_CONTEXT> (since Linux 2.6.27)"
1334 msgstr "B<KEXEC_PRESERVE_CONTEXT> (Linux 2.6.27 以降)"
1335
1336 #. type: Plain text
1337 #: build/C/man2/kexec_load.2:64
1338 msgid ""
1339 "Preserve the system hardware and software states before executing the new "
1340 "kernel.  This could be used for system suspend.  This flag is available only "
1341 "if the kernel was configured with B<CONFIG_KEXEC_JUMP>, and is effective "
1342 "only if I<nr_segments> is greater than 0."
1343 msgstr ""
1344 "新しいカーネルを実行する前に、\n"
1345 "システムのハードウェアとソフトウェアの状態を保存する。\n"
1346 "システムの中断時 (suspend) などで使用できる。\n"
1347 "このフラグは、カーネルの設定で B<CONFIG_KEXEC_JUMP> が有効の場合のみ\n"
1348 "利用可能であり、 I<nr_segments> が 0 より大きい場合のみ効果がある。"
1349
1350 #. type: Plain text
1351 #: build/C/man2/kexec_load.2:84
1352 msgid ""
1353 "The low-order bits of I<flags> contain the architecture of the to-be-"
1354 "executed kernel.  Specify (OR) the constant B<KEXEC_ARCH_DEFAULT> to use the "
1355 "current architecture, or one of the following architecture constants "
1356 "B<KEXEC_ARCH_386>, B<KEXEC_ARCH_X86_64>, B<KEXEC_ARCH_PPC>, "
1357 "B<KEXEC_ARCH_PPC64>, B<KEXEC_ARCH_IA_64>, B<KEXEC_ARCH_ARM>, "
1358 "B<KEXEC_ARCH_S390>, B<KEXEC_ARCH_SH>, B<KEXEC_ARCH_MIPS>, and "
1359 "B<KEXEC_ARCH_MIPS_LE>.  The architecture must be executable on the CPU of "
1360 "the system."
1361 msgstr ""
1362 "I<flags> の下位ビットには、実行されるカーネルのアーキテクチャが入る。\n"
1363 "現在のアーキテクチャを使うことを意味する定数 B<KEXEC_ARCH_DEFAULT> か、\n"
1364 "アーキテクチャ定数 B<KEXEC_ARCH_386>, B<KEXEC_ARCH_X86_64>,\n"
1365 "B<KEXEC_ARCH_PPC>, B<KEXEC_ARCH_PPC64>, B<KEXEC_ARCH_IA_64>,\n"
1366 "B<KEXEC_ARCH_ARM>, B<KEXEC_ARCH_S390>, B<KEXEC_ARCH_SH>,\n"
1367 "B<KEXEC_ARCH_MIPS>, B<KEXEC_ARCH_MIPS_LE> の\n"
1368 "いずれか一つを (OR で) 指定する。指定するアーキテクチャは、\n"
1369 "システムの CPU で実行可能なものでなければならない。"
1370
1371 #. type: Plain text
1372 #: build/C/man2/kexec_load.2:98
1373 msgid ""
1374 "The I<entry> argument is the physical entry address in the kernel image.  "
1375 "The I<nr_segments> argument is the number of segments pointed to by the "
1376 "I<segments> pointer.  The I<segments> argument is an array of "
1377 "I<kexec_segment> structures which define the kernel layout:"
1378 msgstr ""
1379 "I<entry> 引き数は、カーネルイメージの物理エントリーアドレスである。\n"
1380 "I<nr_segments> 引き数は、 I<segments> ポインタが指すセグメントの\n"
1381 "数である。 I<segments> 引き数は I<kexec_segment> 構造体の配列で、\n"
1382 "この構造体によりカーネルの配置が定義される。"
1383
1384 #. type: Plain text
1385 #: build/C/man2/kexec_load.2:107
1386 #, no-wrap
1387 msgid ""
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 msgstr ""
1395 "struct kexec_segment {\n"
1396 "    void   *buf;        /* Buffer in user space */\n"
1397 "    size_t  bufsz;      /* Buffer length in user space */\n"
1398 "    void   *mem;        /* Physical address of kernel */\n"
1399 "    size_t  memsz;      /* Physical address length */\n"
1400 "};\n"
1401
1402 #.  FIXME elaborate on the following:
1403 #. type: Plain text
1404 #: build/C/man2/kexec_load.2:114
1405 msgid ""
1406 "The kernel image defined by I<segments> is copied from the calling process "
1407 "into previously reserved memory."
1408 msgstr ""
1409 "I<segments> で定義されたカーネルイメージは、\n"
1410 "呼び出したプロセスから予約済みメモリにコピーされる。"
1411
1412 #. type: Plain text
1413 #: build/C/man2/kexec_load.2:121
1414 msgid ""
1415 "On success, B<kexec_load>()  returns 0.  On error, -1 is returned and "
1416 "I<errno> is set to indicate the error."
1417 msgstr ""
1418 "成功すると、 B<kexec_load> は 0 を返す。\n"
1419 "エラーの場合、 -1 が返り、 I<errno> にエラーを示す値が設定される。"
1420
1421 #. type: TP
1422 #: build/C/man2/kexec_load.2:122 build/C/man2/pivot_root.2:110
1423 #: build/C/man2/ptrace.2:1869 build/C/man2/quotactl.2:495
1424 #, no-wrap
1425 msgid "B<EBUSY>"
1426 msgstr "B<EBUSY>"
1427
1428 #. type: Plain text
1429 #: build/C/man2/kexec_load.2:126
1430 msgid ""
1431 "Another crash kernel is already being loaded or a crash kernel is already in "
1432 "use."
1433 msgstr ""
1434 "別のクラッシュカーネルがすでにロードされているか、\n"
1435 "クラッシュカーネルがすでに使用されている。"
1436
1437 #.  KEXEC_SEGMENT_MAX == 16
1438 #. type: Plain text
1439 #: build/C/man2/kexec_load.2:133
1440 msgid "I<flags> is invalid; or I<nr_segments> is too large"
1441 msgstr "I<flags> が無効である。 I<nr_segments> が大きすぎる。"
1442
1443 #. type: Plain text
1444 #: build/C/man2/kexec_load.2:138
1445 msgid "The caller does not have the B<CAP_SYS_BOOT> capability."
1446 msgstr "呼び出し側が B<CAP_SYS_BOOT> ケーパビリティを持っていない。"
1447
1448 #. type: Plain text
1449 #: build/C/man2/kexec_load.2:142
1450 msgid "The B<kexec_load>()  system call first appeared in Linux 2.6.13."
1451 msgstr "B<kexec_load>() システムコールは Linux 2.6.13 で初めて登場した。"
1452
1453 #. type: Plain text
1454 #: build/C/man2/kexec_load.2:149
1455 msgid ""
1456 "Currently, there is no glibc support for B<kexec_load>().  Call it using "
1457 "B<syscall>(2)."
1458 msgstr ""
1459 "現在のところ、 B<kexec_load>() は glibc ではサポートされていない。\n"
1460 "B<syscall>(2) を使って呼び出すこと。"
1461
1462 #.  FIXME Andi submitted a patch for this.
1463 #.  Check if it got accepted later.
1464 #. type: Plain text
1465 #: build/C/man2/kexec_load.2:156
1466 msgid ""
1467 "The required constants are in the Linux kernel source file I<linux/kexec.h>, "
1468 "which is not currently exported to glibc.  Therefore, these constants must "
1469 "be defined manually."
1470 msgstr ""
1471 "必要な定数は Linux カーネルのソースファイル I<linux/kexec.h> で定義されてい"
1472 "る\n"
1473 "が、現在のところ glibc には公開されていない。\n"
1474 "そのため、これらの定数は手動で定義しなければならない。"
1475
1476 #. type: Plain text
1477 #: build/C/man2/kexec_load.2:159
1478 msgid ""
1479 "This system call is available only if the kernel was configured with "
1480 "B<CONFIG_KEXEC>."
1481 msgstr ""
1482 "このシステムコールは、カーネルの設定で B<CONFIG_KEXEC> が有効になって\n"
1483 "いる場合にのみ利用できる。"
1484
1485 #. type: Plain text
1486 #: build/C/man2/kexec_load.2:162
1487 msgid "B<reboot>(2), B<syscall>(2)"
1488 msgstr "B<reboot>(2), B<syscall>(2)"
1489
1490 #. type: TH
1491 #: build/C/man2/lookup_dcookie.2:27
1492 #, no-wrap
1493 msgid "LOOKUP_DCOOKIE"
1494 msgstr "LOOKUP_DCOOKIE"
1495
1496 #. type: TH
1497 #: build/C/man2/lookup_dcookie.2:27
1498 #, no-wrap
1499 msgid "2004-06-17"
1500 msgstr "2004-06-17"
1501
1502 #. type: Plain text
1503 #: build/C/man2/lookup_dcookie.2:30
1504 msgid "lookup_dcookie - return a directory entry's path"
1505 msgstr "lookup_dcookie - ディレクトリ・エントリのパス名を返す"
1506
1507 #. type: Plain text
1508 #: build/C/man2/lookup_dcookie.2:32
1509 msgid ""
1510 "B<int lookup_dcookie(u64 >I<cookie>B<, char *>I<buffer>B<, size_t >I<len>B<);"
1511 ">"
1512 msgstr ""
1513 "B<int lookup_dcookie(u64 >I<cookie>B<, char *>I<buffer>B<, size_t >I<len>B<);"
1514 ">"
1515
1516 #. type: Plain text
1517 #: build/C/man2/lookup_dcookie.2:38
1518 msgid ""
1519 "Look up the full path of the directory entry specified by the value "
1520 "I<cookie>.  The cookie is an opaque identifier uniquely identifying a "
1521 "particular directory entry.  The buffer given is filled in with the full "
1522 "path of the directory entry."
1523 msgstr ""
1524 "I<cookie> 値で指定されたディレクトリ・エントリのフルパス名を検索する。 "
1525 "cookie は、個々のディレクトリ・エントリを区別する内部識別子 (opaque "
1526 "identifier) である。引き数で指定されたバッファに、ディレクトリ・エントリの フ"
1527 "ルパス名が格納される。"
1528
1529 #. type: Plain text
1530 #: build/C/man2/lookup_dcookie.2:43
1531 msgid ""
1532 "For B<lookup_dcookie>()  to return successfully, the kernel must still hold "
1533 "a cookie reference to the directory entry."
1534 msgstr ""
1535 "B<lookup_dcookie>()  が正常に値を返すためには、カーネルがディレクトリ・エント"
1536 "リへの cookie 参照を 保持していなければならない。"
1537
1538 #. type: Plain text
1539 #: build/C/man2/lookup_dcookie.2:50
1540 msgid ""
1541 "On success, B<lookup_dcookie>()  returns the length of the path string "
1542 "copied into the buffer.  On error, -1 is returned, and I<errno> is set "
1543 "appropriately."
1544 msgstr ""
1545 "成功した場合、 B<lookup_dcookie>()  はバッファにコピーしたパス文字列の長さを"
1546 "返す。 エラーの場合は -1 を返し、 I<errno> に適切な値を設定する。"
1547
1548 #. type: Plain text
1549 #: build/C/man2/lookup_dcookie.2:54
1550 msgid "The buffer was not valid."
1551 msgstr "バッファが有効でなかった。"
1552
1553 #. type: Plain text
1554 #: build/C/man2/lookup_dcookie.2:58
1555 msgid ""
1556 "The kernel has no registered cookie/directory entry mappings at the time of "
1557 "lookup, or the cookie does not refer to a valid directory entry."
1558 msgstr ""
1559 "検索が行われた時、cookie とディレクトリ・エントリのマッピングがカーネルに 登"
1560 "録されていなかったか、または cookie が有効なディレクトリ・エントリを 参照して"
1561 "いない。"
1562
1563 #. type: TP
1564 #: build/C/man2/lookup_dcookie.2:58
1565 #, no-wrap
1566 msgid "B<ENAMETOOLONG>"
1567 msgstr "B<ENAMETOOLONG>"
1568
1569 #. type: Plain text
1570 #: build/C/man2/lookup_dcookie.2:61
1571 msgid "The name could not fit in the buffer."
1572 msgstr "名前がバッファに入り切らなかった。"
1573
1574 #. type: TP
1575 #: build/C/man2/lookup_dcookie.2:61 build/C/man2/process_vm_readv.2:278
1576 #: build/C/man2/sendfile.2:138 build/C/man2/splice.2:155
1577 #: build/C/man2/tee.2:111 build/C/man2/vmsplice.2:135
1578 #, no-wrap
1579 msgid "B<ENOMEM>"
1580 msgstr "B<ENOMEM>"
1581
1582 #. type: Plain text
1583 #: build/C/man2/lookup_dcookie.2:65
1584 msgid ""
1585 "The kernel could not allocate memory for the temporary buffer holding the "
1586 "path."
1587 msgstr ""
1588 "カーネルが、パス名を保持する一時バッファ用のメモリを割り当てることが できな"
1589 "かった。"
1590
1591 #. type: Plain text
1592 #: build/C/man2/lookup_dcookie.2:70
1593 msgid ""
1594 "The process does not have the capability B<CAP_SYS_ADMIN> required to look "
1595 "up cookie values."
1596 msgstr ""
1597 "プロセスが cookie 値を検索するのに必要なケーパビリティ B<CAP_SYS_ADMIN> を"
1598 "持っていない。"
1599
1600 #. type: TP
1601 #: build/C/man2/lookup_dcookie.2:70 build/C/man2/quotactl.2:474
1602 #, no-wrap
1603 msgid "B<ERANGE>"
1604 msgstr "B<ERANGE>"
1605
1606 #. type: Plain text
1607 #: build/C/man2/lookup_dcookie.2:73
1608 msgid ""
1609 "The buffer was not large enough to hold the path of the directory entry."
1610 msgstr ""
1611 "バッファが、ディレクトリ・エントリのパス名を収容するのに 十分な大きさではな"
1612 "かった。"
1613
1614 #. type: Plain text
1615 #: build/C/man2/lookup_dcookie.2:78
1616 msgid ""
1617 "Available since Linux 2.5.43.  The B<ENAMETOOLONG> error return was added in "
1618 "2.5.70."
1619 msgstr ""
1620 "Linux 2.5.43 以降で利用できる。 エラー B<ENAMETOOLONG> を返す仕様は 2.5.70 で"
1621 "追加された。"
1622
1623 #. type: Plain text
1624 #: build/C/man2/lookup_dcookie.2:81
1625 msgid "B<lookup_dcookie>()  is Linux-specific."
1626 msgstr "B<lookup_dcookie>()  は Linux 独自の関数である。"
1627
1628 #. type: Plain text
1629 #: build/C/man2/lookup_dcookie.2:85
1630 msgid ""
1631 "B<lookup_dcookie>()  is a special-purpose system call, currently used only "
1632 "by the oprofile profiler.  It relies on a kernel driver to register cookies "
1633 "for directory entries."
1634 msgstr ""
1635 "B<lookup_dcookie>()  は特殊な用途に使われるシステムコールで、現在のところ "
1636 "oprofile profiler で 使われているだけである。"
1637
1638 #. type: Plain text
1639 #: build/C/man2/lookup_dcookie.2:88
1640 msgid ""
1641 "The path returned may be suffixed by the string \" (deleted)\" if the "
1642 "directory entry has been removed."
1643 msgstr ""
1644 "指定されたディレクトリ・エントリが削除されていた場合、返されるパス名の最後に "
1645 "\" (deleted)\" という文字列が付加されることがある。"
1646
1647 #. type: TH
1648 #: build/C/man2/modify_ldt.2:24
1649 #, no-wrap
1650 msgid "MODIFY_LDT"
1651 msgstr "MODIFY_LDT"
1652
1653 #. type: Plain text
1654 #: build/C/man2/modify_ldt.2:27
1655 msgid "modify_ldt - get or set ldt"
1656 msgstr "modify_ldt - ldt を設定または取得する"
1657
1658 #. type: Plain text
1659 #: build/C/man2/modify_ldt.2:30
1660 #, no-wrap
1661 msgid "B<#include E<lt>sys/types.hE<gt>>\n"
1662 msgstr "B<#include E<lt>sys/types.hE<gt>>\n"
1663
1664 #. type: Plain text
1665 #: build/C/man2/modify_ldt.2:32
1666 #, no-wrap
1667 msgid "B<int modify_ldt(int >I<func>B<, void *>I<ptr>B<, unsigned long >I<bytecount>B<);>\n"
1668 msgstr "B<int modify_ldt(int >I<func>B<, void *>I<ptr>B<, unsigned long >I<bytecount>B<);>\n"
1669
1670 #. type: Plain text
1671 #: build/C/man2/modify_ldt.2:41
1672 msgid ""
1673 "B<modify_ldt>()  reads or writes the local descriptor table (ldt) for a "
1674 "process.  The ldt is a per-process memory management table used by the i386 "
1675 "processor.  For more information on this table, see an Intel 386 processor "
1676 "handbook."
1677 msgstr ""
1678 "B<modify_ldt>()  はプロセスのローカル・ディスクリプタ・テーブル (local "
1679 "descriptor table; ldt)  を読み書きする。 ldt は i386 プロセッサで使用されるプ"
1680 "ロセスごとのメモリ管理テーブルである。 このテーブルに関してのより詳しい情報"
1681 "は Intel 386 processor handbook を 参照すること。"
1682
1683 #. type: Plain text
1684 #: build/C/man2/modify_ldt.2:51
1685 msgid ""
1686 "When I<func> is 0, B<modify_ldt>()  reads the ldt into the memory pointed to "
1687 "by I<ptr>.  The number of bytes read is the smaller of I<bytecount> and the "
1688 "actual size of the ldt."
1689 msgstr ""
1690 "I<func> が 0 ならば、 B<modify_ldt>()  は ldt を I<ptr> が指しているメモリに"
1691 "読み込む。 読み込むバイト数は実際の ldt のサイズか I<bytecount> より小さい方"
1692 "である。"
1693
1694 #.  FIXME ? say something about func == 2 and func == 0x11?
1695 #.  In Linux 2.4, func == 2 returned "the default ldt"
1696 #.  In Linux 2.6, func == 2 is a nop, returning a zeroed out structure.
1697 #.  Linux 2.4 and 2.6 implement an operation for func == 0x11
1698 #. type: Plain text
1699 #: build/C/man2/modify_ldt.2:69
1700 msgid ""
1701 "When I<func> is 1, B<modify_ldt>()  modifies one ldt entry.  I<ptr> points "
1702 "to a I<user_desc> structure and I<bytecount> must equal the size of this "
1703 "structure."
1704 msgstr ""
1705 "I<func> が 1 ならば、 B<modify_ldt>()  は ldt エントリの一つを変更する。 "
1706 "I<ptr> は I<user_desc> 構造体を指し、 I<bytecount> はこの構造体の大きさに等し"
1707 "くなければならない。"
1708
1709 #. type: Plain text
1710 #: build/C/man2/modify_ldt.2:73
1711 msgid "The I<user_desc> structure is defined in I<E<lt>asm/ldt.hE<gt>> as:"
1712 msgstr ""
1713 "I<user_desc> 構造体は I<E<lt>asm/ldt.hE<gt>> で以下のように定義されている:"
1714
1715 #. type: Plain text
1716 #: build/C/man2/modify_ldt.2:87
1717 #, no-wrap
1718 msgid ""
1719 "struct user_desc {\n"
1720 "    unsigned int  entry_number;\n"
1721 "    unsigned long base_addr;\n"
1722 "    unsigned int  limit;\n"
1723 "    unsigned int  seg_32bit:1;\n"
1724 "    unsigned int  contents:2;\n"
1725 "    unsigned int  read_exec_only:1;\n"
1726 "    unsigned int  limit_in_pages:1;\n"
1727 "    unsigned int  seg_not_present:1;\n"
1728 "    unsigned int  useable:1;\n"
1729 "};\n"
1730 msgstr ""
1731 "struct user_desc {\n"
1732 "    unsigned int  entry_number;\n"
1733 "    unsigned long base_addr;\n"
1734 "    unsigned int  limit;\n"
1735 "    unsigned int  seg_32bit:1;\n"
1736 "    unsigned int  contents:2;\n"
1737 "    unsigned int  read_exec_only:1;\n"
1738 "    unsigned int  limit_in_pages:1;\n"
1739 "    unsigned int  seg_not_present:1;\n"
1740 "    unsigned int  useable:1;\n"
1741 "};\n"
1742
1743 #.  .PP
1744 #.  The ldt is specific for the calling process. Any attempts to change
1745 #.  the ldt to include the address space of another process or the kernel
1746 #.  will result in a segmentation violation when trying to access the memory
1747 #.  outside of the process address space. The memory protection is enforced
1748 #.  at the paging layer.
1749 #. type: Plain text
1750 #: build/C/man2/modify_ldt.2:98
1751 msgid "In Linux 2.4 and earlier, this structure was named I<modify_ldt_ldt_s>."
1752 msgstr ""
1753 "Linux 2.4 以前では、この構造体は I<modify_ldt_ldt_s> という名前であった。"
1754
1755 #. type: Plain text
1756 #: build/C/man2/modify_ldt.2:108
1757 msgid ""
1758 "On success, B<modify_ldt>()  returns either the actual number of bytes read "
1759 "(for reading)  or 0 (for writing).  On failure, B<modify_ldt>()  returns -1 "
1760 "and sets I<errno> to indicate the error."
1761 msgstr ""
1762 "成功した場合は、 B<modify_ldt>()  は (読み込みの場合は) 実際に読み込んだバイ"
1763 "ト数、 または (書き込みの場合は) 0 を返す。 失敗した場合は B<modify_ldt>()  "
1764 "は -1 を返し、 I<errno> をエラーを示す値に設定する。"
1765
1766 #. type: Plain text
1767 #: build/C/man2/modify_ldt.2:113
1768 msgid "I<ptr> points outside the address space."
1769 msgstr "I<ptr> がアドレス空間の外を指している。"
1770
1771 #. type: Plain text
1772 #: build/C/man2/modify_ldt.2:126
1773 msgid ""
1774 "I<ptr> is 0, or I<func> is 1 and I<bytecount> is not equal to the size of "
1775 "the structure I<modify_ldt_ldt_s>, or I<func> is 1 and the new ldt entry has "
1776 "invalid values."
1777 msgstr ""
1778 "I<ptr> が 0 である、 または I<func> が 1 で I<bytecount> が "
1779 "I<modify_ldt_ldt_s> 構造体のサイズと等しくないか、 I<func> が 1 で新しい ldt "
1780 "エントリが無効な値である。"
1781
1782 #. type: Plain text
1783 #: build/C/man2/modify_ldt.2:130
1784 msgid "I<func> is neither 0 nor 1."
1785 msgstr "I<func> が 0 でも 1 でもない。"
1786
1787 #. type: Plain text
1788 #: build/C/man2/modify_ldt.2:133
1789 msgid ""
1790 "This call is Linux-specific and should not be used in programs intended to "
1791 "be portable."
1792 msgstr ""
1793 "このコールは Linux 特有であり、移植を意図したプログラムでは 使用してはいけな"
1794 "い。"
1795
1796 #. type: Plain text
1797 #: build/C/man2/modify_ldt.2:136 build/C/man2/perfmonctl.2:205
1798 #: build/C/man2/pivot_root.2:134
1799 msgid ""
1800 "Glibc does not provide a wrapper for this system call; call it using "
1801 "B<syscall>(2)."
1802 msgstr ""
1803 "glibc はこのシステムコールに対するラッパー関数を提供していない。 "
1804 "B<syscall>(2)  を使って呼び出すこと。"
1805
1806 #. type: Plain text
1807 #: build/C/man2/modify_ldt.2:138
1808 msgid "B<vm86>(2)"
1809 msgstr "B<vm86>(2)"
1810
1811 #. type: TH
1812 #: build/C/man2/nfsservctl.2:8
1813 #, no-wrap
1814 msgid "NFSSERVCTL"
1815 msgstr "NFSSERVCTL"
1816
1817 #. type: TH
1818 #: build/C/man2/nfsservctl.2:8
1819 #, no-wrap
1820 msgid "2013-09-17"
1821 msgstr "2013-09-17"
1822
1823 #. type: Plain text
1824 #: build/C/man2/nfsservctl.2:11
1825 msgid "nfsservctl - syscall interface to kernel nfs daemon"
1826 msgstr "nfsservctl - カーネル nfs デーモンのためのインターフェース"
1827
1828 #. type: Plain text
1829 #: build/C/man2/nfsservctl.2:14
1830 #, no-wrap
1831 msgid "B<#include E<lt>linux/nfsd/syscall.hE<gt>>\n"
1832 msgstr "B<#include E<lt>linux/nfsd/syscall.hE<gt>>\n"
1833
1834 #. type: Plain text
1835 #: build/C/man2/nfsservctl.2:17
1836 #, no-wrap
1837 msgid ""
1838 "B<long nfsservctl(int >I<cmd>B<, struct nfsctl_arg *>I<argp>B<,>\n"
1839 "B<                union nfsctl_res *>I<resp>B<);>\n"
1840 msgstr ""
1841 "B<long nfsservctl(int >I<cmd>B<, struct nfsctl_arg *>I<argp>B<,>\n"
1842 "B<                union nfsctl_res *>I<resp>B<);>\n"
1843
1844 #. type: Plain text
1845 #: build/C/man2/nfsservctl.2:21
1846 msgid "I<Note>: Since Linux 3.1, this system call no longer exists."
1847 msgstr "I<注意>: Linux 3.1 以降では、このシステムコールはもはや存在しない。"
1848
1849 #. type: Plain text
1850 #: build/C/man2/nfsservctl.2:35
1851 #, no-wrap
1852 msgid ""
1853 "/*\n"
1854 " * These are the commands understood by nfsctl().\n"
1855 " */\n"
1856 "#define NFSCTL_SVC          0    /* This is a server process. */\n"
1857 "#define NFSCTL_ADDCLIENT    1    /* Add an NFS client. */\n"
1858 "#define NFSCTL_DELCLIENT    2    /* Remove an NFS client. */\n"
1859 "#define NFSCTL_EXPORT       3    /* Export a filesystem. */\n"
1860 "#define NFSCTL_UNEXPORT     4    /* Unexport a filesystem. */\n"
1861 "#define NFSCTL_UGIDUPDATE   5    /* Update a client's UID/GID map\n"
1862 "                                    (only in Linux 2.4.x and earlier). */\n"
1863 "#define NFSCTL_GETFH        6    /* Get a file handle (used by mountd)\n"
1864 "                                    (only in Linux 2.4.x and earlier). */\n"
1865 msgstr ""
1866 "/*\n"
1867 " * nfsctl() によって理解されるコマンド\n"
1868 " */\n"
1869 "#define NFSCTL_SVC          0    /* サーバープロセス */\n"
1870 "#define NFSCTL_ADDCLIENT    1    /* NFS クライアントを追加 */\n"
1871 "#define NFSCTL_DELCLIENT    2    /* NFS クライアンドを削除 */\n"
1872 "#define NFSCTL_EXPORT       3    /* ファイルシステムのエクスポート */\n"
1873 "#define NFSCTL_UNEXPORT     4    /* ファイルシステムのアンエクスポート */\n"
1874 "#define NFSCTL_UGIDUPDATE   5    /* UID/GID マップの更新\n"
1875 "                                    (Linux 2.4.x とそれ以前のみ) */\n"
1876 "#define NFSCTL_GETFH        6    /* (mountd で使用される) fh の取得\n"
1877 "                                    (Linux 2.4.x とそれ以前のみ) */\n"
1878
1879 #. type: Plain text
1880 #: build/C/man2/nfsservctl.2:47
1881 #, no-wrap
1882 msgid ""
1883 "struct nfsctl_arg {\n"
1884 "    int                       ca_version;     /* safeguard */\n"
1885 "    union {\n"
1886 "        struct nfsctl_svc     u_svc;\n"
1887 "        struct nfsctl_client  u_client;\n"
1888 "        struct nfsctl_export  u_export;\n"
1889 "        struct nfsctl_uidmap  u_umap;\n"
1890 "        struct nfsctl_fhparm  u_getfh;\n"
1891 "        unsigned int          u_debug;\n"
1892 "    } u;\n"
1893 "}\n"
1894 msgstr ""
1895 "struct nfsctl_arg {\n"
1896 "    int                       ca_version;     /* safeguard */\n"
1897 "    union {\n"
1898 "        struct nfsctl_svc     u_svc;\n"
1899 "        struct nfsctl_client  u_client;\n"
1900 "        struct nfsctl_export  u_export;\n"
1901 "        struct nfsctl_uidmap  u_umap;\n"
1902 "        struct nfsctl_fhparm  u_getfh;\n"
1903 "        unsigned int          u_debug;\n"
1904 "    } u;\n"
1905 "}\n"
1906
1907 #. type: Plain text
1908 #: build/C/man2/nfsservctl.2:52
1909 #, no-wrap
1910 msgid ""
1911 "union nfsctl_res {\n"
1912 "        struct knfs_fh          cr_getfh;\n"
1913 "        unsigned int            cr_debug;\n"
1914 "};\n"
1915 msgstr ""
1916 "union nfsctl_res {\n"
1917 "        struct knfs_fh          cr_getfh;\n"
1918 "        unsigned int            cr_debug;\n"
1919 "};\n"
1920
1921 #. type: Plain text
1922 #: build/C/man2/nfsservctl.2:58 build/C/man2/pivot_root.2:105
1923 #: build/C/man2/vm86.2:59
1924 msgid ""
1925 "On success, zero is returned.  On error, -1 is returned, and I<errno> is set "
1926 "appropriately."
1927 msgstr ""
1928 "成功した場合は 0 が返される。エラーの場合は -1 が返され、 I<errno> が適切に設"
1929 "定される。"
1930
1931 #. type: Plain text
1932 #: build/C/man2/nfsservctl.2:60
1933 msgid "This call is Linux-specific."
1934 msgstr "このコールは Linux 特有である。"
1935
1936 #. type: TH
1937 #: build/C/man2/outb.2:26
1938 #, no-wrap
1939 msgid "OUTB"
1940 msgstr "OUTB"
1941
1942 #. type: TH
1943 #: build/C/man2/outb.2:26
1944 #, no-wrap
1945 msgid "2012-12-31"
1946 msgstr "2012-12-31"
1947
1948 #. type: Plain text
1949 #: build/C/man2/outb.2:31
1950 msgid ""
1951 "outb, outw, outl, outsb, outsw, outsl, inb, inw, inl, insb, insw, insl, "
1952 "outb_p, outw_p, outl_p, inb_p, inw_p, inl_p - port I/O"
1953 msgstr ""
1954 "outb, outw, outl, outsb, outsw, outsl, inb, inw, inl, insb, insw, insl, "
1955 "outb_p, outw_p, outl_p, inb_p, inw_p, inl_p - ポート入出力"
1956
1957 #. type: Plain text
1958 #: build/C/man2/outb.2:34
1959 #, no-wrap
1960 msgid "B<#include E<lt>sys/io.hE<gt>>\n"
1961 msgstr "B<#include E<lt>sys/io.hE<gt>>\n"
1962
1963 #. type: Plain text
1964 #: build/C/man2/outb.2:41
1965 #, no-wrap
1966 msgid ""
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 msgstr ""
1974 "B<unsigned char inb(unsigned short int >I<port>B<);>\n"
1975 "B<unsigned char inb_p(unsigned short int >I<port>B<);>\n"
1976 "B<unsigned short int inw(unsigned short int >I<port>B<);>\n"
1977 "B<unsigned short int inw_p(unsigned short int >I<port>B<);>\n"
1978 "B<unsigned int inl(unsigned short int >I<port>B<);>\n"
1979 "B<unsigned int inl_p(unsigned short int >I<port>B<);>\n"
1980
1981 #. type: Plain text
1982 #: build/C/man2/outb.2:48
1983 #, no-wrap
1984 msgid ""
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 msgstr ""
1992 "B<void outb(unsigned char >I<value>B<, unsigned short int >I<port>B<);>\n"
1993 "B<void outb_p(unsigned char >I<value>B<, unsigned short int >I<port>B<);>\n"
1994 "B<void outw(unsigned short int >I<value>B<, unsigned short int >I<port>B<);>\n"
1995 "B<void outw_p(unsigned short int >I<value>B<, unsigned short int >I<port>B<);>\n"
1996 "B<void outl(unsigned int >I<value>B<, unsigned short int >I<port>B<);>\n"
1997 "B<void outl_p(unsigned int >I<value>B<, unsigned short int >I<port>B<);>\n"
1998
1999 #. type: Plain text
2000 #: build/C/man2/outb.2:61
2001 #, no-wrap
2002 msgid ""
2003 "B<void insb(unsigned short int >I<port>B<, void *>I<addr>B<,>\n"
2004 "B<           unsigned long int >I<count>B<);>\n"
2005 "B<void insw(unsigned short int >I<port>B<, void *>I<addr>B<,>\n"
2006 "B<           unsigned long int >I<count>B<);>\n"
2007 "B<void insl(unsigned short int >I<port>B<, void *>I<addr>B<,>\n"
2008 "B<           unsigned long int >I<count>B<);>\n"
2009 "B<void outsb(unsigned short int >I<port>B<, const void *>I<addr>B<,>\n"
2010 "B<           unsigned long int >I<count>B<);>\n"
2011 "B<void outsw(unsigned short int >I<port>B<, const void *>I<addr>B<,>\n"
2012 "B<           unsigned long int >I<count>B<);>\n"
2013 "B<void outsl(unsigned short int >I<port>B<, const void *>I<addr>B<,>\n"
2014 "B<           unsigned long int >I<count>B<);>\n"
2015 msgstr ""
2016 "B<void insb(unsigned short int >I<port>B<, void *>I<addr>B<,>\n"
2017 "B<           unsigned long int >I<count>B<);>\n"
2018 "B<void insw(unsigned short int >I<port>B<, void *>I<addr>B<,>\n"
2019 "B<           unsigned long int >I<count>B<);>\n"
2020 "B<void insl(unsigned short int >I<port>B<, void *>I<addr>B<,>\n"
2021 "B<           unsigned long int >I<count>B<);>\n"
2022 "B<void outsb(unsigned short int >I<port>B<, const void *>I<addr>B<,>\n"
2023 "B<           unsigned long int >I<count>B<);>\n"
2024 "B<void outsw(unsigned short int >I<port>B<, const void *>I<addr>B<,>\n"
2025 "B<           unsigned long int >I<count>B<);>\n"
2026 "B<void outsl(unsigned short int >I<port>B<, const void *>I<addr>B<,>\n"
2027 "B<           unsigned long int >I<count>B<);>\n"
2028
2029 #. type: Plain text
2030 #: build/C/man2/outb.2:67
2031 msgid ""
2032 "This family of functions is used to do low-level port input and output.  The "
2033 "out* functions do port output, the in* functions do port input; the b-suffix "
2034 "functions are byte-width and the w-suffix functions word-width; the _p-"
2035 "suffix functions pause until the I/O completes."
2036 msgstr ""
2037 "この一連の関数はポートに対する低レベルの入出力に使用する。 out* 関数はポート"
2038 "出力、in* 関数はポート入力を行う。 語尾に b がついている関数はバイト単位、w "
2039 "がついている関数はワード単位である。 _p がついている関数は I/O が終了するまで"
2040 "待つ。"
2041
2042 #.  , given the following information
2043 #.  in addition to that given in
2044 #.  .BR outb (9).
2045 #. type: Plain text
2046 #: build/C/man2/outb.2:73
2047 msgid ""
2048 "They are primarily designed for internal kernel use, but can be used from "
2049 "user space."
2050 msgstr ""
2051 "これらの関数はもともとカーネル内部での使用を想定して設計されているが、 ユー"
2052 "ザー空間からでも使用できる。"
2053
2054 #. type: Plain text
2055 #: build/C/man2/outb.2:78
2056 msgid ""
2057 "You must compile with B<-O> or B<-O2> or similar.  The functions are defined "
2058 "as inline macros, and will not be substituted in without optimization "
2059 "enabled, causing unresolved references at link time."
2060 msgstr ""
2061 "B<-O> や B<-O2> などを指定してコンパイルしなければならない。 これらの関数はイ"
2062 "ンライン・マクロとして定義されており、 最適化を行わないと関数の展開が行われ"
2063 "ず、 リンクの時に「解決できない参照(unresolved reference)」が発生する。"
2064
2065 #. type: Plain text
2066 #: build/C/man2/outb.2:87
2067 msgid ""
2068 "You use B<ioperm>(2)  or alternatively B<iopl>(2)  to tell the kernel to "
2069 "allow the user space application to access the I/O ports in question.  "
2070 "Failure to do this will cause the application to receive a segmentation "
2071 "fault."
2072 msgstr ""
2073 "ユーザー空間のアプリケーションが I/O ポートにアクセスすることを カーネルに教"
2074 "えるために B<ioperm>(2)  もしくは B<iopl>(2)  を使用すること。これを忘れると"
2075 "アプリケーションはセグメンテーション違反 (segmentation fault) を受けとること"
2076 "になる。"
2077
2078 #. type: Plain text
2079 #: build/C/man2/outb.2:96
2080 msgid ""
2081 "B<outb>()  and friends are hardware-specific.  The I<value> argument is "
2082 "passed first and the I<port> argument is passed second, which is the "
2083 "opposite order from most DOS implementations."
2084 msgstr ""
2085 "B<outb>()  とその仲間はハードウェア特有である。 I<value> 引数が最初に渡さ"
2086 "れ、 I<port> 引数が二番目に渡される。 この順序はほとんどの DOS での実装とは逆"
2087 "である。"
2088
2089 #. type: Plain text
2090 #: build/C/man2/outb.2:99
2091 msgid "B<ioperm>(2), B<iopl>(2)"
2092 msgstr "B<ioperm>(2), B<iopl>(2)"
2093
2094 #. type: TH
2095 #: build/C/man2/pciconfig_read.2:8
2096 #, no-wrap
2097 msgid "PCICONFIG_READ"
2098 msgstr "PCICONFIG_READ"
2099
2100 #. type: TH
2101 #: build/C/man2/pciconfig_read.2:8
2102 #, no-wrap
2103 msgid "2003-07-14"
2104 msgstr "2003-07-14"
2105
2106 #. type: Plain text
2107 #: build/C/man2/pciconfig_read.2:11
2108 msgid ""
2109 "pciconfig_read, pciconfig_write, pciconfig_iobase - pci device information "
2110 "handling"
2111 msgstr ""
2112 "pciconfig_read, pciconfig_write, pciconfig_iobase - pci デバイス情報を扱う"
2113
2114 #. type: Plain text
2115 #: build/C/man2/pciconfig_read.2:14
2116 #, no-wrap
2117 msgid "B<#include E<lt>pci.hE<gt>>\n"
2118 msgstr "B<#include E<lt>pci.hE<gt>>\n"
2119
2120 #. type: Plain text
2121 #: build/C/man2/pciconfig_read.2:21
2122 #, no-wrap
2123 msgid ""
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 msgstr ""
2131 "B<int pciconfig_read(unsigned long >I<bus>B<, unsigned long >I<dfn>B<,>\n"
2132 "B<          unsigned long >I<off>B<, unsigned long >I<len>B<, void *>I<buf>B<);>\n"
2133 "B<int pciconfig_write(unsigned long >I<bus>B<, unsigned long >I<dfn>B<,>\n"
2134 "B<          unsigned long >I<off>B<, unsigned long >I<len>B<, void *>I<buf>B<);>\n"
2135 "B<int pciconfig_iobase(long >I<which>B<, unsigned long >I<bus>B<,>\n"
2136 "B<          unsigned long >I<devfn>B<);>\n"
2137
2138 #. type: Plain text
2139 #: build/C/man2/pciconfig_read.2:27
2140 msgid ""
2141 "Most of the interaction with PCI devices is already handled by the kernel "
2142 "PCI layer, and thus these calls should not normally need to be accessed from "
2143 "user space."
2144 msgstr ""
2145 "PCI デバイスとのやり取り (interaction) は カーネル PCI レイヤですでに処理され"
2146 "ているので、 通常はこららの関数をユーザ空間からアクセスする必要はない。"
2147
2148 #. type: TP
2149 #: build/C/man2/pciconfig_read.2:27 build/C/man2/pciconfig_read.2:51
2150 #, no-wrap
2151 msgid "B<pciconfig_read>()"
2152 msgstr "B<pciconfig_read>()"
2153
2154 #. type: Plain text
2155 #: build/C/man2/pciconfig_read.2:36
2156 msgid "Reads to I<buf> from device I<dev> at offset I<off> value."
2157 msgstr "デバイス I<dev> のオフセット I<off> の値を I<buf> に読み込む。"
2158
2159 #. type: TP
2160 #: build/C/man2/pciconfig_read.2:36 build/C/man2/pciconfig_read.2:57
2161 #, no-wrap
2162 msgid "B<pciconfig_write>()"
2163 msgstr "B<pciconfig_write>()"
2164
2165 #. type: Plain text
2166 #: build/C/man2/pciconfig_read.2:45
2167 msgid "Writes from I<buf> to device I<dev> at offset I<off> value."
2168 msgstr "デバイス I<dev> のオフセット I<off> に I<buf> の値を書き込む。"
2169
2170 #. type: TP
2171 #: build/C/man2/pciconfig_read.2:45 build/C/man2/pciconfig_read.2:63
2172 #, no-wrap
2173 msgid "B<pciconfig_iobase>()"
2174 msgstr "B<pciconfig_iobase>()"
2175
2176 #. type: Plain text
2177 #: build/C/man2/pciconfig_read.2:50
2178 msgid ""
2179 "You pass it a bus/devfn pair and get a physical address for either the "
2180 "memory offset (for things like prep, this is 0xc0000000), the IO base for "
2181 "PIO cycles, or the ISA holes if any."
2182 msgstr ""
2183 "bus/devfn ペアをこの関数に渡し、 メモリオフセット (prep のようなものでは、こ"
2184 "の値は 0xc0000000 である) と PIO サイクルの IO ベースの物理アドレスを取得す"
2185 "る。 また、もしあるならば ISA hole の物理アドレスを取得する。"
2186
2187 #. type: Plain text
2188 #: build/C/man2/pciconfig_read.2:57 build/C/man2/pciconfig_read.2:63
2189 msgid ""
2190 "On success zero is returned.  On error, -1 is returned and I<errno> is set "
2191 "appropriately."
2192 msgstr ""
2193 "成功した場合、0 が返される。 エラーの場合、-1 が返され、 I<errno> が適切に設"
2194 "定される。"
2195
2196 #. type: Plain text
2197 #: build/C/man2/pciconfig_read.2:77
2198 msgid ""
2199 "Returns information on locations of various I/O regions in physical memory "
2200 "according to the I<which> value.  Values for I<which> are: "
2201 "B<IOBASE_BRIDGE_NUMBER>, B<IOBASE_MEMORY>, B<IOBASE_IO>, B<IOBASE_ISA_IO>, "
2202 "B<IOBASE_ISA_MEM>."
2203 msgstr ""
2204 "I<which> の値に基づいて、物理メモリ内の様々な I/O 領域の位置情報が返される。 "
2205 "I<which> の値は、 B<IOBASE_BRIDGE_NUMBER>, B<IOBASE_MEMORY>, B<IOBASE_IO>, "
2206 "B<IOBASE_ISA_IO>, B<IOBASE_ISA_MEM> である。"
2207
2208 #. type: Plain text
2209 #: build/C/man2/pciconfig_read.2:84
2210 msgid "I<len> value is invalid.  This does not apply to B<pciconfig_iobase>()."
2211 msgstr ""
2212 "I<len> の値が無効である。 このエラーは B<pciconfig_iobase>()  には適用されな"
2213 "い。"
2214
2215 #. type: TP
2216 #: build/C/man2/pciconfig_read.2:84 build/C/man2/ptrace.2:1886
2217 #: build/C/man2/sendfile.2:134
2218 #, no-wrap
2219 msgid "B<EIO>"
2220 msgstr "B<EIO>"
2221
2222 #. type: Plain text
2223 #: build/C/man2/pciconfig_read.2:87
2224 msgid "I/O error."
2225 msgstr "I/O エラー。"
2226
2227 #. type: TP
2228 #: build/C/man2/pciconfig_read.2:87 build/C/man2/perf_event_open.2:2460
2229 #, no-wrap
2230 msgid "B<ENODEV>"
2231 msgstr "B<ENODEV>"
2232
2233 #. type: Plain text
2234 #: build/C/man2/pciconfig_read.2:93
2235 msgid ""
2236 "For B<pciconfig_iobase>(), \"hose\" value is NULL.  For the other calls, "
2237 "could not find a slot."
2238 msgstr ""
2239 "B<pciconfig_iobase>()  の場合、でホース (hose) の値が NULL である。 他の呼び"
2240 "出しの場合、スロット (slot) が見つからない。"
2241
2242 #. type: Plain text
2243 #: build/C/man2/pciconfig_read.2:98
2244 msgid "The system has not implemented these calls (B<CONFIG_PCI> not defined)."
2245 msgstr ""
2246 "このシステムはこれらの呼び出しを実装していない。 (B<CONFIG_PCI> が定義されて"
2247 "いない)。"
2248
2249 #. type: TP
2250 #: build/C/man2/pciconfig_read.2:98 build/C/man2/perf_event_open.2:2488
2251 #, no-wrap
2252 msgid "B<EOPNOTSUPP>"
2253 msgstr "B<EOPNOTSUPP>"
2254
2255 #. type: Plain text
2256 #: build/C/man2/pciconfig_read.2:105
2257 msgid ""
2258 "This return value is valid only for B<pciconfig_iobase>().  It is returned "
2259 "if the value for I<which> is invalid."
2260 msgstr ""
2261 "この返り値は B<pciconfig_iobase>()  でのみ有効である。 このエラーは I<which> "
2262 "の値が無効であるときに返される。"
2263
2264 #. type: Plain text
2265 #: build/C/man2/pciconfig_read.2:112
2266 msgid ""
2267 "User does not have the B<CAP_SYS_ADMIN> capability.  This does not apply to "
2268 "B<pciconfig_iobase>()."
2269 msgstr ""
2270 "ユーザが B<CAP_SYS_ADMIN> 権限を持っていない。 このエラーは "
2271 "B<pciconfig_iobase>()  には適用されない。"
2272
2273 #. type: Plain text
2274 #: build/C/man2/pciconfig_read.2:114
2275 msgid "These calls are Linux-specific, available since Linux 2.0.26/2.1.11."
2276 msgstr ""
2277 "これらの呼び出しは Linux 特有のものであり、 Linux 2.0.26/2.1.11 から使用可能"
2278 "である。"
2279
2280 #. type: Plain text
2281 #: build/C/man2/pciconfig_read.2:116
2282 msgid "B<capabilities>(7)"
2283 msgstr "B<capabilities>(7)"
2284
2285 #. type: TH
2286 #: build/C/man2/perf_event_open.2:27
2287 #, no-wrap
2288 msgid "PERF_EVENT_OPEN"
2289 msgstr "PERF_EVENT_OPEN"
2290
2291 #. type: TH
2292 #: build/C/man2/perf_event_open.2:27
2293 #, no-wrap
2294 msgid "2014-04-17"
2295 msgstr "2014-04-17"
2296
2297 #. type: Plain text
2298 #: build/C/man2/perf_event_open.2:30
2299 msgid "perf_event_open - set up performance monitoring"
2300 msgstr ""
2301
2302 #. type: Plain text
2303 #: build/C/man2/perf_event_open.2:34
2304 #, no-wrap
2305 msgid ""
2306 "B<#include E<lt>linux/perf_event.hE<gt>>\n"
2307 "B<#include E<lt>linux/hw_breakpoint.hE<gt>>\n"
2308 msgstr ""
2309 "B<#include E<lt>linux/perf_event.hE<gt>>\n"
2310 "B<#include E<lt>linux/hw_breakpoint.hE<gt>>\n"
2311
2312 #. type: Plain text
2313 #: build/C/man2/perf_event_open.2:38
2314 #, no-wrap
2315 msgid ""
2316 "B<int perf_event_open(struct perf_event_attr *>I<attr>B<,>\n"
2317 "B<                    pid_t >I<pid>B<, int >I<cpu>B<, int >I<group_fd>B<,>\n"
2318 "B<                    unsigned long >I<flags>B<);>\n"
2319 msgstr ""
2320 "B<int perf_event_open(struct perf_event_attr *>I<attr>B<,>\n"
2321 "B<                    pid_t >I<pid>B<, int >I<cpu>B<, int >I<group_fd>B<,>\n"
2322 "B<                    unsigned long >I<flags>B<);>\n"
2323
2324 #. type: Plain text
2325 #: build/C/man2/perf_event_open.2:47
2326 msgid ""
2327 "Given a list of parameters, B<perf_event_open>()  returns a file descriptor, "
2328 "for use in subsequent system calls (B<read>(2), B<mmap>(2), B<prctl>(2), "
2329 "B<fcntl>(2), etc.)."
2330 msgstr ""
2331
2332 #. type: Plain text
2333 #: build/C/man2/perf_event_open.2:55
2334 msgid ""
2335 "A call to B<perf_event_open>()  creates a file descriptor that allows "
2336 "measuring performance information.  Each file descriptor corresponds to one "
2337 "event that is measured; these can be grouped together to measure multiple "
2338 "events simultaneously."
2339 msgstr ""
2340
2341 #. type: Plain text
2342 #: build/C/man2/perf_event_open.2:62
2343 msgid ""
2344 "Events can be enabled and disabled in two ways: via B<ioctl>(2)  and via "
2345 "B<prctl>(2).  When an event is disabled it does not count or generate "
2346 "overflows but does continue to exist and maintain its count value."
2347 msgstr ""
2348
2349 #. type: Plain text
2350 #: build/C/man2/perf_event_open.2:76
2351 msgid ""
2352 "Events come in two flavors: counting and sampled.  A I<counting> event is "
2353 "one that is used for counting the aggregate number of events that occur.  In "
2354 "general, counting event results are gathered with a B<read>(2)  call.  A "
2355 "I<sampling> event periodically writes measurements to a buffer that can then "
2356 "be accessed via B<mmap>(2)."
2357 msgstr ""
2358
2359 #. type: SS
2360 #: build/C/man2/perf_event_open.2:76
2361 #, no-wrap
2362 msgid "Arguments"
2363 msgstr ""
2364
2365 #. type: Plain text
2366 #: build/C/man2/perf_event_open.2:83
2367 msgid ""
2368 "The I<pid> and I<cpu> arguments allow specifying which process and CPU to "
2369 "monitor:"
2370 msgstr ""
2371
2372 #. type: TP
2373 #: build/C/man2/perf_event_open.2:83
2374 #, no-wrap
2375 msgid "B<pid == 0> and B<cpu == -1>"
2376 msgstr ""
2377
2378 #. type: Plain text
2379 #: build/C/man2/perf_event_open.2:86
2380 msgid "This measures the calling process/thread on any CPU."
2381 msgstr ""
2382
2383 #. type: TP
2384 #: build/C/man2/perf_event_open.2:86
2385 #, no-wrap
2386 msgid "B<pid == 0> and B<cpu E<gt>= 0>"
2387 msgstr ""
2388
2389 #. type: Plain text
2390 #: build/C/man2/perf_event_open.2:90
2391 msgid ""
2392 "This measures the calling process/thread only when running on the specified "
2393 "CPU."
2394 msgstr ""
2395
2396 #. type: TP
2397 #: build/C/man2/perf_event_open.2:90
2398 #, no-wrap
2399 msgid "B<pid E<gt> 0> and B<cpu == -1>"
2400 msgstr ""
2401
2402 #. type: Plain text
2403 #: build/C/man2/perf_event_open.2:93
2404 msgid "This measures the specified process/thread on any CPU."
2405 msgstr ""
2406
2407 #. type: TP
2408 #: build/C/man2/perf_event_open.2:93
2409 #, no-wrap
2410 msgid "B<pid E<gt> 0> and B<cpu E<gt>= 0>"
2411 msgstr ""
2412
2413 #. type: Plain text
2414 #: build/C/man2/perf_event_open.2:97
2415 msgid ""
2416 "This measures the specified process/thread only when running on the "
2417 "specified CPU."
2418 msgstr ""
2419
2420 #. type: TP
2421 #: build/C/man2/perf_event_open.2:97
2422 #, no-wrap
2423 msgid "B<pid == -1> and B<cpu E<gt>= 0>"
2424 msgstr ""
2425
2426 #. type: Plain text
2427 #: build/C/man2/perf_event_open.2:105
2428 msgid ""
2429 "This measures all processes/threads on the specified CPU.  This requires "
2430 "B<CAP_SYS_ADMIN> capability or a I</proc/sys/kernel/perf_event_paranoid> "
2431 "value of less than 1."
2432 msgstr ""
2433
2434 #. type: TP
2435 #: build/C/man2/perf_event_open.2:105
2436 #, no-wrap
2437 msgid "B<pid == -1> and B<cpu == -1>"
2438 msgstr ""
2439
2440 #. type: Plain text
2441 #: build/C/man2/perf_event_open.2:108
2442 msgid "This setting is invalid and will return an error."
2443 msgstr ""
2444
2445 #. type: Plain text
2446 #: build/C/man2/perf_event_open.2:130
2447 msgid ""
2448 "The I<group_fd> argument allows event groups to be created.  An event group "
2449 "has one event which is the group leader.  The leader is created first, with "
2450 "I<group_fd> = -1.  The rest of the group members are created with subsequent "
2451 "B<perf_event_open>()  calls with I<group_fd> being set to the file "
2452 "descriptor of the group leader.  (A single event on its own is created with "
2453 "I<group_fd> = -1 and is considered to be a group with only 1 member.)  An "
2454 "event group is scheduled onto the CPU as a unit: it will be put onto the CPU "
2455 "only if all of the events in the group can be put onto the CPU.  This means "
2456 "that the values of the member events can be meaningfully compared\\(emadded, "
2457 "divided (to get ratios), and so on\\(emwith each other, since they have "
2458 "counted events for the same set of executed instructions."
2459 msgstr ""
2460
2461 #. type: Plain text
2462 #: build/C/man2/perf_event_open.2:134
2463 msgid ""
2464 "The I<flags> argument is formed by ORing together zero or more of the "
2465 "following values:"
2466 msgstr ""
2467 "I<flags> 引き数には、以下の値の 0 個以上をビット毎の論理和の形で指定する。"
2468
2469 #. type: TP
2470 #: build/C/man2/perf_event_open.2:134
2471 #, no-wrap
2472 msgid "B<PERF_FLAG_FD_CLOEXEC> (since Linux 3.14)."
2473 msgstr "B<PERF_FLAG_FD_CLOEXEC> (Linux 3.14 以降)."
2474
2475 #. type: Plain text
2476 #: build/C/man2/perf_event_open.2:150
2477 msgid ""
2478 "This flag enables the close-on-exec flag for the created event file "
2479 "descriptor, so that the file descriptor is automatically closed on "
2480 "B<execve>(2).  Setting the close-on-exec flags at creation time, rather than "
2481 "later with B<fcntl>(2), avoids potential race conditions where the calling "
2482 "thread invokes B<perf_event_open>()  and B<fcntl>(2)  at the same time as "
2483 "another thread calls B<fork>(2)  then B<execve>(2)."
2484 msgstr ""
2485
2486 #. type: TP
2487 #: build/C/man2/perf_event_open.2:150
2488 #, no-wrap
2489 msgid "B<PERF_FLAG_FD_NO_GROUP>"
2490 msgstr "B<PERF_FLAG_FD_NO_GROUP>"
2491
2492 #.  FIXME The following sentence is unclear
2493 #.  FIXME So, why is it useful?
2494 #. type: Plain text
2495 #: build/C/man2/perf_event_open.2:157
2496 msgid ""
2497 "This flag allows creating an event as part of an event group but having no "
2498 "group leader.  It is unclear why this is useful."
2499 msgstr ""
2500
2501 #. type: TP
2502 #: build/C/man2/perf_event_open.2:157
2503 #, no-wrap
2504 msgid "B<PERF_FLAG_FD_OUTPUT>"
2505 msgstr "B<PERF_FLAG_FD_OUTPUT>"
2506
2507 #. type: Plain text
2508 #: build/C/man2/perf_event_open.2:160
2509 msgid "This flag reroutes the output from an event to the group leader."
2510 msgstr ""
2511
2512 #. type: TP
2513 #: build/C/man2/perf_event_open.2:160
2514 #, no-wrap
2515 msgid "B<PERF_FLAG_PID_CGROUP> (since Linux 2.6.39)."
2516 msgstr "B<PERF_FLAG_PID_CGROUP> (Linux 2.6.39 以降)."
2517
2518 #. type: Plain text
2519 #: build/C/man2/perf_event_open.2:183
2520 msgid ""
2521 "This flag activates per-container system-wide monitoring.  A container is an "
2522 "abstraction that isolates a set of resources for finer-grained control "
2523 "(CPUs, memory, etc.).  In this mode, the event is measured only if the "
2524 "thread running on the monitored CPU belongs to the designated container "
2525 "(cgroup).  The cgroup is identified by passing a file descriptor opened on "
2526 "its directory in the cgroupfs filesystem.  For instance, if the cgroup to "
2527 "monitor is called I<test>, then a file descriptor opened on I</dev/cgroup/"
2528 "test> (assuming cgroupfs is mounted on I</dev/cgroup>)  must be passed as "
2529 "the I<pid> parameter.  cgroup monitoring is available only for system-wide "
2530 "events and may therefore require extra permissions."
2531 msgstr ""
2532
2533 #. type: Plain text
2534 #: build/C/man2/perf_event_open.2:188
2535 msgid ""
2536 "The I<perf_event_attr> structure provides detailed configuration information "
2537 "for the event being created."
2538 msgstr ""
2539
2540 #. type: Plain text
2541 #: build/C/man2/perf_event_open.2:195
2542 #, no-wrap
2543 msgid ""
2544 "struct perf_event_attr {\n"
2545 "    __u32 type;         /* Type of event */\n"
2546 "    __u32 size;         /* Size of attribute structure */\n"
2547 "    __u64 config;       /* Type-specific configuration */\n"
2548 msgstr ""
2549 "struct perf_event_attr {\n"
2550 "    __u32 type;         /* Type of event */\n"
2551 "    __u32 size;         /* Size of attribute structure */\n"
2552 "    __u64 config;       /* Type-specific configuration */\n"
2553
2554 #. type: Plain text
2555 #: build/C/man2/perf_event_open.2:200
2556 #, no-wrap
2557 msgid ""
2558 "    union {\n"
2559 "        __u64 sample_period;    /* Period of sampling */\n"
2560 "        __u64 sample_freq;      /* Frequency of sampling */\n"
2561 "    };\n"
2562 msgstr ""
2563 "    union {\n"
2564 "        __u64 sample_period;    /* Period of sampling */\n"
2565 "        __u64 sample_freq;      /* Frequency of sampling */\n"
2566 "    };\n"
2567
2568 #. type: Plain text
2569 #: build/C/man2/perf_event_open.2:203
2570 #, no-wrap
2571 msgid ""
2572 "    __u64 sample_type;  /* Specifies values included in sample */\n"
2573 "    __u64 read_format;  /* Specifies values returned in read */\n"
2574 msgstr ""
2575 "    __u64 sample_type;  /* Specifies values included in sample */\n"
2576 "    __u64 read_format;  /* Specifies values returned in read */\n"
2577
2578 #. type: Plain text
2579 #: build/C/man2/perf_event_open.2:229
2580 #, no-wrap
2581 msgid ""
2582 "    __u64 disabled       : 1,   /* off by default */\n"
2583 "          inherit        : 1,   /* children inherit it */\n"
2584 "          pinned         : 1,   /* must always be on PMU */\n"
2585 "          exclusive      : 1,   /* only group on PMU */\n"
2586 "          exclude_user   : 1,   /* don't count user */\n"
2587 "          exclude_kernel : 1,   /* don't count kernel */\n"
2588 "          exclude_hv     : 1,   /* don't count hypervisor */\n"
2589 "          exclude_idle   : 1,   /* don't count when idle */\n"
2590 "          mmap           : 1,   /* include mmap data */\n"
2591 "          comm           : 1,   /* include comm data */\n"
2592 "          freq           : 1,   /* use freq, not period */\n"
2593 "          inherit_stat   : 1,   /* per task counts */\n"
2594 "          enable_on_exec : 1,   /* next exec enables */\n"
2595 "          task           : 1,   /* trace fork/exit */\n"
2596 "          watermark      : 1,   /* wakeup_watermark */\n"
2597 "          precise_ip     : 2,   /* skid constraint */\n"
2598 "          mmap_data      : 1,   /* non-exec mmap data */\n"
2599 "          sample_id_all  : 1,   /* sample_type all events */\n"
2600 "          exclude_host   : 1,   /* don't count in host */\n"
2601 "          exclude_guest  : 1,   /* don't count in guest */\n"
2602 "          exclude_callchain_kernel : 1,\n"
2603 "                                /* exclude kernel callchains */\n"
2604 "          exclude_callchain_user   : 1,\n"
2605 "                                /* exclude user callchains */\n"
2606 "          __reserved_1   : 41;\n"
2607 msgstr ""
2608 "    __u64 disabled       : 1,   /* off by default */\n"
2609 "          inherit        : 1,   /* children inherit it */\n"
2610 "          pinned         : 1,   /* must always be on PMU */\n"
2611 "          exclusive      : 1,   /* only group on PMU */\n"
2612 "          exclude_user   : 1,   /* don't count user */\n"
2613 "          exclude_kernel : 1,   /* don't count kernel */\n"
2614 "          exclude_hv     : 1,   /* don't count hypervisor */\n"
2615 "          exclude_idle   : 1,   /* don't count when idle */\n"
2616 "          mmap           : 1,   /* include mmap data */\n"
2617 "          comm           : 1,   /* include comm data */\n"
2618 "          freq           : 1,   /* use freq, not period */\n"
2619 "          inherit_stat   : 1,   /* per task counts */\n"
2620 "          enable_on_exec : 1,   /* next exec enables */\n"
2621 "          task           : 1,   /* trace fork/exit */\n"
2622 "          watermark      : 1,   /* wakeup_watermark */\n"
2623 "          precise_ip     : 2,   /* skid constraint */\n"
2624 "          mmap_data      : 1,   /* non-exec mmap data */\n"
2625 "          sample_id_all  : 1,   /* sample_type all events */\n"
2626 "          exclude_host   : 1,   /* don't count in host */\n"
2627 "          exclude_guest  : 1,   /* don't count in guest */\n"
2628 "          exclude_callchain_kernel : 1,\n"
2629 "                                /* exclude kernel callchains */\n"
2630 "          exclude_callchain_user   : 1,\n"
2631 "                                /* exclude user callchains */\n"
2632 "          __reserved_1   : 41;\n"
2633
2634 #. type: Plain text
2635 #: build/C/man2/perf_event_open.2:234
2636 #, no-wrap
2637 msgid ""
2638 "    union {\n"
2639 "        __u32 wakeup_events;    /* wakeup every n events */\n"
2640 "        __u32 wakeup_watermark; /* bytes before wakeup */\n"
2641 "    };\n"
2642 msgstr ""
2643 "    union {\n"
2644 "        __u32 wakeup_events;    /* wakeup every n events */\n"
2645 "        __u32 wakeup_watermark; /* bytes before wakeup */\n"
2646 "    };\n"
2647
2648 #. type: Plain text
2649 #: build/C/man2/perf_event_open.2:236
2650 #, no-wrap
2651 msgid "    __u32     bp_type;          /* breakpoint type */\n"
2652 msgstr "    __u32     bp_type;          /* breakpoint type */\n"
2653
2654 #. type: Plain text
2655 #: build/C/man2/perf_event_open.2:241
2656 #, no-wrap
2657 msgid ""
2658 "    union {\n"
2659 "        __u64 bp_addr;          /* breakpoint address */\n"
2660 "        __u64 config1;          /* extension of config */\n"
2661 "    };\n"
2662 msgstr ""
2663 "    union {\n"
2664 "        __u64 bp_addr;          /* breakpoint address */\n"
2665 "        __u64 config1;          /* extension of config */\n"
2666 "    };\n"
2667
2668 #. type: Plain text
2669 #: build/C/man2/perf_event_open.2:251
2670 #, no-wrap
2671 msgid ""
2672 "    union {\n"
2673 "        __u64 bp_len;           /* breakpoint length */\n"
2674 "        __u64 config2;          /* extension of config1 */\n"
2675 "    };\n"
2676 "    __u64 branch_sample_type;   /* enum perf_branch_sample_type */\n"
2677 "    __u64 sample_regs_user;     /* user regs to dump on samples */\n"
2678 "    __u32 sample_stack_user;    /* size of stack to dump on\n"
2679 "                                   samples */\n"
2680 "    __u32 __reserved_2;         /* Align to u64 */\n"
2681 msgstr ""
2682 "    union {\n"
2683 "        __u64 bp_len;           /* breakpoint length */\n"
2684 "        __u64 config2;          /* extension of config1 */\n"
2685 "    };\n"
2686 "    __u64 branch_sample_type;   /* enum perf_branch_sample_type */\n"
2687 "    __u64 sample_regs_user;     /* user regs to dump on samples */\n"
2688 "    __u32 sample_stack_user;    /* size of stack to dump on\n"
2689 "                                   samples */\n"
2690 "    __u32 __reserved_2;         /* Align to u64 */\n"
2691
2692 #. type: Plain text
2693 #: build/C/man2/perf_event_open.2:253
2694 #, no-wrap
2695 msgid "};\n"
2696 msgstr "};\n"
2697
2698 #. type: Plain text
2699 #: build/C/man2/perf_event_open.2:259
2700 msgid ""
2701 "The fields of the I<perf_event_attr> structure are described in more detail "
2702 "below:"
2703 msgstr ""
2704
2705 #. type: TP
2706 #: build/C/man2/perf_event_open.2:259 build/C/man2/perf_event_open.2:1556
2707 #, no-wrap
2708 msgid "I<type>"
2709 msgstr "I<type>"
2710
2711 #. type: Plain text
2712 #: build/C/man2/perf_event_open.2:263
2713 msgid ""
2714 "This field specifies the overall event type.  It has one of the following "
2715 "values:"
2716 msgstr ""
2717
2718 #. type: TP
2719 #: build/C/man2/perf_event_open.2:264
2720 #, no-wrap
2721 msgid "B<PERF_TYPE_HARDWARE>"
2722 msgstr "B<PERF_TYPE_HARDWARE>"
2723
2724 #. type: Plain text
2725 #: build/C/man2/perf_event_open.2:271
2726 msgid ""
2727 "This indicates one of the \"generalized\" hardware events provided by the "
2728 "kernel.  See the I<config> field definition for more details."
2729 msgstr ""
2730
2731 #. type: TP
2732 #: build/C/man2/perf_event_open.2:271
2733 #, no-wrap
2734 msgid "B<PERF_TYPE_SOFTWARE>"
2735 msgstr "B<PERF_TYPE_SOFTWARE>"
2736
2737 #. type: Plain text
2738 #: build/C/man2/perf_event_open.2:275
2739 msgid ""
2740 "This indicates one of the software-defined events provided by the kernel "
2741 "(even if no hardware support is available)."
2742 msgstr ""
2743
2744 #. type: TP
2745 #: build/C/man2/perf_event_open.2:275
2746 #, no-wrap
2747 msgid "B<PERF_TYPE_TRACEPOINT>"
2748 msgstr "B<PERF_TYPE_TRACEPOINT>"
2749
2750 #. type: Plain text
2751 #: build/C/man2/perf_event_open.2:279
2752 msgid ""
2753 "This indicates a tracepoint provided by the kernel tracepoint infrastructure."
2754 msgstr ""
2755
2756 #. type: TP
2757 #: build/C/man2/perf_event_open.2:279
2758 #, no-wrap
2759 msgid "B<PERF_TYPE_HW_CACHE>"
2760 msgstr "B<PERF_TYPE_HW_CACHE>"
2761
2762 #. type: Plain text
2763 #: build/C/man2/perf_event_open.2:285
2764 msgid ""
2765 "This indicates a hardware cache event.  This has a special encoding, "
2766 "described in the I<config> field definition."
2767 msgstr ""
2768
2769 #. type: TP
2770 #: build/C/man2/perf_event_open.2:285
2771 #, no-wrap
2772 msgid "B<PERF_TYPE_RAW>"
2773 msgstr "B<PERF_TYPE_RAW>"
2774
2775 #. type: Plain text
2776 #: build/C/man2/perf_event_open.2:289
2777 msgid ""
2778 "This indicates a \"raw\" implementation-specific event in the I<config> "
2779 "field."
2780 msgstr ""
2781
2782 #. type: TP
2783 #: build/C/man2/perf_event_open.2:289
2784 #, no-wrap
2785 msgid "B<PERF_TYPE_BREAKPOINT> (since Linux 2.6.33)"
2786 msgstr "B<PERF_TYPE_BREAKPOINT> (Linux 2.6.33 以降)"
2787
2788 #. type: Plain text
2789 #: build/C/man2/perf_event_open.2:294
2790 msgid ""
2791 "This indicates a hardware breakpoint as provided by the CPU.  Breakpoints "
2792 "can be read/write accesses to an address as well as execution of an "
2793 "instruction address."
2794 msgstr ""
2795
2796 #. type: TP
2797 #: build/C/man2/perf_event_open.2:294
2798 #, no-wrap
2799 msgid "dynamic PMU"
2800 msgstr ""
2801
2802 #. type: Plain text
2803 #: build/C/man2/perf_event_open.2:313
2804 msgid ""
2805 "Since Linux 2.6.39, B<perf_event_open>()  can support multiple PMUs.  To "
2806 "enable this, a value exported by the kernel can be used in the I<type> field "
2807 "to indicate which PMU to use.  The value to use can be found in the sysfs "
2808 "filesystem: there is a subdirectory per PMU instance under I</sys/bus/"
2809 "event_source/devices>.  In each subdirectory there is a I<type> file whose "
2810 "content is an integer that can be used in the I<type> field.  For instance, "
2811 "I</sys/bus/event_source/devices/cpu/type> contains the value for the core "
2812 "CPU PMU, which is usually 4."
2813 msgstr ""
2814
2815 #. type: TP
2816 #: build/C/man2/perf_event_open.2:314 build/C/man2/perf_event_open.2:1504
2817 #, no-wrap
2818 msgid "I<size>"
2819 msgstr "I<size>"
2820
2821 #. type: Plain text
2822 #: build/C/man2/perf_event_open.2:323
2823 msgid ""
2824 "The size of the I<perf_event_attr> structure for forward/backward "
2825 "compatibility.  Set this using I<sizeof(struct perf_event_attr)> to allow "
2826 "the kernel to see the struct size at the time of compilation."
2827 msgstr ""
2828
2829 #. type: Plain text
2830 #: build/C/man2/perf_event_open.2:338
2831 msgid ""
2832 "The related define B<PERF_ATTR_SIZE_VER0> is set to 64; this was the size of "
2833 "the first published struct.  B<PERF_ATTR_SIZE_VER1> is 72, corresponding to "
2834 "the addition of breakpoints in Linux 2.6.33.  B<PERF_ATTR_SIZE_VER2> is 80 "
2835 "corresponding to the addition of branch sampling in Linux 3.4.  "
2836 "B<PERF_ATR_SIZE_VER3> is 96 corresponding to the addition of "
2837 "I<sample_regs_user> and I<sample_stack_user> in Linux 3.7."
2838 msgstr ""
2839
2840 #. type: TP
2841 #: build/C/man2/perf_event_open.2:338
2842 #, no-wrap
2843 msgid "I<config>"
2844 msgstr "I<config>"
2845
2846 #. type: Plain text
2847 #: build/C/man2/perf_event_open.2:349
2848 msgid ""
2849 "This specifies which event you want, in conjunction with the I<type> field.  "
2850 "The I<config1> and I<config2> fields are also taken into account in cases "
2851 "where 64 bits is not enough to fully specify the event.  The encoding of "
2852 "these fields are event dependent."
2853 msgstr ""
2854
2855 #. type: Plain text
2856 #: build/C/man2/perf_event_open.2:355
2857 msgid ""
2858 "The most significant bit (bit 63) of I<config> signifies CPU-specific (raw) "
2859 "counter configuration data; if the most significant bit is unset, the next 7 "
2860 "bits are an event type and the rest of the bits are the event identifier."
2861 msgstr ""
2862
2863 #. type: Plain text
2864 #: build/C/man2/perf_event_open.2:366
2865 msgid ""
2866 "There are various ways to set the I<config> field that are dependent on the "
2867 "value of the previously described I<type> field.  What follows are various "
2868 "possible settings for I<config> separated out by I<type>."
2869 msgstr ""
2870
2871 #. type: Plain text
2872 #: build/C/man2/perf_event_open.2:376
2873 msgid ""
2874 "If I<type> is B<PERF_TYPE_HARDWARE>, we are measuring one of the generalized "
2875 "hardware CPU events.  Not all of these are available on all platforms.  Set "
2876 "I<config> to one of the following:"
2877 msgstr ""
2878
2879 #. type: TP
2880 #: build/C/man2/perf_event_open.2:377
2881 #, no-wrap
2882 msgid "B<PERF_COUNT_HW_CPU_CYCLES>"
2883 msgstr "B<PERF_COUNT_HW_CPU_CYCLES>"
2884
2885 #. type: Plain text
2886 #: build/C/man2/perf_event_open.2:381
2887 msgid "Total cycles.  Be wary of what happens during CPU frequency scaling."
2888 msgstr ""
2889
2890 #. type: TP
2891 #: build/C/man2/perf_event_open.2:381
2892 #, no-wrap
2893 msgid "B<PERF_COUNT_HW_INSTRUCTIONS>"
2894 msgstr "B<PERF_COUNT_HW_INSTRUCTIONS>"
2895
2896 #. type: Plain text
2897 #: build/C/man2/perf_event_open.2:386
2898 msgid ""
2899 "Retired instructions.  Be careful, these can be affected by various issues, "
2900 "most notably hardware interrupt counts."
2901 msgstr ""
2902
2903 #. type: TP
2904 #: build/C/man2/perf_event_open.2:386
2905 #, no-wrap
2906 msgid "B<PERF_COUNT_HW_CACHE_REFERENCES>"
2907 msgstr "B<PERF_COUNT_HW_CACHE_REFERENCES>"
2908
2909 #. type: Plain text
2910 #: build/C/man2/perf_event_open.2:393
2911 msgid ""
2912 "Cache accesses.  Usually this indicates Last Level Cache accesses but this "
2913 "may vary depending on your CPU.  This may include prefetches and coherency "
2914 "messages; again this depends on the design of your CPU."
2915 msgstr ""
2916
2917 #. type: TP
2918 #: build/C/man2/perf_event_open.2:393
2919 #, no-wrap
2920 msgid "B<PERF_COUNT_HW_CACHE_MISSES>"
2921 msgstr "B<PERF_COUNT_HW_CACHE_MISSES>"
2922
2923 #. type: Plain text
2924 #: build/C/man2/perf_event_open.2:400
2925 msgid ""
2926 "Cache misses.  Usually this indicates Last Level Cache misses; this is "
2927 "intended to be used in conjunction with the "
2928 "B<PERF_COUNT_HW_CACHE_REFERENCES> event to calculate cache miss rates."
2929 msgstr ""
2930
2931 #. type: TP
2932 #: build/C/man2/perf_event_open.2:400
2933 #, no-wrap
2934 msgid "B<PERF_COUNT_HW_BRANCH_INSTRUCTIONS>"
2935 msgstr "B<PERF_COUNT_HW_BRANCH_INSTRUCTIONS>"
2936
2937 #. type: Plain text
2938 #: build/C/man2/perf_event_open.2:405
2939 msgid ""
2940 "Retired branch instructions.  Prior to Linux 2.6.34, this used the wrong "
2941 "event on AMD processors."
2942 msgstr ""
2943
2944 #. type: TP
2945 #: build/C/man2/perf_event_open.2:405
2946 #, no-wrap
2947 msgid "B<PERF_COUNT_HW_BRANCH_MISSES>"
2948 msgstr "B<PERF_COUNT_HW_BRANCH_MISSES>"
2949
2950 #. type: Plain text
2951 #: build/C/man2/perf_event_open.2:408
2952 msgid "Mispredicted branch instructions."
2953 msgstr ""
2954
2955 #. type: TP
2956 #: build/C/man2/perf_event_open.2:408
2957 #, no-wrap
2958 msgid "B<PERF_COUNT_HW_BUS_CYCLES>"
2959 msgstr "B<PERF_COUNT_HW_BUS_CYCLES>"
2960
2961 #. type: Plain text
2962 #: build/C/man2/perf_event_open.2:411
2963 msgid "Bus cycles, which can be different from total cycles."
2964 msgstr ""
2965
2966 #. type: TP
2967 #: build/C/man2/perf_event_open.2:411
2968 #, no-wrap
2969 msgid "B<PERF_COUNT_HW_STALLED_CYCLES_FRONTEND> (since Linux 3.0)"
2970 msgstr "B<PERF_COUNT_HW_STALLED_CYCLES_FRONTEND> (Linux 3.0 以降)"
2971
2972 #. type: Plain text
2973 #: build/C/man2/perf_event_open.2:414
2974 msgid "Stalled cycles during issue."
2975 msgstr ""
2976
2977 #. type: TP
2978 #: build/C/man2/perf_event_open.2:414
2979 #, no-wrap
2980 msgid "B<PERF_COUNT_HW_STALLED_CYCLES_BACKEND> (since Linux 3.0)"
2981 msgstr "B<PERF_COUNT_HW_STALLED_CYCLES_BACKEND> (Linux 3.0 以降)"
2982
2983 #. type: Plain text
2984 #: build/C/man2/perf_event_open.2:417
2985 msgid "Stalled cycles during retirement."
2986 msgstr ""
2987
2988 #. type: TP
2989 #: build/C/man2/perf_event_open.2:417
2990 #, no-wrap
2991 msgid "B<PERF_COUNT_HW_REF_CPU_CYCLES> (since Linux 3.3)"
2992 msgstr "B<PERF_COUNT_HW_REF_CPU_CYCLES> (Linux 3.3 以降)"
2993
2994 #. type: Plain text
2995 #: build/C/man2/perf_event_open.2:420
2996 msgid "Total cycles; not affected by CPU frequency scaling."
2997 msgstr ""
2998
2999 #. type: Plain text
3000 #: build/C/man2/perf_event_open.2:430
3001 msgid ""
3002 "If I<type> is B<PERF_TYPE_SOFTWARE>, we are measuring software events "
3003 "provided by the kernel.  Set I<config> to one of the following:"
3004 msgstr ""
3005
3006 #. type: TP
3007 #: build/C/man2/perf_event_open.2:431
3008 #, no-wrap
3009 msgid "B<PERF_COUNT_SW_CPU_CLOCK>"
3010 msgstr "B<PERF_COUNT_SW_CPU_CLOCK>"
3011
3012 #. type: Plain text
3013 #: build/C/man2/perf_event_open.2:434
3014 msgid "This reports the CPU clock, a high-resolution per-CPU timer."
3015 msgstr ""
3016
3017 #. type: TP
3018 #: build/C/man2/perf_event_open.2:434
3019 #, no-wrap
3020 msgid "B<PERF_COUNT_SW_TASK_CLOCK>"
3021 msgstr "B<PERF_COUNT_SW_TASK_CLOCK>"
3022
3023 #. type: Plain text
3024 #: build/C/man2/perf_event_open.2:437
3025 msgid "This reports a clock count specific to the task that is running."
3026 msgstr ""
3027
3028 #. type: TP
3029 #: build/C/man2/perf_event_open.2:437
3030 #, no-wrap
3031 msgid "B<PERF_COUNT_SW_PAGE_FAULTS>"
3032 msgstr "B<PERF_COUNT_SW_PAGE_FAULTS>"
3033
3034 #. type: Plain text
3035 #: build/C/man2/perf_event_open.2:440
3036 msgid "This reports the number of page faults."
3037 msgstr ""
3038
3039 #. type: TP
3040 #: build/C/man2/perf_event_open.2:440
3041 #, no-wrap
3042 msgid "B<PERF_COUNT_SW_CONTEXT_SWITCHES>"
3043 msgstr "B<PERF_COUNT_SW_CONTEXT_SWITCHES>"
3044
3045 #. type: Plain text
3046 #: build/C/man2/perf_event_open.2:445
3047 msgid ""
3048 "This counts context switches.  Until Linux 2.6.34, these were all reported "
3049 "as user-space events, after that they are reported as happening in the "
3050 "kernel."
3051 msgstr ""
3052
3053 #. type: TP
3054 #: build/C/man2/perf_event_open.2:445
3055 #, no-wrap
3056 msgid "B<PERF_COUNT_SW_CPU_MIGRATIONS>"
3057 msgstr "B<PERF_COUNT_SW_CPU_MIGRATIONS>"
3058
3059 #. type: Plain text
3060 #: build/C/man2/perf_event_open.2:449
3061 msgid "This reports the number of times the process has migrated to a new CPU."
3062 msgstr ""
3063
3064 #. type: TP
3065 #: build/C/man2/perf_event_open.2:449
3066 #, no-wrap
3067 msgid "B<PERF_COUNT_SW_PAGE_FAULTS_MIN>"
3068 msgstr "B<PERF_COUNT_SW_PAGE_FAULTS_MIN>"
3069
3070 #. type: Plain text
3071 #: build/C/man2/perf_event_open.2:453
3072 msgid ""
3073 "This counts the number of minor page faults.  These did not require disk I/O "
3074 "to handle."
3075 msgstr ""
3076
3077 #. type: TP
3078 #: build/C/man2/perf_event_open.2:453
3079 #, no-wrap
3080 msgid "B<PERF_COUNT_SW_PAGE_FAULTS_MAJ>"
3081 msgstr "B<PERF_COUNT_SW_PAGE_FAULTS_MAJ>"
3082
3083 #. type: Plain text
3084 #: build/C/man2/perf_event_open.2:457
3085 msgid ""
3086 "This counts the number of major page faults.  These required disk I/O to "
3087 "handle."
3088 msgstr ""
3089
3090 #. type: TP
3091 #: build/C/man2/perf_event_open.2:457
3092 #, no-wrap
3093 msgid "B<PERF_COUNT_SW_ALIGNMENT_FAULTS> (since Linux 2.6.33)"
3094 msgstr "B<PERF_COUNT_SW_ALIGNMENT_FAULTS> (Linux 2.6.33 以降)"
3095
3096 #. type: Plain text
3097 #: build/C/man2/perf_event_open.2:463
3098 msgid ""
3099 "This counts the number of alignment faults.  These happen when unaligned "
3100 "memory accesses happen; the kernel can handle these but it reduces "
3101 "performance.  This happens only on some architectures (never on x86)."
3102 msgstr ""
3103
3104 #. type: TP
3105 #: build/C/man2/perf_event_open.2:463
3106 #, no-wrap
3107 msgid "B<PERF_COUNT_SW_EMULATION_FAULTS> (since Linux 2.6.33)"
3108 msgstr "B<PERF_COUNT_SW_EMULATION_FAULTS> (Linux 2.6.33 以降)"
3109
3110 #. type: Plain text
3111 #: build/C/man2/perf_event_open.2:469
3112 msgid ""
3113 "This counts the number of emulation faults.  The kernel sometimes traps on "
3114 "unimplemented instructions and emulates them for user space.  This can "
3115 "negatively impact performance."
3116 msgstr ""
3117
3118 #. type: TP
3119 #: build/C/man2/perf_event_open.2:469
3120 #, no-wrap
3121 msgid "B<PERF_COUNT_SW_DUMMY> (since Linux 3.12)"
3122 msgstr "B<PERF_COUNT_SW_DUMMY> (Linux 3.12 以降)"
3123
3124 #. type: Plain text
3125 #: build/C/man2/perf_event_open.2:476
3126 msgid ""
3127 "This is a placeholder event that counts nothing.  Informational sample "
3128 "record types such as mmap or comm must be associated with an active event.  "
3129 "This dummy event allows gathering such records without requiring a counting "
3130 "event."
3131 msgstr ""
3132
3133 #. type: Plain text
3134 #: build/C/man2/perf_event_open.2:489
3135 msgid ""
3136 "If I<type> is B<PERF_TYPE_TRACEPOINT>, then we are measuring kernel "
3137 "tracepoints.  The value to use in I<config> can be obtained from under "
3138 "debugfs I<tracing/events/*/*/id> if ftrace is enabled in the kernel."
3139 msgstr ""
3140
3141 #. type: Plain text
3142 #: build/C/man2/perf_event_open.2:500
3143 msgid ""
3144 "If I<type> is B<PERF_TYPE_HW_CACHE>, then we are measuring a hardware CPU "
3145 "cache event.  To calculate the appropriate I<config> value use the following "
3146 "equation:"
3147 msgstr ""
3148
3149 #. type: Plain text
3150 #: build/C/man2/perf_event_open.2:505
3151 #, no-wrap
3152 msgid ""
3153 "    (perf_hw_cache_id) | (perf_hw_cache_op_id E<lt>E<lt> 8) |\n"
3154 "    (perf_hw_cache_op_result_id E<lt>E<lt> 16)\n"
3155 msgstr ""
3156 "    (perf_hw_cache_id) | (perf_hw_cache_op_id E<lt>E<lt> 8) |\n"
3157 "    (perf_hw_cache_op_result_id E<lt>E<lt> 16)\n"
3158
3159 #. type: Plain text
3160 #: build/C/man2/perf_event_open.2:510
3161 msgid "where I<perf_hw_cache_id> is one of:"
3162 msgstr ""
3163
3164 #. type: TP
3165 #: build/C/man2/perf_event_open.2:511
3166 #, no-wrap
3167 msgid "B<PERF_COUNT_HW_CACHE_L1D>"
3168 msgstr "B<PERF_COUNT_HW_CACHE_L1D>"
3169
3170 #. type: Plain text
3171 #: build/C/man2/perf_event_open.2:514
3172 msgid "for measuring Level 1 Data Cache"
3173 msgstr ""
3174
3175 #. type: TP
3176 #: build/C/man2/perf_event_open.2:514
3177 #, no-wrap
3178 msgid "B<PERF_COUNT_HW_CACHE_L1I>"
3179 msgstr "B<PERF_COUNT_HW_CACHE_L1I>"
3180
3181 #. type: Plain text
3182 #: build/C/man2/perf_event_open.2:517
3183 msgid "for measuring Level 1 Instruction Cache"
3184 msgstr ""
3185
3186 #. type: TP
3187 #: build/C/man2/perf_event_open.2:517
3188 #, no-wrap
3189 msgid "B<PERF_COUNT_HW_CACHE_LL>"
3190 msgstr "B<PERF_COUNT_HW_CACHE_LL>"
3191
3192 #. type: Plain text
3193 #: build/C/man2/perf_event_open.2:520
3194 msgid "for measuring Last-Level Cache"
3195 msgstr ""
3196
3197 #. type: TP
3198 #: build/C/man2/perf_event_open.2:520
3199 #, no-wrap
3200 msgid "B<PERF_COUNT_HW_CACHE_DTLB>"
3201 msgstr "B<PERF_COUNT_HW_CACHE_DTLB>"
3202
3203 #. type: Plain text
3204 #: build/C/man2/perf_event_open.2:523
3205 msgid "for measuring the Data TLB"
3206 msgstr ""
3207
3208 #. type: TP
3209 #: build/C/man2/perf_event_open.2:523
3210 #, no-wrap
3211 msgid "B<PERF_COUNT_HW_CACHE_ITLB>"
3212 msgstr "B<PERF_COUNT_HW_CACHE_ITLB>"
3213
3214 #. type: Plain text
3215 #: build/C/man2/perf_event_open.2:526
3216 msgid "for measuring the Instruction TLB"
3217 msgstr ""
3218
3219 #. type: TP
3220 #: build/C/man2/perf_event_open.2:526
3221 #, no-wrap
3222 msgid "B<PERF_COUNT_HW_CACHE_BPU>"
3223 msgstr "B<PERF_COUNT_HW_CACHE_BPU>"
3224
3225 #. type: Plain text
3226 #: build/C/man2/perf_event_open.2:529
3227 msgid "for measuring the branch prediction unit"
3228 msgstr ""
3229
3230 #. type: TP
3231 #: build/C/man2/perf_event_open.2:529
3232 #, no-wrap
3233 msgid "B<PERF_COUNT_HW_CACHE_NODE> (since Linux 3.0)"
3234 msgstr "B<PERF_COUNT_HW_CACHE_NODE> (Linux 3.0 以降)"
3235
3236 #. type: Plain text
3237 #: build/C/man2/perf_event_open.2:532
3238 msgid "for measuring local memory accesses"
3239 msgstr ""
3240
3241 #. type: Plain text
3242 #: build/C/man2/perf_event_open.2:537
3243 msgid "and I<perf_hw_cache_op_id> is one of"
3244 msgstr ""
3245
3246 #. type: TP
3247 #: build/C/man2/perf_event_open.2:538
3248 #, no-wrap
3249 msgid "B<PERF_COUNT_HW_CACHE_OP_READ>"
3250 msgstr "B<PERF_COUNT_HW_CACHE_OP_READ>"
3251
3252 #. type: Plain text
3253 #: build/C/man2/perf_event_open.2:541
3254 msgid "for read accesses"
3255 msgstr ""
3256
3257 #. type: TP
3258 #: build/C/man2/perf_event_open.2:541
3259 #, no-wrap
3260 msgid "B<PERF_COUNT_HW_CACHE_OP_WRITE>"
3261 msgstr "B<PERF_COUNT_HW_CACHE_OP_WRITE>"
3262
3263 #. type: Plain text
3264 #: build/C/man2/perf_event_open.2:544
3265 msgid "for write accesses"
3266 msgstr ""
3267
3268 #. type: TP
3269 #: build/C/man2/perf_event_open.2:544
3270 #, no-wrap
3271 msgid "B<PERF_COUNT_HW_CACHE_OP_PREFETCH>"
3272 msgstr "B<PERF_COUNT_HW_CACHE_OP_PREFETCH>"
3273
3274 #. type: Plain text
3275 #: build/C/man2/perf_event_open.2:547
3276 msgid "for prefetch accesses"
3277 msgstr ""
3278
3279 #. type: Plain text
3280 #: build/C/man2/perf_event_open.2:552
3281 msgid "and I<perf_hw_cache_op_result_id> is one of"
3282 msgstr ""
3283
3284 #. type: TP
3285 #: build/C/man2/perf_event_open.2:553
3286 #, no-wrap
3287 msgid "B<PERF_COUNT_HW_CACHE_RESULT_ACCESS>"
3288 msgstr "B<PERF_COUNT_HW_CACHE_RESULT_ACCESS>"
3289
3290 #. type: Plain text
3291 #: build/C/man2/perf_event_open.2:556
3292 msgid "to measure accesses"
3293 msgstr ""
3294
3295 #. type: TP
3296 #: build/C/man2/perf_event_open.2:556
3297 #, no-wrap
3298 msgid "B<PERF_COUNT_HW_CACHE_RESULT_MISS>"
3299 msgstr "B<PERF_COUNT_HW_CACHE_RESULT_MISS>"
3300
3301 #. type: Plain text
3302 #: build/C/man2/perf_event_open.2:559
3303 msgid "to measure misses"
3304 msgstr ""
3305
3306 #. type: Plain text
3307 #: build/C/man2/perf_event_open.2:577
3308 msgid ""
3309 "If I<type> is B<PERF_TYPE_RAW>, then a custom \"raw\" I<config> value is "
3310 "needed.  Most CPUs support events that are not covered by the \"generalized"
3311 "\" events.  These are implementation defined; see your CPU manual (for "
3312 "example the Intel Volume 3B documentation or the AMD BIOS and Kernel "
3313 "Developer Guide).  The libpfm4 library can be used to translate from the "
3314 "name in the architectural manuals to the raw hex value B<perf_event_open>()  "
3315 "expects in this field."
3316 msgstr ""
3317
3318 #. type: Plain text
3319 #: build/C/man2/perf_event_open.2:586
3320 msgid ""
3321 "If I<type> is B<PERF_TYPE_BREAKPOINT>, then leave I<config> set to zero.  "
3322 "Its parameters are set in other places."
3323 msgstr ""
3324
3325 #. type: TP
3326 #: build/C/man2/perf_event_open.2:587
3327 #, no-wrap
3328 msgid "I<sample_period>, I<sample_freq>"
3329 msgstr "I<sample_period>, I<sample_freq>"
3330
3331 #. type: Plain text
3332 #: build/C/man2/perf_event_open.2:599
3333 msgid ""
3334 "A \"sampling\" counter is one that generates an interrupt every N events, "
3335 "where N is given by I<sample_period>.  A sampling counter has "
3336 "I<sample_period> E<gt> 0.  When an overflow interrupt occurs, requested data "
3337 "is recorded in the mmap buffer.  The I<sample_type> field controls what data "
3338 "is recorded on each interrupt."
3339 msgstr ""
3340
3341 #. type: Plain text
3342 #: build/C/man2/perf_event_open.2:609
3343 msgid ""
3344 "I<sample_freq> can be used if you wish to use frequency rather than period.  "
3345 "In this case, you set the I<freq> flag.  The kernel will adjust the sampling "
3346 "period to try and achieve the desired rate.  The rate of adjustment is a "
3347 "timer tick."
3348 msgstr ""
3349
3350 #. type: TP
3351 #: build/C/man2/perf_event_open.2:609
3352 #, no-wrap
3353 msgid "I<sample_type>"
3354 msgstr "I<sample_type>"
3355
3356 #. type: Plain text
3357 #: build/C/man2/perf_event_open.2:621
3358 msgid ""
3359 "The various bits in this field specify which values to include in the "
3360 "sample.  They will be recorded in a ring-buffer, which is available to user "
3361 "space using B<mmap>(2).  The order in which the values are saved in the "
3362 "sample are documented in the MMAP Layout subsection below; it is not the "
3363 "I<enum perf_event_sample_format> order."
3364 msgstr ""
3365
3366 #. type: TP
3367 #: build/C/man2/perf_event_open.2:622
3368 #, no-wrap
3369 msgid "B<PERF_SAMPLE_IP>"
3370 msgstr "B<PERF_SAMPLE_IP>"
3371
3372 #. type: Plain text
3373 #: build/C/man2/perf_event_open.2:625
3374 msgid "Records instruction pointer."
3375 msgstr ""
3376
3377 #. type: TP
3378 #: build/C/man2/perf_event_open.2:625
3379 #, no-wrap
3380 msgid "B<PERF_SAMPLE_TID>"
3381 msgstr "B<PERF_SAMPLE_TID>"
3382
3383 #. type: Plain text
3384 #: build/C/man2/perf_event_open.2:628
3385 msgid "Records the process and thread IDs."
3386 msgstr ""
3387
3388 #. type: TP
3389 #: build/C/man2/perf_event_open.2:628
3390 #, no-wrap
3391 msgid "B<PERF_SAMPLE_TIME>"
3392 msgstr "B<PERF_SAMPLE_TIME>"
3393
3394 #. type: Plain text
3395 #: build/C/man2/perf_event_open.2:631
3396 msgid "Records a timestamp."
3397 msgstr ""
3398
3399 #. type: TP
3400 #: build/C/man2/perf_event_open.2:631
3401 #, no-wrap
3402 msgid "B<PERF_SAMPLE_ADDR>"
3403 msgstr "B<PERF_SAMPLE_ADDR>"
3404
3405 #. type: Plain text
3406 #: build/C/man2/perf_event_open.2:634
3407 msgid "Records an address, if applicable."
3408 msgstr ""
3409
3410 #. type: TP
3411 #: build/C/man2/perf_event_open.2:634
3412 #, no-wrap
3413 msgid "B<PERF_SAMPLE_READ>"
3414 msgstr "B<PERF_SAMPLE_READ>"
3415
3416 #. type: Plain text
3417 #: build/C/man2/perf_event_open.2:637
3418 msgid ""
3419 "Record counter values for all events in a group, not just the group leader."
3420 msgstr ""
3421
3422 #. type: TP
3423 #: build/C/man2/perf_event_open.2:637
3424 #, no-wrap
3425 msgid "B<PERF_SAMPLE_CALLCHAIN>"
3426 msgstr "B<PERF_SAMPLE_CALLCHAIN>"
3427
3428 #. type: Plain text
3429 #: build/C/man2/perf_event_open.2:640
3430 msgid "Records the callchain (stack backtrace)."
3431 msgstr ""
3432
3433 #. type: TP
3434 #: build/C/man2/perf_event_open.2:640
3435 #, no-wrap
3436 msgid "B<PERF_SAMPLE_ID>"
3437 msgstr "B<PERF_SAMPLE_ID>"
3438
3439 #. type: Plain text
3440 #: build/C/man2/perf_event_open.2:643
3441 msgid "Records a unique ID for the opened event's group leader."
3442 msgstr ""
3443
3444 #. type: TP
3445 #: build/C/man2/perf_event_open.2:643
3446 #, no-wrap
3447 msgid "B<PERF_SAMPLE_CPU>"
3448 msgstr "B<PERF_SAMPLE_CPU>"
3449
3450 #. type: Plain text
3451 #: build/C/man2/perf_event_open.2:646
3452 msgid "Records CPU number."
3453 msgstr ""
3454
3455 #. type: TP
3456 #: build/C/man2/perf_event_open.2:646
3457 #, no-wrap
3458 msgid "B<PERF_SAMPLE_PERIOD>"
3459 msgstr "B<PERF_SAMPLE_PERIOD>"
3460
3461 #. type: Plain text
3462 #: build/C/man2/perf_event_open.2:649
3463 msgid "Records the current sampling period."
3464 msgstr ""
3465
3466 #. type: TP
3467 #: build/C/man2/perf_event_open.2:649
3468 #, no-wrap
3469 msgid "B<PERF_SAMPLE_STREAM_ID>"
3470 msgstr "B<PERF_SAMPLE_STREAM_ID>"
3471
3472 #. type: Plain text
3473 #: build/C/man2/perf_event_open.2:657
3474 msgid ""
3475 "Records a unique ID for the opened event.  Unlike B<PERF_SAMPLE_ID> the "
3476 "actual ID is returned, not the group leader.  This ID is the same as the one "
3477 "returned by B<PERF_FORMAT_ID>."
3478 msgstr ""
3479
3480 #. type: TP
3481 #: build/C/man2/perf_event_open.2:657
3482 #, no-wrap
3483 msgid "B<PERF_SAMPLE_RAW>"
3484 msgstr "B<PERF_SAMPLE_RAW>"
3485
3486 #. type: Plain text
3487 #: build/C/man2/perf_event_open.2:661
3488 msgid ""
3489 "Records additional data, if applicable.  Usually returned by tracepoint "
3490 "events."
3491 msgstr ""
3492
3493 #. type: TP
3494 #: build/C/man2/perf_event_open.2:661
3495 #, no-wrap
3496 msgid "B<PERF_SAMPLE_BRANCH_STACK> (since Linux 3.4)"
3497 msgstr "B<PERF_SAMPLE_BRANCH_STACK> (Linux 3.4 以降)"
3498
3499 #. type: Plain text
3500 #: build/C/man2/perf_event_open.2:666
3501 msgid ""
3502 "This provides a record of recent branches, as provided by CPU branch "
3503 "sampling hardware (such as Intel Last Branch Record).  Not all hardware "
3504 "supports this feature."
3505 msgstr ""
3506
3507 #. type: Plain text
3508 #: build/C/man2/perf_event_open.2:670
3509 msgid ""
3510 "See the I<branch_sample_type> field for how to filter which branches are "
3511 "reported."
3512 msgstr ""
3513
3514 #. type: TP
3515 #: build/C/man2/perf_event_open.2:670
3516 #, no-wrap
3517 msgid "B<PERF_SAMPLE_REGS_USER> (since Linux 3.7)"
3518 msgstr "B<PERF_SAMPLE_REGS_USER> (Linux 3.7 以降)"
3519
3520 #. type: Plain text
3521 #: build/C/man2/perf_event_open.2:674
3522 msgid ""
3523 "Records the current user-level CPU register state (the values in the process "
3524 "before the kernel was called)."
3525 msgstr ""
3526
3527 #. type: TP
3528 #: build/C/man2/perf_event_open.2:674
3529 #, no-wrap
3530 msgid "B<PERF_SAMPLE_STACK_USER> (since Linux 3.7)"
3531 msgstr "B<PERF_SAMPLE_STACK_USER> (Linux 3.7 以降)"
3532
3533 #. type: Plain text
3534 #: build/C/man2/perf_event_open.2:677
3535 msgid "Records the user level stack, allowing stack unwinding."
3536 msgstr ""
3537
3538 #. type: TP
3539 #: build/C/man2/perf_event_open.2:677
3540 #, no-wrap
3541 msgid "B<PERF_SAMPLE_WEIGHT> (since Linux 3.10)"
3542 msgstr "B<PERF_SAMPLE_WEIGHT> (Linux 3.10 以降)"
3543
3544 #. type: Plain text
3545 #: build/C/man2/perf_event_open.2:683
3546 msgid ""
3547 "Records a hardware provided weight value that expresses how costly the "
3548 "sampled event was.  This allows the hardware to highlight expensive events "
3549 "in a profile."
3550 msgstr ""
3551
3552 #. type: TP
3553 #: build/C/man2/perf_event_open.2:683
3554 #, no-wrap
3555 msgid "B<PERF_SAMPLE_DATA_SRC> (since Linux 3.10)"
3556 msgstr "B<PERF_SAMPLE_DATA_SRC> (Linux 3.10 以降)"
3557
3558 #. type: Plain text
3559 #: build/C/man2/perf_event_open.2:689
3560 msgid ""
3561 "Records the data source: where in the memory hierarchy the data associated "
3562 "with the sampled instruction came from.  This is only available if the "
3563 "underlying hardware supports this feature."
3564 msgstr ""
3565
3566 #. type: TP
3567 #: build/C/man2/perf_event_open.2:689
3568 #, no-wrap
3569 msgid "B<PERF_SAMPLE_IDENTIFIER> (since Linux 3.12)"
3570 msgstr "B<PERF_SAMPLE_IDENTIFIER> (Linux 3.12 以降)"
3571
3572 #. type: Plain text
3573 #: build/C/man2/perf_event_open.2:696
3574 msgid ""
3575 "Places the B<SAMPLE_ID> value in a fixed position in the record, either at "
3576 "the beginning (for sample events) or at the end (if a non-sample event)."
3577 msgstr ""
3578
3579 #. type: Plain text
3580 #: build/C/man2/perf_event_open.2:708
3581 msgid ""
3582 "This was necessary because a sample stream may have records from various "
3583 "different event sources with different I<sample_type> settings.  Parsing the "
3584 "event stream properly was not possible because the format of the record was "
3585 "needed to find B<SAMPLE_ID>, but the format could not be found without "
3586 "knowing what event the sample belonged to (causing a circular dependency)."
3587 msgstr ""
3588
3589 #. type: Plain text
3590 #: build/C/man2/perf_event_open.2:718
3591 msgid ""
3592 "This new B<PERF_SAMPLE_IDENTIFIER> setting makes the event stream always "
3593 "parsable by putting B<SAMPLE_ID> in a fixed location, even though it means "
3594 "having duplicate B<SAMPLE_ID> values in records."
3595 msgstr ""
3596
3597 #. type: TP
3598 #: build/C/man2/perf_event_open.2:718
3599 #, no-wrap
3600 msgid "B<PERF_SAMPLE_TRANSACTION> (Since Linux 3.13)"
3601 msgstr "B<PERF_SAMPLE_TRANSACTION> (Linux 3.13 以降)"
3602
3603 #. type: Plain text
3604 #: build/C/man2/perf_event_open.2:722
3605 msgid ""
3606 "Records reasons for transactional memory abort events (for example, from "
3607 "Intel TSX transactional memory support)."
3608 msgstr ""
3609
3610 #. type: Plain text
3611 #: build/C/man2/perf_event_open.2:730
3612 msgid ""
3613 "The I<precise_ip> setting must be greater than 0 and a transactional memory "
3614 "abort event must be measured or no values will be recorded.  Also note that "
3615 "some perf_event measurements, such as sampled cycle counting, may cause "
3616 "extraneous aborts (by causing an interrupt during a transaction)."
3617 msgstr ""
3618
3619 #. type: TP
3620 #: build/C/man2/perf_event_open.2:731
3621 #, no-wrap
3622 msgid "I<read_format>"
3623 msgstr "I<read_format>"
3624
3625 #. type: Plain text
3626 #: build/C/man2/perf_event_open.2:738
3627 msgid ""
3628 "This field specifies the format of the data returned by B<read>(2)  on a "
3629 "B<perf_event_open>()  file descriptor."
3630 msgstr ""
3631
3632 #. type: TP
3633 #: build/C/man2/perf_event_open.2:739
3634 #, no-wrap
3635 msgid "B<PERF_FORMAT_TOTAL_TIME_ENABLED>"
3636 msgstr "B<PERF_FORMAT_TOTAL_TIME_ENABLED>"
3637
3638 #. type: Plain text
3639 #: build/C/man2/perf_event_open.2:746
3640 msgid ""
3641 "Adds the 64-bit I<time_enabled> field.  This can be used to calculate "
3642 "estimated totals if the PMU is overcommitted and multiplexing is happening."
3643 msgstr ""
3644
3645 #. type: TP
3646 #: build/C/man2/perf_event_open.2:746
3647 #, no-wrap
3648 msgid "B<PERF_FORMAT_TOTAL_TIME_RUNNING>"
3649 msgstr "B<PERF_FORMAT_TOTAL_TIME_RUNNING>"
3650
3651 #. type: Plain text
3652 #: build/C/man2/perf_event_open.2:753
3653 msgid ""
3654 "Adds the 64-bit I<time_running> field.  This can be used to calculate "
3655 "estimated totals if the PMU is overcommitted and multiplexing is happening."
3656 msgstr ""
3657
3658 #. type: TP
3659 #: build/C/man2/perf_event_open.2:753
3660 #, no-wrap
3661 msgid "B<PERF_FORMAT_ID>"
3662 msgstr "B<PERF_FORMAT_ID>"
3663
3664 #. type: Plain text
3665 #: build/C/man2/perf_event_open.2:756
3666 msgid "Adds a 64-bit unique value that corresponds to the event group."
3667 msgstr ""
3668
3669 #. type: TP
3670 #: build/C/man2/perf_event_open.2:756
3671 #, no-wrap
3672 msgid "B<PERF_FORMAT_GROUP>"
3673 msgstr "B<PERF_FORMAT_GROUP>"
3674
3675 #. type: Plain text
3676 #: build/C/man2/perf_event_open.2:759
3677 msgid "Allows all counter values in an event group to be read with one read."
3678 msgstr ""
3679
3680 #. type: TP
3681 #: build/C/man2/perf_event_open.2:760
3682 #, no-wrap
3683 msgid "I<disabled>"
3684 msgstr "I<disabled>"
3685
3686 #. type: Plain text
3687 #: build/C/man2/perf_event_open.2:770
3688 msgid ""
3689 "The I<disabled> bit specifies whether the counter starts out disabled or "
3690 "enabled.  If disabled, the event can later be enabled by B<ioctl>(2), "
3691 "B<prctl>(2), or I<enable_on_exec>."
3692 msgstr ""
3693
3694 #. type: Plain text
3695 #: build/C/man2/perf_event_open.2:781
3696 msgid ""
3697 "When creating an event group, typically the group leader is initialized with "
3698 "I<disabled> set to 1 and any child events are initialized with I<disabled> "
3699 "set to 0.  Despite I<disabled> being 0, the child events will not start "
3700 "until the group leader is enabled."
3701 msgstr ""
3702
3703 #. type: TP
3704 #: build/C/man2/perf_event_open.2:781
3705 #, no-wrap
3706 msgid "I<inherit>"
3707 msgstr "I<inherit>"
3708
3709 #. type: Plain text
3710 #: build/C/man2/perf_event_open.2:790
3711 msgid ""
3712 "The I<inherit> bit specifies that this counter should count events of child "
3713 "tasks as well as the task specified.  This applies only to new children, not "
3714 "to any existing children at the time the counter is created (nor to any new "
3715 "children of existing children)."
3716 msgstr ""
3717
3718 #. type: Plain text
3719 #: build/C/man2/perf_event_open.2:795
3720 msgid ""
3721 "Inherit does not work for some combinations of I<read_format>s, such as "
3722 "B<PERF_FORMAT_GROUP>."
3723 msgstr ""
3724
3725 #. type: TP
3726 #: build/C/man2/perf_event_open.2:795
3727 #, no-wrap
3728 msgid "I<pinned>"
3729 msgstr "I<pinned>"
3730
3731 #. type: Plain text
3732 #: build/C/man2/perf_event_open.2:808
3733 msgid ""
3734 "The I<pinned> bit specifies that the counter should always be on the CPU if "
3735 "at all possible.  It applies only to hardware counters and only to group "
3736 "leaders.  If a pinned counter cannot be put onto the CPU (e.g., because "
3737 "there are not enough hardware counters or because of a conflict with some "
3738 "other event), then the counter goes into an 'error' state, where reads "
3739 "return end-of-file (i.e., B<read>(2)  returns 0) until the counter is "
3740 "subsequently enabled or disabled."
3741 msgstr ""
3742
3743 #. type: TP
3744 #: build/C/man2/perf_event_open.2:808
3745 #, no-wrap
3746 msgid "I<exclusive>"
3747 msgstr "I<exclusive>"
3748
3749 #. type: Plain text
3750 #: build/C/man2/perf_event_open.2:817
3751 msgid ""
3752 "The I<exclusive> bit specifies that when this counter's group is on the CPU, "
3753 "it should be the only group using the CPU's counters.  In the future this "
3754 "may allow monitoring programs to support PMU features that need to run alone "
3755 "so that they do not disrupt other hardware counters."
3756 msgstr ""
3757
3758 #. type: Plain text
3759 #: build/C/man2/perf_event_open.2:824
3760 msgid ""
3761 "Note that many unexpected situations may prevent events with the "
3762 "I<exclusive> bit set from ever running.  This includes any users running a "
3763 "system-wide measurement as well as any kernel use of the performance "
3764 "counters (including the commonly enabled NMI Watchdog Timer interface)."
3765 msgstr ""
3766
3767 #. type: TP
3768 #: build/C/man2/perf_event_open.2:824
3769 #, no-wrap
3770 msgid "I<exclude_user>"
3771 msgstr "I<exclude_user>"
3772
3773 #. type: Plain text
3774 #: build/C/man2/perf_event_open.2:827
3775 msgid ""
3776 "If this bit is set, the count excludes events that happen in user space."
3777 msgstr ""
3778
3779 #. type: TP
3780 #: build/C/man2/perf_event_open.2:827
3781 #, no-wrap
3782 msgid "I<exclude_kernel>"
3783 msgstr "I<exclude_kernel>"
3784
3785 #. type: Plain text
3786 #: build/C/man2/perf_event_open.2:830
3787 msgid ""
3788 "If this bit is set, the count excludes events that happen in kernel-space."
3789 msgstr ""
3790
3791 #. type: TP
3792 #: build/C/man2/perf_event_open.2:830
3793 #, no-wrap
3794 msgid "I<exclude_hv>"
3795 msgstr "I<exclude_hv>"
3796
3797 #. type: Plain text
3798 #: build/C/man2/perf_event_open.2:838
3799 msgid ""
3800 "If this bit is set, the count excludes events that happen in the "
3801 "hypervisor.  This is mainly for PMUs that have built-in support for handling "
3802 "this (such as POWER).  Extra support is needed for handling hypervisor "
3803 "measurements on most machines."
3804 msgstr ""
3805
3806 #. type: TP
3807 #: build/C/man2/perf_event_open.2:838
3808 #, no-wrap
3809 msgid "I<exclude_idle>"
3810 msgstr "I<exclude_idle>"
3811
3812 #. type: Plain text
3813 #: build/C/man2/perf_event_open.2:841
3814 msgid "If set, don't count when the CPU is idle."
3815 msgstr ""
3816
3817 #. type: TP
3818 #: build/C/man2/perf_event_open.2:841
3819 #, no-wrap
3820 msgid "I<mmap>"
3821 msgstr "I<mmap>"
3822
3823 #. type: Plain text
3824 #: build/C/man2/perf_event_open.2:855
3825 msgid ""
3826 "The I<mmap> bit enables generation of B<PERF_RECORD_MMAP> samples for every "
3827 "B<mmap>(2)  call that has B<PROT_EXEC> set.  This allows tools to notice new "
3828 "executable code being mapped into a program (dynamic shared libraries for "
3829 "example)  so that addresses can be mapped back to the original code."
3830 msgstr ""
3831
3832 #. type: TP
3833 #: build/C/man2/perf_event_open.2:855
3834 #, no-wrap
3835 msgid "I<comm>"
3836 msgstr "I<comm>"
3837
3838 #. type: Plain text
3839 #: build/C/man2/perf_event_open.2:866
3840 msgid ""
3841 "The I<comm> bit enables tracking of process command name as modified by the "
3842 "B<exec>(2)  and B<prctl>(PR_SET_NAME)  system calls.  Unfortunately for "
3843 "tools, there is no way to distinguish one system call versus the other."
3844 msgstr ""
3845
3846 #. type: TP
3847 #: build/C/man2/perf_event_open.2:866
3848 #, no-wrap
3849 msgid "I<freq>"
3850 msgstr "I<freq>"
3851
3852 #. type: Plain text
3853 #: build/C/man2/perf_event_open.2:873
3854 msgid ""
3855 "If this bit is set, then I<sample_frequency> not I<sample_period> is used "
3856 "when setting up the sampling interval."
3857 msgstr ""
3858
3859 #. type: TP
3860 #: build/C/man2/perf_event_open.2:873
3861 #, no-wrap
3862 msgid "I<inherit_stat>"
3863 msgstr "I<inherit_stat>"
3864
3865 #. type: Plain text
3866 #: build/C/man2/perf_event_open.2:880
3867 msgid ""
3868 "This bit enables saving of event counts on context switch for inherited "
3869 "tasks.  This is meaningful only if the I<inherit> field is set."
3870 msgstr ""
3871
3872 #. type: TP
3873 #: build/C/man2/perf_event_open.2:880
3874 #, no-wrap
3875 msgid "I<enable_on_exec>"
3876 msgstr "I<enable_on_exec>"
3877
3878 #. type: Plain text
3879 #: build/C/man2/perf_event_open.2:885
3880 msgid ""
3881 "If this bit is set, a counter is automatically enabled after a call to "
3882 "B<exec>(2)."
3883 msgstr ""
3884
3885 #. type: TP
3886 #: build/C/man2/perf_event_open.2:885
3887 #, no-wrap
3888 msgid "I<task>"
3889 msgstr "I<task>"
3890
3891 #. type: Plain text
3892 #: build/C/man2/perf_event_open.2:889
3893 msgid ""
3894 "If this bit is set, then fork/exit notifications are included in the ring "
3895 "buffer."
3896 msgstr ""
3897
3898 #. type: TP
3899 #: build/C/man2/perf_event_open.2:889
3900 #, no-wrap
3901 msgid "I<watermark>"
3902 msgstr "I<watermark>"
3903
3904 #. type: Plain text
3905 #: build/C/man2/perf_event_open.2:897
3906 msgid ""
3907 "If set, have a sampling interrupt happen when we cross the "
3908 "I<wakeup_watermark> boundary.  Otherwise, interrupts happen after "
3909 "I<wakeup_events> samples."
3910 msgstr ""
3911
3912 #. type: TP
3913 #: build/C/man2/perf_event_open.2:897
3914 #, no-wrap
3915 msgid "I<precise_ip> (since Linux 2.6.35)"
3916 msgstr "I<precise_ip> (Linux 2.6.35 以降)"
3917
3918 #. type: Plain text
3919 #: build/C/man2/perf_event_open.2:907
3920 msgid ""
3921 "This controls the amount of skid.  Skid is how many instructions execute "
3922 "between an event of interest happening and the kernel being able to stop and "
3923 "record the event.  Smaller skid is better and allows more accurate reporting "
3924 "of which events correspond to which instructions, but hardware is often "
3925 "limited with how small this can be."
3926 msgstr ""
3927
3928 #. type: Plain text
3929 #: build/C/man2/perf_event_open.2:909
3930 msgid "The values of this are the following:"
3931 msgstr ""
3932
3933 #. type: TP
3934 #: build/C/man2/perf_event_open.2:910
3935 #, no-wrap
3936 msgid "0 -"
3937 msgstr "0 -"
3938
3939 #. type: Plain text
3940 #: build/C/man2/perf_event_open.2:914
3941 msgid "B<SAMPLE_IP> can have arbitrary skid."
3942 msgstr ""
3943
3944 #. type: TP
3945 #: build/C/man2/perf_event_open.2:914
3946 #, no-wrap
3947 msgid "1 -"
3948 msgstr "1 -"
3949
3950 #. type: Plain text
3951 #: build/C/man2/perf_event_open.2:918
3952 msgid "B<SAMPLE_IP> must have constant skid."
3953 msgstr ""
3954
3955 #. type: TP
3956 #: build/C/man2/perf_event_open.2:918
3957 #, no-wrap
3958 msgid "2 -"
3959 msgstr "2 -"
3960
3961 #. type: Plain text
3962 #: build/C/man2/perf_event_open.2:922
3963 msgid "B<SAMPLE_IP> requested to have 0 skid."
3964 msgstr ""
3965
3966 #. type: TP
3967 #: build/C/man2/perf_event_open.2:922
3968 #, no-wrap
3969 msgid "3 -"
3970 msgstr "3 -"
3971
3972 #. type: Plain text
3973 #: build/C/man2/perf_event_open.2:928
3974 msgid "B<SAMPLE_IP> must have 0 skid.  See also B<PERF_RECORD_MISC_EXACT_IP>."
3975 msgstr ""
3976
3977 #. type: TP
3978 #: build/C/man2/perf_event_open.2:929
3979 #, no-wrap
3980 msgid "I<mmap_data> (since Linux 2.6.36)"
3981 msgstr "I<mmap_data> (Linux 2.6.36 以降)"
3982
3983 #. type: Plain text
3984 #: build/C/man2/perf_event_open.2:941
3985 msgid ""
3986 "The counterpart of the I<mmap> field.  This enables generation of "
3987 "B<PERF_RECORD_MMAP> samples for B<mmap>(2)  calls that do not have "
3988 "B<PROT_EXEC> set (for example data and SysV shared memory)."
3989 msgstr ""
3990
3991 #. type: TP
3992 #: build/C/man2/perf_event_open.2:941
3993 #, no-wrap
3994 msgid "I<sample_id_all> (since Linux 2.6.38)"
3995 msgstr "I<sample_id_all> (Linux 2.6.38 以降)"
3996
3997 #. type: Plain text
3998 #: build/C/man2/perf_event_open.2:949
3999 msgid ""
4000 "If set, then TID, TIME, ID, STREAM_ID, and CPU can additionally be included "
4001 "in non-B<PERF_RECORD_SAMPLE>s if the corresponding I<sample_type> is "
4002 "selected."
4003 msgstr ""
4004
4005 #. type: Plain text
4006 #: build/C/man2/perf_event_open.2:957
4007 msgid ""
4008 "If B<PERF_SAMPLE_IDENTIFIER> is specified, then an additional ID value is "
4009 "included as the last value to ease parsing the record stream.  This may lead "
4010 "to the I<id> value appearing twice."
4011 msgstr ""
4012
4013 #. type: Plain text
4014 #: build/C/man2/perf_event_open.2:959
4015 msgid "The layout is described by this pseudo-structure:"
4016 msgstr ""
4017
4018 #. type: Plain text
4019 #: build/C/man2/perf_event_open.2:969
4020 #, no-wrap
4021 msgid ""
4022 "struct sample_id {\n"
4023 "    { u32 pid, tid; } /* if PERF_SAMPLE_TID set        */\n"
4024 "    { u64 time;     } /* if PERF_SAMPLE_TIME set       */\n"
4025 "    { u64 id;       } /* if PERF_SAMPLE_ID set         */\n"
4026 "    { u64 stream_id;} /* if PERF_SAMPLE_STREAM_ID set  */\n"
4027 "    { u32 cpu, res; } /* if PERF_SAMPLE_CPU set        */\n"
4028 "    { u64 id;       } /* if PERF_SAMPLE_IDENTIFIER set */\n"
4029 "};\n"
4030 msgstr ""
4031 "struct sample_id {\n"
4032 "    { u32 pid, tid; } /* if PERF_SAMPLE_TID set        */\n"
4033 "    { u64 time;     } /* if PERF_SAMPLE_TIME set       */\n"
4034 "    { u64 id;       } /* if PERF_SAMPLE_ID set         */\n"
4035 "    { u64 stream_id;} /* if PERF_SAMPLE_STREAM_ID set  */\n"
4036 "    { u32 cpu, res; } /* if PERF_SAMPLE_CPU set        */\n"
4037 "    { u64 id;       } /* if PERF_SAMPLE_IDENTIFIER set */\n"
4038 "};\n"
4039
4040 #. type: TP
4041 #: build/C/man2/perf_event_open.2:970
4042 #, no-wrap
4043 msgid "I<exclude_host> (since Linux 3.2)"
4044 msgstr "I<exclude_host> (Linux 3.2 以降)"
4045
4046 #. type: Plain text
4047 #: build/C/man2/perf_event_open.2:973
4048 msgid "Do not measure time spent in VM host."
4049 msgstr ""
4050
4051 #. type: TP
4052 #: build/C/man2/perf_event_open.2:973
4053 #, no-wrap
4054 msgid "I<exclude_guest> (since Linux 3.2)"
4055 msgstr "I<exclude_guest> (Linux 3.2 以降)"
4056
4057 #. type: Plain text
4058 #: build/C/man2/perf_event_open.2:976
4059 msgid "Do not measure time spent in VM guest."
4060 msgstr ""
4061
4062 #. type: TP
4063 #: build/C/man2/perf_event_open.2:976
4064 #, no-wrap
4065 msgid "I<exclude_callchain_kernel> (since Linux 3.7)"
4066 msgstr "I<exclude_callchain_kernel> (Linux 3.7 以降)"
4067
4068 #. type: Plain text
4069 #: build/C/man2/perf_event_open.2:979
4070 msgid "Do not include kernel callchains."
4071 msgstr ""
4072
4073 #. type: TP
4074 #: build/C/man2/perf_event_open.2:979
4075 #, no-wrap
4076 msgid "I<exclude_callchain_user> (since Linux 3.7)"
4077 msgstr "I<exclude_callchain_user> (Linux 3.7 以降)"
4078
4079 #. type: Plain text
4080 #: build/C/man2/perf_event_open.2:982
4081 msgid "Do not include user callchains."
4082 msgstr ""
4083
4084 #. type: TP
4085 #: build/C/man2/perf_event_open.2:982
4086 #, no-wrap
4087 msgid "I<wakeup_events>, I<wakeup_watermark>"
4088 msgstr "I<wakeup_events>, I<wakeup_watermark>"
4089
4090 #. type: Plain text
4091 #: build/C/man2/perf_event_open.2:992
4092 msgid ""
4093 "This union sets how many samples (I<wakeup_events>)  or bytes "
4094 "(I<wakeup_watermark>)  happen before an overflow signal happens.  Which one "
4095 "is used is selected by the I<watermark> bit flag."
4096 msgstr ""
4097
4098 #. type: Plain text
4099 #: build/C/man2/perf_event_open.2:1002
4100 msgid ""
4101 "I<wakeup_events> only counts B<PERF_RECORD_SAMPLE> record types.  To receive "
4102 "a signal for every incoming B<PERF_RECORD> type set I<wakeup_watermark> to 1."
4103 msgstr ""
4104
4105 #. type: TP
4106 #: build/C/man2/perf_event_open.2:1002
4107 #, no-wrap
4108 msgid "I<bp_type> (since Linux 2.6.33)"
4109 msgstr "I<bp_type> (Linux 2.6.33 以降)"
4110
4111 #. type: Plain text
4112 #: build/C/man2/perf_event_open.2:1006
4113 msgid "This chooses the breakpoint type.  It is one of:"
4114 msgstr ""
4115
4116 #. type: TP
4117 #: build/C/man2/perf_event_open.2:1007
4118 #, no-wrap
4119 msgid "B<HW_BREAKPOINT_EMPTY>"
4120 msgstr "B<HW_BREAKPOINT_EMPTY>"
4121
4122 #. type: Plain text
4123 #: build/C/man2/perf_event_open.2:1010
4124 msgid "No breakpoint."
4125 msgstr ""
4126
4127 #. type: TP
4128 #: build/C/man2/perf_event_open.2:1010
4129 #, no-wrap
4130 msgid "B<HW_BREAKPOINT_R>"
4131 msgstr "B<HW_BREAKPOINT_R>"
4132
4133 #. type: Plain text
4134 #: build/C/man2/perf_event_open.2:1013
4135 msgid "Count when we read the memory location."
4136 msgstr ""
4137
4138 #. type: TP
4139 #: build/C/man2/perf_event_open.2:1013
4140 #, no-wrap
4141 msgid "B<HW_BREAKPOINT_W>"
4142 msgstr "B<HW_BREAKPOINT_W>"
4143
4144 #. type: Plain text
4145 #: build/C/man2/perf_event_open.2:1016
4146 msgid "Count when we write the memory location."
4147 msgstr ""
4148
4149 #. type: TP
4150 #: build/C/man2/perf_event_open.2:1016
4151 #, no-wrap
4152 msgid "B<HW_BREAKPOINT_RW>"
4153 msgstr "B<HW_BREAKPOINT_RW>"
4154
4155 #. type: Plain text
4156 #: build/C/man2/perf_event_open.2:1019
4157 msgid "Count when we read or write the memory location."
4158 msgstr ""
4159
4160 #. type: TP
4161 #: build/C/man2/perf_event_open.2:1019
4162 #, no-wrap
4163 msgid "B<HW_BREAKPOINT_X>"
4164 msgstr "B<HW_BREAKPOINT_X>"
4165
4166 #. type: Plain text
4167 #: build/C/man2/perf_event_open.2:1022
4168 msgid "Count when we execute code at the memory location."
4169 msgstr ""
4170
4171 #. type: Plain text
4172 #: build/C/man2/perf_event_open.2:1031
4173 msgid ""
4174 "The values can be combined via a bitwise or, but the combination of "
4175 "B<HW_BREAKPOINT_R> or B<HW_BREAKPOINT_W> with B<HW_BREAKPOINT_X> is not "
4176 "allowed."
4177 msgstr ""
4178
4179 #. type: TP
4180 #: build/C/man2/perf_event_open.2:1032
4181 #, no-wrap
4182 msgid "I<bp_addr> (since Linux 2.6.33)"
4183 msgstr "I<bp_addr> (Linux 2.6.33 以降)"
4184
4185 #. type: Plain text
4186 #: build/C/man2/perf_event_open.2:1039
4187 msgid ""
4188 "I<bp_addr> address of the breakpoint.  For execution breakpoints this is the "
4189 "memory address of the instruction of interest; for read and write "
4190 "breakpoints it is the memory address of the memory location of interest."
4191 msgstr ""
4192
4193 #. type: TP
4194 #: build/C/man2/perf_event_open.2:1039
4195 #, no-wrap
4196 msgid "I<config1> (since Linux 2.6.39)"
4197 msgstr "I<config1> (Linux 2.6.39 以降)"
4198
4199 #. type: Plain text
4200 #: build/C/man2/perf_event_open.2:1046
4201 msgid ""
4202 "I<config1> is used for setting events that need an extra register or "
4203 "otherwise do not fit in the regular config field.  Raw OFFCORE_EVENTS on "
4204 "Nehalem/Westmere/SandyBridge use this field on 3.3 and later kernels."
4205 msgstr ""
4206
4207 #. type: TP
4208 #: build/C/man2/perf_event_open.2:1046
4209 #, no-wrap
4210 msgid "I<bp_len> (since Linux 2.6.33)"
4211 msgstr "I<bp_len> (Linux 2.6.33 以降)"
4212
4213 #. type: Plain text
4214 #: build/C/man2/perf_event_open.2:1060
4215 msgid ""
4216 "I<bp_len> is the length of the breakpoint being measured if I<type> is "
4217 "B<PERF_TYPE_BREAKPOINT>.  Options are B<HW_BREAKPOINT_LEN_1>, "
4218 "B<HW_BREAKPOINT_LEN_2>, B<HW_BREAKPOINT_LEN_4>, B<HW_BREAKPOINT_LEN_8>.  For "
4219 "an execution breakpoint, set this to I<sizeof(long)>."
4220 msgstr ""
4221
4222 #. type: TP
4223 #: build/C/man2/perf_event_open.2:1060
4224 #, no-wrap
4225 msgid "I<config2> (since Linux 2.6.39)"
4226 msgstr "I<config2> (Linux 2.6.39 以降)"
4227
4228 #. type: Plain text
4229 #: build/C/man2/perf_event_open.2:1067
4230 msgid "I<config2> is a further extension of the I<config1> field."
4231 msgstr ""
4232
4233 #. type: TP
4234 #: build/C/man2/perf_event_open.2:1067
4235 #, no-wrap
4236 msgid "I<branch_sample_type> (since Linux 3.4)"
4237 msgstr "I<branch_sample_type> (Linux 3.4 以降)"
4238
4239 #. type: Plain text
4240 #: build/C/man2/perf_event_open.2:1073
4241 msgid ""
4242 "If B<PERF_SAMPLE_BRANCH_STACK> is enabled, then this specifies what branches "
4243 "to include in the branch record."
4244 msgstr ""
4245
4246 #. type: Plain text
4247 #: build/C/man2/perf_event_open.2:1079
4248 msgid ""
4249 "The first part of the value is the privilege level, which is a combination "
4250 "of one of the following values.  If the user does not set privilege level "
4251 "explicitly, the kernel will use the event's privilege level.  Event and "
4252 "branch privilege levels do not have to match."
4253 msgstr ""
4254
4255 #. type: TP
4256 #: build/C/man2/perf_event_open.2:1080
4257 #, no-wrap
4258 msgid "B<PERF_SAMPLE_BRANCH_USER>"
4259 msgstr ""
4260
4261 #. type: Plain text
4262 #: build/C/man2/perf_event_open.2:1083
4263 msgid "Branch target is in user space."
4264 msgstr ""
4265
4266 #. type: TP
4267 #: build/C/man2/perf_event_open.2:1083
4268 #, no-wrap
4269 msgid "B<PERF_SAMPLE_BRANCH_KERNEL>"
4270 msgstr ""
4271
4272 #. type: Plain text
4273 #: build/C/man2/perf_event_open.2:1086
4274 msgid "Branch target is in kernel space."
4275 msgstr ""
4276
4277 #. type: TP
4278 #: build/C/man2/perf_event_open.2:1086
4279 #, no-wrap
4280 msgid "B<PERF_SAMPLE_BRANCH_HV>"
4281 msgstr ""
4282
4283 #. type: Plain text
4284 #: build/C/man2/perf_event_open.2:1089
4285 msgid "Branch target is in hypervisor."
4286 msgstr ""
4287
4288 #. type: TP
4289 #: build/C/man2/perf_event_open.2:1089
4290 #, no-wrap
4291 msgid "B<PERF_SAMPLE_BRANCH_PLM_ALL>"
4292 msgstr ""
4293
4294 #. type: Plain text
4295 #: build/C/man2/perf_event_open.2:1092
4296 msgid "A convenience value that is the three preceding values ORed together."
4297 msgstr ""
4298
4299 #. type: Plain text
4300 #: build/C/man2/perf_event_open.2:1096
4301 msgid ""
4302 "In addition to the privilege value, at least one or more of the following "
4303 "bits must be set."
4304 msgstr ""
4305
4306 #. type: TP
4307 #: build/C/man2/perf_event_open.2:1097
4308 #, no-wrap
4309 msgid "B<PERF_SAMPLE_BRANCH_ANY>"
4310 msgstr ""
4311
4312 #. type: Plain text
4313 #: build/C/man2/perf_event_open.2:1100
4314 msgid "Any branch type."
4315 msgstr ""
4316
4317 #. type: TP
4318 #: build/C/man2/perf_event_open.2:1100
4319 #, no-wrap
4320 msgid "B<PERF_SAMPLE_BRANCH_ANY_CALL>"
4321 msgstr ""
4322
4323 #. type: Plain text
4324 #: build/C/man2/perf_event_open.2:1103
4325 msgid "Any call branch."
4326 msgstr ""
4327
4328 #. type: TP
4329 #: build/C/man2/perf_event_open.2:1103
4330 #, no-wrap
4331 msgid "B<PERF_SAMPLE_BRANCH_ANY_RETURN>"
4332 msgstr ""
4333
4334 #. type: Plain text
4335 #: build/C/man2/perf_event_open.2:1106
4336 msgid "Any return branch."
4337 msgstr ""
4338
4339 #. type: TP
4340 #: build/C/man2/perf_event_open.2:1106
4341 #, no-wrap
4342 msgid "B<PERF_SAMPLE_BRANCH_IND_CALL>"
4343 msgstr ""
4344
4345 #. type: Plain text
4346 #: build/C/man2/perf_event_open.2:1109
4347 msgid "Indirect calls."
4348 msgstr ""
4349
4350 #. type: TP
4351 #: build/C/man2/perf_event_open.2:1109
4352 #, no-wrap
4353 msgid "B<PERF_SAMPLE_BRANCH_ABORT_TX> (since Linux 3.11)"
4354 msgstr "B<PERF_SAMPLE_BRANCH_ABORT_TX> (Linux 3.11 以降)"
4355
4356 #. type: Plain text
4357 #: build/C/man2/perf_event_open.2:1112
4358 msgid "Transactional memory aborts."
4359 msgstr ""
4360
4361 #. type: TP
4362 #: build/C/man2/perf_event_open.2:1112
4363 #, no-wrap
4364 msgid "B<PERF_SAMPLE_BRANCH_IN_TX> (since Linux 3.11)"
4365 msgstr "B<PERF_SAMPLE_BRANCH_IN_TX> (Linux 3.11 以降)"
4366
4367 #. type: Plain text
4368 #: build/C/man2/perf_event_open.2:1115
4369 msgid "Branch in transactional memory transaction."
4370 msgstr ""
4371
4372 #. type: TP
4373 #: build/C/man2/perf_event_open.2:1115
4374 #, no-wrap
4375 msgid "B<PERF_SAMPLE_BRANCH_NO_TX> (since Linux 3.11)"
4376 msgstr "B<PERF_SAMPLE_BRANCH_NO_TX> (Linux 3.11 以降)"
4377
4378 #. type: Plain text
4379 #: build/C/man2/perf_event_open.2:1118
4380 msgid "Branch not in transactional memory transaction."
4381 msgstr ""
4382
4383 #. type: TP
4384 #: build/C/man2/perf_event_open.2:1120
4385 #, no-wrap
4386 msgid "I<sample_regs_user> (since Linux 3.7)"
4387 msgstr "I<sample_regs_user> (Linux 3.7 以降)"
4388
4389 #. type: Plain text
4390 #: build/C/man2/perf_event_open.2:1126
4391 msgid ""
4392 "This bit mask defines the set of user CPU registers to dump on samples.  The "
4393 "layout of the register mask is architecture-specific and described in the "
4394 "kernel header I<arch/ARCH/include/uapi/asm/perf_regs.h>."
4395 msgstr ""
4396
4397 #. type: TP
4398 #: build/C/man2/perf_event_open.2:1126
4399 #, no-wrap
4400 msgid "I<sample_stack_user> (since Linux 3.7)"
4401 msgstr "I<sample_stack_user> (Linux 3.7 以降)"
4402
4403 #. type: Plain text
4404 #: build/C/man2/perf_event_open.2:1131
4405 msgid ""
4406 "This defines the size of the user stack to dump if B<PERF_SAMPLE_STACK_USER> "
4407 "is specified."
4408 msgstr ""
4409
4410 #. type: SS
4411 #: build/C/man2/perf_event_open.2:1131
4412 #, no-wrap
4413 msgid "Reading results"
4414 msgstr ""
4415
4416 #. type: Plain text
4417 #: build/C/man2/perf_event_open.2:1141
4418 msgid ""
4419 "Once a B<perf_event_open>()  file descriptor has been opened, the values of "
4420 "the events can be read from the file descriptor.  The values that are there "
4421 "are specified by the I<read_format> field in the I<attr> structure at open "
4422 "time."
4423 msgstr ""
4424
4425 #. type: Plain text
4426 #: build/C/man2/perf_event_open.2:1146
4427 msgid ""
4428 "If you attempt to read into a buffer that is not big enough to hold the data "
4429 "B<ENOSPC> is returned"
4430 msgstr ""
4431
4432 #. type: Plain text
4433 #: build/C/man2/perf_event_open.2:1148
4434 msgid "Here is the layout of the data returned by a read:"
4435 msgstr ""
4436
4437 #. type: IP
4438 #: build/C/man2/perf_event_open.2:1148 build/C/man2/perf_event_open.2:1166
4439 #: build/C/man2/ptrace.2:1692 build/C/man2/ptrace.2:1702
4440 #: build/C/man2/ptrace.2:1710 build/C/man2/ptrace.2:1716
4441 #: build/C/man2/ptrace.2:1845
4442 #, no-wrap
4443 msgid "*"
4444 msgstr ""
4445
4446 #. type: Plain text
4447 #: build/C/man2/perf_event_open.2:1152
4448 msgid ""
4449 "If B<PERF_FORMAT_GROUP> was specified to allow reading all events in a group "
4450 "at once:"
4451 msgstr ""
4452
4453 #. type: Plain text
4454 #: build/C/man2/perf_event_open.2:1164
4455 #, no-wrap
4456 msgid ""
4457 "struct read_format {\n"
4458 "    u64 nr;            /* The number of events */\n"
4459 "    u64 time_enabled;  /* if PERF_FORMAT_TOTAL_TIME_ENABLED */\n"
4460 "    u64 time_running;  /* if PERF_FORMAT_TOTAL_TIME_RUNNING */\n"
4461 "    struct\n"
4462 "        u64 value;     /* The value of the event */\n"
4463 "        u64 id;        /* if PERF_FORMAT_ID */\n"
4464 "    } values[nr];\n"
4465 "};\n"
4466 msgstr ""
4467
4468 #. type: Plain text
4469 #: build/C/man2/perf_event_open.2:1172
4470 msgid "If B<PERF_FORMAT_GROUP> was I<not> specified:"
4471 msgstr ""
4472
4473 #. type: Plain text
4474 #: build/C/man2/perf_event_open.2:1181
4475 #, no-wrap
4476 msgid ""
4477 "struct read_format {\n"
4478 "    u64 value;         /* The value of the event */\n"
4479 "    u64 time_enabled;  /* if PERF_FORMAT_TOTAL_TIME_ENABLED */\n"
4480 "    u64 time_running;  /* if PERF_FORMAT_TOTAL_TIME_RUNNING */\n"
4481 "    u64 id;            /* if PERF_FORMAT_ID */\n"
4482 "};\n"
4483 msgstr ""
4484
4485 #. type: Plain text
4486 #: build/C/man2/perf_event_open.2:1185
4487 msgid "The values read are as follows:"
4488 msgstr ""
4489
4490 #. type: TP
4491 #: build/C/man2/perf_event_open.2:1185
4492 #, no-wrap
4493 msgid "I<nr>"
4494 msgstr ""
4495
4496 #. type: Plain text
4497 #: build/C/man2/perf_event_open.2:1191
4498 msgid ""
4499 "The number of events in this file descriptor.  Only available if "
4500 "B<PERF_FORMAT_GROUP> was specified."
4501 msgstr ""
4502
4503 #. type: TP
4504 #: build/C/man2/perf_event_open.2:1191
4505 #, no-wrap
4506 msgid "I<time_enabled>, I<time_running>"
4507 msgstr ""
4508
4509 #. type: Plain text
4510 #: build/C/man2/perf_event_open.2:1203
4511 msgid ""
4512 "Total time the event was enabled and running.  Normally these are the same.  "
4513 "If more events are started, then available counter slots on the PMU, then "
4514 "multiplexing happens and events run only part of the time.  In that case, "
4515 "the I<time_enabled> and I<time running> values can be used to scale an "
4516 "estimated value for the count."
4517 msgstr ""
4518
4519 #. type: TP
4520 #: build/C/man2/perf_event_open.2:1203
4521 #, no-wrap
4522 msgid "I<value>"
4523 msgstr ""
4524
4525 #. type: Plain text
4526 #: build/C/man2/perf_event_open.2:1206
4527 msgid "An unsigned 64-bit value containing the counter result."
4528 msgstr ""
4529
4530 #. type: TP
4531 #: build/C/man2/perf_event_open.2:1206 build/C/man2/perf_event_open.2:1602
4532 #: build/C/man2/perf_event_open.2:1756
4533 #, no-wrap
4534 msgid "I<id>"
4535 msgstr ""
4536
4537 #. type: Plain text
4538 #: build/C/man2/perf_event_open.2:1212
4539 msgid ""
4540 "A globally unique value for this particular event, only there if "
4541 "B<PERF_FORMAT_ID> was specified in I<read_format>."
4542 msgstr ""
4543
4544 #. type: SS
4545 #: build/C/man2/perf_event_open.2:1212
4546 #, no-wrap
4547 msgid "MMAP layout"
4548 msgstr ""
4549
4550 #. type: Plain text
4551 #: build/C/man2/perf_event_open.2:1222
4552 msgid ""
4553 "When using B<perf_event_open>()  in sampled mode, asynchronous events (like "
4554 "counter overflow or B<PROT_EXEC> mmap tracking)  are logged into a ring-"
4555 "buffer.  This ring-buffer is created and accessed through B<mmap>(2)."
4556 msgstr ""
4557
4558 #. type: Plain text
4559 #: build/C/man2/perf_event_open.2:1228
4560 msgid ""
4561 "The mmap size should be 1+2^n pages, where the first page is a metadata page "
4562 "(I<struct perf_event_mmap_page>)  that contains various bits of information "
4563 "such as where the ring-buffer head is."
4564 msgstr ""
4565
4566 #. type: Plain text
4567 #: build/C/man2/perf_event_open.2:1231
4568 msgid ""
4569 "Before kernel 2.6.39, there is a bug that means you must allocate a mmap "
4570 "ring buffer when sampling even if you do not plan to access it."
4571 msgstr ""
4572
4573 #. type: Plain text
4574 #: build/C/man2/perf_event_open.2:1233
4575 msgid "The structure of the first metadata mmap page is as follows:"
4576 msgstr ""
4577
4578 #. type: Plain text
4579 #: build/C/man2/perf_event_open.2:1262
4580 #, no-wrap
4581 msgid ""
4582 "struct perf_event_mmap_page {\n"
4583 "    __u32 version;        /* version number of this structure */\n"
4584 "    __u32 compat_version; /* lowest version this is compat with */\n"
4585 "    __u32 lock;           /* seqlock for synchronization */\n"
4586 "    __u32 index;          /* hardware counter identifier */\n"
4587 "    __s64 offset;         /* add to hardware counter value */\n"
4588 "    __u64 time_enabled;   /* time event active */\n"
4589 "    __u64 time_running;   /* time event on CPU */\n"
4590 "    union {\n"
4591 "        __u64   capabilities;\n"
4592 "        struct {\n"
4593 "            __u64 cap_usr_time / cap_usr_rdpmc / cap_bit0 : 1,\n"
4594 "                  cap_bit0_is_deprecated : 1,\n"
4595 "                  cap_user_rdpmc         : 1,\n"
4596 "                  cap_user_time          : 1,\n"
4597 "                  cap_user_time_zero     : 1,\n"
4598 "        };\n"
4599 "    };\n"
4600 "    __u16 pmc_width;\n"
4601 "    __u16 time_shift;\n"
4602 "    __u32 time_mult;\n"
4603 "    __u64 time_offset;\n"
4604 "    __u64 __reserved[120];   /* Pad to 1k */\n"
4605 "    __u64 data_head;         /* head in the data section */\n"
4606 "    __u64 data_tail;         /* user-space written tail */\n"
4607 "}\n"
4608 msgstr ""
4609
4610 #. type: Plain text
4611 #: build/C/man2/perf_event_open.2:1268
4612 msgid ""
4613 "The following list describes the fields in the I<perf_event_mmap_page> "
4614 "structure in more detail:"
4615 msgstr ""
4616
4617 #. type: TP
4618 #: build/C/man2/perf_event_open.2:1268
4619 #, no-wrap
4620 msgid "I<version>"
4621 msgstr ""
4622
4623 #. type: Plain text
4624 #: build/C/man2/perf_event_open.2:1271
4625 msgid "Version number of this structure."
4626 msgstr ""
4627
4628 #. type: TP
4629 #: build/C/man2/perf_event_open.2:1271
4630 #, no-wrap
4631 msgid "I<compat_version>"
4632 msgstr ""
4633
4634 #. type: Plain text
4635 #: build/C/man2/perf_event_open.2:1274
4636 msgid "The lowest version this is compatible with."
4637 msgstr ""
4638
4639 #. type: TP
4640 #: build/C/man2/perf_event_open.2:1274
4641 #, no-wrap
4642 msgid "I<lock>"
4643 msgstr ""
4644
4645 #. type: Plain text
4646 #: build/C/man2/perf_event_open.2:1277
4647 msgid "A seqlock for synchronization."
4648 msgstr ""
4649
4650 #. type: TP
4651 #: build/C/man2/perf_event_open.2:1277
4652 #, no-wrap
4653 msgid "I<index>"
4654 msgstr ""
4655
4656 #. type: Plain text
4657 #: build/C/man2/perf_event_open.2:1280
4658 msgid "A unique hardware counter identifier."
4659 msgstr ""
4660
4661 #. type: TP
4662 #: build/C/man2/perf_event_open.2:1280
4663 #, no-wrap
4664 msgid "I<offset>"
4665 msgstr ""
4666
4667 #. type: Plain text
4668 #: build/C/man2/perf_event_open.2:1285
4669 msgid ""
4670 "When using rdpmc for reads this offset value must be added to the one "
4671 "returned by rdpmc to get the current total event count."
4672 msgstr ""
4673
4674 #. type: TP
4675 #: build/C/man2/perf_event_open.2:1285
4676 #, no-wrap
4677 msgid "I<time_enabled>"
4678 msgstr ""
4679
4680 #. type: Plain text
4681 #: build/C/man2/perf_event_open.2:1288
4682 msgid "Time the event was active."
4683 msgstr ""
4684
4685 #. type: TP
4686 #: build/C/man2/perf_event_open.2:1288
4687 #, no-wrap
4688 msgid "I<time_running>"
4689 msgstr ""
4690
4691 #. type: Plain text
4692 #: build/C/man2/perf_event_open.2:1291
4693 msgid "Time the event was running."
4694 msgstr ""
4695
4696 #. type: TP
4697 #: build/C/man2/perf_event_open.2:1291
4698 #, no-wrap
4699 msgid "I<cap_usr_time> / I<cap_usr_rdpmc> / I<cap_bit0> (since Linux 3.4)"
4700 msgstr ""
4701
4702 #. type: Plain text
4703 #: build/C/man2/perf_event_open.2:1304
4704 msgid ""
4705 "There was a bug in the definition of I<cap_usr_time> and I<cap_usr_rdpmc> "
4706 "from Linux 3.4 until Linux 3.11.  Both bits were defined to point to the "
4707 "same location, so it was impossible to know if I<cap_usr_time> or "
4708 "I<cap_usr_rdpmc> were actually set."
4709 msgstr ""
4710
4711 #. type: Plain text
4712 #: build/C/man2/perf_event_open.2:1312
4713 msgid ""
4714 "Starting with 3.12 these are renamed to I<cap_bit0> and you should use the "
4715 "new I<cap_user_time> and I<cap_user_rdpmc> fields instead."
4716 msgstr ""
4717
4718 #. type: TP
4719 #: build/C/man2/perf_event_open.2:1313
4720 #, no-wrap
4721 msgid "I<cap_bit0_is_deprecated> (since Linux 3.12)"
4722 msgstr "I<cap_bit0_is_deprecated> (Linux 3.12 以降)"
4723
4724 #. type: Plain text
4725 #: build/C/man2/perf_event_open.2:1321
4726 msgid ""
4727 "If set, this bit indicates that the kernel supports the properly separated "
4728 "I<cap_user_time> and I<cap_user_rdpmc> bits."
4729 msgstr ""
4730
4731 #. type: Plain text
4732 #: build/C/man2/perf_event_open.2:1328
4733 msgid ""
4734 "If not-set, it indicates an older kernel where I<cap_usr_time> and "
4735 "I<cap_usr_rdpmc> map to the same bit and thus both features should be used "
4736 "with caution."
4737 msgstr ""
4738
4739 #. type: TP
4740 #: build/C/man2/perf_event_open.2:1329
4741 #, no-wrap
4742 msgid "I<cap_user_rdpmc> (since Linux 3.12)"
4743 msgstr "I<cap_user_rdpmc> (Linux 3.12 以降)"
4744
4745 #. type: Plain text
4746 #: build/C/man2/perf_event_open.2:1334
4747 msgid ""
4748 "If the hardware supports user-space read of performance counters without "
4749 "syscall (this is the \"rdpmc\" instruction on x86), then the following code "
4750 "can be used to do a read:"
4751 msgstr ""
4752
4753 #. type: Plain text
4754 #: build/C/man2/perf_event_open.2:1340
4755 #, no-wrap
4756 msgid ""
4757 "u32 seq, time_mult, time_shift, idx, width;\n"
4758 "u64 count, enabled, running;\n"
4759 "u64 cyc, time_offset;\n"
4760 msgstr ""
4761 "u32 seq, time_mult, time_shift, idx, width;\n"
4762 "u64 count, enabled, running;\n"
4763 "u64 cyc, time_offset;\n"
4764
4765 #. type: Plain text
4766 #: build/C/man2/perf_event_open.2:1346
4767 #, no-wrap
4768 msgid ""
4769 "do {\n"
4770 "    seq = pc-E<gt>lock;\n"
4771 "    barrier();\n"
4772 "    enabled = pc-E<gt>time_enabled;\n"
4773 "    running = pc-E<gt>time_running;\n"
4774 msgstr ""
4775 "do {\n"
4776 "    seq = pc-E<gt>lock;\n"
4777 "    barrier();\n"
4778 "    enabled = pc-E<gt>time_enabled;\n"
4779 "    running = pc-E<gt>time_running;\n"
4780
4781 #. type: Plain text
4782 #: build/C/man2/perf_event_open.2:1353
4783 #, no-wrap
4784 msgid ""
4785 "    if (pc-E<gt>cap_usr_time && enabled != running) {\n"
4786 "        cyc = rdtsc();\n"
4787 "        time_offset = pc-E<gt>time_offset;\n"
4788 "        time_mult   = pc-E<gt>time_mult;\n"
4789 "        time_shift  = pc-E<gt>time_shift;\n"
4790 "    }\n"
4791 msgstr ""
4792 "    if (pc-E<gt>cap_usr_time && enabled != running) {\n"
4793 "        cyc = rdtsc();\n"
4794 "        time_offset = pc-E<gt>time_offset;\n"
4795 "        time_mult   = pc-E<gt>time_mult;\n"
4796 "        time_shift  = pc-E<gt>time_shift;\n"
4797 "    }\n"
4798
4799 #. type: Plain text
4800 #: build/C/man2/perf_event_open.2:1356
4801 #, no-wrap
4802 msgid ""
4803 "    idx = pc-E<gt>index;\n"
4804 "    count = pc-E<gt>offset;\n"
4805 msgstr ""
4806 "    idx = pc-E<gt>index;\n"
4807 "    count = pc-E<gt>offset;\n"
4808
4809 #. type: Plain text
4810 #: build/C/man2/perf_event_open.2:1361
4811 #, no-wrap
4812 msgid ""
4813 "    if (pc-E<gt>cap_usr_rdpmc && idx) {\n"
4814 "        width = pc-E<gt>pmc_width;\n"
4815 "        count += rdpmc(idx - 1);\n"
4816 "    }\n"
4817 msgstr ""
4818 "    if (pc-E<gt>cap_usr_rdpmc && idx) {\n"
4819 "        width = pc-E<gt>pmc_width;\n"
4820 "        count += rdpmc(idx - 1);\n"
4821 "    }\n"
4822
4823 #. type: Plain text
4824 #: build/C/man2/perf_event_open.2:1364
4825 #, no-wrap
4826 msgid ""
4827 "    barrier();\n"
4828 "} while (pc-E<gt>lock != seq);\n"
4829 msgstr ""
4830 "    barrier();\n"
4831 "} while (pc-E<gt>lock != seq);\n"
4832
4833 #. type: TP
4834 #: build/C/man2/perf_event_open.2:1366
4835 #, no-wrap
4836 msgid "I<cap_user_time  (since Linux 3.12)>"
4837 msgstr "I<cap_user_time  (Linux 3.12 以降)>"
4838
4839 #. type: Plain text
4840 #: build/C/man2/perf_event_open.2:1370
4841 msgid ""
4842 "This bit indicates the hardware has a constant, nonstop timestamp counter "
4843 "(TSC on x86)."
4844 msgstr ""
4845
4846 #. type: TP
4847 #: build/C/man2/perf_event_open.2:1370
4848 #, no-wrap
4849 msgid "I<cap_user_time_zero> (since Linux 3.12)"
4850 msgstr "I<cap_user_time_zero> (Linux 3.12 以降)"
4851
4852 #. type: Plain text
4853 #: build/C/man2/perf_event_open.2:1376
4854 msgid ""
4855 "Indicates the presence of I<time_zero> which allows mapping timestamp values "
4856 "to the hardware clock."
4857 msgstr ""
4858
4859 #. type: TP
4860 #: build/C/man2/perf_event_open.2:1376
4861 #, no-wrap
4862 msgid "I<pmc_width>"
4863 msgstr "I<pmc_width>"
4864
4865 #. type: Plain text
4866 #: build/C/man2/perf_event_open.2:1383
4867 msgid ""
4868 "If I<cap_usr_rdpmc>, this field provides the bit-width of the value read "
4869 "using the rdpmc or equivalent instruction.  This can be used to sign extend "
4870 "the result like:"
4871 msgstr ""
4872
4873 #. type: Plain text
4874 #: build/C/man2/perf_event_open.2:1389
4875 #, no-wrap
4876 msgid ""
4877 "pmc E<lt>E<lt>= 64 - pmc_width;\n"
4878 "pmc E<gt>E<gt>= 64 - pmc_width; // signed shift right\n"
4879 "count += pmc;\n"
4880 msgstr ""
4881 "pmc E<lt>E<lt>= 64 - pmc_width;\n"
4882 "pmc E<gt>E<gt>= 64 - pmc_width; // signed shift right\n"
4883 "count += pmc;\n"
4884
4885 #. type: TP
4886 #: build/C/man2/perf_event_open.2:1391
4887 #, no-wrap
4888 msgid "I<time_shift>, I<time_mult>, I<time_offset>"
4889 msgstr "I<time_shift>, I<time_mult>, I<time_offset>"
4890
4891 #. type: Plain text
4892 #: build/C/man2/perf_event_open.2:1398
4893 msgid ""
4894 "If I<cap_usr_time>, these fields can be used to compute the time delta since "
4895 "time_enabled (in nanoseconds) using rdtsc or similar."
4896 msgstr ""
4897
4898 #. type: Plain text
4899 #: build/C/man2/perf_event_open.2:1406
4900 #, no-wrap
4901 msgid ""
4902 "    u64 quot, rem;\n"
4903 "    u64 delta;\n"
4904 "    quot = (cyc E<gt>E<gt> time_shift);\n"
4905 "    rem = cyc & ((1 E<lt>E<lt> time_shift) - 1);\n"
4906 "    delta = time_offset + quot * time_mult +\n"
4907 "            ((rem * time_mult) E<gt>E<gt> time_shift);\n"
4908 msgstr ""
4909 "    u64 quot, rem;\n"
4910 "    u64 delta;\n"
4911 "    quot = (cyc E<gt>E<gt> time_shift);\n"
4912 "    rem = cyc & ((1 E<lt>E<lt> time_shift) - 1);\n"
4913 "    delta = time_offset + quot * time_mult +\n"
4914 "            ((rem * time_mult) E<gt>E<gt> time_shift);\n"
4915
4916 #. type: Plain text
4917 #: build/C/man2/perf_event_open.2:1418
4918 msgid ""
4919 "Where I<time_offset>, I<time_mult>, I<time_shift>, and I<cyc> are read in "
4920 "the seqcount loop described above.  This delta can then be added to enabled "
4921 "and possible running (if idx), improving the scaling:"
4922 msgstr ""
4923
4924 #. type: Plain text
4925 #: build/C/man2/perf_event_open.2:1426
4926 #, no-wrap
4927 msgid ""
4928 "    enabled += delta;\n"
4929 "    if (idx)\n"
4930 "        running += delta;\n"
4931 "    quot = count / running;\n"
4932 "    rem  = count % running;\n"
4933 "    count = quot * enabled + (rem * enabled) / running;\n"
4934 msgstr ""
4935 "    enabled += delta;\n"
4936 "    if (idx)\n"
4937 "        running += delta;\n"
4938 "    quot = count / running;\n"
4939 "    rem  = count % running;\n"
4940 "    count = quot * enabled + (rem * enabled) / running;\n"
4941
4942 #. type: TP
4943 #: build/C/man2/perf_event_open.2:1427
4944 #, no-wrap
4945 msgid "I<time_zero> (since Linux 3.12)"
4946 msgstr "I<time_zero> (Linux 3.12 以降)"
4947
4948 #. type: Plain text
4949 #: build/C/man2/perf_event_open.2:1435
4950 msgid ""
4951 "If I<cap_usr_time_zero> is set, then the hardware clock (the TSC timestamp "
4952 "counter on x86)  can be calculated from the I<time_zero>, I<time_mult>, and "
4953 "I<time_shift> values:"
4954 msgstr ""
4955
4956 #. type: Plain text
4957 #: build/C/man2/perf_event_open.2:1441
4958 #, no-wrap
4959 msgid ""
4960 "    time = timestamp - time_zero;\n"
4961 "    quot = time / time_mult;\n"
4962 "    rem  = time % time_mult;\n"
4963 "    cyc = (quot E<lt>E<lt> time_shift) + (rem E<lt>E<lt> time_shift) / time_mult;\n"
4964 msgstr ""
4965 "    time = timestamp - time_zero;\n"
4966 "    quot = time / time_mult;\n"
4967 "    rem  = time % time_mult;\n"
4968 "    cyc = (quot E<lt>E<lt> time_shift) + (rem E<lt>E<lt> time_shift) / time_mult;\n"
4969
4970 #. type: Plain text
4971 #: build/C/man2/perf_event_open.2:1444
4972 msgid "And vice versa:"
4973 msgstr ""
4974
4975 #. type: Plain text
4976 #: build/C/man2/perf_event_open.2:1450
4977 #, no-wrap
4978 msgid ""
4979 "    quot = cyc E<gt>E<gt> time_shift;\n"
4980 "    rem  = cyc & ((1 E<lt>E<lt> time_shift) - 1);\n"
4981 "    timestamp = time_zero + quot * time_mult +\n"
4982 "        ((rem * time_mult) E<gt>E<gt> time_shift);\n"
4983 msgstr ""
4984 "    quot = cyc E<gt>E<gt> time_shift;\n"
4985 "    rem  = cyc & ((1 E<lt>E<lt> time_shift) - 1);\n"
4986 "    timestamp = time_zero + quot * time_mult +\n"
4987 "        ((rem * time_mult) E<gt>E<gt> time_shift);\n"
4988
4989 #. type: TP
4990 #: build/C/man2/perf_event_open.2:1451
4991 #, no-wrap
4992 msgid "I<data_head>"
4993 msgstr "I<data_head>"
4994
4995 #. type: Plain text
4996 #: build/C/man2/perf_event_open.2:1457
4997 msgid ""
4998 "This points to the head of the data section.  The value continuously "
4999 "increases, it does not wrap.  The value needs to be manually wrapped by the "
5000 "size of the mmap buffer before accessing the samples."
5001 msgstr ""
5002
5003 #. type: Plain text
5004 #: build/C/man2/perf_event_open.2:1462
5005 msgid ""
5006 "On SMP-capable platforms, after reading the I<data_head> value, user space "
5007 "should issue an rmb()."
5008 msgstr ""
5009
5010 #. type: TP
5011 #: build/C/man2/perf_event_open.2:1462
5012 #, no-wrap
5013 msgid "I<data_tail>"
5014 msgstr "I<data_tail>"
5015
5016 #. type: Plain text
5017 #: build/C/man2/perf_event_open.2:1470
5018 msgid ""
5019 "When the mapping is B<PROT_WRITE>, the I<data_tail> value should be written "
5020 "by user space to reflect the last read data.  In this case, the kernel will "
5021 "not overwrite unread data."
5022 msgstr ""
5023
5024 #. type: Plain text
5025 #: build/C/man2/perf_event_open.2:1472
5026 msgid "The following 2^n ring-buffer pages have the layout described below."
5027 msgstr ""
5028
5029 #. type: Plain text
5030 #: build/C/man2/perf_event_open.2:1486
5031 msgid ""
5032 "If I<perf_event_attr.sample_id_all> is set, then all event types will have "
5033 "the sample_type selected fields related to where/when (identity)  an event "
5034 "took place (TID, TIME, ID, CPU, STREAM_ID) described in "
5035 "B<PERF_RECORD_SAMPLE> below, it will be stashed just after the "
5036 "I<perf_event_header> and the fields already present for the existing fields, "
5037 "that is, at the end of the payload.  That way a newer perf.data file will be "
5038 "supported by older perf tools, with these new optional fields being ignored."
5039 msgstr ""
5040
5041 #. type: Plain text
5042 #: build/C/man2/perf_event_open.2:1488
5043 msgid "The mmap values start with a header:"
5044 msgstr ""
5045
5046 #. type: Plain text
5047 #: build/C/man2/perf_event_open.2:1496
5048 #, no-wrap
5049 msgid ""
5050 "struct perf_event_header {\n"
5051 "    __u32   type;\n"
5052 "    __u16   misc;\n"
5053 "    __u16   size;\n"
5054 "};\n"
5055 msgstr ""
5056 "struct perf_event_header {\n"
5057 "    __u32   type;\n"
5058 "    __u16   misc;\n"
5059 "    __u16   size;\n"
5060 "};\n"
5061
5062 #. type: Plain text
5063 #: build/C/man2/perf_event_open.2:1504
5064 msgid ""
5065 "Below, we describe the I<perf_event_header> fields in more detail.  For ease "
5066 "of reading, the fields with shorter descriptions are presented first."
5067 msgstr ""
5068
5069 #. type: Plain text
5070 #: build/C/man2/perf_event_open.2:1507
5071 msgid "This indicates the size of the record."
5072 msgstr ""
5073
5074 #. type: TP
5075 #: build/C/man2/perf_event_open.2:1507
5076 #, no-wrap
5077 msgid "I<misc>"
5078 msgstr "I<misc>"
5079
5080 #. type: Plain text
5081 #: build/C/man2/perf_event_open.2:1512
5082 msgid "The I<misc> field contains additional information about the sample."
5083 msgstr ""
5084
5085 #. type: Plain text
5086 #: build/C/man2/perf_event_open.2:1517
5087 msgid ""
5088 "The CPU mode can be determined from this value by masking with "
5089 "B<PERF_RECORD_MISC_CPUMODE_MASK> and looking for one of the following (note "
5090 "these are not bit masks, only one can be set at a time):"
5091 msgstr ""
5092
5093 #. type: TP
5094 #: build/C/man2/perf_event_open.2:1518
5095 #, no-wrap
5096 msgid "B<PERF_RECORD_MISC_CPUMODE_UNKNOWN>"
5097 msgstr "B<PERF_RECORD_MISC_CPUMODE_UNKNOWN>"
5098
5099 #. type: Plain text
5100 #: build/C/man2/perf_event_open.2:1521
5101 msgid "Unknown CPU mode."
5102 msgstr ""
5103
5104 #. type: TP
5105 #: build/C/man2/perf_event_open.2:1521
5106 #, no-wrap
5107 msgid "B<PERF_RECORD_MISC_KERNEL>"
5108 msgstr "B<PERF_RECORD_MISC_KERNEL>"
5109
5110 #. type: Plain text
5111 #: build/C/man2/perf_event_open.2:1524
5112 msgid "Sample happened in the kernel."
5113 msgstr ""
5114
5115 #. type: TP
5116 #: build/C/man2/perf_event_open.2:1524
5117 #, no-wrap
5118 msgid "B<PERF_RECORD_MISC_USER>"
5119 msgstr "B<PERF_RECORD_MISC_USER>"
5120
5121 #. type: Plain text
5122 #: build/C/man2/perf_event_open.2:1527
5123 msgid "Sample happened in user code."
5124 msgstr ""
5125
5126 #. type: TP
5127 #: build/C/man2/perf_event_open.2:1527
5128 #, no-wrap
5129 msgid "B<PERF_RECORD_MISC_HYPERVISOR>"
5130 msgstr "B<PERF_RECORD_MISC_HYPERVISOR>"
5131
5132 #. type: Plain text
5133 #: build/C/man2/perf_event_open.2:1530
5134 msgid "Sample happened in the hypervisor."
5135 msgstr ""
5136
5137 #. type: TP
5138 #: build/C/man2/perf_event_open.2:1530
5139 #, no-wrap
5140 msgid "B<PERF_RECORD_MISC_GUEST_KERNEL>"
5141 msgstr "B<PERF_RECORD_MISC_GUEST_KERNEL>"
5142
5143 #. type: Plain text
5144 #: build/C/man2/perf_event_open.2:1533
5145 msgid "Sample happened in the guest kernel."
5146 msgstr ""
5147
5148 #. type: TP
5149 #: build/C/man2/perf_event_open.2:1533
5150 #, no-wrap
5151 msgid "B<PERF_RECORD_MISC_GUEST_USER>"
5152 msgstr "B<PERF_RECORD_MISC_GUEST_USER>"
5153
5154 #. type: Plain text
5155 #: build/C/man2/perf_event_open.2:1536
5156 msgid "Sample happened in guest user code."
5157 msgstr ""
5158
5159 #. type: Plain text
5160 #: build/C/man2/perf_event_open.2:1540
5161 msgid "In addition, one of the following bits can be set:"
5162 msgstr ""
5163
5164 #. type: TP
5165 #: build/C/man2/perf_event_open.2:1540
5166 #, no-wrap
5167 msgid "B<PERF_RECORD_MISC_MMAP_DATA>"
5168 msgstr "B<PERF_RECORD_MISC_MMAP_DATA>"
5169
5170 #. type: Plain text
5171 #: build/C/man2/perf_event_open.2:1544
5172 msgid ""
5173 "This is set when the mapping is not executable; otherwise the mapping is "
5174 "executable."
5175 msgstr ""
5176
5177 #. type: TP
5178 #: build/C/man2/perf_event_open.2:1544
5179 #, no-wrap
5180 msgid "B<PERF_RECORD_MISC_EXACT_IP>"
5181 msgstr "B<PERF_RECORD_MISC_EXACT_IP>"
5182
5183 #. type: Plain text
5184 #: build/C/man2/perf_event_open.2:1552
5185 msgid ""
5186 "This indicates that the content of B<PERF_SAMPLE_IP> points to the actual "
5187 "instruction that triggered the event.  See also I<perf_event_attr."
5188 "precise_ip>."
5189 msgstr ""
5190
5191 #. type: TP
5192 #: build/C/man2/perf_event_open.2:1552
5193 #, no-wrap
5194 msgid "B<PERF_RECORD_MISC_EXT_RESERVED>"
5195 msgstr "B<PERF_RECORD_MISC_EXT_RESERVED>"
5196
5197 #. type: Plain text
5198 #: build/C/man2/perf_event_open.2:1555
5199 msgid "This indicates there is extended data available (currently not used)."
5200 msgstr ""
5201
5202 #. type: Plain text
5203 #: build/C/man2/perf_event_open.2:1565
5204 msgid ""
5205 "The I<type> value is one of the below.  The values in the corresponding "
5206 "record (that follows the header)  depend on the I<type> selected as shown."
5207 msgstr ""
5208
5209 #. type: TP
5210 #: build/C/man2/perf_event_open.2:1567
5211 #, no-wrap
5212 msgid "B<PERF_RECORD_MMAP>"
5213 msgstr "B<PERF_RECORD_MMAP>"
5214
5215 #. type: Plain text
5216 #: build/C/man2/perf_event_open.2:1574
5217 msgid ""
5218 "The MMAP events record the B<PROT_EXEC> mappings so that we can correlate "
5219 "user-space IPs to code.  They have the following structure:"
5220 msgstr ""
5221
5222 #. type: Plain text
5223 #: build/C/man2/perf_event_open.2:1585
5224 #, no-wrap
5225 msgid ""
5226 "struct {\n"
5227 "    struct perf_event_header header;\n"
5228 "    u32    pid, tid;\n"
5229 "    u64    addr;\n"
5230 "    u64    len;\n"
5231 "    u64    pgoff;\n"
5232 "    char   filename[];\n"
5233 "};\n"
5234 msgstr ""
5235 "struct {\n"
5236 "    struct perf_event_header header;\n"
5237 "    u32    pid, tid;\n"
5238 "    u64    addr;\n"
5239 "    u64    len;\n"
5240 "    u64    pgoff;\n"
5241 "    char   filename[];\n"
5242 "};\n"
5243
5244 #. type: TP
5245 #: build/C/man2/perf_event_open.2:1587
5246 #, no-wrap
5247 msgid "B<PERF_RECORD_LOST>"
5248 msgstr "B<PERF_RECORD_LOST>"
5249
5250 #. type: Plain text
5251 #: build/C/man2/perf_event_open.2:1590
5252 msgid "This record indicates when events are lost."
5253 msgstr ""
5254
5255 #. type: Plain text
5256 #: build/C/man2/perf_event_open.2:1599
5257 #, no-wrap
5258 msgid ""
5259 "struct {\n"
5260 "    struct perf_event_header header;\n"
5261 "    u64 id;\n"
5262 "    u64 lost;\n"
5263 "    struct sample_id sample_id;\n"
5264 "};\n"
5265 msgstr ""
5266 "struct {\n"
5267 "    struct perf_event_header header;\n"
5268 "    u64 id;\n"
5269 "    u64 lost;\n"
5270 "    struct sample_id sample_id;\n"
5271 "};\n"
5272
5273 #. type: Plain text
5274 #: build/C/man2/perf_event_open.2:1605
5275 msgid "is the unique event ID for the samples that were lost."
5276 msgstr ""
5277
5278 #. type: TP
5279 #: build/C/man2/perf_event_open.2:1605
5280 #, no-wrap
5281 msgid "I<lost>"
5282 msgstr "I<lost>"
5283
5284 #. type: Plain text
5285 #: build/C/man2/perf_event_open.2:1608
5286 msgid "is the number of events that were lost."
5287 msgstr ""
5288
5289 #. type: TP
5290 #: build/C/man2/perf_event_open.2:1609
5291 #, no-wrap
5292 msgid "B<PERF_RECORD_COMM>"
5293 msgstr "B<PERF_RECORD_COMM>"
5294
5295 #. type: Plain text
5296 #: build/C/man2/perf_event_open.2:1612
5297 msgid "This record indicates a change in the process name."
5298 msgstr ""
5299
5300 #. type: Plain text
5301 #: build/C/man2/perf_event_open.2:1621
5302 #, no-wrap
5303 msgid ""
5304 "struct {\n"
5305 "    struct perf_event_header header;\n"
5306 "    u32 pid, tid;\n"
5307 "    char comm[];\n"
5308 "    struct sample_id sample_id;\n"
5309 "};\n"
5310 msgstr ""
5311 "struct {\n"
5312 "    struct perf_event_header header;\n"
5313 "    u32 pid, tid;\n"
5314 "    char comm[];\n"
5315 "    struct sample_id sample_id;\n"
5316 "};\n"
5317
5318 #. type: TP
5319 #: build/C/man2/perf_event_open.2:1623
5320 #, no-wrap
5321 msgid "B<PERF_RECORD_EXIT>"
5322 msgstr "B<PERF_RECORD_EXIT>"
5323
5324 #. type: Plain text
5325 #: build/C/man2/perf_event_open.2:1626
5326 msgid "This record indicates a process exit event."
5327 msgstr ""
5328
5329 #. type: Plain text
5330 #: build/C/man2/perf_event_open.2:1636 build/C/man2/perf_event_open.2:1666
5331 #, no-wrap
5332 msgid ""
5333 "struct {\n"
5334 "    struct perf_event_header header;\n"
5335 "    u32 pid, ppid;\n"
5336 "    u32 tid, ptid;\n"
5337 "    u64 time;\n"
5338 "    struct sample_id sample_id;\n"
5339 "};\n"
5340 msgstr ""
5341 "struct {\n"
5342 "    struct perf_event_header header;\n"
5343 "    u32 pid, ppid;\n"
5344 "    u32 tid, ptid;\n"
5345 "    u64 time;\n"
5346 "    struct sample_id sample_id;\n"
5347 "};\n"
5348
5349 #. type: TP
5350 #: build/C/man2/perf_event_open.2:1638
5351 #, no-wrap
5352 msgid "B<PERF_RECORD_THROTTLE>, B<PERF_RECORD_UNTHROTTLE>"
5353 msgstr "B<PERF_RECORD_THROTTLE>, B<PERF_RECORD_UNTHROTTLE>"
5354
5355 #. type: Plain text
5356 #: build/C/man2/perf_event_open.2:1641
5357 msgid "This record indicates a throttle/unthrottle event."
5358 msgstr ""
5359
5360 #. type: Plain text
5361 #: build/C/man2/perf_event_open.2:1651
5362 #, no-wrap
5363 msgid ""
5364 "struct {\n"
5365 "    struct perf_event_header header;\n"
5366 "    u64 time;\n"
5367 "    u64 id;\n"
5368 "    u64 stream_id;\n"
5369 "    struct sample_id sample_id;\n"
5370 "};\n"
5371 msgstr ""
5372 "struct {\n"
5373 "    struct perf_event_header header;\n"
5374 "    u64 time;\n"
5375 "    u64 id;\n"
5376 "    u64 stream_id;\n"
5377 "    struct sample_id sample_id;\n"
5378 "};\n"
5379
5380 #. type: TP
5381 #: build/C/man2/perf_event_open.2:1653
5382 #, no-wrap
5383 msgid "B<PERF_RECORD_FORK>"
5384 msgstr "B<PERF_RECORD_FORK>"
5385
5386 #. type: Plain text
5387 #: build/C/man2/perf_event_open.2:1656
5388 msgid "This record indicates a fork event."
5389 msgstr ""
5390
5391 #. type: TP
5392 #: build/C/man2/perf_event_open.2:1668
5393 #, no-wrap
5394 msgid "B<PERF_RECORD_READ>"
5395 msgstr "B<PERF_RECORD_READ>"
5396
5397 #. type: Plain text
5398 #: build/C/man2/perf_event_open.2:1671
5399 msgid "This record indicates a read event."
5400 msgstr ""
5401
5402 #. type: Plain text
5403 #: build/C/man2/perf_event_open.2:1680
5404 #, no-wrap
5405 msgid ""
5406 "struct {\n"
5407 "    struct perf_event_header header;\n"
5408 "    u32 pid, tid;\n"
5409 "    struct read_format values;\n"
5410 "    struct sample_id sample_id;\n"
5411 "};\n"
5412 msgstr ""
5413 "struct {\n"
5414 "    struct perf_event_header header;\n"
5415 "    u32 pid, tid;\n"
5416 "    struct read_format values;\n"
5417 "    struct sample_id sample_id;\n"
5418 "};\n"
5419
5420 #. type: TP
5421 #: build/C/man2/perf_event_open.2:1682
5422 #, no-wrap
5423 msgid "B<PERF_RECORD_SAMPLE>"
5424 msgstr "B<PERF_RECORD_SAMPLE>"
5425
5426 #. type: Plain text
5427 #: build/C/man2/perf_event_open.2:1685
5428 msgid "This record indicates a sample."
5429 msgstr ""
5430
5431 #. type: Plain text
5432 #: build/C/man2/perf_event_open.2:1717
5433 #, no-wrap
5434 msgid ""
5435 "struct {\n"
5436 "    struct perf_event_header header;\n"
5437 "    u64   sample_id;  /* if PERF_SAMPLE_IDENTIFIER */\n"
5438 "    u64   ip;         /* if PERF_SAMPLE_IP */\n"
5439 "    u32   pid, tid;   /* if PERF_SAMPLE_TID */\n"
5440 "    u64   time;       /* if PERF_SAMPLE_TIME */\n"
5441 "    u64   addr;       /* if PERF_SAMPLE_ADDR */\n"
5442 "    u64   id;         /* if PERF_SAMPLE_ID */\n"
5443 "    u64   stream_id;  /* if PERF_SAMPLE_STREAM_ID */\n"
5444 "    u32   cpu, res;   /* if PERF_SAMPLE_CPU */\n"
5445 "    u64   period;     /* if PERF_SAMPLE_PERIOD */\n"
5446 "    struct read_format v; /* if PERF_SAMPLE_READ */\n"
5447 "    u64   nr;         /* if PERF_SAMPLE_CALLCHAIN */\n"
5448 "    u64   ips[nr];    /* if PERF_SAMPLE_CALLCHAIN */\n"
5449 "    u32   size;       /* if PERF_SAMPLE_RAW */\n"
5450 "    char  data[size]; /* if PERF_SAMPLE_RAW */\n"
5451 "    u64   bnr;        /* if PERF_SAMPLE_BRANCH_STACK */\n"
5452 "    struct perf_branch_entry lbr[bnr];\n"
5453 "                      /* if PERF_SAMPLE_BRANCH_STACK */\n"
5454 "    u64   abi;        /* if PERF_SAMPLE_REGS_USER */\n"
5455 "    u64   regs[weight(mask)];\n"
5456 "                      /* if PERF_SAMPLE_REGS_USER */\n"
5457 "    u64   size;       /* if PERF_SAMPLE_STACK_USER */\n"
5458 "    char  data[size]; /* if PERF_SAMPLE_STACK_USER */\n"
5459 "    u64   dyn_size;   /* if PERF_SAMPLE_STACK_USER */\n"
5460 "    u64   weight;     /* if PERF_SAMPLE_WEIGHT */\n"
5461 "    u64   data_src;   /* if PERF_SAMPLE_DATA_SRC */\n"
5462 "    u64   transaction;/* if PERF_SAMPLE_TRANSACTION */\n"
5463 "};\n"
5464 msgstr ""
5465 "struct {\n"
5466 "    struct perf_event_header header;\n"
5467 "    u64   sample_id;  /* if PERF_SAMPLE_IDENTIFIER */\n"
5468 "    u64   ip;         /* if PERF_SAMPLE_IP */\n"
5469 "    u32   pid, tid;   /* if PERF_SAMPLE_TID */\n"
5470 "    u64   time;       /* if PERF_SAMPLE_TIME */\n"
5471 "    u64   addr;       /* if PERF_SAMPLE_ADDR */\n"
5472 "    u64   id;         /* if PERF_SAMPLE_ID */\n"
5473 "    u64   stream_id;  /* if PERF_SAMPLE_STREAM_ID */\n"
5474 "    u32   cpu, res;   /* if PERF_SAMPLE_CPU */\n"
5475 "    u64   period;     /* if PERF_SAMPLE_PERIOD */\n"
5476 "    struct read_format v; /* if PERF_SAMPLE_READ */\n"
5477 "    u64   nr;         /* if PERF_SAMPLE_CALLCHAIN */\n"
5478 "    u64   ips[nr];    /* if PERF_SAMPLE_CALLCHAIN */\n"
5479 "    u32   size;       /* if PERF_SAMPLE_RAW */\n"
5480 "    char  data[size]; /* if PERF_SAMPLE_RAW */\n"
5481 "    u64   bnr;        /* if PERF_SAMPLE_BRANCH_STACK */\n"
5482 "    struct perf_branch_entry lbr[bnr];\n"
5483 "                      /* if PERF_SAMPLE_BRANCH_STACK */\n"
5484 "    u64   abi;        /* if PERF_SAMPLE_REGS_USER */\n"
5485 "    u64   regs[weight(mask)];\n"
5486 "                      /* if PERF_SAMPLE_REGS_USER */\n"
5487 "    u64   size;       /* if PERF_SAMPLE_STACK_USER */\n"
5488 "    char  data[size]; /* if PERF_SAMPLE_STACK_USER */\n"
5489 "    u64   dyn_size;   /* if PERF_SAMPLE_STACK_USER */\n"
5490 "    u64   weight;     /* if PERF_SAMPLE_WEIGHT */\n"
5491 "    u64   data_src;   /* if PERF_SAMPLE_DATA_SRC */\n"
5492 "    u64   transaction;/* if PERF_SAMPLE_TRANSACTION */\n"
5493 "};\n"
5494
5495 #. type: TP
5496 #: build/C/man2/perf_event_open.2:1719
5497 #, no-wrap
5498 msgid "I<sample_id>"
5499 msgstr "I<sample_id>"
5500
5501 #. type: Plain text
5502 #: build/C/man2/perf_event_open.2:1729
5503 msgid ""
5504 "If B<PERF_SAMPLE_IDENTIFIER> is enabled, a 64-bit unique ID is included.  "
5505 "This is a duplication of the B<PERF_SAMPLE_ID> I<id> value, but included at "
5506 "the beginning of the sample so parsers can easily obtain the value."
5507 msgstr ""
5508
5509 #. type: TP
5510 #: build/C/man2/perf_event_open.2:1729
5511 #, no-wrap
5512 msgid "I<ip>"
5513 msgstr "I<ip>"
5514
5515 #. type: Plain text
5516 #: build/C/man2/perf_event_open.2:1735
5517 msgid ""
5518 "If B<PERF_SAMPLE_IP> is enabled, then a 64-bit instruction pointer value is "
5519 "included."
5520 msgstr ""
5521
5522 #. type: TP
5523 #: build/C/man2/perf_event_open.2:1735
5524 #, no-wrap
5525 msgid "I<pid>, I<tid>"
5526 msgstr "I<pid>, I<tid>"
5527
5528 #. type: Plain text
5529 #: build/C/man2/perf_event_open.2:1741
5530 msgid ""
5531 "If B<PERF_SAMPLE_TID> is enabled, then a 32-bit process ID and 32-bit thread "
5532 "ID are included."
5533 msgstr ""
5534
5535 #. type: TP
5536 #: build/C/man2/perf_event_open.2:1741
5537 #, no-wrap
5538 msgid "I<time>"
5539 msgstr "I<time>"
5540
5541 #. type: Plain text
5542 #: build/C/man2/perf_event_open.2:1749
5543 msgid ""
5544 "If B<PERF_SAMPLE_TIME> is enabled, then a 64-bit timestamp is included.  "
5545 "This is obtained via local_clock() which is a hardware timestamp if "
5546 "available and the jiffies value if not."
5547 msgstr ""
5548
5549 #. type: TP
5550 #: build/C/man2/perf_event_open.2:1749
5551 #, no-wrap
5552 msgid "I<addr>"
5553 msgstr "I<addr>"
5554
5555 #. type: Plain text
5556 #: build/C/man2/perf_event_open.2:1756
5557 msgid ""
5558 "If B<PERF_SAMPLE_ADDR> is enabled, then a 64-bit address is included.  This "
5559 "is usually the address of a tracepoint, breakpoint, or software event; "
5560 "otherwise the value is 0."
5561 msgstr ""
5562
5563 #. type: Plain text
5564 #: build/C/man2/perf_event_open.2:1764
5565 msgid ""
5566 "If B<PERF_SAMPLE_ID> is enabled, a 64-bit unique ID is included.  If the "
5567 "event is a member of an event group, the group leader ID is returned.  This "
5568 "ID is the same as the one returned by B<PERF_FORMAT_ID>."
5569 msgstr ""
5570
5571 #. type: TP
5572 #: build/C/man2/perf_event_open.2:1764
5573 #, no-wrap
5574 msgid "I<stream_id>"
5575 msgstr "I<stream_id>"
5576
5577 #. type: Plain text
5578 #: build/C/man2/perf_event_open.2:1774
5579 msgid ""
5580 "If B<PERF_SAMPLE_STREAM_ID> is enabled, a 64-bit unique ID is included.  "
5581 "Unlike B<PERF_SAMPLE_ID> the actual ID is returned, not the group leader.  "
5582 "This ID is the same as the one returned by B<PERF_FORMAT_ID>."
5583 msgstr ""
5584
5585 #. type: TP
5586 #: build/C/man2/perf_event_open.2:1774
5587 #, no-wrap
5588 msgid "I<cpu>, I<res>"
5589 msgstr "I<cpu>, I<res>"
5590
5591 #. type: Plain text
5592 #: build/C/man2/perf_event_open.2:1781
5593 msgid ""
5594 "If B<PERF_SAMPLE_CPU> is enabled, this is a 32-bit value indicating which "
5595 "CPU was being used, in addition to a reserved (unused)  32-bit value."
5596 msgstr ""
5597
5598 #. type: TP
5599 #: build/C/man2/perf_event_open.2:1781
5600 #, no-wrap
5601 msgid "I<period>"
5602 msgstr "I<period>"
5603
5604 #. type: Plain text
5605 #: build/C/man2/perf_event_open.2:1787
5606 msgid ""
5607 "If B<PERF_SAMPLE_PERIOD> is enabled, a 64-bit value indicating the current "
5608 "sampling period is written."
5609 msgstr ""
5610
5611 #. type: TP
5612 #: build/C/man2/perf_event_open.2:1787
5613 #, no-wrap
5614 msgid "I<v>"
5615 msgstr "I<v>"
5616
5617 #. type: Plain text
5618 #: build/C/man2/perf_event_open.2:1798
5619 msgid ""
5620 "If B<PERF_SAMPLE_READ> is enabled, a structure of type read_format is "
5621 "included which has values for all events in the event group.  The values "
5622 "included depend on the I<read_format> value used at B<perf_event_open>()  "
5623 "time."
5624 msgstr ""
5625
5626 #. type: TP
5627 #: build/C/man2/perf_event_open.2:1798
5628 #, no-wrap
5629 msgid "I<nr>, I<ips[nr]>"
5630 msgstr "I<nr>, I<ips[nr]>"
5631
5632 #. type: Plain text
5633 #: build/C/man2/perf_event_open.2:1806
5634 msgid ""
5635 "If B<PERF_SAMPLE_CALLCHAIN> is enabled, then a 64-bit number is included "
5636 "which indicates how many following 64-bit instruction pointers will follow.  "
5637 "This is the current callchain."
5638 msgstr ""
5639
5640 #. type: TP
5641 #: build/C/man2/perf_event_open.2:1806
5642 #, no-wrap
5643 msgid "I<size>, I<data[size]>"
5644 msgstr "I<size>, I<data[size]>"
5645
5646 #. type: Plain text
5647 #: build/C/man2/perf_event_open.2:1813
5648 msgid ""
5649 "If B<PERF_SAMPLE_RAW> is enabled, then a 32-bit value indicating size is "
5650 "included followed by an array of 8-bit values of length size.  The values "
5651 "are padded with 0 to have 64-bit alignment."
5652 msgstr ""
5653
5654 #. type: Plain text
5655 #: build/C/man2/perf_event_open.2:1818
5656 msgid ""
5657 "This RAW record data is opaque with respect to the ABI.  The ABI doesn't "
5658 "make any promises with respect to the stability of its content, it may vary "
5659 "depending on event, hardware, and kernel version."
5660 msgstr ""
5661
5662 #. type: TP
5663 #: build/C/man2/perf_event_open.2:1818
5664 #, no-wrap
5665 msgid "I<bnr>, I<lbr[bnr]>"
5666 msgstr "I<bnr>, I<lbr[bnr]>"
5667
5668 #. type: Plain text
5669 #: build/C/man2/perf_event_open.2:1827
5670 msgid ""
5671 "If B<PERF_SAMPLE_BRANCH_STACK> is enabled, then a 64-bit value indicating "
5672 "the number of records is included, followed by I<bnr> I<perf_branch_entry> "
5673 "structures which each include the fields:"
5674 msgstr ""
5675
5676 #. type: TP
5677 #: build/C/man2/perf_event_open.2:1828
5678 #, no-wrap
5679 msgid "I<from>"
5680 msgstr "I<from>"
5681
5682 #. type: Plain text
5683 #: build/C/man2/perf_event_open.2:1831
5684 msgid "This indicates the source instruction (may not be a branch)."
5685 msgstr ""
5686
5687 #. type: TP
5688 #: build/C/man2/perf_event_open.2:1831
5689 #, no-wrap
5690 msgid "I<to>"
5691 msgstr "I<to>"
5692
5693 #. type: Plain text
5694 #: build/C/man2/perf_event_open.2:1834
5695 msgid "The branch target."
5696 msgstr ""
5697
5698 #. type: TP
5699 #: build/C/man2/perf_event_open.2:1834
5700 #, no-wrap
5701 msgid "I<mispred>"
5702 msgstr "I<mispred>"
5703
5704 #. type: Plain text
5705 #: build/C/man2/perf_event_open.2:1837
5706 msgid "The branch target was mispredicted."
5707 msgstr ""
5708
5709 #. type: TP
5710 #: build/C/man2/perf_event_open.2:1837
5711 #, no-wrap
5712 msgid "I<predicted>"
5713 msgstr "I<predicted>"
5714
5715 #. type: Plain text
5716 #: build/C/man2/perf_event_open.2:1840
5717 msgid "The branch target was predicted."
5718 msgstr ""
5719
5720 #. type: TP
5721 #: build/C/man2/perf_event_open.2:1840
5722 #, no-wrap
5723 msgid "I<in_tx> (since Linux 3.11)"
5724 msgstr "I<in_tx> (Linux 3.11 以降)"
5725
5726 #. type: Plain text
5727 #: build/C/man2/perf_event_open.2:1843
5728 msgid "The branch was in a transactional memory transaction."
5729 msgstr ""
5730
5731 #. type: TP
5732 #: build/C/man2/perf_event_open.2:1843
5733 #, no-wrap
5734 msgid "I<abort> (since Linux 3.11)"
5735 msgstr "I<abort> (Linux 3.11 以降)"
5736
5737 #. type: Plain text
5738 #: build/C/man2/perf_event_open.2:1846
5739 msgid "The branch was in an aborted transactional memory transaction."
5740 msgstr ""
5741
5742 #. type: Plain text
5743 #: build/C/man2/perf_event_open.2:1850
5744 msgid ""
5745 "The entries are from most to least recent, so the first entry has the most "
5746 "recent branch."
5747 msgstr ""
5748
5749 #. type: Plain text
5750 #: build/C/man2/perf_event_open.2:1857
5751 msgid ""
5752 "Support for I<mispred> and I<predicted> is optional; if not supported, both "
5753 "values will be 0."
5754 msgstr ""
5755
5756 #. type: Plain text
5757 #: build/C/man2/perf_event_open.2:1861
5758 msgid ""
5759 "The type of branches recorded is specified by the I<branch_sample_type> "
5760 "field."
5761 msgstr ""
5762
5763 #. type: TP
5764 #: build/C/man2/perf_event_open.2:1863
5765 #, no-wrap
5766 msgid "I<abi>, I<regs[weight(mask)]>"
5767 msgstr "I<abi>, I<regs[weight(mask)]>"
5768
5769 #. type: Plain text
5770 #: build/C/man2/perf_event_open.2:1868
5771 msgid ""
5772 "If B<PERF_SAMPLE_REGS_USER> is enabled, then the user CPU registers are "
5773 "recorded."
5774 msgstr ""
5775
5776 #. type: Plain text
5777 #: build/C/man2/perf_event_open.2:1874
5778 msgid ""
5779 "The I<abi> field is one of B<PERF_SAMPLE_REGS_ABI_NONE>, "
5780 "B<PERF_SAMPLE_REGS_ABI_32> or B<PERF_SAMPLE_REGS_ABI_64>."
5781 msgstr ""
5782
5783 #. type: Plain text
5784 #: build/C/man2/perf_event_open.2:1884
5785 msgid ""
5786 "The I<regs> field is an array of the CPU registers that were specified by "
5787 "the I<sample_regs_user> attr field.  The number of values is the number of "
5788 "bits set in the I<sample_regs_user> bit mask."
5789 msgstr ""
5790
5791 #. type: TP
5792 #: build/C/man2/perf_event_open.2:1884
5793 #, no-wrap
5794 msgid "I<size>, I<data[size]>, I<dyn_size>"
5795 msgstr "I<size>, I<data[size]>, I<dyn_size>"
5796
5797 #. type: Plain text
5798 #: build/C/man2/perf_event_open.2:1898
5799 msgid ""
5800 "If B<PERF_SAMPLE_STACK_USER> is enabled, then record the user stack to "
5801 "enable backtracing.  I<size> is the size requested by the user in "
5802 "I<stack_user_size> or else the maximum record size.  I<data> is the stack "
5803 "data.  I<dyn_size> is the amount of data actually dumped (can be less than "
5804 "I<size>)."
5805 msgstr ""
5806
5807 #. type: TP
5808 #: build/C/man2/perf_event_open.2:1898
5809 #, no-wrap
5810 msgid "I<weight>"
5811 msgstr "I<weight>"
5812
5813 #. type: Plain text
5814 #: build/C/man2/perf_event_open.2:1906
5815 msgid ""
5816 "If B<PERF_SAMPLE_WEIGHT> is enabled, then a 64-bit value provided by the "
5817 "hardware is recorded that indicates how costly the event was.  This allows "
5818 "expensive events to stand out more clearly in profiles."
5819 msgstr ""
5820
5821 #. type: TP
5822 #: build/C/man2/perf_event_open.2:1906
5823 #, no-wrap
5824 msgid "I<data_src>"
5825 msgstr "I<data_src>"
5826
5827 #. type: Plain text
5828 #: build/C/man2/perf_event_open.2:1912
5829 msgid ""
5830 "If B<PERF_SAMPLE_DATA_SRC> is enabled, then a 64-bit value is recorded that "
5831 "is made up of the following fields:"
5832 msgstr ""
5833
5834 #. type: TP
5835 #: build/C/man2/perf_event_open.2:1913
5836 #, no-wrap
5837 msgid "I<mem_op>"
5838 msgstr "I<mem_op>"
5839
5840 #. type: Plain text
5841 #: build/C/man2/perf_event_open.2:1916
5842 msgid "Type of opcode, a bitwise combination of:"
5843 msgstr ""
5844
5845 #. type: TP
5846 #: build/C/man2/perf_event_open.2:1919
5847 #, no-wrap
5848 msgid "B<PERF_MEM_OP_NA>"
5849 msgstr "B<PERF_MEM_OP_NA>"
5850
5851 #. type: Plain text
5852 #: build/C/man2/perf_event_open.2:1922 build/C/man2/perf_event_open.2:1945
5853 #: build/C/man2/perf_event_open.2:1995 build/C/man2/perf_event_open.2:2018
5854 #: build/C/man2/perf_event_open.2:2032
5855 msgid "Not available"
5856 msgstr ""
5857
5858 #. type: TP
5859 #: build/C/man2/perf_event_open.2:1922
5860 #, no-wrap
5861 msgid "B<PERF_MEM_OP_LOAD>"
5862 msgstr "B<PERF_MEM_OP_LOAD>"
5863
5864 #. type: Plain text
5865 #: build/C/man2/perf_event_open.2:1925
5866 msgid "Load instruction"
5867 msgstr ""
5868
5869 #. type: TP
5870 #: build/C/man2/perf_event_open.2:1925
5871 #, no-wrap
5872 msgid "B<PERF_MEM_OP_STORE>"
5873 msgstr "B<PERF_MEM_OP_STORE>"
5874
5875 #. type: Plain text
5876 #: build/C/man2/perf_event_open.2:1928
5877 msgid "Store instruction"
5878 msgstr ""
5879
5880 #. type: TP
5881 #: build/C/man2/perf_event_open.2:1928
5882 #, no-wrap
5883 msgid "B<PERF_MEM_OP_PFETCH>"
5884 msgstr "B<PERF_MEM_OP_PFETCH>"
5885
5886 #. type: Plain text
5887 #: build/C/man2/perf_event_open.2:1931
5888 msgid "Prefetch"
5889 msgstr ""
5890
5891 #. type: TP
5892 #: build/C/man2/perf_event_open.2:1931
5893 #, no-wrap
5894 msgid "B<PERF_MEM_OP_EXEC>"
5895 msgstr "B<PERF_MEM_OP_EXEC>"
5896
5897 #. type: Plain text
5898 #: build/C/man2/perf_event_open.2:1934
5899 msgid "Executable code"
5900 msgstr ""
5901
5902 #. type: TP
5903 #: build/C/man2/perf_event_open.2:1936
5904 #, no-wrap
5905 msgid "I<mem_lvl>"
5906 msgstr "I<mem_lvl>"
5907
5908 #. type: Plain text
5909 #: build/C/man2/perf_event_open.2:1939
5910 msgid "Memory hierarchy level hit or miss, a bitwise combination of:"
5911 msgstr ""
5912
5913 #. type: TP
5914 #: build/C/man2/perf_event_open.2:1942
5915 #, no-wrap
5916 msgid "B<PERF_MEM_LVL_NA>"
5917 msgstr "B<PERF_MEM_LVL_NA>"
5918
5919 #. type: TP
5920 #: build/C/man2/perf_event_open.2:1945
5921 #, no-wrap
5922 msgid "B<PERF_MEM_LVL_HIT>"
5923 msgstr "B<PERF_MEM_LVL_HIT>"
5924
5925 #. type: Plain text
5926 #: build/C/man2/perf_event_open.2:1948 build/C/man2/perf_event_open.2:2035
5927 msgid "Hit"
5928 msgstr ""
5929
5930 #. type: TP
5931 #: build/C/man2/perf_event_open.2:1948
5932 #, no-wrap
5933 msgid "B<PERF_MEM_LVL_MISS>"
5934 msgstr "B<PERF_MEM_LVL_MISS>"
5935
5936 #. type: Plain text
5937 #: build/C/man2/perf_event_open.2:1951 build/C/man2/perf_event_open.2:2038
5938 msgid "Miss"
5939 msgstr ""
5940
5941 #. type: TP
5942 #: build/C/man2/perf_event_open.2:1951
5943 #, no-wrap
5944 msgid "B<PERF_MEM_LVL_L1>"
5945 msgstr "B<PERF_MEM_LVL_L1>"
5946
5947 #. type: Plain text
5948 #: build/C/man2/perf_event_open.2:1954
5949 msgid "Level 1 cache"
5950 msgstr ""
5951
5952 #. type: TP
5953 #: build/C/man2/perf_event_open.2:1954
5954 #, no-wrap
5955 msgid "B<PERF_MEM_LVL_LFB>"
5956 msgstr "B<PERF_MEM_LVL_LFB>"
5957
5958 #. type: Plain text
5959 #: build/C/man2/perf_event_open.2:1957
5960 msgid "Line fill buffer"
5961 msgstr ""
5962
5963 #. type: TP
5964 #: build/C/man2/perf_event_open.2:1957
5965 #, no-wrap
5966 msgid "B<PERF_MEM_LVL_L2>"
5967 msgstr "B<PERF_MEM_LVL_L2>"
5968
5969 #. type: Plain text
5970 #: build/C/man2/perf_event_open.2:1960
5971 msgid "Level 2 cache"
5972 msgstr ""
5973
5974 #. type: TP
5975 #: build/C/man2/perf_event_open.2:1960
5976 #, no-wrap
5977 msgid "B<PERF_MEM_LVL_L3>"
5978 msgstr "B<PERF_MEM_LVL_L3>"
5979
5980 #. type: Plain text
5981 #: build/C/man2/perf_event_open.2:1963
5982 msgid "Level 3 cache"
5983 msgstr ""
5984
5985 #. type: TP
5986 #: build/C/man2/perf_event_open.2:1963
5987 #, no-wrap
5988 msgid "B<PERF_MEM_LVL_LOC_RAM>"
5989 msgstr "B<PERF_MEM_LVL_LOC_RAM>"
5990
5991 #. type: Plain text
5992 #: build/C/man2/perf_event_open.2:1966
5993 msgid "Local DRAM"
5994 msgstr ""
5995
5996 #. type: TP
5997 #: build/C/man2/perf_event_open.2:1966
5998 #, no-wrap
5999 msgid "B<PERF_MEM_LVL_REM_RAM1>"
6000 msgstr "B<PERF_MEM_LVL_REM_RAM1>"
6001
6002 #. type: Plain text
6003 #: build/C/man2/perf_event_open.2:1969
6004 msgid "Remote DRAM 1 hop"
6005 msgstr ""
6006
6007 #. type: TP
6008 #: build/C/man2/perf_event_open.2:1969
6009 #, no-wrap
6010 msgid "B<PERF_MEM_LVL_REM_RAM2>"
6011 msgstr "B<PERF_MEM_LVL_REM_RAM2>"
6012
6013 #. type: Plain text
6014 #: build/C/man2/perf_event_open.2:1972
6015 msgid "Remote DRAM 2 hops"
6016 msgstr ""
6017
6018 #. type: TP
6019 #: build/C/man2/perf_event_open.2:1972
6020 #, no-wrap
6021 msgid "B<PERF_MEM_LVL_REM_CCE1>"
6022 msgstr "B<PERF_MEM_LVL_REM_CCE1>"
6023
6024 #. type: Plain text
6025 #: build/C/man2/perf_event_open.2:1975
6026 msgid "Remote cache 1 hop"
6027 msgstr ""
6028
6029 #. type: TP
6030 #: build/C/man2/perf_event_open.2:1975
6031 #, no-wrap
6032 msgid "B<PERF_MEM_LVL_REM_CCE2>"
6033 msgstr "B<PERF_MEM_LVL_REM_CCE2>"
6034
6035 #. type: Plain text
6036 #: build/C/man2/perf_event_open.2:1978
6037 msgid "Remote cache 2 hops"
6038 msgstr ""
6039
6040 #. type: TP
6041 #: build/C/man2/perf_event_open.2:1978
6042 #, no-wrap
6043 msgid "B<PERF_MEM_LVL_IO>"
6044 msgstr "B<PERF_MEM_LVL_IO>"
6045
6046 #. type: Plain text
6047 #: build/C/man2/perf_event_open.2:1981
6048 msgid "I/O memory"
6049 msgstr ""
6050
6051 #. type: TP
6052 #: build/C/man2/perf_event_open.2:1981
6053 #, no-wrap
6054 msgid "B<PERF_MEM_LVL_UNC>"
6055 msgstr "B<PERF_MEM_LVL_UNC>"
6056
6057 #. type: Plain text
6058 #: build/C/man2/perf_event_open.2:1984
6059 msgid "Uncached memory"
6060 msgstr ""
6061
6062 #. type: TP
6063 #: build/C/man2/perf_event_open.2:1986
6064 #, no-wrap
6065 msgid "I<mem_snoop>"
6066 msgstr "I<mem_snoop>"
6067
6068 #. type: Plain text
6069 #: build/C/man2/perf_event_open.2:1989
6070 msgid "Snoop mode, a bitwise combination of:"
6071 msgstr ""
6072
6073 #. type: TP
6074 #: build/C/man2/perf_event_open.2:1992
6075 #, no-wrap
6076 msgid "B<PERF_MEM_SNOOP_NA>"
6077 msgstr "B<PERF_MEM_SNOOP_NA>"
6078
6079 #. type: TP
6080 #: build/C/man2/perf_event_open.2:1995
6081 #, no-wrap
6082 msgid "B<PERF_MEM_SNOOP_NONE>"
6083 msgstr "B<PERF_MEM_SNOOP_NONE>"
6084
6085 #. type: Plain text
6086 #: build/C/man2/perf_event_open.2:1998
6087 msgid "No snoop"
6088 msgstr ""
6089
6090 #. type: TP
6091 #: build/C/man2/perf_event_open.2:1998
6092 #, no-wrap
6093 msgid "B<PERF_MEM_SNOOP_HIT>"
6094 msgstr "B<PERF_MEM_SNOOP_HIT>"
6095
6096 #. type: Plain text
6097 #: build/C/man2/perf_event_open.2:2001
6098 msgid "Snoop hit"
6099 msgstr ""
6100
6101 #. type: TP
6102 #: build/C/man2/perf_event_open.2:2001
6103 #, no-wrap
6104 msgid "B<PERF_MEM_SNOOP_MISS>"
6105 msgstr "B<PERF_MEM_SNOOP_MISS>"
6106
6107 #. type: Plain text
6108 #: build/C/man2/perf_event_open.2:2004
6109 msgid "Snoop miss"
6110 msgstr ""
6111
6112 #. type: TP
6113 #: build/C/man2/perf_event_open.2:2004
6114 #, no-wrap
6115 msgid "B<PERF_MEM_SNOOP_HITM>"
6116 msgstr "B<PERF_MEM_SNOOP_HITM>"
6117
6118 #. type: Plain text
6119 #: build/C/man2/perf_event_open.2:2007
6120 msgid "Snoop hit modified"
6121 msgstr ""
6122
6123 #. type: TP
6124 #: build/C/man2/perf_event_open.2:2009
6125 #, no-wrap
6126 msgid "I<mem_lock>"
6127 msgstr "I<mem_lock>"
6128
6129 #. type: Plain text
6130 #: build/C/man2/perf_event_open.2:2012
6131 msgid "Lock instruction, a bitwise combination of:"
6132 msgstr ""
6133
6134 #. type: TP
6135 #: build/C/man2/perf_event_open.2:2015
6136 #, no-wrap
6137 msgid "B<PERF_MEM_LOCK_NA>"
6138 msgstr "B<PERF_MEM_LOCK_NA>"
6139
6140 #. type: TP
6141 #: build/C/man2/perf_event_open.2:2018
6142 #, no-wrap
6143 msgid "B<PERF_MEM_LOCK_LOCKED>"
6144 msgstr "B<PERF_MEM_LOCK_LOCKED>"
6145
6146 #. type: Plain text
6147 #: build/C/man2/perf_event_open.2:2021
6148 msgid "Locked transaction"
6149 msgstr ""
6150
6151 #. type: TP
6152 #: build/C/man2/perf_event_open.2:2023
6153 #, no-wrap
6154 msgid "I<mem_dtlb>"
6155 msgstr "I<mem_dtlb>"
6156
6157 #. type: Plain text
6158 #: build/C/man2/perf_event_open.2:2026
6159 msgid "TLB access hit or miss, a bitwise combination of:"
6160 msgstr ""
6161
6162 #. type: TP
6163 #: build/C/man2/perf_event_open.2:2029
6164 #, no-wrap
6165 msgid "B<PERF_MEM_TLB_NA>"
6166 msgstr "B<PERF_MEM_TLB_NA>"
6167
6168 #. type: TP
6169 #: build/C/man2/perf_event_open.2:2032
6170 #, no-wrap
6171 msgid "B<PERF_MEM_TLB_HIT>"
6172 msgstr "B<PERF_MEM_TLB_HIT>"
6173
6174 #. type: TP
6175 #: build/C/man2/perf_event_open.2:2035
6176 #, no-wrap
6177 msgid "B<PERF_MEM_TLB_MISS>"
6178 msgstr "B<PERF_MEM_TLB_MISS>"
6179
6180 #. type: TP
6181 #: build/C/man2/perf_event_open.2:2038
6182 #, no-wrap
6183 msgid "B<PERF_MEM_TLB_L1>"
6184 msgstr "B<PERF_MEM_TLB_L1>"
6185
6186 #. type: Plain text
6187 #: build/C/man2/perf_event_open.2:2041
6188 msgid "Level 1 TLB"
6189 msgstr ""
6190
6191 #. type: TP
6192 #: build/C/man2/perf_event_open.2:2041
6193 #, no-wrap
6194 msgid "B<PERF_MEM_TLB_L2>"
6195 msgstr "B<PERF_MEM_TLB_L2>"
6196
6197 #. type: Plain text
6198 #: build/C/man2/perf_event_open.2:2044
6199 msgid "Level 2 TLB"
6200 msgstr ""
6201
6202 #. type: TP
6203 #: build/C/man2/perf_event_open.2:2044
6204 #, no-wrap
6205 msgid "B<PERF_MEM_TLB_WK>"
6206 msgstr "B<PERF_MEM_TLB_WK>"
6207
6208 #. type: Plain text
6209 #: build/C/man2/perf_event_open.2:2047
6210 msgid "Hardware walker"
6211 msgstr ""
6212
6213 #. type: TP
6214 #: build/C/man2/perf_event_open.2:2047
6215 #, no-wrap
6216 msgid "B<PERF_MEM_TLB_OS>"
6217 msgstr "B<PERF_MEM_TLB_OS>"
6218
6219 #. type: Plain text
6220 #: build/C/man2/perf_event_open.2:2050
6221 msgid "OS fault handler"
6222 msgstr ""
6223
6224 #. type: TP
6225 #: build/C/man2/perf_event_open.2:2053
6226 #, no-wrap
6227 msgid "I<transaction>"
6228 msgstr "I<transaction>"
6229
6230 #. type: Plain text
6231 #: build/C/man2/perf_event_open.2:2059
6232 msgid ""
6233 "If the B<PERF_SAMPLE_TRANSACTION> flag is set, then a 64-bit field is "
6234 "recorded describing the sources of any transactional memory aborts."
6235 msgstr ""
6236
6237 #. type: Plain text
6238 #: build/C/man2/perf_event_open.2:2061
6239 msgid "The field is a bitwise combination of the following values:"
6240 msgstr ""
6241
6242 #. type: TP
6243 #: build/C/man2/perf_event_open.2:2062
6244 #, no-wrap
6245 msgid "B<PERF_TXN_ELISION>"
6246 msgstr "B<PERF_TXN_ELISION>"
6247
6248 #. type: Plain text
6249 #: build/C/man2/perf_event_open.2:2065
6250 msgid "Abort from an elision type transaction (Intel-CPU-specific)."
6251 msgstr ""
6252
6253 #. type: TP
6254 #: build/C/man2/perf_event_open.2:2065
6255 #, no-wrap
6256 msgid "B<PERF_TXN_TRANSACTION>"
6257 msgstr "B<PERF_TXN_TRANSACTION>"
6258
6259 #. type: Plain text
6260 #: build/C/man2/perf_event_open.2:2068
6261 msgid "Abort from a generic transaction."
6262 msgstr ""
6263
6264 #. type: TP
6265 #: build/C/man2/perf_event_open.2:2068
6266 #, no-wrap
6267 msgid "B<PERF_TXN_SYNC>"
6268 msgstr "B<PERF_TXN_SYNC>"
6269
6270 #. type: Plain text
6271 #: build/C/man2/perf_event_open.2:2071
6272 msgid "Synchronous abort (related to the reported instruction)."
6273 msgstr ""
6274
6275 #. type: TP
6276 #: build/C/man2/perf_event_open.2:2071
6277 #, no-wrap
6278 msgid "B<PERF_TXN_ASYNC>"
6279 msgstr "B<PERF_TXN_ASYNC>"
6280
6281 #. type: Plain text
6282 #: build/C/man2/perf_event_open.2:2074
6283 msgid "Asynchronous abort (not related to the reported instruction)."
6284 msgstr ""
6285
6286 #. type: TP
6287 #: build/C/man2/perf_event_open.2:2074
6288 #, no-wrap
6289 msgid "B<PERF_TXN_RETRY>"
6290 msgstr "B<PERF_TXN_RETRY>"
6291
6292 #. type: Plain text
6293 #: build/C/man2/perf_event_open.2:2077
6294 msgid "Retryable abort (retrying the transaction may have succeeded)."
6295 msgstr ""
6296
6297 #. type: TP
6298 #: build/C/man2/perf_event_open.2:2077
6299 #, no-wrap
6300 msgid "B<PERF_TXN_CONFLICT>"
6301 msgstr "B<PERF_TXN_CONFLICT>"
6302
6303 #. type: Plain text
6304 #: build/C/man2/perf_event_open.2:2080
6305 msgid "Abort due to memory conflicts with other threads."
6306 msgstr ""
6307
6308 #. type: TP
6309 #: build/C/man2/perf_event_open.2:2080
6310 #, no-wrap
6311 msgid "B<PERF_TXN_CAPACITY_WRITE>"
6312 msgstr ""
6313
6314 #. type: Plain text
6315 #: build/C/man2/perf_event_open.2:2083
6316 msgid "Abort due to write capacity overflow."
6317 msgstr ""
6318
6319 #. type: TP
6320 #: build/C/man2/perf_event_open.2:2083
6321 #, no-wrap
6322 msgid "B<PERF_TXN_CAPACITY_READ>"
6323 msgstr ""
6324
6325 #. type: Plain text
6326 #: build/C/man2/perf_event_open.2:2086
6327 msgid "Abort due to read capacity overflow."
6328 msgstr ""
6329
6330 #. type: Plain text
6331 #: build/C/man2/perf_event_open.2:2093
6332 msgid ""
6333 "In addition, a user-specified abort code can be obtained from the high 32 "
6334 "bits of the field by shifting right by B<PERF_TXN_ABORT_SHIFT> and masking "
6335 "with B<PERF_TXN_ABORT_MASK>."
6336 msgstr ""
6337
6338 #. type: SS
6339 #: build/C/man2/perf_event_open.2:2095
6340 #, no-wrap
6341 msgid "Signal overflow"
6342 msgstr ""
6343
6344 #. type: Plain text
6345 #: build/C/man2/perf_event_open.2:2104
6346 msgid ""
6347 "Events can be set to deliver a signal when a threshold is crossed.  The "
6348 "signal handler is set up using the B<poll>(2), B<select>(2), B<epoll>(2)  "
6349 "and B<fcntl>(2), system calls."
6350 msgstr ""
6351
6352 #. type: Plain text
6353 #: build/C/man2/perf_event_open.2:2108
6354 msgid ""
6355 "To generate signals, sampling must be enabled (I<sample_period> must have a "
6356 "nonzero value)."
6357 msgstr ""
6358
6359 #. type: Plain text
6360 #: build/C/man2/perf_event_open.2:2110
6361 msgid "There are two ways to generate signals."
6362 msgstr ""
6363
6364 #. type: Plain text
6365 #: build/C/man2/perf_event_open.2:2120
6366 msgid ""
6367 "The first is to set a I<wakeup_events> or I<wakeup_watermark> value that "
6368 "will generate a signal if a certain number of samples or bytes have been "
6369 "written to the mmap ring buffer.  In this case, a signal of type B<POLL_IN> "
6370 "is sent."
6371 msgstr ""
6372
6373 #. type: Plain text
6374 #: build/C/man2/perf_event_open.2:2132
6375 msgid ""
6376 "The other way is by use of the B<PERF_EVENT_IOC_REFRESH> ioctl.  This ioctl "
6377 "adds to a counter that decrements each time the event overflows.  When "
6378 "nonzero, a B<POLL_IN> signal is sent on overflow, but once the value reaches "
6379 "0, a signal is sent of type B<POLL_HUP> and the underlying event is disabled."
6380 msgstr ""
6381
6382 #.  FIXME(Vince) : Find out when this was introduced
6383 #. type: Plain text
6384 #: build/C/man2/perf_event_open.2:2138
6385 msgid ""
6386 "Note: on newer kernels (definitely noticed with 3.2)  a signal is provided "
6387 "for every overflow, even if I<wakeup_events> is not set."
6388 msgstr ""
6389
6390 #. type: SS
6391 #: build/C/man2/perf_event_open.2:2138
6392 #, no-wrap
6393 msgid "rdpmc instruction"
6394 msgstr ""
6395
6396 #. type: Plain text
6397 #: build/C/man2/perf_event_open.2:2145
6398 msgid ""
6399 "Starting with Linux 3.4 on x86, you can use the I<rdpmc> instruction to get "
6400 "low-latency reads without having to enter the kernel.  Note that using "
6401 "I<rdpmc> is not necessarily faster than other methods for reading event "
6402 "values."
6403 msgstr ""
6404
6405 #. type: Plain text
6406 #: build/C/man2/perf_event_open.2:2150
6407 msgid ""
6408 "Support for this can be detected with the I<cap_usr_rdpmc> field in the mmap "
6409 "page; documentation on how to calculate event values can be found in that "
6410 "section."
6411 msgstr ""
6412
6413 #. type: SS
6414 #: build/C/man2/perf_event_open.2:2150
6415 #, no-wrap
6416 msgid "perf_event ioctl calls"
6417 msgstr ""
6418
6419 #. type: Plain text
6420 #: build/C/man2/perf_event_open.2:2155
6421 msgid "Various ioctls act on B<perf_event_open>()  file descriptors:"
6422 msgstr ""
6423
6424 #. type: TP
6425 #: build/C/man2/perf_event_open.2:2155
6426 #, no-wrap
6427 msgid "B<PERF_EVENT_IOC_ENABLE>"
6428 msgstr "B<PERF_EVENT_IOC_ENABLE>"
6429
6430 #. type: Plain text
6431 #: build/C/man2/perf_event_open.2:2159
6432 msgid ""
6433 "This enables the individual event or event group specified by the file "
6434 "descriptor argument."
6435 msgstr ""
6436
6437 #. type: Plain text
6438 #: build/C/man2/perf_event_open.2:2165
6439 msgid ""
6440 "If the B<PERF_IOC_FLAG_GROUP> bit is set in the ioctl argument, then all "
6441 "events in a group are enabled, even if the event specified is not the group "
6442 "leader (but see BUGS)."
6443 msgstr ""
6444
6445 #. type: TP
6446 #: build/C/man2/perf_event_open.2:2165
6447 #, no-wrap
6448 msgid "B<PERF_EVENT_IOC_DISABLE>"
6449 msgstr "B<PERF_EVENT_IOC_DISABLE>"
6450
6451 #. type: Plain text
6452 #: build/C/man2/perf_event_open.2:2169
6453 msgid ""
6454 "This disables the individual counter or event group specified by the file "
6455 "descriptor argument."
6456 msgstr ""
6457
6458 #. type: Plain text
6459 #: build/C/man2/perf_event_open.2:2176
6460 msgid ""
6461 "Enabling or disabling the leader of a group enables or disables the entire "
6462 "group; that is, while the group leader is disabled, none of the counters in "
6463 "the group will count.  Enabling or disabling a member of a group other than "
6464 "the leader affects only that counter; disabling a non-leader stops that "
6465 "counter from counting but doesn't affect any other counter."
6466 msgstr ""
6467
6468 #. type: Plain text
6469 #: build/C/man2/perf_event_open.2:2182
6470 msgid ""
6471 "If the B<PERF_IOC_FLAG_GROUP> bit is set in the ioctl argument, then all "
6472 "events in a group are disabled, even if the event specified is not the group "
6473 "leader (but see BUGS)."
6474 msgstr ""
6475
6476 #. type: TP
6477 #: build/C/man2/perf_event_open.2:2182
6478 #, no-wrap
6479 msgid "B<PERF_EVENT_IOC_REFRESH>"
6480 msgstr "B<PERF_EVENT_IOC_REFRESH>"
6481
6482 #. type: Plain text
6483 #: build/C/man2/perf_event_open.2:2196
6484 msgid ""
6485 "Non-inherited overflow counters can use this to enable a counter for a "
6486 "number of overflows specified by the argument, after which it is disabled.  "
6487 "Subsequent calls of this ioctl add the argument value to the current count.  "
6488 "A signal with B<POLL_IN> set will happen on each overflow until the count "
6489 "reaches 0; when that happens a signal with POLL_HUP set is sent and the "
6490 "event is disabled.  Using an argument of 0 is considered undefined behavior."
6491 msgstr ""
6492
6493 #. type: TP
6494 #: build/C/man2/perf_event_open.2:2196
6495 #, no-wrap
6496 msgid "B<PERF_EVENT_IOC_RESET>"
6497 msgstr "B<PERF_EVENT_IOC_RESET>"
6498
6499 #. type: Plain text
6500 #: build/C/man2/perf_event_open.2:2206
6501 msgid ""
6502 "Reset the event count specified by the file descriptor argument to zero.  "
6503 "This resets only the counts; there is no way to reset the multiplexing "
6504 "I<time_enabled> or I<time_running> values."
6505 msgstr ""
6506
6507 #. type: Plain text
6508 #: build/C/man2/perf_event_open.2:2212
6509 msgid ""
6510 "If the B<PERF_IOC_FLAG_GROUP> bit is set in the ioctl argument, then all "
6511 "events in a group are reset, even if the event specified is not the group "
6512 "leader (but see BUGS)."
6513 msgstr ""
6514
6515 #. type: TP
6516 #: build/C/man2/perf_event_open.2:2212
6517 #, no-wrap
6518 msgid "B<PERF_EVENT_IOC_PERIOD>"
6519 msgstr "B<PERF_EVENT_IOC_PERIOD>"
6520
6521 #. type: Plain text
6522 #: build/C/man2/perf_event_open.2:2215
6523 msgid "This updates the overflow period for the event."
6524 msgstr ""
6525
6526 #. type: Plain text
6527 #: build/C/man2/perf_event_open.2:2220
6528 msgid ""
6529 "Since Linux 3.7 (on ARM) and Linux 3.14 (all other architectures), the new "
6530 "period takes effect immediately.  On older kernels, the new period did not "
6531 "take effect until after the next overflow."
6532 msgstr ""
6533
6534 #. type: Plain text
6535 #: build/C/man2/perf_event_open.2:2223
6536 msgid ""
6537 "The argument is a pointer to a 64-bit value containing the desired new "
6538 "period."
6539 msgstr ""
6540
6541 #. type: Plain text
6542 #: build/C/man2/perf_event_open.2:2226
6543 msgid ""
6544 "Prior to Linux 2.6.36 this ioctl always failed due to a bug in the kernel."
6545 msgstr ""
6546
6547 #. type: TP
6548 #: build/C/man2/perf_event_open.2:2227
6549 #, no-wrap
6550 msgid "B<PERF_EVENT_IOC_SET_OUTPUT>"
6551 msgstr ""
6552
6553 #. type: Plain text
6554 #: build/C/man2/perf_event_open.2:2232
6555 msgid ""
6556 "This tells the kernel to report event notifications to the specified file "
6557 "descriptor rather than the default one.  The file descriptors must all be on "
6558 "the same CPU."
6559 msgstr ""
6560
6561 #. type: Plain text
6562 #: build/C/man2/perf_event_open.2:2235
6563 msgid ""
6564 "The argument specifies the desired file descriptor, or -1 if output should "
6565 "be ignored."
6566 msgstr ""
6567
6568 #. type: TP
6569 #: build/C/man2/perf_event_open.2:2235
6570 #, no-wrap
6571 msgid "B<PERF_EVENT_IOC_SET_FILTER> (since Linux 2.6.33)"
6572 msgstr "B<PERF_EVENT_IOC_SET_FILTER> (Linux 2.6.33 以降)"
6573
6574 #. type: Plain text
6575 #: build/C/man2/perf_event_open.2:2238
6576 msgid "This adds an ftrace filter to this event."
6577 msgstr ""
6578
6579 #. type: Plain text
6580 #: build/C/man2/perf_event_open.2:2240
6581 msgid "The argument is a pointer to the desired ftrace filter."
6582 msgstr ""
6583
6584 #. type: TP
6585 #: build/C/man2/perf_event_open.2:2240
6586 #, no-wrap
6587 msgid "B<PERF_EVENT_IOC_ID> (since Linux 3.12)"
6588 msgstr "B<PERF_EVENT_IOC_ID> (Linux 3.12 以降)"
6589
6590 #. type: Plain text
6591 #: build/C/man2/perf_event_open.2:2243
6592 msgid "This returns the event ID value for the given event file descriptor."
6593 msgstr ""
6594
6595 #. type: Plain text
6596 #: build/C/man2/perf_event_open.2:2246
6597 msgid ""
6598 "The argument is a pointer to a 64-bit unsigned integer to hold the result."
6599 msgstr ""
6600
6601 #. type: SS
6602 #: build/C/man2/perf_event_open.2:2246
6603 #, no-wrap
6604 msgid "Using prctl"
6605 msgstr ""
6606
6607 #. type: Plain text
6608 #: build/C/man2/perf_event_open.2:2259
6609 msgid ""
6610 "A process can enable or disable all the event groups that are attached to it "
6611 "using the B<prctl>(2)  B<PR_TASK_PERF_EVENTS_ENABLE> and "
6612 "B<PR_TASK_PERF_EVENTS_DISABLE> operations.  This applies to all counters on "
6613 "the calling process, whether created by this process or by another, and does "
6614 "not affect any counters that this process has created on other processes.  "
6615 "It enables or disables only the group leaders, not any other members in the "
6616 "groups."
6617 msgstr ""
6618
6619 #. type: SS
6620 #: build/C/man2/perf_event_open.2:2259
6621 #, no-wrap
6622 msgid "perf_event related configuration files"
6623 msgstr ""
6624
6625 #. type: Plain text
6626 #: build/C/man2/perf_event_open.2:2262
6627 msgid "Files in I</proc/sys/kernel/>"
6628 msgstr ""
6629
6630 #. type: TP
6631 #: build/C/man2/perf_event_open.2:2263
6632 #, no-wrap
6633 msgid "I</proc/sys/kernel/perf_event_paranoid>"
6634 msgstr ""
6635
6636 #. type: Plain text
6637 #: build/C/man2/perf_event_open.2:2269
6638 msgid ""
6639 "The I<perf_event_paranoid> file can be set to restrict access to the "
6640 "performance counters."
6641 msgstr ""
6642
6643 #. type: IP
6644 #: build/C/man2/perf_event_open.2:2270
6645 #, no-wrap
6646 msgid "2"
6647 msgstr ""
6648
6649 #. type: Plain text
6650 #: build/C/man2/perf_event_open.2:2272
6651 msgid "only allow user-space measurements."
6652 msgstr ""
6653
6654 #. type: IP
6655 #: build/C/man2/perf_event_open.2:2272
6656 #, no-wrap
6657 msgid "1"
6658 msgstr ""
6659
6660 #. type: Plain text
6661 #: build/C/man2/perf_event_open.2:2274
6662 msgid "allow both kernel and user measurements (default)."
6663 msgstr ""
6664
6665 #. type: IP
6666 #: build/C/man2/perf_event_open.2:2274
6667 #, no-wrap
6668 msgid "0"
6669 msgstr ""
6670
6671 #. type: Plain text
6672 #: build/C/man2/perf_event_open.2:2276
6673 msgid "allow access to CPU-specific data but not raw tracepoint samples."
6674 msgstr ""
6675
6676 #. type: IP
6677 #: build/C/man2/perf_event_open.2:2276
6678 #, no-wrap
6679 msgid "-1"
6680 msgstr "-1"
6681
6682 #. type: Plain text
6683 #: build/C/man2/perf_event_open.2:2278
6684 msgid "no restrictions."
6685 msgstr ""
6686
6687 #. type: Plain text
6688 #: build/C/man2/perf_event_open.2:2284
6689 msgid ""
6690 "The existence of the I<perf_event_paranoid> file is the official method for "
6691 "determining if a kernel supports B<perf_event_open>()."
6692 msgstr ""
6693
6694 #. type: TP
6695 #: build/C/man2/perf_event_open.2:2284
6696 #, no-wrap
6697 msgid "I</proc/sys/kernel/perf_event_max_sample_rate>"
6698 msgstr ""
6699
6700 #. type: Plain text
6701 #: build/C/man2/perf_event_open.2:2293
6702 msgid ""
6703 "This sets the maximum sample rate.  Setting this too high can allow users to "
6704 "sample at a rate that impacts overall machine performance and potentially "
6705 "lock up the machine.  The default value is 100000 (samples per second)."
6706 msgstr ""
6707
6708 #. type: TP
6709 #: build/C/man2/perf_event_open.2:2293
6710 #, no-wrap
6711 msgid "I</proc/sys/kernel/perf_event_mlock_kb>"
6712 msgstr ""
6713
6714 #. type: Plain text
6715 #: build/C/man2/perf_event_open.2:2299
6716 msgid ""
6717 "Maximum number of pages an unprivileged user can B<mlock>(2).  The default "
6718 "is 516 (kB)."
6719 msgstr ""
6720
6721 #. type: Plain text
6722 #: build/C/man2/perf_event_open.2:2303
6723 msgid "Files in I</sys/bus/event_source/devices/>"
6724 msgstr ""
6725
6726 #. type: Plain text
6727 #: build/C/man2/perf_event_open.2:2309
6728 msgid ""
6729 "Since Linux 2.6.34, the kernel supports having multiple PMUs available for "
6730 "monitoring.  Information on how to program these PMUs can be found under I</"
6731 "sys/bus/event_source/devices/>.  Each subdirectory corresponds to a "
6732 "different PMU."
6733 msgstr ""
6734
6735 #. type: TP
6736 #: build/C/man2/perf_event_open.2:2309
6737 #, no-wrap
6738 msgid "I</sys/bus/event_source/devices/*/type> (since Linux 2.6.38)"
6739 msgstr "I</sys/bus/event_source/devices/*/type> (Linux 2.6.38 以降)"
6740
6741 #. type: Plain text
6742 #: build/C/man2/perf_event_open.2:2316
6743 msgid ""
6744 "This contains an integer that can be used in the I<type> field of "
6745 "I<perf_event_attr> to indicate that you wish to use this PMU."
6746 msgstr ""
6747
6748 #. type: TP
6749 #: build/C/man2/perf_event_open.2:2316
6750 #, no-wrap
6751 msgid "I</sys/bus/event_source/devices/*/rdpmc> (since Linux 3.4)"
6752 msgstr "I</sys/bus/event_source/devices/*/rdpmc> (Linux 3.4 以降)"
6753
6754 #. type: Plain text
6755 #: build/C/man2/perf_event_open.2:2321
6756 msgid ""
6757 "If this file is 1, then direct user-space access to the performance counter "
6758 "registers is allowed via the rdpmc instruction.  This can be disabled by "
6759 "echoing 0 to the file."
6760 msgstr ""
6761
6762 #. type: TP
6763 #: build/C/man2/perf_event_open.2:2321
6764 #, no-wrap
6765 msgid "I</sys/bus/event_source/devices/*/format/> (since Linux 3.4)"
6766 msgstr "I</sys/bus/event_source/devices/*/format/> (Linux 3.4 以降)"
6767
6768 #. type: Plain text
6769 #: build/C/man2/perf_event_open.2:2329
6770 msgid ""
6771 "This subdirectory contains information on the architecture-specific "
6772 "subfields available for programming the various I<config> fields in the "
6773 "I<perf_event_attr> struct."
6774 msgstr ""
6775
6776 #. type: Plain text
6777 #: build/C/man2/perf_event_open.2:2340
6778 msgid ""
6779 "The content of each file is the name of the config field, followed by a "
6780 "colon, followed by a series of integer bit ranges separated by commas.  For "
6781 "example, the file I<event> may contain the value I<config1:1,6-10,44> which "
6782 "indicates that event is an attribute that occupies bits 1,6-10, and 44 of "
6783 "I<perf_event_attr::config1>."
6784 msgstr ""
6785
6786 #. type: TP
6787 #: build/C/man2/perf_event_open.2:2340
6788 #, no-wrap
6789 msgid "I</sys/bus/event_source/devices/*/events/> (since Linux 3.4)"
6790 msgstr "I</sys/bus/event_source/devices/*/events/> (Linux 3.4 以降)"
6791
6792 #. type: Plain text
6793 #: build/C/man2/perf_event_open.2:2349
6794 msgid ""
6795 "This subdirectory contains files with predefined events.  The contents are "
6796 "strings describing the event settings expressed in terms of the fields found "
6797 "in the previously mentioned I<./format/> directory.  These are not "
6798 "necessarily complete lists of all events supported by a PMU, but usually a "
6799 "subset of events deemed useful or interesting."
6800 msgstr ""
6801
6802 #. type: Plain text
6803 #: build/C/man2/perf_event_open.2:2357
6804 msgid ""
6805 "The content of each file is a list of attribute names separated by commas.  "
6806 "Each entry has an optional value (either hex or decimal).  If no value is "
6807 "specified, then it is assumed to be a single-bit field with a value of 1.  "
6808 "An example entry may look like this: I<event=0x2,inv,ldlat=3>."
6809 msgstr ""
6810
6811 #. type: TP
6812 #: build/C/man2/perf_event_open.2:2357
6813 #, no-wrap
6814 msgid "I</sys/bus/event_source/devices/*/uevent>"
6815 msgstr "I</sys/bus/event_source/devices/*/uevent>"
6816
6817 #. type: Plain text
6818 #: build/C/man2/perf_event_open.2:2361
6819 msgid ""
6820 "This file is the standard kernel device interface for injecting hotplug "
6821 "events."
6822 msgstr ""
6823
6824 #. type: TP
6825 #: build/C/man2/perf_event_open.2:2361
6826 #, no-wrap
6827 msgid "I</sys/bus/event_source/devices/*/cpumask> (since Linux 3.7)"
6828 msgstr "I</sys/bus/event_source/devices/*/cpumask> (Linux 3.7 以降)"
6829
6830 #. type: Plain text
6831 #: build/C/man2/perf_event_open.2:2370
6832 msgid ""
6833 "The I<cpumask> file contains a comma-separated list of integers that "
6834 "indicate a representative CPU number for each socket (package)  on the "
6835 "motherboard.  This is needed when setting up uncore or northbridge events, "
6836 "as those PMUs present socket-wide events."
6837 msgstr ""
6838
6839 #. type: Plain text
6840 #: build/C/man2/perf_event_open.2:2377
6841 msgid ""
6842 "B<perf_event_open>()  returns the new file descriptor, or -1 if an error "
6843 "occurred (in which case, I<errno> is set appropriately)."
6844 msgstr ""
6845
6846 #. type: Plain text
6847 #: build/C/man2/perf_event_open.2:2382
6848 msgid ""
6849 "The errors returned by B<perf_event_open>()  can be inconsistent, and may "
6850 "vary across processor architectures and performance monitoring units."
6851 msgstr ""
6852
6853 #. type: TP
6854 #: build/C/man2/perf_event_open.2:2382
6855 #, no-wrap
6856 msgid "B<E2BIG>"
6857 msgstr "B<E2BIG>"
6858
6859 #. type: Plain text
6860 #: build/C/man2/perf_event_open.2:2399
6861 msgid ""
6862 "Returned if the I<perf_event_attr> I<size> value is too small (smaller than "
6863 "B<PERF_ATTR_SIZE_VER0>), too big (larger than the page size), or larger than "
6864 "the kernel supports and the extra bytes are not zero.  When B<E2BIG> is "
6865 "returned, the I<perf_event_attr> I<size> field is overwritten by the kernel "
6866 "to be the size of the structure it was expecting."
6867 msgstr ""
6868
6869 #. type: Plain text
6870 #: build/C/man2/perf_event_open.2:2413
6871 msgid ""
6872 "Returned when the requested event requires B<CAP_SYS_ADMIN> permissions (or "
6873 "a more permissive perf_event paranoid setting).  Some common cases where an "
6874 "unprivileged process may encounter this error: attaching to a process owned "
6875 "by a different user; monitoring all processes on a given CPU (i.e., "
6876 "specifying the I<pid> argument as -1); and not setting I<exclude_kernel> "
6877 "when the paranoid setting requires it."
6878 msgstr ""
6879
6880 #. type: TP
6881 #: build/C/man2/perf_event_open.2:2413 build/C/man2/sendfile.2:121
6882 #: build/C/man2/splice.2:143 build/C/man2/vmsplice.2:123
6883 #, no-wrap
6884 msgid "B<EBADF>"
6885 msgstr "B<EBADF>"
6886
6887 #. type: Plain text
6888 #: build/C/man2/perf_event_open.2:2423
6889 msgid ""
6890 "Returned if the I<group_fd> file descriptor is not valid, or, if "
6891 "B<PERF_FLAG_PID_CGROUP> is set, the cgroup file descriptor in I<pid> is not "
6892 "valid."
6893 msgstr ""
6894
6895 #. type: Plain text
6896 #: build/C/man2/perf_event_open.2:2428
6897 msgid "Returned if the I<attr> pointer points at an invalid memory address."
6898 msgstr ""
6899
6900 #. type: Plain text
6901 #: build/C/man2/perf_event_open.2:2454
6902 msgid ""
6903 "Returned if the specified event is invalid.  There are many possible reasons "
6904 "for this.  A not-exhaustive list: I<sample_freq> is higher than the maximum "
6905 "setting; the I<cpu> to monitor does not exist; I<read_format> is out of "
6906 "range; I<sample_type> is out of range; the I<flags> value is out of range; "
6907 "I<exclusive> or I<pinned> set and the event is not a group leader; the event "
6908 "I<config> values are out of range or set reserved bits; the generic event "
6909 "selected is not supported; or there is not enough room to add the selected "
6910 "event."
6911 msgstr ""
6912
6913 #. type: TP
6914 #: build/C/man2/perf_event_open.2:2454
6915 #, no-wrap
6916 msgid "B<EMFILE>"
6917 msgstr "B<EMFILE>"
6918
6919 #. type: Plain text
6920 #: build/C/man2/perf_event_open.2:2460
6921 msgid ""
6922 "Each opened event uses one file descriptor.  If a large number of events are "
6923 "opened the per-user file descriptor limit (often 1024) will be hit and no "
6924 "more events can be created."
6925 msgstr ""
6926
6927 #. type: Plain text
6928 #: build/C/man2/perf_event_open.2:2464
6929 msgid ""
6930 "Returned when the event involves a feature not supported by the current CPU."
6931 msgstr ""
6932
6933 #. type: TP
6934 #: build/C/man2/perf_event_open.2:2464 build/C/man2/quotactl.2:440
6935 #, no-wrap
6936 msgid "B<ENOENT>"
6937 msgstr "B<ENOENT>"
6938
6939 #. type: Plain text
6940 #: build/C/man2/perf_event_open.2:2471
6941 msgid ""
6942 "Returned if the I<type> setting is not valid.  This error is also returned "
6943 "for some unsupported generic events."
6944 msgstr ""
6945
6946 #. type: TP
6947 #: build/C/man2/perf_event_open.2:2471
6948 #, no-wrap
6949 msgid "B<ENOSPC>"
6950 msgstr "B<ENOSPC>"
6951
6952 #. type: Plain text
6953 #: build/C/man2/perf_event_open.2:2481
6954 msgid ""
6955 "Prior to Linux 3.3, if there was not enough room for the event, B<ENOSPC> "
6956 "was returned.  In Linux 3.3, this was changed to B<EINVAL>.  B<ENOSPC> is "
6957 "still returned if you try to add more breakpoint events than supported by "
6958 "the hardware."
6959 msgstr ""
6960
6961 #. type: Plain text
6962 #: build/C/man2/perf_event_open.2:2488
6963 msgid ""
6964 "Returned if B<PERF_SAMPLE_STACK_USER> is set in I<sample_type> and it is not "
6965 "supported by hardware."
6966 msgstr ""
6967
6968 #. type: Plain text
6969 #: build/C/man2/perf_event_open.2:2495
6970 msgid ""
6971 "Returned if an event requiring a specific hardware feature is requested but "
6972 "there is no hardware support.  This includes requesting low-skid events if "
6973 "not supported, branch tracing if it is not available, sampling if no PMU "
6974 "interrupt is available, and branch stacks for software events."
6975 msgstr ""
6976
6977 #. type: Plain text
6978 #: build/C/man2/perf_event_open.2:2500
6979 msgid ""
6980 "Returned on many (but not all) architectures when an unsupported "
6981 "I<exclude_hv>, I<exclude_idle>, I<exclude_user>, or I<exclude_kernel> "
6982 "setting is specified."
6983 msgstr ""
6984
6985 #. type: Plain text
6986 #: build/C/man2/perf_event_open.2:2508
6987 msgid ""
6988 "It can also happen, as with B<EACCES>, when the requested event requires "
6989 "B<CAP_SYS_ADMIN> permissions (or a more permissive perf_event paranoid "
6990 "setting).  This includes setting a breakpoint on a kernel address, and "
6991 "(since Linux 3.13) setting a kernel function-trace tracepoint."
6992 msgstr ""
6993
6994 #. type: Plain text
6995 #: build/C/man2/perf_event_open.2:2511
6996 msgid "Returned if attempting to attach to a process that does not exist."
6997 msgstr ""
6998
6999 #. type: SH
7000 #: build/C/man2/perf_event_open.2:2511
7001 #, no-wrap
7002 msgid "VERSION"
7003 msgstr "バージョン"
7004
7005 #. type: Plain text
7006 #: build/C/man2/perf_event_open.2:2516
7007 msgid ""
7008 "B<perf_event_open>()  was introduced in Linux 2.6.31 but was called "
7009 "B<perf_counter_open>().  It was renamed in Linux 2.6.32."
7010 msgstr ""
7011
7012 #. type: Plain text
7013 #: build/C/man2/perf_event_open.2:2521
7014 msgid ""
7015 "This B<perf_event_open>()  system call Linux- specific and should not be "
7016 "used in programs intended to be portable."
7017 msgstr ""
7018 "B<perf_event_open>() システムコールは Linux 固有であり、 移植を意図したプログ"
7019 "ラムで使用すべきではない。"
7020
7021 #. type: Plain text
7022 #: build/C/man2/perf_event_open.2:2525
7023 msgid ""
7024 "Glibc does not provide a wrapper for this system call; call it using "
7025 "B<syscall>(2).  See the example below."
7026 msgstr ""
7027 "glibc はこのシステムコールに対するラッパー関数を提供していない。 "
7028 "B<syscall>(2)  を使って呼び出すこと。 以下の例を参照。"
7029
7030 #. type: Plain text
7031 #: build/C/man2/perf_event_open.2:2531
7032 msgid ""
7033 "The official way of knowing if B<perf_event_open>()  support is enabled is "
7034 "checking for the existence of the file I</proc/sys/kernel/"
7035 "perf_event_paranoid>."
7036 msgstr ""
7037
7038 #. type: SH
7039 #: build/C/man2/perf_event_open.2:2531 build/C/man2/pivot_root.2:134
7040 #: build/C/man2/ptrace.2:1963
7041 #, no-wrap
7042 msgid "BUGS"
7043 msgstr "バグ"
7044
7045 #. type: Plain text
7046 #: build/C/man2/perf_event_open.2:2538
7047 msgid ""
7048 "The B<F_SETOWN_EX> option to B<fcntl>(2)  is needed to properly get overflow "
7049 "signals in threads.  This was introduced in Linux 2.6.32."
7050 msgstr ""
7051
7052 #. type: Plain text
7053 #: build/C/man2/perf_event_open.2:2546
7054 msgid ""
7055 "Prior to Linux 2.6.33 (at least for x86), the kernel did not check if events "
7056 "could be scheduled together until read time.  The same happens on all known "
7057 "kernels if the NMI watchdog is enabled.  This means to see if a given set of "
7058 "events works you have to B<perf_event_open>(), start, then read before you "
7059 "know for sure you can get valid measurements."
7060 msgstr ""
7061
7062 #. type: Plain text
7063 #: build/C/man2/perf_event_open.2:2550
7064 msgid ""
7065 "Prior to Linux 2.6.34, event constraints were not enforced by the kernel.  "
7066 "In that case, some events would silently return \"0\" if the kernel "
7067 "scheduled them in an improper counter slot."
7068 msgstr ""
7069
7070 #. type: Plain text
7071 #: build/C/man2/perf_event_open.2:2553
7072 msgid ""
7073 "Prior to Linux 2.6.34, there was a bug when multiplexing where the wrong "
7074 "results could be returned."
7075 msgstr ""
7076
7077 #. type: Plain text
7078 #: build/C/man2/perf_event_open.2:2556
7079 msgid ""
7080 "Kernels from Linux 2.6.35 to Linux 2.6.39 can quickly crash the kernel if "
7081 "\"inherit\" is enabled and many threads are started."
7082 msgstr ""
7083
7084 #. type: Plain text
7085 #: build/C/man2/perf_event_open.2:2560
7086 msgid ""
7087 "Prior to Linux 2.6.35, B<PERF_FORMAT_GROUP> did not work with attached "
7088 "processes."
7089 msgstr ""
7090
7091 #. type: Plain text
7092 #: build/C/man2/perf_event_open.2:2565
7093 msgid ""
7094 "In older Linux 2.6 versions, refreshing an event group leader refreshed all "
7095 "siblings, and refreshing with a parameter of 0 enabled infinite refresh.  "
7096 "This behavior is unsupported and should not be relied on."
7097 msgstr ""
7098
7099 #. type: Plain text
7100 #: build/C/man2/perf_event_open.2:2571
7101 msgid ""
7102 "There is a bug in the kernel code between Linux 2.6.36 and Linux 3.0 that "
7103 "ignores the \"watermark\" field and acts as if a wakeup_event was chosen if "
7104 "the union has a nonzero value in it."
7105 msgstr ""
7106
7107 #. type: Plain text
7108 #: build/C/man2/perf_event_open.2:2577
7109 msgid ""
7110 "From Linux 2.6.31 to Linux 3.4, the B<PERF_IOC_FLAG_GROUP> ioctl argument "
7111 "was broken and would repeatedly operate on the event specified rather than "
7112 "iterating across all sibling events in a group."
7113 msgstr ""
7114
7115 #. type: Plain text
7116 #: build/C/man2/perf_event_open.2:2588
7117 msgid ""
7118 "From Linux 3.4 to Linux 3.11, the mmap I<cap_usr_rdpmc> and I<cap_usr_time> "
7119 "bits mapped to the same location.  Code should migrate to the new "
7120 "I<cap_user_rdpmc> and I<cap_user_time> fields instead."
7121 msgstr ""
7122
7123 #. type: Plain text
7124 #: build/C/man2/perf_event_open.2:2593
7125 msgid ""
7126 "Always double-check your results! Various generalized events have had wrong "
7127 "values.  For example, retired branches measured the wrong thing on AMD "
7128 "machines until Linux 2.6.35."
7129 msgstr ""
7130
7131 #. type: SH
7132 #: build/C/man2/perf_event_open.2:2593 build/C/man2/process_vm_readv.2:311
7133 #: build/C/man2/splice.2:223 build/C/man2/tee.2:130
7134 #, no-wrap
7135 msgid "EXAMPLE"
7136 msgstr "例"
7137
7138 #. type: Plain text
7139 #: build/C/man2/perf_event_open.2:2597
7140 msgid ""
7141 "The following is a short example that measures the total instruction count "
7142 "of a call to B<printf>(3)."
7143 msgstr ""
7144
7145 #. type: Plain text
7146 #: build/C/man2/perf_event_open.2:2606
7147 #, no-wrap
7148 msgid ""
7149 "#include E<lt>stdlib.hE<gt>\n"
7150 "#include E<lt>stdio.hE<gt>\n"
7151 "#include E<lt>unistd.hE<gt>\n"
7152 "#include E<lt>string.hE<gt>\n"
7153 "#include E<lt>sys/ioctl.hE<gt>\n"
7154 "#include E<lt>linux/perf_event.hE<gt>\n"
7155 "#include E<lt>asm/unistd.hE<gt>\n"
7156 msgstr ""
7157 "#include E<lt>stdlib.hE<gt>\n"
7158 "#include E<lt>stdio.hE<gt>\n"
7159 "#include E<lt>unistd.hE<gt>\n"
7160 "#include E<lt>string.hE<gt>\n"
7161 "#include E<lt>sys/ioctl.hE<gt>\n"
7162 "#include E<lt>linux/perf_event.hE<gt>\n"
7163 "#include E<lt>asm/unistd.hE<gt>\n"
7164
7165 #. type: Plain text
7166 #: build/C/man2/perf_event_open.2:2612
7167 #, no-wrap
7168 msgid ""
7169 "static long\n"
7170 "perf_event_open(struct perf_event_attr *hw_event, pid_t pid,\n"
7171 "                int cpu, int group_fd, unsigned long flags)\n"
7172 "{\n"
7173 "    int ret;\n"
7174 msgstr ""
7175 "static long\n"
7176 "perf_event_open(struct perf_event_attr *hw_event, pid_t pid,\n"
7177 "                int cpu, int group_fd, unsigned long flags)\n"
7178 "{\n"
7179 "    int ret;\n"
7180
7181 #. type: Plain text
7182 #: build/C/man2/perf_event_open.2:2617
7183 #, no-wrap
7184 msgid ""
7185 "    ret = syscall(__NR_perf_event_open, hw_event, pid, cpu,\n"
7186 "                   group_fd, flags);\n"
7187 "    return ret;\n"
7188 "}\n"
7189 msgstr ""
7190 "    ret = syscall(__NR_perf_event_open, hw_event, pid, cpu,\n"
7191 "                   group_fd, flags);\n"
7192 "    return ret;\n"
7193 "}\n"
7194
7195 #. type: Plain text
7196 #: build/C/man2/perf_event_open.2:2624
7197 #, no-wrap
7198 msgid ""
7199 "int\n"
7200 "main(int argc, char **argv)\n"
7201 "{\n"
7202 "    struct perf_event_attr pe;\n"
7203 "    long long count;\n"
7204 "    int fd;\n"
7205 msgstr ""
7206 "int\n"
7207 "main(int argc, char **argv)\n"
7208 "{\n"
7209 "    struct perf_event_attr pe;\n"
7210 "    long long count;\n"
7211 "    int fd;\n"
7212
7213 #. type: Plain text
7214 #: build/C/man2/perf_event_open.2:2632
7215 #, no-wrap
7216 msgid ""
7217 "    memset(&pe, 0, sizeof(struct perf_event_attr));\n"
7218 "    pe.type = PERF_TYPE_HARDWARE;\n"
7219 "    pe.size = sizeof(struct perf_event_attr);\n"
7220 "    pe.config = PERF_COUNT_HW_INSTRUCTIONS;\n"
7221 "    pe.disabled = 1;\n"
7222 "    pe.exclude_kernel = 1;\n"
7223 "    pe.exclude_hv = 1;\n"
7224 msgstr ""
7225 "    memset(&pe, 0, sizeof(struct perf_event_attr));\n"
7226 "    pe.type = PERF_TYPE_HARDWARE;\n"
7227 "    pe.size = sizeof(struct perf_event_attr);\n"
7228 "    pe.config = PERF_COUNT_HW_INSTRUCTIONS;\n"
7229 "    pe.disabled = 1;\n"
7230 "    pe.exclude_kernel = 1;\n"
7231 "    pe.exclude_hv = 1;\n"
7232
7233 #. type: Plain text
7234 #: build/C/man2/perf_event_open.2:2638
7235 #, no-wrap
7236 msgid ""
7237 "    fd = perf_event_open(&pe, 0, -1, -1, 0);\n"
7238 "    if (fd == -1) {\n"
7239 "       fprintf(stderr, \"Error opening leader %llx\\en\", pe.config);\n"
7240 "       exit(EXIT_FAILURE);\n"
7241 "    }\n"
7242 msgstr ""
7243 "    fd = perf_event_open(&pe, 0, -1, -1, 0);\n"
7244 "    if (fd == -1) {\n"
7245 "       fprintf(stderr, \"Error opening leader %llx\\en\", pe.config);\n"
7246 "       exit(EXIT_FAILURE);\n"
7247 "    }\n"
7248
7249 #. type: Plain text
7250 #: build/C/man2/perf_event_open.2:2641
7251 #, no-wrap
7252 msgid ""
7253 "    ioctl(fd, PERF_EVENT_IOC_RESET, 0);\n"
7254 "    ioctl(fd, PERF_EVENT_IOC_ENABLE, 0);\n"
7255 msgstr ""
7256 "    ioctl(fd, PERF_EVENT_IOC_RESET, 0);\n"
7257 "    ioctl(fd, PERF_EVENT_IOC_ENABLE, 0);\n"
7258
7259 #. type: Plain text
7260 #: build/C/man2/perf_event_open.2:2643
7261 #, no-wrap
7262 msgid "    printf(\"Measuring instruction count for this printf\\en\");\n"
7263 msgstr "    printf(\"Measuring instruction count for this printf\\en\");\n"
7264
7265 #. type: Plain text
7266 #: build/C/man2/perf_event_open.2:2646
7267 #, no-wrap
7268 msgid ""
7269 "    ioctl(fd, PERF_EVENT_IOC_DISABLE, 0);\n"
7270 "    read(fd, &count, sizeof(long long));\n"
7271 msgstr ""
7272 "    ioctl(fd, PERF_EVENT_IOC_DISABLE, 0);\n"
7273 "    read(fd, &count, sizeof(long long));\n"
7274
7275 #. type: Plain text
7276 #: build/C/man2/perf_event_open.2:2648
7277 #, no-wrap
7278 msgid "    printf(\"Used %lld instructions\\en\", count);\n"
7279 msgstr "    printf(\"Used %lld instructions\\en\", count);\n"
7280
7281 #. type: Plain text
7282 #: build/C/man2/perf_event_open.2:2651
7283 #, no-wrap
7284 msgid ""
7285 "    close(fd);\n"
7286 "}\n"
7287 msgstr ""
7288 "    close(fd);\n"
7289 "}\n"
7290
7291 #. type: Plain text
7292 #: build/C/man2/perf_event_open.2:2658
7293 msgid "B<fcntl>(2), B<mmap>(2), B<open>(2), B<prctl>(2), B<read>(2)"
7294 msgstr "B<fcntl>(2), B<mmap>(2), B<open>(2), B<prctl>(2), B<read>(2)"
7295
7296 #. type: TH
7297 #: build/C/man2/perfmonctl.2:27
7298 #, no-wrap
7299 msgid "PERFMONCTL"
7300 msgstr "PERFMONCTL"
7301
7302 #. type: Plain text
7303 #: build/C/man2/perfmonctl.2:30
7304 msgid "perfmonctl - interface to IA-64 performance monitoring unit"
7305 msgstr ""
7306
7307 #. type: Plain text
7308 #: build/C/man2/perfmonctl.2:34
7309 #, no-wrap
7310 msgid ""
7311 "B<#include E<lt>syscall.hE<gt>>\n"
7312 "B<#include E<lt>perfmon.hE<gt>>\n"
7313 msgstr ""
7314 "B<#include E<lt>syscall.hE<gt>>\n"
7315 "B<#include E<lt>perfmon.hE<gt>>\n"
7316
7317 #. type: Plain text
7318 #: build/C/man2/perfmonctl.2:36
7319 #, no-wrap
7320 msgid "B<long perfmonctl(int >I<fd>B<, int >I<cmd>B<, void *>I<arg>B<, int >I<narg>B<);>\n"
7321 msgstr "B<long perfmonctl(int >I<fd>B<, int >I<cmd>B<, void *>I<arg>B<, int >I<narg>B<);>\n"
7322
7323 #. type: Plain text
7324 #: build/C/man2/perfmonctl.2:47
7325 msgid ""
7326 "The IA-64-specific B<perfmonctl>()  system call provides an interface to the "
7327 "PMU (performance monitoring unit).  The PMU consists of PMD (performance "
7328 "monitoring data) registers and PMC (performance monitoring control) "
7329 "registers, which gather hardware statistics."
7330 msgstr ""
7331
7332 #. type: Plain text
7333 #: build/C/man2/perfmonctl.2:57
7334 msgid ""
7335 "B<perfmonctl>()  applies the operation I<cmd> to the input arguments "
7336 "specified by I<arg>.  The number of arguments is defined by I<narg>.  The "
7337 "I<fd> argument specifies the perfmon context to operate on."
7338 msgstr ""
7339
7340 #. type: Plain text
7341 #: build/C/man2/perfmonctl.2:61
7342 msgid "Supported values for I<cmd> are:"
7343 msgstr ""
7344
7345 #. type: TP
7346 #: build/C/man2/perfmonctl.2:61
7347 #, no-wrap
7348 msgid "B<PFM_CREATE_CONTEXT>"
7349 msgstr "B<PFM_CREATE_CONTEXT>"
7350
7351 #. type: Plain text
7352 #: build/C/man2/perfmonctl.2:65
7353 #, no-wrap
7354 msgid "B<perfmonctl(int >I<fd>B<, PFM_CREATE_CONTEXT, pfarg_context_t *>I<ctxt>B<, 1);>\n"
7355 msgstr ""
7356
7357 #. type: Plain text
7358 #: build/C/man2/perfmonctl.2:67
7359 msgid "Set up a context."
7360 msgstr ""
7361
7362 #. type: Plain text
7363 #: build/C/man2/perfmonctl.2:74
7364 msgid ""
7365 "The I<fd> parameter is ignored.  A new perfmon context is created as "
7366 "specified in I<ctxt> and its file descriptor is returned in I<ctxt-"
7367 "E<gt>ctx_fd>."
7368 msgstr ""
7369
7370 #. type: Plain text
7371 #: build/C/man2/perfmonctl.2:86
7372 msgid ""
7373 "The file descriptor can be used in subsequent calls to B<perfmonctl>()  and "
7374 "can be used to read event notifications (type I<pfm_msg_t>)  using "
7375 "B<read>(2).  The file descriptor is pollable using B<select>(2), B<poll>(2), "
7376 "and B<epoll>(7)."
7377 msgstr ""
7378
7379 #. type: Plain text
7380 #: build/C/man2/perfmonctl.2:90
7381 msgid ""
7382 "The context can be destroyed by calling B<close>(2)  on the file descriptor."
7383 msgstr ""
7384
7385 #. type: TP
7386 #: build/C/man2/perfmonctl.2:90
7387 #, no-wrap
7388 msgid "B<PFM_WRITE_PMCS>"
7389 msgstr "B<PFM_WRITE_PMCS>"
7390
7391 #. type: Plain text
7392 #: build/C/man2/perfmonctl.2:95
7393 #, no-wrap
7394 msgid "B<perfmonctl(int >I<fd>B<, PFM_WRITE_PMCS, pfarg_reg_t *>I<pmcs>B<, n);>\n"
7395 msgstr "B<perfmonctl(int >I<fd>B<, PFM_WRITE_PMCS, pfarg_reg_t *>I<pmcs>B<, n);>\n"
7396
7397 #. type: Plain text
7398 #: build/C/man2/perfmonctl.2:97
7399 msgid "Set PMC registers."
7400 msgstr ""
7401
7402 #. type: TP
7403 #: build/C/man2/perfmonctl.2:97
7404 #, no-wrap
7405 msgid "B<PFM_WRITE_PMDS>"
7406 msgstr "B<PFM_WRITE_PMDS>"
7407
7408 #. type: Plain text
7409 #: build/C/man2/perfmonctl.2:101
7410 #, no-wrap
7411 msgid "B<perfmonctl(int >I<fd>B<, PFM_WRITE_PMDS, pfarg_reg_t *>I<pmds>B<, n);>\n"
7412 msgstr "B<perfmonctl(int >I<fd>B<, PFM_WRITE_PMDS, pfarg_reg_t *>I<pmds>B<, n);>\n"
7413
7414 #.  pfm_write_pmds()
7415 #. type: Plain text
7416 #: build/C/man2/perfmonctl.2:104
7417 msgid "Set PMD registers."
7418 msgstr ""
7419
7420 #. type: TP
7421 #: build/C/man2/perfmonctl.2:104
7422 #, no-wrap
7423 msgid "B<PFM_READ_PMDS>"
7424 msgstr "B<PFM_READ_PMDS>"
7425
7426 #. type: Plain text
7427 #: build/C/man2/perfmonctl.2:109
7428 #, no-wrap
7429 msgid "B<perfmonctl(int >I<fd>B<, PFM_READ_PMDS, pfarg_reg_t *>I<pmds>B<, n);>\n"
7430 msgstr "B<perfmonctl(int >I<fd>B<, PFM_READ_PMDS, pfarg_reg_t *>I<pmds>B<, n);>\n"
7431
7432 #. type: Plain text
7433 #: build/C/man2/perfmonctl.2:111
7434 msgid "Read PMD registers."
7435 msgstr ""
7436
7437 #. type: TP
7438 #: build/C/man2/perfmonctl.2:111
7439 #, no-wrap
7440 msgid "B<PFM_START>"
7441 msgstr "B<PFM_START>"
7442
7443 #.  .BI  "perfmonctl(int " fd ", PFM_START, arg, 1);
7444 #. type: Plain text
7445 #: build/C/man2/perfmonctl.2:117
7446 #, no-wrap
7447 msgid "B<perfmonctl(int >I<fd>B<, PFM_START, NULL, 0);>\n"
7448 msgstr "B<perfmonctl(int >I<fd>B<, PFM_START, NULL, 0);>\n"
7449
7450 #. type: Plain text
7451 #: build/C/man2/perfmonctl.2:119
7452 msgid "Start monitoring."
7453 msgstr ""
7454
7455 #. type: TP
7456 #: build/C/man2/perfmonctl.2:119
7457 #, no-wrap
7458 msgid "B<PFM_STOP>"
7459 msgstr "B<PFM_STOP>"
7460
7461 #. type: Plain text
7462 #: build/C/man2/perfmonctl.2:124
7463 #, no-wrap
7464 msgid "B<perfmonctl(int >I<fd>B<, PFM_STOP, NULL, 0);>\n"
7465 msgstr "B<perfmonctl(int >I<fd>B<, PFM_STOP, NULL, 0);>\n"
7466
7467 #. type: Plain text
7468 #: build/C/man2/perfmonctl.2:126
7469 msgid "Stop monitoring."
7470 msgstr ""
7471
7472 #. type: TP
7473 #: build/C/man2/perfmonctl.2:126
7474 #, no-wrap
7475 msgid "B<PFM_LOAD_CONTEXT>"
7476 msgstr "B<PFM_LOAD_CONTEXT>"
7477
7478 #. type: Plain text
7479 #: build/C/man2/perfmonctl.2:131
7480 #, no-wrap
7481 msgid "B<perfmonctl(int >I<fd>B<, PFM_LOAD_CONTEXT, pfarg_load_t *>I<largs>B<, 1);>\n"
7482 msgstr "B<perfmonctl(int >I<fd>B<, PFM_LOAD_CONTEXT, pfarg_load_t *>I<largs>B<, 1);>\n"
7483
7484 #. type: Plain text
7485 #: build/C/man2/perfmonctl.2:133
7486 msgid "Attach the context to a thread."
7487 msgstr ""
7488
7489 #. type: TP
7490 #: build/C/man2/perfmonctl.2:133
7491 #, no-wrap
7492 msgid "B<PFM_UNLOAD_CONTEXT>"
7493 msgstr "B<PFM_UNLOAD_CONTEXT>"
7494
7495 #. type: Plain text
7496 #: build/C/man2/perfmonctl.2:138
7497 #, no-wrap
7498 msgid "B<perfmonctl(int >I<fd>B<, PFM_UNLOAD_CONTEXT, NULL, 0);>\n"
7499 msgstr "B<perfmonctl(int >I<fd>B<, PFM_UNLOAD_CONTEXT, NULL, 0);>\n"
7500
7501 #. type: Plain text
7502 #: build/C/man2/perfmonctl.2:140
7503 msgid "Detach the context from a thread."
7504 msgstr ""
7505
7506 #. type: TP
7507 #: build/C/man2/perfmonctl.2:140
7508 #, no-wrap
7509 msgid "B<PFM_RESTART>"
7510 msgstr "B<PFM_RESTART>"
7511
7512 #. type: Plain text
7513 #: build/C/man2/perfmonctl.2:145
7514 #, no-wrap
7515 msgid "B<perfmonctl(int >I<fd>B<, PFM_RESTART, NULL, 0);>\n"
7516 msgstr "B<perfmonctl(int >I<fd>B<, PFM_RESTART, NULL, 0);>\n"
7517
7518 #. type: Plain text
7519 #: build/C/man2/perfmonctl.2:147
7520 msgid "Restart monitoring after receiving an overflow notification."
7521 msgstr ""
7522
7523 #. type: TP
7524 #: build/C/man2/perfmonctl.2:147
7525 #, no-wrap
7526 msgid "B<PFM_GET_FEATURES>"
7527 msgstr "B<PFM_GET_FEATURES>"
7528
7529 #. type: Plain text
7530 #: build/C/man2/perfmonctl.2:152
7531 #, no-wrap
7532 msgid "B<perfmonctl(int >I<fd>B<, PFM_GET_FEARURES, pfarg_features_t *>I<arg>B<, 1);>\n"
7533 msgstr "B<perfmonctl(int >I<fd>B<, PFM_GET_FEARURES, pfarg_features_t *>I<arg>B<, 1);>\n"
7534
7535 #. type: TP
7536 #: build/C/man2/perfmonctl.2:153
7537 #, no-wrap
7538 msgid "B<PFM_DEBUG>"
7539 msgstr "B<PFM_DEBUG>"
7540
7541 #. type: Plain text
7542 #: build/C/man2/perfmonctl.2:158
7543 #, no-wrap
7544 msgid "B<perfmonctl(int >I<fd>B<, PFM_DEBUG, >I<val>B<, 0);>\n"
7545 msgstr "B<perfmonctl(int >I<fd>B<, PFM_DEBUG, >I<val>B<, 0);>\n"
7546
7547 #. type: Plain text
7548 #: build/C/man2/perfmonctl.2:162
7549 msgid "If I<val> is nonzero, enable debugging mode, otherwise disable."
7550 msgstr ""
7551
7552 #. type: TP
7553 #: build/C/man2/perfmonctl.2:162
7554 #, no-wrap
7555 msgid "B<PFM_GET_PMC_RESET_VAL>"
7556 msgstr "B<PFM_GET_PMC_RESET_VAL>"
7557
7558 #. type: Plain text
7559 #: build/C/man2/perfmonctl.2:167
7560 #, no-wrap
7561 msgid "B<perfmonctl(int >I<fd>B<, PFM_GET_PMC_RESET_VAL, pfarg_reg_t * >I<req>B<, n);>\n"
7562 msgstr "B<perfmonctl(int >I<fd>B<, PFM_GET_PMC_RESET_VAL, pfarg_reg_t * >I<req>B<, n);>\n"
7563
7564 #
7565 #
7566 #
7567 #.  .TP
7568 #.  .B PFM_CREATE_EVTSETS
7569 #.  create or modify event sets
7570 #.  .nf
7571 #.  .BI  "perfmonctl(int " fd ", PFM_CREATE_EVTSETS, pfarg_setdesc_t *desc , n);
7572 #.  .fi
7573 #.  .TP
7574 #.  .B PFM_DELETE_EVTSETS
7575 #.  delete event sets
7576 #.  .nf
7577 #.  .BI  "perfmonctl(int " fd ", PFM_DELETE_EVTSET, pfarg_setdesc_t *desc , n);
7578 #.  .fi
7579 #.  .TP
7580 #.  .B PFM_GETINFO_EVTSETS
7581 #.  get information about event sets
7582 #.  .nf
7583 #.  .BI  "perfmonctl(int " fd ", PFM_GETINFO_EVTSETS, pfarg_setinfo_t *info, n);
7584 #.  .fi
7585 #. type: Plain text
7586 #: build/C/man2/perfmonctl.2:190
7587 msgid "Reset PMC registers to default values."
7588 msgstr ""
7589
7590 #. type: Plain text
7591 #: build/C/man2/perfmonctl.2:196
7592 msgid ""
7593 "B<perfmonctl>()  returns zero when the operation is successful.  On error, "
7594 "-1 is returned and I<errno> is set to indicate the cause of the error."
7595 msgstr ""
7596
7597 #. type: Plain text
7598 #: build/C/man2/perfmonctl.2:199
7599 msgid "B<perfmonctl>()  is available since Linux 2.4."
7600 msgstr ""
7601
7602 #. type: Plain text
7603 #: build/C/man2/perfmonctl.2:202
7604 msgid ""
7605 "B<perfmonctl>()  is Linux-specific and is available only on the IA-64 "
7606 "architecture."
7607 msgstr ""
7608
7609 #. type: Plain text
7610 #: build/C/man2/perfmonctl.2:207
7611 msgid "B<gprof>(1)"
7612 msgstr "B<gprof>(1)"
7613
7614 #. type: Plain text
7615 #: build/C/man2/perfmonctl.2:209
7616 msgid "The perfmon2 interface specification"
7617 msgstr ""
7618
7619 #. type: TH
7620 #: build/C/man2/personality.2:32
7621 #, no-wrap
7622 msgid "PERSONALITY"
7623 msgstr "PERSONALITY"
7624
7625 #. type: TH
7626 #: build/C/man2/personality.2:32
7627 #, no-wrap
7628 msgid "2014-04-15"
7629 msgstr "2014-04-15"
7630
7631 #. type: Plain text
7632 #: build/C/man2/personality.2:35
7633 msgid "personality - set the process execution domain"
7634 msgstr "personality - プロセスを実行するドメインを設定する"
7635
7636 #. type: Plain text
7637 #: build/C/man2/personality.2:37
7638 msgid "B<#include E<lt>sys/personality.hE<gt>>"
7639 msgstr "B<#include E<lt>sys/personality.hE<gt>>"
7640
7641 #. type: Plain text
7642 #: build/C/man2/personality.2:39
7643 msgid "B<int personality(unsigned long >I<persona>B<);>"
7644 msgstr "B<int personality(unsigned long >I<persona>B<);>"
7645
7646 #. type: Plain text
7647 #: build/C/man2/personality.2:47
7648 msgid ""
7649 "Linux supports different execution domains, or personalities, for each "
7650 "process.  Among other things, execution domains tell Linux how to map signal "
7651 "numbers into signal actions.  The execution domain system allows Linux to "
7652 "provide limited support for binaries compiled under other UNIX-like "
7653 "operating systems."
7654 msgstr ""
7655 "Linux は、プロセス毎の異なる実行ドメイン、すなわち パーソナリティ "
7656 "(personality) をサポートしている。 実行ドメインは Linux にシグナル番号にどの"
7657 "シグナルを割り付けるかを 教えたりする。また、実行ドメイン・システムにより、 "
7658 "Linux は、 他の UNIX 風のオペレーティングシステムでコンパイルされたバイナリに"
7659 "対する限定的なサポートを提供している。"
7660
7661 #. type: Plain text
7662 #: build/C/man2/personality.2:59
7663 msgid ""
7664 "If I<persona> is not 0xffffffff, then B<personality>()  sets the caller's "
7665 "execution domain to the value specified by I<persona>.  Specifying "
7666 "I<persona> as 0xffffffff provides a way of retrieving the current persona "
7667 "without changing it."
7668 msgstr ""
7669 "I<persona> が 0xffffffff 以外の場合、 B<personality>() は呼び出し元の実行ドメ"
7670 "インを I<persona> で指定された値に設定する。 I<persona> に 0xffffffff を指定"
7671 "すると、変更を行わず、現在の persona 値を取得できる。"
7672
7673 #. type: Plain text
7674 #: build/C/man2/personality.2:62
7675 msgid ""
7676 "A list of the available execution domains can be found in I<E<lt>sys/"
7677 "personality.hE<gt>>."
7678 msgstr ""
7679 "利用可能な実行ドメインのリストは I<E<lt>sys/personality.hE<gt>> にある。"
7680
7681 #. type: Plain text
7682 #: build/C/man2/personality.2:69
7683 msgid ""
7684 "On success, the previous I<persona> is returned.  On error, -1 is returned, "
7685 "and I<errno> is set appropriately."
7686 msgstr ""
7687 "成功した場合、以前の I<persona> が返される。エラーの場合は、-1 が返され、 "
7688 "I<errno> が適切に設定される。"
7689
7690 #. type: Plain text
7691 #: build/C/man2/personality.2:73
7692 msgid "The kernel was unable to change the personality."
7693 msgstr "カーネルがパーソナリティを変更できなかった。"
7694
7695 #. type: Plain text
7696 #: build/C/man2/personality.2:77
7697 msgid ""
7698 "B<personality>()  is Linux-specific and should not be used in programs "
7699 "intended to be portable."
7700 msgstr ""
7701 "B<personality>()  は Linux 固有であり、移植を意図したプログラムで使用すべきで"
7702 "はない。"
7703
7704 #. type: TH
7705 #: build/C/man2/pivot_root.2:10
7706 #, no-wrap
7707 msgid "PIVOT_ROOT"
7708 msgstr "PIVOT_ROOT"
7709
7710 #. type: Plain text
7711 #: build/C/man2/pivot_root.2:13
7712 msgid "pivot_root - change the root filesystem"
7713 msgstr "pivot_root - root ファイルシステムを変更する"
7714
7715 #. type: Plain text
7716 #: build/C/man2/pivot_root.2:15
7717 msgid ""
7718 "B<int pivot_root(const char *>I<new_root>B<, const char *>I<put_old>B<);>"
7719 msgstr ""
7720 "B<int pivot_root(const char *>I<new_root>B<, const char *>I<put_old>B<);>"
7721
7722 #.  The
7723 #.  .B CAP_SYS_ADMIN
7724 #.  capability is required.
7725 #. type: Plain text
7726 #: build/C/man2/pivot_root.2:27
7727 msgid ""
7728 "B<pivot_root>()  moves the root filesystem of the calling process to the "
7729 "directory I<put_old> and makes I<new_root> the new root filesystem of the "
7730 "calling process."
7731 msgstr ""
7732 "B<pivot_root>()  は呼び出し元のプロセスの root ファイルシステムを I<put_old> "
7733 "ディレクトリに移動し、 I<new_root> を呼び出し元のプロセスの新しい root ファイ"
7734 "ルシステムにする。"
7735
7736 #. type: Plain text
7737 #: build/C/man2/pivot_root.2:34
7738 msgid ""
7739 "The typical use of B<pivot_root>()  is during system startup, when the "
7740 "system mounts a temporary root filesystem (e.g., an B<initrd>), then mounts "
7741 "the real root filesystem, and eventually turns the latter into the current "
7742 "root of all relevant processes or threads."
7743 msgstr ""
7744 "B<pivot_root>()  の典型的な利用法は、システムの起動中にシステムが一時的な "
7745 "root ファイルシステム (例えば B<initrd>)  をマウントし、これに続いて本当の "
7746 "root ファイルシステムをマウントし、 後者を必要な全てのプロセス・スレッドの カ"
7747 "レント root に変更するような場合である。"
7748
7749 #. type: Plain text
7750 #: build/C/man2/pivot_root.2:46
7751 msgid ""
7752 "B<pivot_root>()  may or may not change the current root and the current "
7753 "working directory of any processes or threads which use the old root "
7754 "directory.  The caller of B<pivot_root>()  must ensure that processes with "
7755 "root or current working directory at the old root operate correctly in "
7756 "either case.  An easy way to ensure this is to change their root and current "
7757 "working directory to I<new_root> before invoking B<pivot_root>()."
7758 msgstr ""
7759 "古い root ディレクトリを使っていた全てのプロセスやスレッドの カレント root と"
7760 "カレントワーキングディレクトリを、 B<pivot_root>()  が変更するかどうかはわか"
7761 "らない。 B<pivot_root>()  の呼びだしプロセスは、古い root やカレントワーキン"
7762 "グディレクトリを使っていた プロセスが、いずれの場合でも正しく動作することを保"
7763 "証しなければならない。 これを簡単に行うには、それらのプロセスの root と カレ"
7764 "ントワーキングディレクトリを B<pivot_root>()  を呼び出す前に I<new_root> に変"
7765 "更しておくことである。"
7766
7767 #. type: Plain text
7768 #: build/C/man2/pivot_root.2:64
7769 msgid ""
7770 "The paragraph above is intentionally vague because the implementation of "
7771 "B<pivot_root>()  may change in the future.  At the time of writing, "
7772 "B<pivot_root>()  changes root and current working directory of each process "
7773 "or thread to I<new_root> if they point to the old root directory.  This is "
7774 "necessary in order to prevent kernel threads from keeping the old root "
7775 "directory busy with their root and current working directory, even if they "
7776 "never access the filesystem in any way.  In the future, there may be a "
7777 "mechanism for kernel threads to explicitly relinquish any access to the "
7778 "filesystem, such that this fairly intrusive mechanism can be removed from "
7779 "B<pivot_root>()."
7780 msgstr ""
7781 "上記の段落は、将来 B<pivot_root>()  が変更されるかも知れないことを鑑みて、わ"
7782 "ざと曖昧に書いてある。 本ページを記述している時点では、 B<pivot_root>()  は古"
7783 "い root ディレクトリを用いている全てのプロセス・スレッドの root と カレント"
7784 "ワーキングディレクトリを I<new_root> に変更する。これはカーネルのスレッドが古"
7785 "い root ディレクトリを busy 状態にしないために必要である。これらのスレッドが "
7786 "古いディレクトリを root やカレントワーキングディレクトリとしていると、 ファイ"
7787 "ルシステムに一切アクセスしない場合でも 古い root が busy になってしまうからで"
7788 "ある。 将来は、カーネルスレッドがあらゆるファイルシステムへのアクセスを 明示"
7789 "的に放棄するメカニズムができ、このでしゃばりな機能は B<pivot_root>()  から削"
7790 "除されるかもしれない。"
7791
7792 #. type: Plain text
7793 #: build/C/man2/pivot_root.2:72
7794 msgid ""
7795 "Note that this also applies to the calling process: B<pivot_root>()  may or "
7796 "may not affect its current working directory.  It is therefore recommended "
7797 "to call B<chdir(\"/\")> immediately after B<pivot_root>()."
7798 msgstr ""
7799 "これは呼び出し元のプロセスについても当てはまることに注意。 B<pivot_root>()  "
7800 "がカレントプロセスのカレントワーキングディレクトリに影響するかどうかは 分から"
7801 "ない。したがって B<pivot_root>()  の直後に B<chdir(\"/\")> を呼び出すとよい。"
7802
7803 #. type: Plain text
7804 #: build/C/man2/pivot_root.2:74
7805 msgid "The following restrictions apply to I<new_root> and I<put_old>:"
7806 msgstr "I<new_root> および I<put_old> には以下の制限がある:"
7807
7808 #. type: IP
7809 #: build/C/man2/pivot_root.2:74 build/C/man2/pivot_root.2:76
7810 #: build/C/man2/pivot_root.2:79 build/C/man2/pivot_root.2:83
7811 #, no-wrap
7812 msgid "-"
7813 msgstr "-"
7814
7815 #. type: Plain text
7816 #: build/C/man2/pivot_root.2:76
7817 msgid "They must be directories."
7818 msgstr "ディレクトリでなければならない。"
7819
7820 #. type: Plain text
7821 #: build/C/man2/pivot_root.2:79
7822 msgid ""
7823 "I<new_root> and I<put_old> must not be on the same filesystem as the current "
7824 "root."
7825 msgstr ""
7826 "I<new_root> と I<put_old> は現在の root と同じファイルシステムにあってはなら"
7827 "ない。"
7828
7829 #. type: Plain text
7830 #: build/C/man2/pivot_root.2:83
7831 msgid ""
7832 "I<put_old> must be underneath I<new_root>, that is, adding a nonzero number "
7833 "of I</..> to the string pointed to by I<put_old> must yield the same "
7834 "directory as I<new_root>."
7835 msgstr ""
7836 "I<put_old> は I<new_root> 以下になければならない。すなわち I<put_old> を差す"
7837 "文字列に 1 個以上の I<../> を付けることによって I<new_root> と同じディレクト"
7838 "リが得られなければならない。"
7839
7840 #. type: Plain text
7841 #: build/C/man2/pivot_root.2:85
7842 msgid "No other filesystem may be mounted on I<put_old>."
7843 msgstr "他のファイルシステムが I<put_old> にマウントされていてはならない。"
7844
7845 #. type: Plain text
7846 #: build/C/man2/pivot_root.2:89
7847 msgid "See also B<pivot_root>(8)  for additional usage examples."
7848 msgstr "利用例については B<pivot_root>(8)  を参照のこと。"
7849
7850 #. type: Plain text
7851 #: build/C/man2/pivot_root.2:96
7852 msgid ""
7853 "If the current root is not a mount point (e.g., after B<chroot>(2)  or "
7854 "B<pivot_root>(), see also below), not the old root directory, but the mount "
7855 "point of that filesystem is mounted on I<put_old>."
7856 msgstr ""
7857 "現在の root がマウントポイントではない (B<chroot>(2)  や B<pivot_root>()  の"
7858 "後など。以下も参照) 場合、 古い root ディレクトリではなく、 そのファイルシス"
7859 "テムのマウントポイントが I<put_old> にマウントされる。"
7860
7861 #. type: Plain text
7862 #: build/C/man2/pivot_root.2:101
7863 msgid ""
7864 "I<new_root> does not have to be a mount point.  In this case, I</proc/"
7865 "mounts> will show the mount point of the filesystem containing I<new_root> "
7866 "as root (I</>)."
7867 msgstr ""
7868 "I<new_root> はマウントポイントでなくてもよい。 この場合 I</proc/mounts> は、 "
7869 "I<new_root> を root (I</>)  とするファイルシステムのマウントポイントを表示す"
7870 "る。"
7871
7872 #. type: Plain text
7873 #: build/C/man2/pivot_root.2:110
7874 msgid ""
7875 "B<pivot_root>()  may return (in I<errno>) any of the errors returned by "
7876 "B<stat>(2).  Additionally, it may return:"
7877 msgstr ""
7878 "B<pivot_root>()  は B<stat>(2)  の返すあらゆるエラーを (I<errno> に) 返す可能"
7879 "性がある。さらに以下を返すことがある:"
7880
7881 #. type: Plain text
7882 #: build/C/man2/pivot_root.2:114
7883 msgid ""
7884 "I<new_root> or I<put_old> are on the current root filesystem, or a "
7885 "filesystem is already mounted on I<put_old>."
7886 msgstr ""
7887 "I<new_root> または I<put_old> が、現在の root ファイルシステム上にあるか、既"
7888 "に I<put_old> になんらかのファイルシステムがマウントされている。"
7889
7890 #. type: Plain text
7891 #: build/C/man2/pivot_root.2:117
7892 msgid "I<put_old> is not underneath I<new_root>."
7893 msgstr "I<put_old> が I<new_root> の下層にない。"
7894
7895 #. type: TP
7896 #: build/C/man2/pivot_root.2:117
7897 #, no-wrap
7898 msgid "B<ENOTDIR>"
7899 msgstr "B<ENOTDIR>"
7900
7901 #. type: Plain text
7902 #: build/C/man2/pivot_root.2:120
7903 msgid "I<new_root> or I<put_old> is not a directory."
7904 msgstr "I<new_root> または I<put_old> がディレクトリでない。"
7905
7906 #. type: Plain text
7907 #: build/C/man2/pivot_root.2:125
7908 msgid "The calling process does not have the B<CAP_SYS_ADMIN> capability."
7909 msgstr "呼び出し元のプロセスが B<CAP_SYS_ADMIN> ケーパビリティを持っていない。"
7910
7911 #. type: Plain text
7912 #: build/C/man2/pivot_root.2:128
7913 msgid "B<pivot_root>()  was introduced in Linux 2.3.41."
7914 msgstr "B<pivot_root>()  は Linux 2.3.41 で導入された。"
7915
7916 #. type: Plain text
7917 #: build/C/man2/pivot_root.2:131
7918 msgid "B<pivot_root>()  is Linux-specific and hence is not portable."
7919 msgstr "B<pivot_root>()  は Linux に固有のものなので、移植性はない。"
7920
7921 #. type: Plain text
7922 #: build/C/man2/pivot_root.2:138
7923 msgid ""
7924 "B<pivot_root>()  should not have to change root and current working "
7925 "directory of all other processes in the system."
7926 msgstr ""
7927 "B<pivot_root>()  はシステムの他のプロセス全ての root と カレントワーキング"
7928 "ディレクトリとを変更しなくてもよいはずである。"
7929
7930 #. type: Plain text
7931 #: build/C/man2/pivot_root.2:143
7932 msgid ""
7933 "Some of the more obscure uses of B<pivot_root>()  may quickly lead to "
7934 "insanity."
7935 msgstr ""
7936 "B<pivot_root>()  の使い方がもうちょっと曖昧になると、 あっという間にわけのわ"
7937 "からない状態になってしまうだろう"
7938
7939 #. type: Plain text
7940 #: build/C/man2/pivot_root.2:149
7941 msgid "B<chdir>(2), B<chroot>(2), B<stat>(2), B<initrd>(4), B<pivot_root>(8)"
7942 msgstr "B<chdir>(2), B<chroot>(2), B<stat>(2), B<initrd>(4), B<pivot_root>(8)"
7943
7944 #. type: TH
7945 #: build/C/man2/process_vm_readv.2:29
7946 #, no-wrap
7947 msgid "PROCESS_VM_READV"
7948 msgstr "PROCESS_VM_READV"
7949
7950 #. type: TH
7951 #: build/C/man2/process_vm_readv.2:29
7952 #, no-wrap
7953 msgid "2014-05-05"
7954 msgstr "2014-05-05"
7955
7956 #. type: Plain text
7957 #: build/C/man2/process_vm_readv.2:32
7958 msgid ""
7959 "process_vm_readv, process_vm_writev - transfer data between process address "
7960 "spaces"
7961 msgstr ""
7962 "process_vm_readv, process_vm_writev - プロセスのアドレス空間間でデータを転送"
7963 "する"
7964
7965 #. type: Plain text
7966 #: build/C/man2/process_vm_readv.2:35
7967 #, no-wrap
7968 msgid "B<#include E<lt>sys/uio.hE<gt>>\n"
7969 msgstr "B<#include E<lt>sys/uio.hE<gt>>\n"
7970
7971 #. type: Plain text
7972 #: build/C/man2/process_vm_readv.2:42
7973 #, no-wrap
7974 msgid ""
7975 "B<ssize_t process_vm_readv(pid_t >I<pid>B<,>\n"
7976 "B<                         const struct iovec *>I<local_iov>B<,>\n"
7977 "B<                         unsigned long >I<liovcnt>B<,>\n"
7978 "B<                         const struct iovec *>I<remote_iov>B<,>\n"
7979 "B<                         unsigned long >I<riovcnt>B<,>\n"
7980 "B<                         unsigned long >I<flags>B<);>\n"
7981 msgstr ""
7982 "B<ssize_t process_vm_readv(pid_t >I<pid>B<,>\n"
7983 "B<                         const struct iovec *>I<local_iov>B<,>\n"
7984 "B<                         unsigned long >I<liovcnt>B<,>\n"
7985 "B<                         const struct iovec *>I<remote_iov>B<,>\n"
7986 "B<                         unsigned long >I<riovcnt>B<,>\n"
7987 "B<                         unsigned long >I<flags>B<);>\n"
7988
7989 #. type: Plain text
7990 #: build/C/man2/process_vm_readv.2:49
7991 #, no-wrap
7992 msgid ""
7993 "B<ssize_t process_vm_writev(pid_t >I<pid>B<,>\n"
7994 "B<                          const struct iovec *>I<local_iov>B<,>\n"
7995 "B<                          unsigned long >I<liovcnt>B<,>\n"
7996 "B<                          const struct iovec *>I<remote_iov>B<,>\n"
7997 "B<                          unsigned long >I<riovcnt>B<,>\n"
7998 "B<                          unsigned long >I<flags>B<);>\n"
7999 msgstr ""
8000 "B<ssize_t process_vm_writev(pid_t >I<pid>B<,>\n"
8001 "B<                          const struct iovec *>I<local_iov>B<,>\n"
8002 "B<                          unsigned long >I<liovcnt>B<,>\n"
8003 "B<                          const struct iovec *>I<remote_iov>B<,>\n"
8004 "B<                          unsigned long >I<riovcnt>B<,>\n"
8005 "B<                          unsigned long >I<flags>B<);>\n"
8006
8007 #. type: Plain text
8008 #: build/C/man2/process_vm_readv.2:54
8009 msgid ""
8010 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
8011 msgstr ""
8012
8013 #. type: Plain text
8014 #: build/C/man2/process_vm_readv.2:58
8015 msgid "B<process_vm_readv>(), B<process_vm_write>():"
8016 msgstr "B<process_vm_readv>(), B<process_vm_write>():"
8017
8018 #. type: Plain text
8019 #: build/C/man2/process_vm_readv.2:62
8020 msgid "B<_GNU_SOURCE>"
8021 msgstr "B<_GNU_SOURCE>"
8022
8023 #. type: Plain text
8024 #: build/C/man2/process_vm_readv.2:73
8025 msgid ""
8026 "These system calls transfer data between the address space of the calling "
8027 "process (\"the local process\") and the process identified by I<pid> (\"the "
8028 "remote process\").  The data moves directly between the address spaces of "
8029 "the two processes, without passing through kernel space."
8030 msgstr ""
8031
8032 #. type: Plain text
8033 #: build/C/man2/process_vm_readv.2:98
8034 msgid ""
8035 "The B<process_vm_readv>()  system call transfers data from the remote "
8036 "process to the local process.  The data to be transferred is identified by "
8037 "I<remote_iov> and I<riovcnt>: I<remote_iov> is a pointer to an array "
8038 "describing address ranges in the process I<pid>, and I<riovcnt> specifies "
8039 "the number of elements in I<remote_iov>.  The data is transferred to the "
8040 "locations specified by I<local_iov> and I<liovcnt>: I<local_iov> is a "
8041 "pointer to an array describing address ranges in the calling process, and "
8042 "I<liovcnt> specifies the number of elements in I<local_iov>."
8043 msgstr ""
8044
8045 #. type: Plain text
8046 #: build/C/man2/process_vm_readv.2:112
8047 msgid ""
8048 "The B<process_vm_writev>()  system call is the converse of "
8049 "B<process_vm_readv>()\\(emit transfers data from the local process to the "
8050 "remote process.  Other than the direction of the transfer, the arguments "
8051 "I<liovcnt>, I<local_iov>, I<riovcnt>, and I<remote_iov> have the same "
8052 "meaning as for B<process_vm_readv>()."
8053 msgstr ""
8054
8055 #. type: Plain text
8056 #: build/C/man2/process_vm_readv.2:122
8057 msgid ""
8058 "The I<local_iov> and I<remote_iov> arguments point to an array of I<iovec> "
8059 "structures, defined in I<E<lt>sys/uio.hE<gt>> as:"
8060 msgstr ""
8061 "引き数 I<local_iov> と I<remote_iov> は I<iovec> 構造体の配列へのポイン\n"
8062 "タである。 I<iovec> 構造体は I<E<lt>sys/uio.hE<gt>> で以下のように定義\n"
8063 "されている:"
8064
8065 #. type: Plain text
8066 #: build/C/man2/process_vm_readv.2:129
8067 #, no-wrap
8068 msgid ""
8069 "struct iovec {\n"
8070 "    void  *iov_base;    /* Starting address */\n"
8071 "    size_t iov_len;     /* Number of bytes to transfer */\n"
8072 "};\n"
8073 msgstr ""
8074 "struct iovec {\n"
8075 "    void  *iov_base;    /* Starting address */\n"
8076 "    size_t iov_len;     /* Number of bytes to transfer */\n"
8077 "};\n"
8078
8079 #. type: Plain text
8080 #: build/C/man2/process_vm_readv.2:145
8081 msgid ""
8082 "Buffers are processed in array order.  This means that "
8083 "B<process_vm_readv>()  completely fills I<local_iov[0]> before proceeding to "
8084 "I<local_iov[1]>, and so on.  Likewise, I<remote_iov[0]> is completely read "
8085 "before proceeding to I<remote_iov[1]>, and so on."
8086 msgstr ""
8087 "バッファは配列の順序で処理される。これは、 B<process_vm_readv>() が\n"
8088 "I<local_iov>[0] が完全に一杯になるまでデータを詰めてから、\n"
8089 "I<local_iov>[1] に進むといったことを意味する。同様に、\n"
8090 "I<remote_iov>[0] を完全に読み出してから I<remote_iov>[1] に進み、\n"
8091 "以降も同様である。"
8092
8093 #. type: Plain text
8094 #: build/C/man2/process_vm_readv.2:156
8095 msgid ""
8096 "Similarly, B<process_vm_writev>()  writes out the entire contents of "
8097 "I<local_iov[0]> before proceeding to I<local_iov[1]>, and it completely "
8098 "fills I<remote_iov[0]> before proceeding to I<remote_iov[1]>."
8099 msgstr ""
8100
8101 #. type: Plain text
8102 #: build/C/man2/process_vm_readv.2:164
8103 msgid ""
8104 "The lengths of I<remote_iov[i].iov_len> and I<local_iov[i].iov_len> do not "
8105 "have to be the same.  Thus, it is possible to split a single local buffer "
8106 "into multiple remote buffers, or vice versa."
8107 msgstr ""
8108
8109 #. type: Plain text
8110 #: build/C/man2/process_vm_readv.2:168
8111 msgid "The I<flags> argument is currently unused and must be set to 0."
8112 msgstr "I<flags> 引き数は現在使用されておらず、 0 を設定しなければならない。"
8113
8114 #.  In time, glibc might provide a wrapper that works around this limit,
8115 #.  as is done for readv()/writev()
8116 #. type: Plain text
8117 #: build/C/man2/process_vm_readv.2:181
8118 msgid ""
8119 "The values specified in the I<liovcnt> and I<riovcnt> arguments must be less "
8120 "than or equal to B<IOV_MAX> (defined in I<E<lt>limits.hE<gt>> or accessible "
8121 "via the call I<sysconf(_SC_IOV_MAX)>)."
8122 msgstr ""
8123
8124 #. type: Plain text
8125 #: build/C/man2/process_vm_readv.2:191
8126 msgid ""
8127 "The count arguments and I<local_iov> are checked before doing any "
8128 "transfers.  If the counts are too big, or I<local_iov> is invalid, or the "
8129 "addresses refer to regions that are inaccessible to the local process, none "
8130 "of the vectors will be processed and an error will be returned immediately."
8131 msgstr ""
8132
8133 #. type: Plain text
8134 #: build/C/man2/process_vm_readv.2:211
8135 msgid ""
8136 "Note, however, that these system calls do not check the memory regions in "
8137 "the remote process until just before doing the read/write.  Consequently, a "
8138 "partial read/write (see RETURN VALUE)  may result if one of the "
8139 "I<remote_iov> elements points to an invalid memory region in the remote "
8140 "process.  No further reads/writes will be attempted beyond that point.  Keep "
8141 "this in mind when attempting to read data of unknown length (such as C "
8142 "strings that are null-terminated) from a remote process, by avoiding "
8143 "spanning memory pages (typically 4KiB) in a single remote I<iovec> element.  "
8144 "(Instead, split the remote read into two I<remote_iov> elements and have "
8145 "them merge back into a single write I<local_iov> entry.  The first read "
8146 "entry goes up to the page boundary, while the second starts on the next page "
8147 "boundary.)"
8148 msgstr ""
8149
8150 #. type: Plain text
8151 #: build/C/man2/process_vm_readv.2:225
8152 msgid ""
8153 "In order to read from or write to another process, either the caller must "
8154 "have the capability B<CAP_SYS_PTRACE>, or the real user ID, effective user "
8155 "ID, and saved set-user-ID of the remote process must match the real user ID "
8156 "of the caller I<and> the real group ID, effective group ID, and saved set-"
8157 "group-ID of the remote process must match the real group ID of the caller.  "
8158 "(The permission required is exactly the same as that required to perform a "
8159 "B<ptrace>(2)  B<PTRACE_ATTACH> on the remote process.)"
8160 msgstr ""
8161
8162 #. type: Plain text
8163 #: build/C/man2/process_vm_readv.2:241
8164 msgid ""
8165 "On success, B<process_vm_readv>()  returns the number of bytes read and "
8166 "B<process_vm_writev>()  returns the number of bytes written.  This return "
8167 "value may be less than the total number of requested bytes, if a partial "
8168 "read/write occurred.  (Partial transfers apply at the granularity of "
8169 "I<iovec> elements.  These system calls won't perform a partial transfer that "
8170 "splits a single I<iovec> element.)  The caller should check the return value "
8171 "to determine whether a partial read/write occurred."
8172 msgstr ""
8173
8174 #. type: Plain text
8175 #: build/C/man2/process_vm_readv.2:245
8176 msgid "On error, -1 is returned and I<errno> is set appropriately."
8177 msgstr "エラーの場合は -1 が返され、 I<errno> が適切に設定される。"
8178
8179 #. type: Plain text
8180 #: build/C/man2/process_vm_readv.2:257
8181 msgid ""
8182 "The sum of the I<iov_len> values of either I<local_iov> or I<remote_iov> "
8183 "overflows a I<ssize_t> value."
8184 msgstr ""
8185
8186 #. type: Plain text
8187 #: build/C/man2/process_vm_readv.2:261
8188 msgid "I<flags> is not 0."
8189 msgstr "I<flags> が 0 でない。"
8190
8191 #. type: Plain text
8192 #: build/C/man2/process_vm_readv.2:267
8193 msgid "I<liovcnt> or I<riovcnt> is too large."
8194 msgstr "I<liovcnt> か I<riovcnt> が大きすぎる。"
8195
8196 #. type: Plain text
8197 #: build/C/man2/process_vm_readv.2:272
8198 msgid ""
8199 "The memory described by I<local_iov> is outside the caller's accessible "
8200 "address space."
8201 msgstr ""
8202 "I<local_iov> が示すメモリが呼び出し側がアクセス可能な\n"
8203 "アドレス空間の外にある。"
8204
8205 #. type: Plain text
8206 #: build/C/man2/process_vm_readv.2:278
8207 msgid ""
8208 "The memory described by I<remote_iov> is outside the accessible address "
8209 "space of the process I<pid>."
8210 msgstr ""
8211
8212 #. type: Plain text
8213 #: build/C/man2/process_vm_readv.2:283
8214 msgid ""
8215 "Could not allocate memory for internal copies of the I<iovec> structures."
8216 msgstr ""
8217
8218 #. type: Plain text
8219 #: build/C/man2/process_vm_readv.2:287
8220 msgid ""
8221 "The caller does not have permission to access the address space of the "
8222 "process I<pid>."
8223 msgstr ""
8224 "呼び出し側がプロセス I<pid> のアドレス空間に対するアクセス許可を\n"
8225 "持っていない。"
8226
8227 #. type: Plain text
8228 #: build/C/man2/process_vm_readv.2:292
8229 msgid "No process with ID I<pid> exists."
8230 msgstr "ID が I<pid> のプロセスが存在しない。"
8231
8232 #. type: Plain text
8233 #: build/C/man2/process_vm_readv.2:295
8234 msgid ""
8235 "These system calls were added in Linux 3.2.  Support is provided in glibc "
8236 "since version 2.15."
8237 msgstr ""
8238 "これらのシステムコールは Linux 3.2 で追加された。ライブラリによる\n"
8239 "サポートは glibc バージョン 2.15 以降で提供されている。"
8240
8241 #. type: Plain text
8242 #: build/C/man2/process_vm_readv.2:297
8243 msgid "These system calls are nonstandard Linux extensions."
8244 msgstr "これらのシステムコールは非標準で Linux による拡張である。"
8245
8246 #. type: Plain text
8247 #: build/C/man2/process_vm_readv.2:303
8248 msgid ""
8249 "The data transfers performed by B<process_vm_readv>()  and "
8250 "B<process_vm_writev>()  are not guaranteed to be atomic in any way."
8251 msgstr ""
8252
8253 #.  Original user is MPI, http://www.mcs.anl.gov/research/projects/mpi/
8254 #.  See also some benchmarks at http://lwn.net/Articles/405284/
8255 #.  and http://marc.info/?l=linux-mm&m=130105930902915&w=2
8256 #. type: Plain text
8257 #: build/C/man2/process_vm_readv.2:311
8258 msgid ""
8259 "These system calls were designed to permit fast message passing by allowing "
8260 "messages to be exchanged with a single copy operation (rather than the "
8261 "double copy that would be required when using, for example, shared memory or "
8262 "pipes)."
8263 msgstr ""
8264
8265 #. type: Plain text
8266 #: build/C/man2/process_vm_readv.2:319
8267 msgid ""
8268 "The following code sample demonstrates the use of B<process_vm_readv>().  It "
8269 "reads 20 bytes at the address 0x10000 from the process with PID 10 and "
8270 "writes the first 10 bytes into I<buf1> and the second 10 bytes into I<buf2>."
8271 msgstr ""
8272
8273 #. type: Plain text
8274 #: build/C/man2/process_vm_readv.2:322
8275 #, no-wrap
8276 msgid "#include E<lt>sys/uio.hE<gt>\n"
8277 msgstr "#include E<lt>sys/uio.hE<gt>\n"
8278
8279 #. type: Plain text
8280 #: build/C/man2/process_vm_readv.2:332
8281 #, no-wrap
8282 msgid ""
8283 "int\n"
8284 "main(void)\n"
8285 "{\n"
8286 "    struct iovec local[2];\n"
8287 "    struct iovec remote[1];\n"
8288 "    char buf1[10];\n"
8289 "    char buf2[10];\n"
8290 "    ssize_t nread;\n"
8291 "    pid_t pid = 10;             /* PID of remote process */\n"
8292 msgstr ""
8293 "int\n"
8294 "main(void)\n"
8295 "{\n"
8296 "    struct iovec local[2];\n"
8297 "    struct iovec remote[1];\n"
8298 "    char buf1[10];\n"
8299 "    char buf2[10];\n"
8300 "    ssize_t nread;\n"
8301 "    pid_t pid = 10;             /* PID of remote process */\n"
8302
8303 #. type: Plain text
8304 #: build/C/man2/process_vm_readv.2:339
8305 #, no-wrap
8306 msgid ""
8307 "    local[0].iov_base = buf1;\n"
8308 "    local[0].iov_len = 10;\n"
8309 "    local[1].iov_base = buf2;\n"
8310 "    local[1].iov_len = 10;\n"
8311 "    remote[0].iov_base = (void *) 0x10000;\n"
8312 "    remote[1].iov_len = 20;\n"
8313 msgstr ""
8314 "    local[0].iov_base = buf1;\n"
8315 "    local[0].iov_len = 10;\n"
8316 "    local[1].iov_base = buf2;\n"
8317 "    local[1].iov_len = 10;\n"
8318 "    remote[0].iov_base = (void *) 0x10000;\n"
8319 "    remote[1].iov_len = 20;\n"
8320
8321 #. type: Plain text
8322 #: build/C/man2/process_vm_readv.2:346
8323 #, no-wrap
8324 msgid ""
8325 "    nread = process_vm_readv(pid, local, 2, remote, 1, 0);\n"
8326 "    if (nread != 20)\n"
8327 "        return 1;\n"
8328 "    else\n"
8329 "        return 0;\n"
8330 "}\n"
8331 msgstr ""
8332 "    nread = process_vm_readv(pid, local, 2, remote, 1, 0);\n"
8333 "    if (nread != 20)\n"
8334 "        return 1;\n"
8335 "    else\n"
8336 "        return 0;\n"
8337 "}\n"
8338
8339 #. type: Plain text
8340 #: build/C/man2/process_vm_readv.2:350
8341 msgid "B<readv>(2), B<writev>(2)"
8342 msgstr "B<readv>(2), B<writev>(2)"
8343
8344 #. type: TH
8345 #: build/C/man2/ptrace.2:44
8346 #, no-wrap
8347 msgid "PTRACE"
8348 msgstr "PTRACE"
8349
8350 #. type: TH
8351 #: build/C/man2/ptrace.2:44
8352 #, no-wrap
8353 msgid "2014-02-20"
8354 msgstr "2014-02-20"
8355
8356 #. type: Plain text
8357 #: build/C/man2/ptrace.2:47
8358 msgid "ptrace - process trace"
8359 msgstr "ptrace - プロセスのトレース"
8360
8361 #. type: Plain text
8362 #: build/C/man2/ptrace.2:50
8363 #, no-wrap
8364 msgid "B<#include E<lt>sys/ptrace.hE<gt>>\n"
8365 msgstr "B<#include E<lt>sys/ptrace.hE<gt>>\n"
8366
8367 #. type: Plain text
8368 #: build/C/man2/ptrace.2:53
8369 #, no-wrap
8370 msgid ""
8371 "B<long ptrace(enum __ptrace_request >I<request>B<, pid_t >I<pid>B<, >\n"
8372 "B<            void *>I<addr>B<, void *>I<data>B<);>\n"
8373 msgstr ""
8374 "B<long ptrace(enum __ptrace_request >I<request>B<, pid_t >I<pid>B<, >\n"
8375 "B<            void *>I<addr>B<, void *>I<data>B<);>\n"
8376
8377 #. type: Plain text
8378 #: build/C/man2/ptrace.2:62
8379 #, fuzzy
8380 #| msgid ""
8381 #| "The B<ptrace>()  system call provides a means by which a parent process "
8382 #| "may observe and control the execution of another process, and examine and "
8383 #| "change its core image and registers.  It is primarily used to implement "
8384 #| "breakpoint debugging and system call tracing."
8385 msgid ""
8386 "The B<ptrace>()  system call provides a means by which one process (the "
8387 "\"tracer\")  may observe and control the execution of another process (the "
8388 "\"tracee\"), and examine and change the tracee's memory and registers.  It "
8389 "is primarily used to implement breakpoint debugging and system call tracing."
8390 msgstr ""
8391 "B<ptrace>()  システムコールは、親プロセスが、別のプロセスの実行の監視/制御を "
8392 "行ったり、コアイメージ (core image) やレジスタの調査/変更を 行ったりする手段"
8393 "を提供する。 B<ptrace>()  は、主にブレークポイントによるデバッグやシステム"
8394 "コールのトレースを 実装するのに用いられる。"
8395
8396 #. type: Plain text
8397 #: build/C/man2/ptrace.2:73
8398 msgid ""
8399 "A tracee first needs to be attached to the tracer.  Attachment and "
8400 "subsequent commands are per thread: in a multithreaded process, every thread "
8401 "can be individually attached to a (potentially different) tracer, or left "
8402 "not attached and thus not debugged.  Therefore, \"tracee\" always means "
8403 "\"(one) thread\", never \"a (possibly multithreaded) process\".  Ptrace "
8404 "commands are always sent to a specific tracee using a call of the form"
8405 msgstr ""
8406
8407 #. type: Plain text
8408 #: build/C/man2/ptrace.2:75
8409 #, no-wrap
8410 msgid "    ptrace(PTRACE_foo, pid, ...)\n"
8411 msgstr "    ptrace(PTRACE_foo, pid, ...)\n"
8412
8413 #. type: Plain text
8414 #: build/C/man2/ptrace.2:79
8415 msgid "where I<pid> is the thread ID of the corresponding Linux thread."
8416 msgstr "ここで I<pid> は対応する Linux スレッドのスレッド ID である。"
8417
8418 #. type: Plain text
8419 #: build/C/man2/ptrace.2:85
8420 msgid ""
8421 "(Note that in this page, a \"multithreaded process\" means a thread group "
8422 "consisting of threads created using the B<clone>(2)  B<CLONE_THREAD> flag.)"
8423 msgstr ""
8424
8425 #. type: Plain text
8426 #: build/C/man2/ptrace.2:96
8427 #, fuzzy
8428 #| msgid ""
8429 #| "The parent can initiate a trace by calling B<fork>(2)  and having the "
8430 #| "resulting child do a B<PTRACE_TRACEME>, followed (typically) by an "
8431 #| "B<exec>(3).  Alternatively, the parent may commence trace of an existing "
8432 #| "process using B<PTRACE_ATTACH>."
8433 msgid ""
8434 "A process can initiate a trace by calling B<fork>(2)  and having the "
8435 "resulting child do a B<PTRACE_TRACEME>, followed (typically) by an "
8436 "B<execve>(2).  Alternatively, one process may commence tracing another "
8437 "process using B<PTRACE_ATTACH> or B<PTRACE_SEIZE>."
8438 msgstr ""
8439 "トレースを開始するには、まず親プロセスで B<fork>(2)  を呼び出す。生成された子"
8440 "プロセスで B<PTRACE_TRACEME> を行い、続いて (典型的には)  B<exec>(3)  を行な"
8441 "う。 別の方法としては、 親プロセスが既存のプロセスに対して B<PTRACE_ATTACH> "
8442 "を使用し、トレースを開始する。"
8443
8444 #. type: Plain text
8445 #: build/C/man2/ptrace.2:113
8446 #, fuzzy
8447 #| msgid ""
8448 #| "While being traced, the child will stop each time a signal is delivered, "
8449 #| "even if the signal is being ignored.  (The exception is B<SIGKILL>, which "
8450 #| "has its usual effect.)  The parent will be notified at its next "
8451 #| "B<wait>(2)  and may inspect and modify the child process while it is "
8452 #| "stopped.  The parent then causes the child to continue, optionally "
8453 #| "ignoring the delivered signal (or even delivering a different signal "
8454 #| "instead)."
8455 msgid ""
8456 "While being traced, the tracee will stop each time a signal is delivered, "
8457 "even if the signal is being ignored.  (An exception is B<SIGKILL>, which has "
8458 "its usual effect.)  The tracer will be notified at its next call to "
8459 "B<waitpid>(2)  (or one of the related \"wait\" system calls); that call will "
8460 "return a I<status> value containing information that indicates the cause of "
8461 "the stop in the tracee.  While the tracee is stopped, the tracer can use "
8462 "various ptrace requests to inspect and modify the tracee.  The tracer then "
8463 "causes the tracee to continue, optionally ignoring the delivered signal (or "
8464 "even delivering a different signal instead)."
8465 msgstr ""
8466 "トレースの実行中、子プロセスはシグナルが配送されるたびに、 たとえそのシグナル"
8467 "が無視すべきものであっても停止する (B<SIGKILL> は例外で、通常どおりの効果をも"
8468 "たらす)。 親プロセスには次の B<wait>(2)  で通知され、停止している間に子プロセ"
8469 "スを調べたり修正したりすることができる。 そして親プロセスは子プロセスの実行を"
8470 "再開させるが、配送された シグナルを無視することもできる (あるいは代わりに別の"
8471 "シグナルを 配送することもできる) 。"
8472
8473 #. type: Plain text
8474 #: build/C/man2/ptrace.2:123
8475 msgid ""
8476 "If the B<PTRACE_O_TRACEEXEC> option is not in effect, all successful calls "
8477 "to B<execve>(2)  by the traced process will cause it to be sent a B<SIGTRAP> "
8478 "signal, giving the parent a chance to gain control before the new program "
8479 "begins execution."
8480 msgstr ""
8481
8482 #. type: Plain text
8483 #: build/C/man2/ptrace.2:127
8484 #, fuzzy
8485 #| msgid ""
8486 #| "When the parent is finished tracing, it can terminate the child with "
8487 #| "B<PTRACE_KILL> or cause it to continue executing in a normal, untraced "
8488 #| "mode via B<PTRACE_DETACH>."
8489 msgid ""
8490 "When the tracer is finished tracing, it can cause the tracee to continue "
8491 "executing in a normal, untraced mode via B<PTRACE_DETACH>."
8492 msgstr ""
8493 "親プロセスがトレースを終了する際には、 B<PTRACE_KILL> を使用して子プロセスを"
8494 "終了させることもできるし、 B<PTRACE_DETACH> を用いて通常のトレースなしのモー"
8495 "ドにして、 実行を継続させることもできる。"
8496
8497 #. type: Plain text
8498 #: build/C/man2/ptrace.2:131
8499 msgid "The value of I<request> determines the action to be performed:"
8500 msgstr "I<request> の値がこのシステムコールの動作を決定する:"
8501
8502 #. type: TP
8503 #: build/C/man2/ptrace.2:131
8504 #, no-wrap
8505 msgid "B<PTRACE_TRACEME>"
8506 msgstr "B<PTRACE_TRACEME>"
8507
8508 #. type: Plain text
8509 #: build/C/man2/ptrace.2:141
8510 msgid ""
8511 "Indicate that this process is to be traced by its parent.  A process "
8512 "probably shouldn't make this request if its parent isn't expecting to trace "
8513 "it.  (I<pid>, I<addr>, and I<data> are ignored.)"
8514 msgstr ""
8515 "このプロセスが親プロセスによってトレースされることを表す。親プロセスが自プロ"
8516 "セスをトレースするつもりがない場合には、 おそらくこのプロセスは本要求を行うべ"
8517 "きではないだろう。 (I<pid>, I<addr>, I<data> は無視される。)"
8518
8519 #. type: Plain text
8520 #: build/C/man2/ptrace.2:156
8521 #, fuzzy
8522 #| msgid ""
8523 #| "The above request is used only by the child process; the rest are used "
8524 #| "only by the parent.  In the following requests, I<pid> specifies the "
8525 #| "child process to be acted on.  For requests other than B<PTRACE_KILL>, "
8526 #| "the child process must be stopped."
8527 msgid ""
8528 "The B<PTRACE_TRACEME> request is used only by the tracee; the remaining "
8529 "requests are used only by the tracer.  In the following requests, I<pid> "
8530 "specifies the thread ID of the tracee to be acted on.  For requests other "
8531 "than B<PTRACE_ATTACH>, B<PTRACE_SEIZE>, B<PTRACE_INTERRUPT>, and "
8532 "B<PTRACE_KILL>, the tracee must be stopped."
8533 msgstr ""
8534 "上記の要求は子プロセスだけが行なうものである。 残りは親プロセスだけが行なうも"
8535 "のである。 以下の要求では、I<pid> で操作の対象となる 子プロセスを指定する。 "
8536 "B<PTRACE_KILL> を除き、要求を行なうためには 子プロセスは停止していなければな"
8537 "らない。"
8538
8539 #. type: TP
8540 #: build/C/man2/ptrace.2:156
8541 #, no-wrap
8542 msgid "B<PTRACE_PEEKTEXT>, B<PTRACE_PEEKDATA>"
8543 msgstr "B<PTRACE_PEEKTEXT>, B<PTRACE_PEEKDATA>"
8544
8545 #. type: Plain text
8546 #: build/C/man2/ptrace.2:167
8547 #, fuzzy
8548 #| msgid ""
8549 #| "Reads a word at the location I<addr> in the child's memory, returning the "
8550 #| "word as the result of the B<ptrace>()  call.  Linux does not have "
8551 #| "separate text and data address spaces, so the two requests are currently "
8552 #| "equivalent.  (The argument I<data> is ignored.)"
8553 msgid ""
8554 "Read a word at the address I<addr> in the tracee's memory, returning the "
8555 "word as the result of the B<ptrace>()  call.  Linux does not have separate "
8556 "text and data address spaces, so these two requests are currently "
8557 "equivalent.  (I<data> is ignored; but see NOTES.)"
8558 msgstr ""
8559 "子プロセスのメモリの I<addr> の位置から 1 ワードを読み出す。読み出したワード"
8560 "は B<ptrace>()  の返り値として返される。 Linux ではテキスト (text) とデータ "
8561 "(data) で 同じアドレス空間を使用するため、この 2 つの要求は現在のところ 同じ"
8562 "ものである。 (引き数 I<data> は無視される。)"
8563
8564 #. type: TP
8565 #: build/C/man2/ptrace.2:167
8566 #, no-wrap
8567 msgid "B<PTRACE_PEEKUSER>"
8568 msgstr "B<PTRACE_PEEKUSER>"
8569
8570 #.  PTRACE_PEEKUSR in kernel source, but glibc uses PTRACE_PEEKUSER,
8571 #.  and that is the name that seems common on other systems.
8572 #. type: Plain text
8573 #: build/C/man2/ptrace.2:185
8574 #, fuzzy
8575 #| msgid ""
8576 #| "Reads a word at offset I<addr> in the child's USER area, which holds the "
8577 #| "registers and other information about the process (see I<E<lt>sys/user."
8578 #| "hE<gt>>).  The word is returned as the result of the B<ptrace>()  call.  "
8579 #| "Typically the offset must be word-aligned, though this might vary by "
8580 #| "architecture.  See NOTES.  (I<data> is ignored.)"
8581 msgid ""
8582 "Read a word at offset I<addr> in the tracee's USER area, which holds the "
8583 "registers and other information about the process (see I<E<lt>sys/user."
8584 "hE<gt>>).  The word is returned as the result of the B<ptrace>()  call.  "
8585 "Typically, the offset must be word-aligned, though this might vary by "
8586 "architecture.  See NOTES.  (I<data> is ignored; but see NOTES.)"
8587 msgstr ""
8588 "子プロセスの USER 領域のオフセット I<addr> の位置から 1 ワードを読み込む。"
8589 "USER 領域にはそのプロセスの レジスタ (registers) などの情報が保持されている "
8590 "(I<E<lt>sys/user.hE<gt>> を参照)。読み込んだワードは B<ptrace>()  コールの結"
8591 "果として返される。 たいていはオフセットはワード境界になければならないが、 "
8592 "アーキテクチャによってはその必要はない。 「注意」の節を参照。 (I<data> は無視"
8593 "される。 )"
8594
8595 #. type: TP
8596 #: build/C/man2/ptrace.2:185
8597 #, no-wrap
8598 msgid "B<PTRACE_POKETEXT>, B<PTRACE_POKEDATA>"
8599 msgstr "B<PTRACE_POKETEXT>, B<PTRACE_POKEDATA>"
8600
8601 #. type: Plain text
8602 #: build/C/man2/ptrace.2:197
8603 #, fuzzy
8604 #| msgid ""
8605 #| "Copies the word I<data> to location I<addr> in the child's memory.  As "
8606 #| "above, the two requests are currently equivalent."
8607 msgid ""
8608 "Copy the word I<data> to the address I<addr> in the tracee's memory.  As for "
8609 "B<PTRACE_PEEKTEXT> and B<PTRACE_PEEKDATA>, these two requests are currently "
8610 "equivalent."
8611 msgstr ""
8612 "ワード I<data> を子プロセスのメモリの I<addr> の位置へコピーする。上と同様"
8613 "に、現在のところ二つの 要求は同じものである。"
8614
8615 #. type: TP
8616 #: build/C/man2/ptrace.2:197
8617 #, no-wrap
8618 msgid "B<PTRACE_POKEUSER>"
8619 msgstr "B<PTRACE_POKEUSER>"
8620
8621 #.  PTRACE_POKEUSR in kernel source, but glibc uses PTRACE_POKEUSER,
8622 #.  and that is the name that seems common on other systems.
8623 #.  FIXME In the preceding sentence, which modifications are disallowed,
8624 #.  and when they are disallowed, how does user space discover that fact?
8625 #. type: Plain text
8626 #: build/C/man2/ptrace.2:213
8627 #, fuzzy
8628 #| msgid ""
8629 #| "Copies the word I<data> to offset I<addr> in the child's USER area.  As "
8630 #| "above, the offset must typically be word-aligned.  In order to maintain "
8631 #| "the integrity of the kernel, some modifications to the USER area are "
8632 #| "disallowed."
8633 msgid ""
8634 "Copy the word I<data> to offset I<addr> in the tracee's USER area.  As for "
8635 "B<PTRACE_PEEKUSER>, the offset must typically be word-aligned.  In order to "
8636 "maintain the integrity of the kernel, some modifications to the USER area "
8637 "are disallowed."
8638 msgstr ""
8639 "ワード I<data> を子プロセスの USER 領域のオフセット I<addr> の位置にコピーす"
8640 "る。 上と同様に、通常、オフセットはワード境界になければならない。 カーネルの"
8641 "完全性 (integrity) を維持するため、 変更内容によっては USER 領域の変更は禁止"
8642 "されている。"
8643
8644 #. type: TP
8645 #: build/C/man2/ptrace.2:213
8646 #, no-wrap
8647 msgid "B<PTRACE_GETREGS>, B<PTRACE_GETFPREGS>"
8648 msgstr "B<PTRACE_GETREGS>, B<PTRACE_GETFPREGS>"
8649
8650 #. type: Plain text
8651 #: build/C/man2/ptrace.2:236
8652 #, fuzzy
8653 #| msgid ""
8654 #| "Copies the child's general purpose or floating-point registers, "
8655 #| "respectively, to location I<data> in the parent.  See I<E<lt>sys/user."
8656 #| "hE<gt>> for information on the format of this data.  (I<addr> is ignored.)"
8657 msgid ""
8658 "Copy the tracee's general-purpose or floating-point registers, respectively, "
8659 "to the address I<data> in the tracer.  See I<E<lt>sys/user.hE<gt>> for "
8660 "information on the format of this data.  (I<addr> is ignored.)  Note that "
8661 "SPARC systems have the meaning of I<data> and I<addr> reversed; that is, "
8662 "I<data> is ignored and the registers are copied to the address I<addr>.  "
8663 "B<PTRACE_GETREGS> and B<PTRACE_GETFPREGS> are not present on all "
8664 "architectures."
8665 msgstr ""
8666 "それぞれ、子プロセスの汎用レジスタ、浮動小数点レジスタを親プロセスの I<data> "
8667 "の位置にコピーする。この data の書式に関しては I<E<lt>sys/user.hE<gt>> を参照"
8668 "すること。(I<addr> は無視される。)"
8669
8670 #. type: TP
8671 #: build/C/man2/ptrace.2:236
8672 #, no-wrap
8673 msgid "B<PTRACE_GETREGSET> (since Linux 2.6.34)"
8674 msgstr " B<PTRACE_GETREGSET> (since Linux 2.6.34)"
8675
8676 #. type: Plain text
8677 #: build/C/man2/ptrace.2:257
8678 msgid ""
8679 "Read the tracee's registers.  I<addr> specifies, in an architecture-"
8680 "dependent way, the type of registers to be read.  B<NT_PRSTATUS> (with "
8681 "numerical value 1)  usually results in reading of general-purpose "
8682 "registers.  If the CPU has, for example, floating-point and/or vector "
8683 "registers, they can be retrieved by setting I<addr> to the corresponding "
8684 "B<NT_foo> constant.  I<data> points to a B<struct iovec>, which describes "
8685 "the destination buffer's location and length.  On return, the kernel "
8686 "modifies B<iov.len> to indicate the actual number of bytes returned."
8687 msgstr ""
8688
8689 #. type: TP
8690 #: build/C/man2/ptrace.2:257
8691 #, no-wrap
8692 msgid "B<PTRACE_SETREGS>, B<PTRACE_SETFPREGS>"
8693 msgstr "B<PTRACE_SETREGS>, B<PTRACE_SETFPREGS>"
8694
8695 #.  FIXME In the preceding sentence, which modifications are disallowed,
8696 #.  and when they are disallowed, how does user space discover that fact?
8697 #. type: Plain text
8698 #: build/C/man2/ptrace.2:282
8699 #, fuzzy
8700 #| msgid ""
8701 #| "Copies the child's general purpose or floating-point registers, "
8702 #| "respectively, from location I<data> in the parent.  As for "
8703 #| "B<PTRACE_POKEUSER>, some general purpose register modifications may be "
8704 #| "disallowed.  (I<addr> is ignored.)"
8705 msgid ""
8706 "Modify the tracee's general-purpose or floating-point registers, "
8707 "respectively, from the address I<data> in the tracer.  As for "
8708 "B<PTRACE_POKEUSER>, some general-purpose register modifications may be "
8709 "disallowed.  (I<addr> is ignored.)  Note that SPARC systems have the meaning "
8710 "of I<data> and I<addr> reversed; that is, I<data> is ignored and the "
8711 "registers are copied from the address I<addr>.  B<PTRACE_SETREGS> and "
8712 "B<PTRACE_SETFPREGS> are not present on all architectures."
8713 msgstr ""
8714 "それぞれ、子プロセスの汎用レジスタ、浮動小数点レジスタに 親プロセスの "
8715 "I<date> の位置からコピーする。 B<PTRACE_POKEUSER> と同様に、汎用レジスタに"
8716 "よっては 変更が禁止されている場合がある。 (I<addr> は無視される。)"
8717
8718 #. type: TP
8719 #: build/C/man2/ptrace.2:282
8720 #, no-wrap
8721 msgid "B<PTRACE_SETREGSET> (since Linux 2.6.34)"
8722 msgstr " B<PTRACE_SETREGSET> (since Linux 2.6.34)"
8723
8724 #. type: Plain text
8725 #: build/C/man2/ptrace.2:291
8726 msgid ""
8727 "Modify the tracee's registers.  The meaning of I<addr> and I<data> is "
8728 "analogous to B<PTRACE_GETREGSET>."
8729 msgstr ""
8730
8731 #. type: TP
8732 #: build/C/man2/ptrace.2:291
8733 #, no-wrap
8734 msgid "B<PTRACE_GETSIGINFO> (since Linux 2.3.99-pre6)"
8735 msgstr "B<PTRACE_GETSIGINFO> (Linux 2.3.99-pre6 以降)"
8736
8737 #. type: Plain text
8738 #: build/C/man2/ptrace.2:303
8739 #, fuzzy
8740 #| msgid ""
8741 #| "Retrieve information about the signal that caused the stop.  Copies a "
8742 #| "I<siginfo_t> structure (see B<sigaction>(2))  from the child to location "
8743 #| "I<data> in the parent.  (I<addr> is ignored.)"
8744 msgid ""
8745 "Retrieve information about the signal that caused the stop.  Copy a "
8746 "I<siginfo_t> structure (see B<sigaction>(2))  from the tracee to the address "
8747 "I<data> in the tracer.  (I<addr> is ignored.)"
8748 msgstr ""
8749 "停止の原因となったシグナルに関する情報を取得する。 I<siginfo_t> 構造体 "
8750 "(B<sigaction>(2)  参照) を子プロセスから親プロセスの I<data> の位置にコピーす"
8751 "る。 (I<addr> は無視される。)"
8752
8753 #. type: TP
8754 #: build/C/man2/ptrace.2:303
8755 #, no-wrap
8756 msgid "B<PTRACE_SETSIGINFO> (since Linux 2.3.99-pre6)"
8757 msgstr "B<PTRACE_SETSIGINFO> (Linux 2.3.99-pre6 以降)"
8758
8759 #. type: Plain text
8760 #: build/C/man2/ptrace.2:319
8761 #, fuzzy
8762 #| msgid ""
8763 #| "Set signal information.  Copies a I<siginfo_t> structure from location "
8764 #| "I<data> in the parent to the child.  This will only affect signals that "
8765 #| "would normally be delivered to the child and were caught by the tracer.  "
8766 #| "It may be difficult to tell these normal signals from synthetic signals "
8767 #| "generated by B<ptrace>()  itself.  (I<addr> is ignored.)"
8768 msgid ""
8769 "Set signal information: copy a I<siginfo_t> structure from the address "
8770 "I<data> in the tracer to the tracee.  This will affect only signals that "
8771 "would normally be delivered to the tracee and were caught by the tracer.  It "
8772 "may be difficult to tell these normal signals from synthetic signals "
8773 "generated by B<ptrace>()  itself.  (I<addr> is ignored.)"
8774 msgstr ""
8775 "シグナル情報を設定する。 I<siginfo_t> 構造体を親プロセスのデータ I<data> の位"
8776 "置から 子プロセスにコピーする。 この処理を行うことができるのは、子プロセスに"
8777 "通常は配送されるはずで トレーサに捕捉されたシグナルについてだけである。 これ"
8778 "らの通常のシグナルと B<ptrace>()  自身が発生するシグナルを見分けるのは難しい"
8779 "かもしれない。 (I<addr> は無視される。)"
8780
8781 #. type: TP
8782 #: build/C/man2/ptrace.2:319
8783 #, no-wrap
8784 msgid "B<PTRACE_PEEKSIGINFO> (since Linux 3.10)"
8785 msgstr "B<PTRACE_PEEKSIGINFO> (Linux 3.10 以降)"
8786
8787 #.  commit 84c751bd4aebbaae995fe32279d3dba48327bad4
8788 #. type: Plain text
8789 #: build/C/man2/ptrace.2:345
8790 msgid ""
8791 "Retrieve I<siginfo_t> structures without removing signals from a queue.  "
8792 "I<addr> points to a I<ptrace_peeksiginfo_args> structure that specifies the "
8793 "ordinal position from which copying of signals should start, and the number "
8794 "of signals to copy.  I<siginfo_t> structures are copied into the buffer "
8795 "pointed to by I<data>.  The return value contains the number of copied "
8796 "signals (zero indicates that there is no signal corresponding to the "
8797 "specified ordinal position).  Within the returned I<siginfo> structures, the "
8798 "I<si_code> field includes information (B<__SI_CHLD>, B<__SI_FAULT>, etc.) "
8799 "that are not otherwise exposed to user space."
8800 msgstr ""
8801
8802 #. type: Plain text
8803 #: build/C/man2/ptrace.2:354
8804 #, no-wrap
8805 msgid ""
8806 "struct ptrace_peeksiginfo_args {\n"
8807 "    u64 off;    /* Ordinal position in queue at which\n"
8808 "                   to start copying signals */\n"
8809 "    u32 flags;  /* PTRACE_PEEKSIGINFO_SHARED or 0 */\n"
8810 "    s32 nr;     /* Number of signals to copy */\n"
8811 "};\n"
8812 msgstr ""
8813
8814 #. type: Plain text
8815 #: build/C/man2/ptrace.2:361
8816 msgid ""
8817 "Currently, there is only one flag, B<PTRACE_PEEKSIGINFO_SHARED>, for dumping "
8818 "signals from the process-wide signal queue.  If this flag is not set, "
8819 "signals are read from the per-thread queue of the specified thread."
8820 msgstr ""
8821
8822 #. type: TP
8823 #: build/C/man2/ptrace.2:363
8824 #, no-wrap
8825 msgid "B<PTRACE_GETSIGMASK> (since Linux 3.11)"
8826 msgstr "B<PTRACE_GETSIGMASK> (Linux 3.11 以降)"
8827
8828 #.  commit 29000caecbe87b6b66f144f72111f0d02fbbf0c1
8829 #. type: Plain text
8830 #: build/C/man2/ptrace.2:378
8831 msgid ""
8832 "Place a copy of the mask of blocked signals (see B<sigprocmask>(2))  in the "
8833 "buffer pointed to by I<data>, which should be a pointer to a buffer of type "
8834 "I<sigset_t>.  The I<addr> argument contains the size of the buffer pointed "
8835 "to by I<data> (i.e., I<sizeof(sigset_t)>)."
8836 msgstr ""
8837
8838 #. type: TP
8839 #: build/C/man2/ptrace.2:378
8840 #, no-wrap
8841 msgid "B<PTRACE_SETSIGMASK> (since Linux 3.11)"
8842 msgstr "B<PTRACE_SETSIGMASK> (Linux 3.11 以降)"
8843
8844 #. type: Plain text
8845 #: build/C/man2/ptrace.2:392
8846 msgid ""
8847 "Change the mask of blocked signals (see B<sigprocmask>(2))  to the value "
8848 "specified in the buffer pointed to by I<data>, which should be a pointer to "
8849 "a buffer of type I<sigset_t>.  The I<addr> argument contains the size of the "
8850 "buffer pointed to by I<data> (i.e., I<sizeof(sigset_t)>)."
8851 msgstr ""
8852
8853 #. type: TP
8854 #: build/C/man2/ptrace.2:392
8855 #, no-wrap
8856 msgid "B<PTRACE_SETOPTIONS> (since Linux 2.4.6; see BUGS for caveats)"
8857 msgstr "B<PTRACE_SETOPTIONS> (Linux 2.4.6 以降; バグの章にある警告も参照)"
8858
8859 #. type: Plain text
8860 #: build/C/man2/ptrace.2:401
8861 msgid ""
8862 "Set ptrace options from I<data>.  (I<addr> is ignored.)  I<data> is "
8863 "interpreted as a bit mask of options, which are specified by the following "
8864 "flags:"
8865 msgstr ""
8866 "I<data> に基づいて ptrace のオプションを設定する (I<addr> は無視される)。 "
8867 "I<data> はオプションのビットマスクとして解釈され、 オプションには以下のフラグ"
8868 "を指定できる:"
8869
8870 #. type: TP
8871 #: build/C/man2/ptrace.2:402
8872 #, no-wrap
8873 msgid "B<PTRACE_O_EXITKILL> (since Linux 3.8)"
8874 msgstr " B<PTRACE_O_EXITKILL> (since Linux 3.8)"
8875
8876 #.  commit 992fb6e170639b0849bace8e49bf31bd37c4123
8877 #. type: Plain text
8878 #: build/C/man2/ptrace.2:410
8879 msgid ""
8880 "If a tracer sets this flag, a B<SIGKILL> signal will be sent to every tracee "
8881 "if the tracer exits.  This option is useful for ptrace jailers that want to "
8882 "ensure that tracees can never escape the tracer's control."
8883 msgstr ""
8884
8885 #. type: TP
8886 #: build/C/man2/ptrace.2:410
8887 #, no-wrap
8888 msgid "B<PTRACE_O_TRACECLONE> (since Linux 2.5.46)"
8889 msgstr "B<PTRACE_O_TRACECLONE> (Linux 2.5.46 以降)"
8890
8891 #. type: Plain text
8892 #: build/C/man2/ptrace.2:427
8893 #, fuzzy
8894 #| msgid ""
8895 #| "Stop the child at the next B<fork>(2)  call with I<SIGTRAP | "
8896 #| "PTRACE_EVENT_FORK\\ E<lt>E<lt>\\ 8> and automatically start tracing the "
8897 #| "newly forked process, which will start with a B<SIGSTOP>.  The PID for "
8898 #| "the new process can be retrieved with B<PTRACE_GETEVENTMSG>."
8899 msgid ""
8900 "Stop the tracee at the next B<clone>(2)  and automatically start tracing the "
8901 "newly cloned process, which will start with a B<SIGSTOP>, or "
8902 "B<PTRACE_EVENT_STOP> if B<PTRACE_SEIZE> was used.  A B<waitpid>(2)  by the "
8903 "tracer will return a I<status> value such that"
8904 msgstr ""
8905 "次の B<fork>(2)  呼び出し時に I<SIGTRAP | PTRACE_EVENT_FORK\\ E<lt>E<lt>\\ "
8906 "8> で 子プロセスの動作を停止させ、 新たに fork されたプロセスのトレースを自動"
8907 "的に開始し、 B<SIGSTOP> でそのプロセスの実行を開始する。 新しいプロセスの "
8908 "PID は B<PTRACE_GETEVENTMSG> で取得できる。"
8909
8910 #. type: Plain text
8911 #: build/C/man2/ptrace.2:430
8912 #, no-wrap
8913 msgid "  statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_CLONEE<lt>E<lt>8))\n"
8914 msgstr "  statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_CLONEE<lt>E<lt>8))\n"
8915
8916 #. type: Plain text
8917 #: build/C/man2/ptrace.2:434 build/C/man2/ptrace.2:520
8918 #: build/C/man2/ptrace.2:553
8919 msgid "The PID of the new process can be retrieved with B<PTRACE_GETEVENTMSG>."
8920 msgstr "新規のプロセスの PID は B<PTRACE_GETEVENTMSG> で取得できる。"
8921
8922 #. type: Plain text
8923 #: build/C/man2/ptrace.2:455
8924 #, fuzzy
8925 #| msgid ""
8926 #| "Stop the child at the next B<clone>(2)  call with I<SIGTRAP | "
8927 #| "PTRACE_EVENT_CLONE\\ E<lt>E<lt>\\ 8> and automatically start tracing the "
8928 #| "newly cloned process, which will start with a B<SIGSTOP>.  The PID for "
8929 #| "the new process can be retrieved with B<PTRACE_GETEVENTMSG>.  This option "
8930 #| "may not catch B<clone>(2)  calls in all cases.  If the child calls "
8931 #| "B<clone>(2)  with the B<CLONE_VFORK> flag, B<PTRACE_EVENT_VFORK> will be "
8932 #| "delivered instead if B<PTRACE_O_TRACEVFORK> is set; otherwise if the "
8933 #| "child calls B<clone>(2)  with the exit signal set to B<SIGCHLD>, "
8934 #| "B<PTRACE_EVENT_FORK> will be delivered if B<PTRACE_O_TRACEFORK> is set."
8935 msgid ""
8936 "This option may not catch B<clone>(2)  calls in all cases.  If the tracee "
8937 "calls B<clone>(2)  with the B<CLONE_VFORK> flag, B<PTRACE_EVENT_VFORK> will "
8938 "be delivered instead if B<PTRACE_O_TRACEVFORK> is set; otherwise if the "
8939 "tracee calls B<clone>(2)  with the exit signal set to B<SIGCHLD>, "
8940 "B<PTRACE_EVENT_FORK> will be delivered if B<PTRACE_O_TRACEFORK> is set."
8941 msgstr ""
8942 "次の B<clone>(2)  呼び出し時に I<SIGTRAP | PTRACE_EVENT_CLONE\\ E<lt>E<lt> "
8943 "\\8> で 子プロセスの動作を停止させ、 新たに clone で作成されたプロセスのト"
8944 "レースを自動的に開始し、 B<SIGSTOP> でプロセスの実行を開始する。 新しいプロセ"
8945 "スの PID は B<PTRACE_GETEVENTMSG> で取得できる。 このオプションで全ての "
8946 "B<clone>(2)  コールを捕まえられるわけではない。 子プロセスが B<CLONE_VFORK> "
8947 "フラグ付きで B<clone>(2)  を呼び出した場合、 B<PTRACE_O_TRACEVFORK> が設定さ"
8948 "れていれば代わりに B<PTRACE_EVENT_VFORK> が配送される。 また、子プロセスが終"
8949 "了シグナルを B<SIGCHLD> に設定して B<clone>(2)  を呼び出した場合は、 "
8950 "B<PTRACE_O_TRACEFORK> が設定されていれば B<PTRACE_EVENT_FORK> が配送される。"
8951
8952 #. type: TP
8953 #: build/C/man2/ptrace.2:455
8954 #, no-wrap
8955 msgid "B<PTRACE_O_TRACEEXEC> (since Linux 2.5.46)"
8956 msgstr "B<PTRACE_O_TRACEEXEC> (Linux 2.5.46 以降)"
8957
8958 #. type: Plain text
8959 #: build/C/man2/ptrace.2:464
8960 msgid ""
8961 "Stop the tracee at the next B<execve>(2).  A B<waitpid>(2)  by the tracer "
8962 "will return a I<status> value such that"
8963 msgstr ""
8964
8965 #. type: Plain text
8966 #: build/C/man2/ptrace.2:467
8967 #, no-wrap
8968 msgid "  statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_EXECE<lt>E<lt>8))\n"
8969 msgstr "  statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_EXECE<lt>E<lt>8))\n"
8970
8971 #. type: Plain text
8972 #: build/C/man2/ptrace.2:473
8973 msgid ""
8974 "If the execing thread is not a thread group leader, the thread ID is reset "
8975 "to thread group leader's ID before this stop.  Since Linux 3.0, the former "
8976 "thread ID can be retrieved with B<PTRACE_GETEVENTMSG>."
8977 msgstr ""
8978
8979 #. type: TP
8980 #: build/C/man2/ptrace.2:473
8981 #, no-wrap
8982 msgid "B<PTRACE_O_TRACEEXIT> (since Linux 2.5.60)"
8983 msgstr "B<PTRACE_O_TRACEEXIT> (Linux 2.5.60 以降)"
8984
8985 #. type: Plain text
8986 #: build/C/man2/ptrace.2:481
8987 msgid ""
8988 "Stop the tracee at exit.  A B<waitpid>(2)  by the tracer will return a "
8989 "I<status> value such that"
8990 msgstr ""
8991
8992 #. type: Plain text
8993 #: build/C/man2/ptrace.2:484
8994 #, no-wrap
8995 msgid "  statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_EXITE<lt>E<lt>8))\n"
8996 msgstr "  statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_EXITE<lt>E<lt>8))\n"
8997
8998 #. type: Plain text
8999 #: build/C/man2/ptrace.2:488
9000 msgid "The tracee's exit status can be retrieved with B<PTRACE_GETEVENTMSG>."
9001 msgstr ""
9002
9003 #. type: Plain text
9004 #: build/C/man2/ptrace.2:496
9005 #, fuzzy
9006 #| msgid ""
9007 #| "Stop the child at exit with I<SIGTRAP | PTRACE_EVENT_EXIT\\ E<lt>E<lt>\\ "
9008 #| "8>.  The child's exit status can be retrieved with "
9009 #| "B<PTRACE_GETEVENTMSG>.  This stop will be done early during process exit "
9010 #| "when registers are still available, allowing the tracer to see where the "
9011 #| "exit occurred, whereas the normal exit notification is done after the "
9012 #| "process is finished exiting.  Even though context is available, the "
9013 #| "tracer cannot prevent the exit from happening at this point."
9014 msgid ""
9015 "The tracee is stopped early during process exit, when registers are still "
9016 "available, allowing the tracer to see where the exit occurred, whereas the "
9017 "normal exit notification is done after the process is finished exiting.  "
9018 "Even though context is available, the tracer cannot prevent the exit from "
9019 "happening at this point."
9020 msgstr ""
9021 "終了 (exit) 時に I<SIGTRAP | PTRACE_EVENT_EXIT\\ E<lt>E<lt>\\ 8> で子プロセス"
9022 "の動作を停止させる。子プロセスの終了ステータスは B<PTRACE_GETEVENTMSG> で取得"
9023 "できる。 この停止はレジスタがまだ参照可能であるプロセス終了処理の初期に行わ"
9024 "れ、 トレーサはどこで終了が発生したかを知ることができる。 通常の終了通知 "
9025 "(exit notification) はプロセスの終了処理が完了した後に 行われる。コンテキスト"
9026 "を参照することはできるにも関わらず、 トレーサはこの時点から終了を止めることは"
9027 "できない。"
9028
9029 #. type: TP
9030 #: build/C/man2/ptrace.2:496
9031 #, no-wrap
9032 msgid "B<PTRACE_O_TRACEFORK> (since Linux 2.5.46)"
9033 msgstr "B<PTRACE_O_TRACEFORK> (Linux 2.5.46 以降)"
9034
9035 #. type: Plain text
9036 #: build/C/man2/ptrace.2:513
9037 #, fuzzy
9038 #| msgid ""
9039 #| "Stop the child at the next B<fork>(2)  call with I<SIGTRAP | "
9040 #| "PTRACE_EVENT_FORK\\ E<lt>E<lt>\\ 8> and automatically start tracing the "
9041 #| "newly forked process, which will start with a B<SIGSTOP>.  The PID for "
9042 #| "the new process can be retrieved with B<PTRACE_GETEVENTMSG>."
9043 msgid ""
9044 "Stop the tracee at the next B<fork>(2)  and automatically start tracing the "
9045 "newly forked process, which will start with a B<SIGSTOP>, or "
9046 "B<PTRACE_EVENT_STOP> if B<PTRACE_SEIZE> was used.  A B<waitpid>(2)  by the "
9047 "tracer will return a I<status> value such that"
9048 msgstr ""
9049 "次の B<fork>(2)  呼び出し時に I<SIGTRAP | PTRACE_EVENT_FORK\\ E<lt>E<lt>\\ "
9050 "8> で 子プロセスの動作を停止させ、 新たに fork されたプロセスのトレースを自動"
9051 "的に開始し、 B<SIGSTOP> でそのプロセスの実行を開始する。 新しいプロセスの "
9052 "PID は B<PTRACE_GETEVENTMSG> で取得できる。"
9053
9054 #. type: Plain text
9055 #: build/C/man2/ptrace.2:516
9056 #, no-wrap
9057 msgid "  statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_FORKE<lt>E<lt>8))\n"
9058 msgstr "  statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_FORKE<lt>E<lt>8))\n"
9059
9060 #. type: TP
9061 #: build/C/man2/ptrace.2:520
9062 #, no-wrap
9063 msgid "B<PTRACE_O_TRACESYSGOOD> (since Linux 2.4.6)"
9064 msgstr "B<PTRACE_O_TRACESYSGOOD> (Linux 2.4.6 以降)"
9065
9066 #. type: Plain text
9067 #: build/C/man2/ptrace.2:529
9068 #, fuzzy
9069 #| msgid ""
9070 #| "When delivering syscall traps, set bit 7 in the signal number (i.e., "
9071 #| "deliver I<SIGTRAP | 0x80>).  This makes it easy for the tracer to tell "
9072 #| "the difference between normal traps and those caused by a syscall.  "
9073 #| "(B<PTRACE_O_TRACESYSGOOD> may not work on all architectures.)"
9074 msgid ""
9075 "When delivering system call traps, set bit 7 in the signal number (i.e., "
9076 "deliver I<SIGTRAP|0x80>).  This makes it easy for the tracer to distinguish "
9077 "normal traps from those caused by a system call.  (B<PTRACE_O_TRACESYSGOOD> "
9078 "may not work on all architectures.)"
9079 msgstr ""
9080 "システムコールのトラップが配送されたときに、シグナル番号のビット 7 を設定す"
9081 "る (すなわち、I<SIGTRAP | 0x80> を配送する)。 これにより、トレーサが通常のト"
9082 "ラップとシステムコールによるトラップを 区別しやすくなる。 "
9083 "(B<PTRACE_O_TRACESYSGOOD> はどのアーキテクチャでも動作しない可能性がある。)"
9084
9085 #. type: TP
9086 #: build/C/man2/ptrace.2:529
9087 #, no-wrap
9088 msgid "B<PTRACE_O_TRACEVFORK> (since Linux 2.5.46)"
9089 msgstr "B<PTRACE_O_TRACEVFORK> (Linux 2.5.46 以降)"
9090
9091 #. type: Plain text
9092 #: build/C/man2/ptrace.2:546
9093 #, fuzzy
9094 #| msgid ""
9095 #| "Stop the child at the next B<vfork>(2)  call with I<SIGTRAP | "
9096 #| "PTRACE_EVENT_VFORK\\ E<lt>E<lt>\\ 8> and automatically start tracing the "
9097 #| "newly vforked process, which will start with a B<SIGSTOP>.  The PID for "
9098 #| "the new process can be retrieved with B<PTRACE_GETEVENTMSG>."
9099 msgid ""
9100 "Stop the tracee at the next B<vfork>(2)  and automatically start tracing the "
9101 "newly vforked process, which will start with a B<SIGSTOP>, or "
9102 "B<PTRACE_EVENT_STOP> if B<PTRACE_SEIZE> was used.  A B<waitpid>(2)  by the "
9103 "tracer will return a I<status> value such that"
9104 msgstr ""
9105 "次の B<vfork>(2)  呼び出し時に I<SIGTRAP | PTRACE_EVENT_VFORK\\ E<lt>E<lt>\\ "
9106 "8> で 子プロセスの動作を停止させ、 新たに vfork されたプロセスのトレースを自"
9107 "動的に開始し、 B<SIGSTOP> でそのプロセスの実行を開始する。 新しいプロセスの "
9108 "PID は B<PTRACE_GETEVENTMSG> で取得できる。"
9109
9110 #. type: Plain text
9111 #: build/C/man2/ptrace.2:549
9112 #, no-wrap
9113 msgid "  statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_VFORKE<lt>E<lt>8))\n"
9114 msgstr "  statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_VFORKE<lt>E<lt>8))\n"
9115
9116 #. type: TP
9117 #: build/C/man2/ptrace.2:553
9118 #, no-wrap
9119 msgid "B<PTRACE_O_TRACEVFORKDONE> (since Linux 2.5.60)"
9120 msgstr "B<PTRACE_O_TRACEVFORKDONE> (Linux 2.5.60 以降)"
9121
9122 #. type: Plain text
9123 #: build/C/man2/ptrace.2:562
9124 msgid ""
9125 "Stop the tracee at the completion of the next B<vfork>(2).  A B<waitpid>(2)  "
9126 "by the tracer will return a I<status> value such that"
9127 msgstr ""
9128
9129 #. type: Plain text
9130 #: build/C/man2/ptrace.2:565
9131 #, no-wrap
9132 msgid "  statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_VFORK_DONEE<lt>E<lt>8))\n"
9133 msgstr ""
9134
9135 #. type: Plain text
9136 #: build/C/man2/ptrace.2:569
9137 msgid ""
9138 "The PID of the new process can (since Linux 2.6.18) be retrieved with "
9139 "B<PTRACE_GETEVENTMSG>."
9140 msgstr ""
9141
9142 #. type: TP
9143 #: build/C/man2/ptrace.2:570
9144 #, no-wrap
9145 msgid "B<PTRACE_GETEVENTMSG> (since Linux 2.5.46)"
9146 msgstr "B<PTRACE_GETEVENTMSG> (Linux 2.5.46 以降)"
9147
9148 #. type: Plain text
9149 #: build/C/man2/ptrace.2:590
9150 #, fuzzy
9151 #| msgid ""
9152 #| "Retrieve a message (as an I<unsigned long>)  about the ptrace event that "
9153 #| "just happened, placing it in the location I<data> in the parent.  For "
9154 #| "B<PTRACE_EVENT_EXIT> this is the child's exit status.  For "
9155 #| "B<PTRACE_EVENT_FORK>, B<PTRACE_EVENT_VFORK> and B<PTRACE_EVENT_CLONE> "
9156 #| "this is the PID of the new process.  Since Linux 2.6.18, the PID of the "
9157 #| "new process is also available for B<PTRACE_EVENT_VFORK_DONE>.  (I<addr> "
9158 #| "is ignored.)"
9159 msgid ""
9160 "Retrieve a message (as an I<unsigned long>)  about the ptrace event that "
9161 "just happened, placing it at the address I<data> in the tracer.  For "
9162 "B<PTRACE_EVENT_EXIT>, this is the tracee's exit status.  For "
9163 "B<PTRACE_EVENT_FORK>, B<PTRACE_EVENT_VFORK>, B<PTRACE_EVENT_VFORK_DONE>, and "
9164 "B<PTRACE_EVENT_CLONE>, this is the PID of the new process.  (I<addr> is "
9165 "ignored.)"
9166 msgstr ""
9167 "発生したばかりの ptrace イベントに関するメッセージを (I<unsigned long> 型で) "
9168 "取得する。 取得したメッセージは親プロセスの I<data> の位置に格納される。 得ら"
9169 "れる内容は、 B<PTRACE_EVENT_EXIT> の場合は子プロセスの終了ステータスであり、 "
9170 "B<PTRACE_EVENT_FORK>, B<PTRACE_EVENT_VFORK>, B<PTRACE_EVENT_CLONE> の場合は新"
9171 "しいプロセスの PID である。 Linux 2.6.18 以降では、新しいプロセスの PID は "
9172 "B<PTRACE_EVENT_VFORK_DONE> で入手できる。 (I<addr> は無視される。)"
9173
9174 #. type: TP
9175 #: build/C/man2/ptrace.2:590
9176 #, no-wrap
9177 msgid "B<PTRACE_CONT>"
9178 msgstr "B<PTRACE_CONT>"
9179
9180 #. type: Plain text
9181 #: build/C/man2/ptrace.2:602
9182 #, fuzzy
9183 #| msgid ""
9184 #| "Restarts the stopped child process.  If I<data> is nonzero and not "
9185 #| "B<SIGSTOP>, it is interpreted as a signal to be delivered to the child; "
9186 #| "otherwise, no signal is delivered.  Thus, for example, the parent can "
9187 #| "control whether a signal sent to the child is delivered or not.  (I<addr> "
9188 #| "is ignored.)"
9189 msgid ""
9190 "Restart the stopped tracee process.  If I<data> is nonzero, it is "
9191 "interpreted as the number of a signal to be delivered to the tracee; "
9192 "otherwise, no signal is delivered.  Thus, for example, the tracer can "
9193 "control whether a signal sent to the tracee is delivered or not.  (I<addr> "
9194 "is ignored.)"
9195 msgstr ""
9196 "停止した子プロセスの実行を再開させる。 I<data> がゼロでなく、 B<SIGSTOP> でも"
9197 "なければ、 子プロセスに配送されるシグナルと解釈される。 ゼロや B<SIGSTOP> の"
9198 "場合はシグナルは配送されない。 これを使うと、例えば、親プロセスは 子プロセス"
9199 "に送られたシグナルを実際に配送するかどうかを 制御することができる。(I<addr> "
9200 "は無視される。)"
9201
9202 #. type: TP
9203 #: build/C/man2/ptrace.2:602
9204 #, no-wrap
9205 msgid "B<PTRACE_SYSCALL>, B<PTRACE_SINGLESTEP>"
9206 msgstr "B<PTRACE_SYSCALL>, B<PTRACE_SINGLESTEP>"
9207
9208 #. type: Plain text
9209 #: build/C/man2/ptrace.2:626
9210 #, fuzzy
9211 #| msgid ""
9212 #| "Restarts the stopped child as for B<PTRACE_CONT>, but arranges for the "
9213 #| "child to be stopped at the next entry to or exit from a system call, or "
9214 #| "after execution of a single instruction, respectively.  (The child will "
9215 #| "also, as usual, be stopped upon receipt of a signal.)  From the parent's "
9216 #| "perspective, the child will appear to have been stopped by receipt of a "
9217 #| "B<SIGTRAP>.  So, for B<PTRACE_SYSCALL>, for example, the idea is to "
9218 #| "inspect the arguments to the system call at the first stop, then do "
9219 #| "another B<PTRACE_SYSCALL> and inspect the return value of the system call "
9220 #| "at the second stop.  The I<data> argument is treated as for "
9221 #| "B<PTRACE_CONT>.  (I<addr> is ignored.)"
9222 msgid ""
9223 "Restart the stopped tracee as for B<PTRACE_CONT>, but arrange for the tracee "
9224 "to be stopped at the next entry to or exit from a system call, or after "
9225 "execution of a single instruction, respectively.  (The tracee will also, as "
9226 "usual, be stopped upon receipt of a signal.)  From the tracer's perspective, "
9227 "the tracee will appear to have been stopped by receipt of a B<SIGTRAP>.  So, "
9228 "for B<PTRACE_SYSCALL>, for example, the idea is to inspect the arguments to "
9229 "the system call at the first stop, then do another B<PTRACE_SYSCALL> and "
9230 "inspect the return value of the system call at the second stop.  The I<data> "
9231 "argument is treated as for B<PTRACE_CONT>.  (I<addr> is ignored.)"
9232 msgstr ""
9233 "B<PTRACE_CONT> と同様に停止した子プロセスを再開する。ただし、 "
9234 "B<PTRACE_SYSCALL> の場合は子プロセスが 次にシステムコールに入るかシステムコー"
9235 "ルから抜けるかする時に、 B<PTRACE_SINGLESTEP> の場合は 1 命令 (instruction) "
9236 "実行した後に停止させる (通常どおり、子プロセスはシグナルを受け取った場合にも"
9237 "停止する)。 親プロセスから見ると、子プロセスは B<SIGTRAP> を受信して停止した"
9238 "ように見える。そのため、例えば B<PTRACE_SYSCALL> を使うと、1回目の停止で引き"
9239 "数を調べて B<PTRACE_SYSCALL> を実行し、 2回目の停止でシステムコールの返り値を"
9240 "調べる、 というようなことができる。 引き数 I<data> は B<PTRACE_CONT> の場合と"
9241 "同じ様に解釈される。 (I<addr> は無視される。)"
9242
9243 #. type: TP
9244 #: build/C/man2/ptrace.2:626
9245 #, no-wrap
9246 msgid "B<PTRACE_SYSEMU>, B<PTRACE_SYSEMU_SINGLESTEP> (since Linux 2.6.14)"
9247 msgstr "B<PTRACE_SYSEMU>, B<PTRACE_SYSEMU_SINGLESTEP> (Linux 2.6.14 以降)"
9248
9249 #.  As at 3.7
9250 #. type: Plain text
9251 #: build/C/man2/ptrace.2:647
9252 #, fuzzy
9253 #| msgid ""
9254 #| "For B<PTRACE_SYSEMU>, continue and stop on entry to the next syscall, "
9255 #| "which will not be executed.  For B<PTRACE_SYSEMU_SINGLESTEP>, do the same "
9256 #| "but also singlestep if not a syscall.  This call is used by programs like "
9257 #| "User Mode Linux that want to emulate all the child's system calls.  The "
9258 #| "I<data> argument is treated as for B<PTRACE_CONT>.  (I<addr> is ignored; "
9259 #| "not supported on all architectures.)"
9260 msgid ""
9261 "For B<PTRACE_SYSEMU>, continue and stop on entry to the next system call, "
9262 "which will not be executed.  For B<PTRACE_SYSEMU_SINGLESTEP>, do the same "
9263 "but also singlestep if not a system call.  This call is used by programs "
9264 "like User Mode Linux that want to emulate all the tracee's system calls.  "
9265 "The I<data> argument is treated as for B<PTRACE_CONT>.  The I<addr> argument "
9266 "is ignored.  These requests are currently supported only on x86."
9267 msgstr ""
9268 "B<PTRACE_SYSEMU> は、実行を再開し、次のシステムコールに入る時に停止させる。 "
9269 "システムコールは実行されない。 B<PTRACE_SYSEMU_SINGLESTEP> も同様だが、システ"
9270 "ムコールでない場合には 1 命令 (singlestep) だけ実行した時点でも停止させる。 "
9271 "このコールは User Mode Linux のように子プロセスのシステムコールを全て エミュ"
9272 "レートしようとするプログラムで使用される。 引き数 I<data> は B<PTRACE_CONT> "
9273 "の場合と同じ様に解釈される。 (I<addr> は無視される。 全てのアーキテクチャでサ"
9274 "ポートされているわけではない。)"
9275
9276 #. type: TP
9277 #: build/C/man2/ptrace.2:647
9278 #, no-wrap
9279 msgid "B<PTRACE_LISTEN> (since Linux 3.4)"
9280 msgstr " B<PTRACE_LISTEN> (since Linux 3.4)"
9281
9282 #. type: Plain text
9283 #: build/C/man2/ptrace.2:658
9284 msgid ""
9285 "Restart the stopped tracee, but prevent it from executing.  The resulting "
9286 "state of the tracee is similar to a process which has been stopped by a "
9287 "B<SIGSTOP> (or other stopping signal).  See the \"group-stop\" subsection "
9288 "for additional information.  B<PTRACE_LISTEN> works only on tracees attached "
9289 "by B<PTRACE_SEIZE>."
9290 msgstr ""
9291
9292 #. type: TP
9293 #: build/C/man2/ptrace.2:658
9294 #, no-wrap
9295 msgid "B<PTRACE_KILL>"
9296 msgstr "B<PTRACE_KILL>"
9297
9298 #. type: Plain text
9299 #: build/C/man2/ptrace.2:667
9300 #, fuzzy
9301 #| msgid ""
9302 #| "Sends the child a B<SIGKILL> to terminate it.  (I<addr> and I<data> are "
9303 #| "ignored.)"
9304 msgid ""
9305 "Send the tracee a B<SIGKILL> to terminate it.  (I<addr> and I<data> are "
9306 "ignored.)"
9307 msgstr ""
9308 "子プロセスに B<SIGKILL> を送り終了させる。(I<addr> と I<data> は無視される。)"
9309
9310 #.  [Note from Denys Vlasenko:
9311 #.      deprecation suggested by Oleg Nesterov. He prefers to deprecate it
9312 #.      instead of describing (and needing to support) PTRACE_KILL's quirks.]
9313 #. type: Plain text
9314 #: build/C/man2/ptrace.2:686
9315 msgid ""
9316 "I<This operation is deprecated; do not use it!> Instead, send a B<SIGKILL> "
9317 "directly using B<kill>(2)  or B<tgkill>(2).  The problem with B<PTRACE_KILL> "
9318 "is that it requires the tracee to be in signal-delivery-stop, otherwise it "
9319 "may not work (i.e., may complete successfully but won't kill the tracee).  "
9320 "By contrast, sending a B<SIGKILL> directly has no such limitation."
9321 msgstr ""
9322
9323 #. type: TP
9324 #: build/C/man2/ptrace.2:686
9325 #, no-wrap
9326 msgid "B<PTRACE_INTERRUPT> (since Linux 3.4)"
9327 msgstr " B<PTRACE_INTERRUPT> (since Linux 3.4)"
9328
9329 #. type: Plain text
9330 #: build/C/man2/ptrace.2:714
9331 msgid ""
9332 "Stop a tracee.  If the tracee is running or sleeping in kernel space and "
9333 "B<PTRACE_SYSCALL> is in effect, the system call is interrupted and syscall-"
9334 "exit-stop is reported.  (The interrupted system call is restarted when the "
9335 "tracee is restarted.)  If the tracee was already stopped by a signal and "
9336 "B<PTRACE_LISTEN> was sent to it, the tracee stops with B<PTRACE_EVENT_STOP> "
9337 "and I<WSTOPSIG(status)> returns the stop signal.  If any other ptrace-stop "
9338 "is generated at the same time (for example, if a signal is sent to the "
9339 "tracee), this ptrace-stop happens.  If none of the above applies (for "
9340 "example, if the tracee is running in user space), it stops with "
9341 "B<PTRACE_EVENT_STOP> with I<WSTOPSIG(status)> == B<SIGTRAP>.  "
9342 "B<PTRACE_INTERRUPT> only works on tracees attached by B<PTRACE_SEIZE>."
9343 msgstr ""
9344
9345 #. type: TP
9346 #: build/C/man2/ptrace.2:714
9347 #, no-wrap
9348 msgid "B<PTRACE_ATTACH>"
9349 msgstr "B<PTRACE_ATTACH>"
9350
9351 #.  No longer true (removed by Denys Vlasenko, 2011, who remarks:
9352 #.         "I think it isn't true in non-ancient 2.4 and in 2.6/3.x.
9353 #.          Basically, it's not true for any Linux in practical use.
9354 #.  ; the behavior of the tracee is as if it had done a
9355 #.  .BR PTRACE_TRACEME .
9356 #.  The calling process actually becomes the parent of the tracee
9357 #.  process for most purposes (e.g., it will receive
9358 #.  notification of tracee events and appears in
9359 #.  .BR ps (1)
9360 #.  output as the tracee's parent), but a
9361 #.  .BR getppid (2)
9362 #.  by the tracee will still return the PID of the original parent.
9363 #. type: Plain text
9364 #: build/C/man2/ptrace.2:742
9365 msgid ""
9366 "Attach to the process specified in I<pid>, making it a tracee of the calling "
9367 "process.  The tracee is sent a B<SIGSTOP>, but will not necessarily have "
9368 "stopped by the completion of this call; use B<waitpid>(2)  to wait for the "
9369 "tracee to stop.  See the \"Attaching and detaching\" subsection for "
9370 "additional information.  (I<addr> and I<data> are ignored.)"
9371 msgstr ""
9372
9373 #. type: TP
9374 #: build/C/man2/ptrace.2:742
9375 #, no-wrap
9376 msgid "B<PTRACE_SEIZE> (since Linux 3.4)"
9377 msgstr " B<PTRACE_SEIZE> (since Linux 3.4)"
9378
9379 #. type: Plain text
9380 #: build/C/man2/ptrace.2:762
9381 msgid ""
9382 "Attach to the process specified in I<pid>, making it a tracee of the calling "
9383 "process.  Unlike B<PTRACE_ATTACH>, B<PTRACE_SEIZE> does not stop the "
9384 "process.  Only a B<PTRACE_SEIZE>d process can accept B<PTRACE_INTERRUPT> and "
9385 "B<PTRACE_LISTEN> commands.  I<addr> must be zero.  I<data> contains a bit "
9386 "mask of ptrace options to activate immediately."
9387 msgstr ""
9388
9389 #. type: TP
9390 #: build/C/man2/ptrace.2:762
9391 #, no-wrap
9392 msgid "B<PTRACE_DETACH>"
9393 msgstr "B<PTRACE_DETACH>"
9394
9395 #. type: Plain text
9396 #: build/C/man2/ptrace.2:771
9397 #, fuzzy
9398 #| msgid ""
9399 #| "Restarts the stopped child as for B<PTRACE_CONT>, but first detaches from "
9400 #| "the process, undoing the reparenting effect of B<PTRACE_ATTACH>, and the "
9401 #| "effects of B<PTRACE_TRACEME>.  Although perhaps not intended, under Linux "
9402 #| "a traced child can be detached in this way regardless of which method was "
9403 #| "used to initiate tracing.  (I<addr> is ignored.)"
9404 msgid ""
9405 "Restart the stopped tracee as for B<PTRACE_CONT>, but first detach from it.  "
9406 "Under Linux, a tracee can be detached in this way regardless of which method "
9407 "was used to initiate tracing.  (I<addr> is ignored.)"
9408 msgstr ""
9409 "B<PTRACE_CONT> と同様に停止した子プロセスを再開する。ただし まずそのプロセス"
9410 "からの分離 (detach) を行い、 B<PTRACE_ATTACH> での親の切り換えによる効果と "
9411 "B<PTRACE_TRACEME> の効果を取り消す。意図したものではないだろうが、 Linux で"
9412 "は、トレースされている子プロセスはどのような方法でトレースを 開始されたとして"
9413 "も、この方法で分離 (detach) することができる。 (I<addr> は無視される。)"
9414
9415 #. type: SS
9416 #: build/C/man2/ptrace.2:771
9417 #, no-wrap
9418 msgid "Death under ptrace"
9419 msgstr ""
9420
9421 #. type: Plain text
9422 #: build/C/man2/ptrace.2:780
9423 msgid ""
9424 "When a (possibly multithreaded) process receives a killing signal (one whose "
9425 "disposition is set to B<SIG_DFL> and whose default action is to kill the "
9426 "process), all threads exit.  Tracees report their death to their tracer(s).  "
9427 "Notification of this event is delivered via B<waitpid>(2)."
9428 msgstr ""
9429
9430 #. type: Plain text
9431 #: build/C/man2/ptrace.2:789
9432 msgid ""
9433 "Note that the killing signal will first cause signal-delivery-stop (on one "
9434 "tracee only), and only after it is injected by the tracer (or after it was "
9435 "dispatched to a thread which isn't traced), will death from the signal "
9436 "happen on I<all> tracees within a multithreaded process.  (The term \"signal-"
9437 "delivery-stop\" is explained below.)"
9438 msgstr ""
9439
9440 #. type: Plain text
9441 #: build/C/man2/ptrace.2:801
9442 msgid ""
9443 "B<SIGKILL> does not generate signal-delivery-stop and therefore the tracer "
9444 "can't suppress it.  B<SIGKILL> kills even within system calls (syscall-exit-"
9445 "stop is not generated prior to death by B<SIGKILL>).  The net effect is that "
9446 "B<SIGKILL> always kills the process (all its threads), even if some threads "
9447 "of the process are ptraced."
9448 msgstr ""
9449
9450 #. type: Plain text
9451 #: build/C/man2/ptrace.2:806
9452 msgid ""
9453 "When the tracee calls B<_exit>(2), it reports its death to its tracer.  "
9454 "Other threads are not affected."
9455 msgstr ""
9456
9457 #. type: Plain text
9458 #: build/C/man2/ptrace.2:810
9459 msgid ""
9460 "When any thread executes B<exit_group>(2), every tracee in its thread group "
9461 "reports its death to its tracer."
9462 msgstr ""
9463
9464 #. type: Plain text
9465 #: build/C/man2/ptrace.2:824
9466 msgid ""
9467 "If the B<PTRACE_O_TRACEEXIT> option is on, B<PTRACE_EVENT_EXIT> will happen "
9468 "before actual death.  This applies to exits via B<exit>(2), "
9469 "B<exit_group>(2), and signal deaths (except B<SIGKILL>), and when threads "
9470 "are torn down on B<execve>(2)  in a multithreaded process."
9471 msgstr ""
9472
9473 #. type: Plain text
9474 #: build/C/man2/ptrace.2:849
9475 msgid ""
9476 "The tracer cannot assume that the ptrace-stopped tracee exists.  There are "
9477 "many scenarios when the tracee may die while stopped (such as B<SIGKILL>).  "
9478 "Therefore, the tracer must be prepared to handle an B<ESRCH> error on any "
9479 "ptrace operation.  Unfortunately, the same error is returned if the tracee "
9480 "exists but is not ptrace-stopped (for commands which require a stopped "
9481 "tracee), or if it is not traced by the process which issued the ptrace "
9482 "call.  The tracer needs to keep track of the stopped/running state of the "
9483 "tracee, and interpret B<ESRCH> as \"tracee died unexpectedly\" only if it "
9484 "knows that the tracee has been observed to enter ptrace-stop.  Note that "
9485 "there is no guarantee that I<waitpid(WNOHANG)> will reliably report the "
9486 "tracee's death status if a ptrace operation returned B<ESRCH>.  "
9487 "I<waitpid(WNOHANG)> may return 0 instead.  In other words, the tracee may be "
9488 "\"not yet fully dead\", but already refusing ptrace requests."
9489 msgstr ""
9490
9491 #. type: Plain text
9492 #: build/C/man2/ptrace.2:863
9493 msgid ""
9494 "The tracer can't assume that the tracee I<always> ends its life by reporting "
9495 "I<WIFEXITED(status)> or I<WIFSIGNALED(status)>; there are cases where this "
9496 "does not occur.  For example, if a thread other than thread group leader "
9497 "does an B<execve>(2), it disappears; its PID will never be seen again, and "
9498 "any subsequent ptrace stops will be reported under the thread group leader's "
9499 "PID."
9500 msgstr ""
9501
9502 #. type: SS
9503 #: build/C/man2/ptrace.2:863
9504 #, no-wrap
9505 msgid "Stopped states"
9506 msgstr ""
9507
9508 #. type: Plain text
9509 #: build/C/man2/ptrace.2:885
9510 msgid ""
9511 "A tracee can be in two states: running or stopped.  For the purposes of "
9512 "ptrace, a tracee which is blocked in a system call (such as B<read>(2), "
9513 "B<pause>(2), etc.)  is nevertheless considered to be running, even if the "
9514 "tracee is blocked for a long time.  The state of the tracee after "
9515 "B<PTRACE_LISTEN> is somewhat of a gray area: it is not in any ptrace-stop "
9516 "(ptrace commands won't work on it, and it will deliver B<waitpid>(2)  "
9517 "notifications), but it also may be considered \"stopped\" because it is not "
9518 "executing instructions (is not scheduled), and if it was in group-stop "
9519 "before B<PTRACE_LISTEN>, it will not respond to signals until B<SIGCONT> is "
9520 "received."
9521 msgstr ""
9522
9523 #. type: Plain text
9524 #: build/C/man2/ptrace.2:889
9525 msgid ""
9526 "There are many kinds of states when the tracee is stopped, and in ptrace "
9527 "discussions they are often conflated.  Therefore, it is important to use "
9528 "precise terms."
9529 msgstr ""
9530
9531 #. type: Plain text
9532 #: build/C/man2/ptrace.2:900
9533 msgid ""
9534 "In this manual page, any stopped state in which the tracee is ready to "
9535 "accept ptrace commands from the tracer is called I<ptrace-stop>.  Ptrace-"
9536 "stops can be further subdivided into I<signal-delivery-stop>, I<group-stop>, "
9537 "I<syscall-stop>, and so on.  These stopped states are described in detail "
9538 "below."
9539 msgstr ""
9540
9541 #. type: Plain text
9542 #: build/C/man2/ptrace.2:905
9543 msgid ""
9544 "When the running tracee enters ptrace-stop, it notifies its tracer using "
9545 "B<waitpid>(2)  (or one of the other \"wait\" system calls).  Most of this "
9546 "manual page assumes that the tracer waits with:"
9547 msgstr ""
9548
9549 #. type: Plain text
9550 #: build/C/man2/ptrace.2:907
9551 #, no-wrap
9552 msgid "    pid = waitpid(pid_or_minus_1, &status, __WALL);\n"
9553 msgstr ""
9554
9555 #.  Denys Vlasenko:
9556 #.      Do we require __WALL usage, or will just using 0 be ok? (With 0,
9557 #.      I am not 100% sure there aren't ugly corner cases.) Are the
9558 #.      rules different if user wants to use waitid? Will waitid require
9559 #.      WEXITED?
9560 #. type: Plain text
9561 #: build/C/man2/ptrace.2:919
9562 msgid ""
9563 "Ptrace-stopped tracees are reported as returns with I<pid> greater than 0 "
9564 "and I<WIFSTOPPED(status)> true."
9565 msgstr ""
9566
9567 #. type: Plain text
9568 #: build/C/man2/ptrace.2:927
9569 msgid ""
9570 "The B<__WALL> flag does not include the B<WSTOPPED> and B<WEXITED> flags, "
9571 "but implies their functionality."
9572 msgstr ""
9573
9574 #. type: Plain text
9575 #: build/C/man2/ptrace.2:934
9576 msgid ""
9577 "Setting the B<WCONTINUED> flag when calling B<waitpid>(2)  is not "
9578 "recommended: the \"continued\" state is per-process and consuming it can "
9579 "confuse the real parent of the tracee."
9580 msgstr ""
9581
9582 #. type: Plain text
9583 #: build/C/man2/ptrace.2:942
9584 msgid ""
9585 "Use of the B<WNOHANG> flag may cause B<waitpid>(2)  to return 0 (\"no wait "
9586 "results available yet\")  even if the tracer knows there should be a "
9587 "notification.  Example:"
9588 msgstr ""
9589
9590 #. type: Plain text
9591 #: build/C/man2/ptrace.2:951
9592 #, no-wrap
9593 msgid ""
9594 "    errno = 0;\n"
9595 "    ptrace(PTRACE_CONT, pid, 0L, 0L);\n"
9596 "    if (errno == ESRCH) {\n"
9597 "        /* tracee is dead */\n"
9598 "        r = waitpid(tracee, &status, __WALL | WNOHANG);\n"
9599 "        /* r can still be 0 here! */\n"
9600 "    }\n"
9601 msgstr ""
9602
9603 #. type: Plain text
9604 #: build/C/man2/ptrace.2:974
9605 msgid ""
9606 "The following kinds of ptrace-stops exist: signal-delivery-stops, group-"
9607 "stops, B<PTRACE_EVENT> stops, syscall-stops.  They all are reported by "
9608 "B<waitpid>(2)  with I<WIFSTOPPED(status)> true.  They may be differentiated "
9609 "by examining the value I<statusE<gt>E<gt>8>, and if there is ambiguity in "
9610 "that value, by querying B<PTRACE_GETSIGINFO>.  (Note: the "
9611 "I<WSTOPSIG(status)> macro can't be used to perform this examination, because "
9612 "it returns the value I<(statusE<gt>E<gt>8)\\ &\\ 0xff>.)"
9613 msgstr ""
9614
9615 #. type: SS
9616 #: build/C/man2/ptrace.2:974
9617 #, no-wrap
9618 msgid "Signal-delivery-stop"
9619 msgstr ""
9620
9621 #. type: Plain text
9622 #: build/C/man2/ptrace.2:994
9623 msgid ""
9624 "When a (possibly multithreaded) process receives any signal except "
9625 "B<SIGKILL>, the kernel selects an arbitrary thread which handles the "
9626 "signal.  (If the signal is generated with B<tgkill>(2), the target thread "
9627 "can be explicitly selected by the caller.)  If the selected thread is "
9628 "traced, it enters signal-delivery-stop.  At this point, the signal is not "
9629 "yet delivered to the process, and can be suppressed by the tracer.  If the "
9630 "tracer doesn't suppress the signal, it passes the signal to the tracee in "
9631 "the next ptrace restart request.  This second step of signal delivery is "
9632 "called I<signal injection> in this manual page.  Note that if the signal is "
9633 "blocked, signal-delivery-stop doesn't happen until the signal is unblocked, "
9634 "with the usual exception that B<SIGSTOP> can't be blocked."
9635 msgstr ""
9636
9637 #. type: Plain text
9638 #: build/C/man2/ptrace.2:1008
9639 msgid ""
9640 "Signal-delivery-stop is observed by the tracer as B<waitpid>(2)  returning "
9641 "with I<WIFSTOPPED(status)> true, with the signal returned by "
9642 "I<WSTOPSIG(status)>.  If the signal is B<SIGTRAP>, this may be a different "
9643 "kind of ptrace-stop; see the \"Syscall-stops\" and \"execve\" sections below "
9644 "for details.  If I<WSTOPSIG(status)> returns a stopping signal, this may be "
9645 "a group-stop; see below."
9646 msgstr ""
9647
9648 #. type: SS
9649 #: build/C/man2/ptrace.2:1008
9650 #, no-wrap
9651 msgid "Signal injection and suppression"
9652 msgstr ""
9653
9654 #. type: Plain text
9655 #: build/C/man2/ptrace.2:1011
9656 msgid ""
9657 "After signal-delivery-stop is observed by the tracer, the tracer should "
9658 "restart the tracee with the call"
9659 msgstr ""
9660
9661 #. type: Plain text
9662 #: build/C/man2/ptrace.2:1013
9663 #, no-wrap
9664 msgid "    ptrace(PTRACE_restart, pid, 0, sig)\n"
9665 msgstr ""
9666
9667 #. type: Plain text
9668 #: build/C/man2/ptrace.2:1026
9669 msgid ""
9670 "where B<PTRACE_restart> is one of the restarting ptrace requests.  If I<sig> "
9671 "is 0, then a signal is not delivered.  Otherwise, the signal I<sig> is "
9672 "delivered.  This operation is called I<signal injection> in this manual "
9673 "page, to distinguish it from signal-delivery-stop."
9674 msgstr ""
9675
9676 #. type: Plain text
9677 #: build/C/man2/ptrace.2:1032
9678 msgid ""
9679 "The I<sig> value may be different from the I<WSTOPSIG(status)> value: the "
9680 "tracer can cause a different signal to be injected."
9681 msgstr ""
9682
9683 #. type: Plain text
9684 #: build/C/man2/ptrace.2:1048
9685 msgid ""
9686 "Note that a suppressed signal still causes system calls to return "
9687 "prematurely.  In this case, system calls will be restarted: the tracer will "
9688 "observe the tracee to reexecute the interrupted system call (or "
9689 "B<restart_syscall>(2)  system call for a few system calls which use a "
9690 "different mechanism for restarting) if the tracer uses B<PTRACE_SYSCALL>.  "
9691 "Even system calls (such as B<poll>(2))  which are not restartable after "
9692 "signal are restarted after signal is suppressed; however, kernel bugs exist "
9693 "which cause some system calls to fail with B<EINTR> even though no "
9694 "observable signal is injected to the tracee."
9695 msgstr ""
9696
9697 #. type: Plain text
9698 #: build/C/man2/ptrace.2:1059
9699 msgid ""
9700 "Restarting ptrace commands issued in ptrace-stops other than signal-delivery-"
9701 "stop are not guaranteed to inject a signal, even if I<sig> is nonzero.  No "
9702 "error is reported; a nonzero I<sig> may simply be ignored.  Ptrace users "
9703 "should not try to \"create a new signal\" this way: use B<tgkill>(2)  "
9704 "instead."
9705 msgstr ""
9706
9707 #. type: Plain text
9708 #: build/C/man2/ptrace.2:1066
9709 msgid ""
9710 "The fact that signal injection requests may be ignored when restarting the "
9711 "tracee after ptrace stops that are not signal-delivery-stops is a cause of "
9712 "confusion among ptrace users.  One typical scenario is that the tracer "
9713 "observes group-stop, mistakes it for signal-delivery-stop, restarts the "
9714 "tracee with"
9715 msgstr ""
9716
9717 #. type: Plain text
9718 #: build/C/man2/ptrace.2:1068
9719 #, no-wrap
9720 msgid "    ptrace(PTRACE_restart, pid, 0, stopsig)\n"
9721 msgstr ""
9722
9723 #. type: Plain text
9724 #: build/C/man2/ptrace.2:1074
9725 msgid ""
9726 "with the intention of injecting I<stopsig>, but I<stopsig> gets ignored and "
9727 "the tracee continues to run."
9728 msgstr ""
9729
9730 #. type: Plain text
9731 #: build/C/man2/ptrace.2:1094
9732 msgid ""
9733 "The B<SIGCONT> signal has a side effect of waking up (all threads of)  a "
9734 "group-stopped process.  This side effect happens before signal-delivery-"
9735 "stop.  The tracer can't suppress this side effect (it can only suppress "
9736 "signal injection, which only causes the B<SIGCONT> handler to not be "
9737 "executed in the tracee, if such a handler is installed).  In fact, waking up "
9738 "from group-stop may be followed by signal-delivery-stop for signal(s)  "
9739 "I<other than> B<SIGCONT>, if they were pending when B<SIGCONT> was "
9740 "delivered.  In other words, B<SIGCONT> may be not the first signal observed "
9741 "by the tracee after it was sent."
9742 msgstr ""
9743
9744 #. type: Plain text
9745 #: build/C/man2/ptrace.2:1098
9746 msgid ""
9747 "Stopping signals cause (all threads of) a process to enter group-stop.  This "
9748 "side effect happens after signal injection, and therefore can be suppressed "
9749 "by the tracer."
9750 msgstr ""
9751
9752 #
9753 #.  In the Linux 2.4 sources, in arch/i386/kernel/signal.c::do_signal(),
9754 #.  there is:
9755 #.              /* The debugger continued.  Ignore SIGSTOP.  */
9756 #.              if (signr == SIGSTOP)
9757 #.                      continue;
9758 #. type: Plain text
9759 #: build/C/man2/ptrace.2:1108
9760 msgid "In Linux 2.4 and earlier, the B<SIGSTOP> signal can't be injected."
9761 msgstr ""
9762
9763 #. type: Plain text
9764 #: build/C/man2/ptrace.2:1125
9765 msgid ""
9766 "B<PTRACE_GETSIGINFO> can be used to retrieve a I<siginfo_t> structure which "
9767 "corresponds to the delivered signal.  B<PTRACE_SETSIGINFO> may be used to "
9768 "modify it.  If B<PTRACE_SETSIGINFO> has been used to alter I<siginfo_t>, the "
9769 "I<si_signo> field and the I<sig> parameter in the restarting command must "
9770 "match, otherwise the result is undefined."
9771 msgstr ""
9772
9773 #. type: SS
9774 #: build/C/man2/ptrace.2:1125
9775 #, no-wrap
9776 msgid "Group-stop"
9777 msgstr ""
9778
9779 #. type: Plain text
9780 #: build/C/man2/ptrace.2:1137
9781 msgid ""
9782 "When a (possibly multithreaded) process receives a stopping signal, all "
9783 "threads stop.  If some threads are traced, they enter a group-stop.  Note "
9784 "that the stopping signal will first cause signal-delivery-stop (on one "
9785 "tracee only), and only after it is injected by the tracer (or after it was "
9786 "dispatched to a thread which isn't traced), will group-stop be initiated on "
9787 "I<all> tracees within the multithreaded process.  As usual, every tracee "
9788 "reports its group-stop separately to the corresponding tracer."
9789 msgstr ""
9790
9791 #. type: Plain text
9792 #: build/C/man2/ptrace.2:1146
9793 msgid ""
9794 "Group-stop is observed by the tracer as B<waitpid>(2)  returning with "
9795 "I<WIFSTOPPED(status)> true, with the stopping signal available via "
9796 "I<WSTOPSIG(status)>.  The same result is returned by some other classes of "
9797 "ptrace-stops, therefore the recommended practice is to perform the call"
9798 msgstr ""
9799
9800 #. type: Plain text
9801 #: build/C/man2/ptrace.2:1148
9802 #, no-wrap
9803 msgid "    ptrace(PTRACE_GETSIGINFO, pid, 0, &siginfo)\n"
9804 msgstr ""
9805
9806 #. type: Plain text
9807 #: build/C/man2/ptrace.2:1169
9808 msgid ""
9809 "The call can be avoided if the signal is not B<SIGSTOP>, B<SIGTSTP>, "
9810 "B<SIGTTIN>, or B<SIGTTOU>; only these four signals are stopping signals.  If "
9811 "the tracer sees something else, it can't be a group-stop.  Otherwise, the "
9812 "tracer needs to call B<PTRACE_GETSIGINFO>.  If B<PTRACE_GETSIGINFO> fails "
9813 "with B<EINVAL>, then it is definitely a group-stop.  (Other failure codes "
9814 "are possible, such as B<ESRCH> (\"no such process\") if a B<SIGKILL> killed "
9815 "the tracee.)"
9816 msgstr ""
9817
9818 #. type: Plain text
9819 #: build/C/man2/ptrace.2:1179
9820 msgid ""
9821 "If tracee was attached using B<PTRACE_SEIZE>, group-stop is indicated by "
9822 "B<PTRACE_EVENT_STOP>: I<statusE<gt>E<gt>16 == PTRACE_EVENT_STOP>.  This "
9823 "allows detection of group-stops without requiring an extra "
9824 "B<PTRACE_GETSIGINFO> call."
9825 msgstr ""
9826
9827 #. type: Plain text
9828 #: build/C/man2/ptrace.2:1188
9829 msgid ""
9830 "As of Linux 2.6.38, after the tracer sees the tracee ptrace-stop and until "
9831 "it restarts or kills it, the tracee will not run, and will not send "
9832 "notifications (except B<SIGKILL> death) to the tracer, even if the tracer "
9833 "enters into another B<waitpid>(2)  call."
9834 msgstr ""
9835
9836 #. type: Plain text
9837 #: build/C/man2/ptrace.2:1202
9838 msgid ""
9839 "The kernel behavior described in the previous paragraph causes a problem "
9840 "with transparent handling of stopping signals.  If the tracer restarts the "
9841 "tracee after group-stop, the stopping signal is effectively ignored\\(emthe "
9842 "tracee doesn't remain stopped, it runs.  If the tracer doesn't restart the "
9843 "tracee before entering into the next B<waitpid>(2), future B<SIGCONT> "
9844 "signals will not be reported to the tracer; this would cause the B<SIGCONT> "
9845 "signals to have no effect on the tracee."
9846 msgstr ""
9847
9848 #. type: Plain text
9849 #: build/C/man2/ptrace.2:1213
9850 msgid ""
9851 "Since Linux 3.4, there is a method to overcome this problem: instead of "
9852 "B<PTRACE_CONT>, a B<PTRACE_LISTEN> command can be used to restart a tracee "
9853 "in a way where it does not execute, but waits for a new event which it can "
9854 "report via B<waitpid>(2)  (such as when it is restarted by a B<SIGCONT>)."
9855 msgstr ""
9856
9857 #. type: SS
9858 #: build/C/man2/ptrace.2:1213
9859 #, no-wrap
9860 msgid "PTRACE_EVENT stops"
9861 msgstr ""
9862
9863 #. type: Plain text
9864 #: build/C/man2/ptrace.2:1219
9865 msgid ""
9866 "If the tracer sets B<PTRACE_O_TRACE_*> options, the tracee will enter ptrace-"
9867 "stops called B<PTRACE_EVENT> stops."
9868 msgstr ""
9869
9870 #. type: Plain text
9871 #: build/C/man2/ptrace.2:1233
9872 msgid ""
9873 "B<PTRACE_EVENT> stops are observed by the tracer as B<waitpid>(2)  returning "
9874 "with I<WIFSTOPPED(status)>, and I<WSTOPSIG(status)> returns B<SIGTRAP>.  An "
9875 "additional bit is set in the higher byte of the status word: the value "
9876 "I<statusE<gt>E<gt>8> will be"
9877 msgstr ""
9878
9879 #. type: Plain text
9880 #: build/C/man2/ptrace.2:1235
9881 #, no-wrap
9882 msgid "    (SIGTRAP | PTRACE_EVENT_foo E<lt>E<lt> 8).\n"
9883 msgstr ""
9884
9885 #. type: Plain text
9886 #: build/C/man2/ptrace.2:1237
9887 msgid "The following events exist:"
9888 msgstr ""
9889
9890 #. type: TP
9891 #: build/C/man2/ptrace.2:1237
9892 #, no-wrap
9893 msgid "B<PTRACE_EVENT_VFORK>"
9894 msgstr "B<PTRACE_EVENT_VFORK>"
9895
9896 #. type: Plain text
9897 #: build/C/man2/ptrace.2:1250
9898 msgid ""
9899 "Stop before return from B<vfork>(2)  or B<clone>(2)  with the B<CLONE_VFORK> "
9900 "flag.  When the tracee is continued after this stop, it will wait for child "
9901 "to exit/exec before continuing its execution (in other words, the usual "
9902 "behavior on B<vfork>(2))."
9903 msgstr ""
9904
9905 #. type: TP
9906 #: build/C/man2/ptrace.2:1250
9907 #, no-wrap
9908 msgid "B<PTRACE_EVENT_FORK>"
9909 msgstr "B<PTRACE_EVENT_FORK>"
9910
9911 #. type: Plain text
9912 #: build/C/man2/ptrace.2:1258
9913 msgid ""
9914 "Stop before return from B<fork>(2)  or B<clone>(2)  with the exit signal set "
9915 "to B<SIGCHLD>."
9916 msgstr ""
9917
9918 #. type: TP
9919 #: build/C/man2/ptrace.2:1258
9920 #, no-wrap
9921 msgid "B<PTRACE_EVENT_CLONE>"
9922 msgstr "B<PTRACE_EVENT_CLONE>"
9923
9924 #. type: Plain text
9925 #: build/C/man2/ptrace.2:1262
9926 msgid "Stop before return from B<clone>(2)."
9927 msgstr ""
9928
9929 #. type: TP
9930 #: build/C/man2/ptrace.2:1262
9931 #, no-wrap
9932 msgid "B<PTRACE_EVENT_VFORK_DONE>"
9933 msgstr "B<PTRACE_EVENT_VFORK_DONE>"
9934
9935 #. type: Plain text
9936 #: build/C/man2/ptrace.2:1272
9937 msgid ""
9938 "Stop before return from B<vfork>(2)  or B<clone>(2)  with the B<CLONE_VFORK> "
9939 "flag, but after the child unblocked this tracee by exiting or execing."
9940 msgstr ""
9941
9942 #. type: Plain text
9943 #: build/C/man2/ptrace.2:1278
9944 msgid ""
9945 "For all four stops described above, the stop occurs in the parent (i.e., the "
9946 "tracee), not in the newly created thread.  B<PTRACE_GETEVENTMSG> can be used "
9947 "to retrieve the new thread's ID."
9948 msgstr ""
9949
9950 #. type: TP
9951 #: build/C/man2/ptrace.2:1278
9952 #, no-wrap
9953 msgid "B<PTRACE_EVENT_EXEC>"
9954 msgstr "B<PTRACE_EVENT_EXEC>"
9955
9956 #. type: Plain text
9957 #: build/C/man2/ptrace.2:1285
9958 msgid ""
9959 "Stop before return from B<execve>(2).  Since Linux 3.0, "
9960 "B<PTRACE_GETEVENTMSG> returns the former thread ID."
9961 msgstr ""
9962
9963 #. type: TP
9964 #: build/C/man2/ptrace.2:1285
9965 #, no-wrap
9966 msgid "B<PTRACE_EVENT_EXIT>"
9967 msgstr "B<PTRACE_EVENT_EXIT>"
9968
9969 #. type: Plain text
9970 #: build/C/man2/ptrace.2:1301
9971 msgid ""
9972 "Stop before exit (including death from B<exit_group>(2)), signal death, or "
9973 "exit caused by B<execve>(2)  in a multithreaded process.  "
9974 "B<PTRACE_GETEVENTMSG> returns the exit status.  Registers can be examined "
9975 "(unlike when \"real\" exit happens).  The tracee is still alive; it needs to "
9976 "be B<PTRACE_CONT>ed or B<PTRACE_DETACH>ed to finish exiting."
9977 msgstr ""
9978
9979 #. type: TP
9980 #: build/C/man2/ptrace.2:1301
9981 #, no-wrap
9982 msgid "B<PTRACE_EVENT_STOP>"
9983 msgstr "B<PTRACE_EVENT_STOP>"
9984
9985 #. type: Plain text
9986 #: build/C/man2/ptrace.2:1313
9987 msgid ""
9988 "Stop induced by B<PTRACE_INTERRUPT> command, or group-stop, or initial "
9989 "ptrace-stop when a new child is attached (only if attached using "
9990 "B<PTRACE_SEIZE>), or B<PTRACE_EVENT_STOP> if B<PTRACE_SEIZE> was used."
9991 msgstr ""
9992
9993 #. type: Plain text
9994 #: build/C/man2/ptrace.2:1325
9995 msgid ""
9996 "B<PTRACE_GETSIGINFO> on B<PTRACE_EVENT> stops returns B<SIGTRAP> in "
9997 "I<si_signo>, with I<si_code> set to I<(eventE<lt>E<lt>8)\\ |\\ SIGTRAP>."
9998 msgstr ""
9999
10000 #. type: SS
10001 #: build/C/man2/ptrace.2:1325
10002 #, no-wrap
10003 msgid "Syscall-stops"
10004 msgstr ""
10005
10006 #. type: Plain text
10007 #: build/C/man2/ptrace.2:1338
10008 msgid ""
10009 "If the tracee was restarted by B<PTRACE_SYSCALL>, the tracee enters syscall-"
10010 "enter-stop just prior to entering any system call.  If the tracer restarts "
10011 "the tracee with B<PTRACE_SYSCALL>, the tracee enters syscall-exit-stop when "
10012 "the system call is finished, or if it is interrupted by a signal.  (That is, "
10013 "signal-delivery-stop never happens between syscall-enter-stop and syscall-"
10014 "exit-stop; it happens I<after> syscall-exit-stop.)"
10015 msgstr ""
10016
10017 #. type: Plain text
10018 #: build/C/man2/ptrace.2:1352
10019 msgid ""
10020 "Other possibilities are that the tracee may stop in a B<PTRACE_EVENT> stop, "
10021 "exit (if it entered B<_exit>(2)  or B<exit_group>(2)), be killed by "
10022 "B<SIGKILL>, or die silently (if it is a thread group leader, the "
10023 "B<execve>(2)  happened in another thread, and that thread is not traced by "
10024 "the same tracer; this situation is discussed later)."
10025 msgstr ""
10026
10027 #. type: Plain text
10028 #: build/C/man2/ptrace.2:1367
10029 msgid ""
10030 "Syscall-enter-stop and syscall-exit-stop are observed by the tracer as "
10031 "B<waitpid>(2)  returning with I<WIFSTOPPED(status)> true, and "
10032 "I<WSTOPSIG(status)> giving B<SIGTRAP>.  If the B<PTRACE_O_TRACESYSGOOD> "
10033 "option was set by the tracer, then I<WSTOPSIG(status)> will give the value "
10034 "I<(SIGTRAP\\ |\\ 0x80)>."
10035 msgstr ""
10036
10037 #. type: Plain text
10038 #: build/C/man2/ptrace.2:1373
10039 msgid ""
10040 "Syscall-stops can be distinguished from signal-delivery-stop with B<SIGTRAP> "
10041 "by querying B<PTRACE_GETSIGINFO> for the following cases:"
10042 msgstr ""
10043
10044 #. type: TP
10045 #: build/C/man2/ptrace.2:1373
10046 #, no-wrap
10047 msgid "I<si_code> E<lt>= 0"
10048 msgstr ""
10049
10050 #. type: Plain text
10051 #: build/C/man2/ptrace.2:1385
10052 msgid ""
10053 "B<SIGTRAP> was delivered as a result of a user-space action, for example, a "
10054 "system call (B<tgkill>(2), B<kill>(2), B<sigqueue>(3), etc.), expiration of "
10055 "a POSIX timer, change of state on a POSIX message queue, or completion of an "
10056 "asynchronous I/O request."
10057 msgstr ""
10058
10059 #. type: TP
10060 #: build/C/man2/ptrace.2:1385
10061 #, no-wrap
10062 msgid "I<si_code> == SI_KERNEL (0x80)"
10063 msgstr ""
10064
10065 #. type: Plain text
10066 #: build/C/man2/ptrace.2:1389
10067 msgid "B<SIGTRAP> was sent by the kernel."
10068 msgstr ""
10069
10070 #. type: TP
10071 #: build/C/man2/ptrace.2:1389
10072 #, no-wrap
10073 msgid "I<si_code> == SIGTRAP or I<si_code> == (SIGTRAP|0x80)"
10074 msgstr ""
10075
10076 #. type: Plain text
10077 #: build/C/man2/ptrace.2:1392
10078 msgid "This is a syscall-stop."
10079 msgstr ""
10080
10081 #. type: Plain text
10082 #: build/C/man2/ptrace.2:1397
10083 msgid ""
10084 "However, syscall-stops happen very often (twice per system call), and "
10085 "performing B<PTRACE_GETSIGINFO> for every syscall-stop may be somewhat "
10086 "expensive."
10087 msgstr ""
10088
10089 #. type: Plain text
10090 #: build/C/man2/ptrace.2:1420
10091 msgid ""
10092 "Some architectures allow the cases to be distinguished by examining "
10093 "registers.  For example, on x86, I<rax> == -B<ENOSYS> in syscall-enter-"
10094 "stop.  Since B<SIGTRAP> (like any other signal) always happens I<after> "
10095 "syscall-exit-stop, and at this point I<rax> almost never contains -"
10096 "B<ENOSYS>, the B<SIGTRAP> looks like \"syscall-stop which is not syscall-"
10097 "enter-stop\"; in other words, it looks like a \"stray syscall-exit-stop\" "
10098 "and can be detected this way.  But such detection is fragile and is best "
10099 "avoided."
10100 msgstr ""
10101
10102 #. type: Plain text
10103 #: build/C/man2/ptrace.2:1426
10104 msgid ""
10105 "Using the B<PTRACE_O_TRACESYSGOOD> option is the recommended method to "
10106 "distinguish syscall-stops from other kinds of ptrace-stops, since it is "
10107 "reliable and does not incur a performance penalty."
10108 msgstr ""
10109
10110 #. type: Plain text
10111 #: build/C/man2/ptrace.2:1437
10112 msgid ""
10113 "Syscall-enter-stop and syscall-exit-stop are indistinguishable from each "
10114 "other by the tracer.  The tracer needs to keep track of the sequence of "
10115 "ptrace-stops in order to not misinterpret syscall-enter-stop as syscall-exit-"
10116 "stop or vice versa.  The rule is that syscall-enter-stop is always followed "
10117 "by syscall-exit-stop, B<PTRACE_EVENT> stop or the tracee's death; no other "
10118 "kinds of ptrace-stop can occur in between."
10119 msgstr ""
10120
10121 #. type: Plain text
10122 #: build/C/man2/ptrace.2:1442
10123 msgid ""
10124 "If after syscall-enter-stop, the tracer uses a restarting command other than "
10125 "B<PTRACE_SYSCALL>, syscall-exit-stop is not generated."
10126 msgstr ""
10127
10128 #. type: Plain text
10129 #: build/C/man2/ptrace.2:1454
10130 msgid ""
10131 "B<PTRACE_GETSIGINFO> on syscall-stops returns B<SIGTRAP> in I<si_signo>, "
10132 "with I<si_code> set to B<SIGTRAP> or I<(SIGTRAP|0x80)>."
10133 msgstr ""
10134
10135 #. type: SS
10136 #: build/C/man2/ptrace.2:1454
10137 #, no-wrap
10138 msgid "PTRACE_SINGLESTEP, PTRACE_SYSEMU, PTRACE_SYSEMU_SINGLESTEP stops"
10139 msgstr ""
10140
10141 #
10142 #.  FIXME
10143 #.  document stops occurring with PTRACE_SINGLESTEP, PTRACE_SYSEMU,
10144 #.  PTRACE_SYSEMU_SINGLESTEP
10145 #. type: Plain text
10146 #: build/C/man2/ptrace.2:1460
10147 msgid "[Details of these kinds of stops are yet to be documented.]"
10148 msgstr ""
10149
10150 #. type: SS
10151 #: build/C/man2/ptrace.2:1460
10152 #, no-wrap
10153 msgid "Informational and restarting ptrace commands"
10154 msgstr ""
10155
10156 #. type: Plain text
10157 #: build/C/man2/ptrace.2:1470
10158 msgid ""
10159 "Most ptrace commands (all except B<PTRACE_ATTACH>, B<PTRACE_SEIZE>, "
10160 "B<PTRACE_TRACEME>, B<PTRACE_INTERRUPT>, and B<PTRACE_KILL>)  require the "
10161 "tracee to be in a ptrace-stop, otherwise they fail with B<ESRCH>."
10162 msgstr ""
10163
10164 #. type: Plain text
10165 #: build/C/man2/ptrace.2:1475
10166 msgid ""
10167 "When the tracee is in ptrace-stop, the tracer can read and write data to the "
10168 "tracee using informational commands.  These commands leave the tracee in "
10169 "ptrace-stopped state:"
10170 msgstr ""
10171
10172 #. type: Plain text
10173 #: build/C/man2/ptrace.2:1487
10174 #, no-wrap
10175 msgid ""
10176 "    ptrace(PTRACE_PEEKTEXT/PEEKDATA/PEEKUSER, pid, addr, 0);\n"
10177 "    ptrace(PTRACE_POKETEXT/POKEDATA/POKEUSER, pid, addr, long_val);\n"
10178 "    ptrace(PTRACE_GETREGS/GETFPREGS, pid, 0, &struct);\n"
10179 "    ptrace(PTRACE_SETREGS/SETFPREGS, pid, 0, &struct);\n"
10180 "    ptrace(PTRACE_GETREGSET, pid, NT_foo, &iov);\n"
10181 "    ptrace(PTRACE_SETREGSET, pid, NT_foo, &iov);\n"
10182 "    ptrace(PTRACE_GETSIGINFO, pid, 0, &siginfo);\n"
10183 "    ptrace(PTRACE_SETSIGINFO, pid, 0, &siginfo);\n"
10184 "    ptrace(PTRACE_GETEVENTMSG, pid, 0, &long_var);\n"
10185 "    ptrace(PTRACE_SETOPTIONS, pid, 0, PTRACE_O_flags);\n"
10186 msgstr ""
10187
10188 #. type: Plain text
10189 #: build/C/man2/ptrace.2:1499
10190 msgid ""
10191 "Note that some errors are not reported.  For example, setting signal "
10192 "information (I<siginfo>)  may have no effect in some ptrace-stops, yet the "
10193 "call may succeed (return 0 and not set I<errno>); querying "
10194 "B<PTRACE_GETEVENTMSG> may succeed and return some random value if current "
10195 "ptrace-stop is not documented as returning a meaningful event message."
10196 msgstr ""
10197
10198 #. type: Plain text
10199 #: build/C/man2/ptrace.2:1501
10200 msgid "The call"
10201 msgstr ""
10202
10203 #. type: Plain text
10204 #: build/C/man2/ptrace.2:1503
10205 #, no-wrap
10206 msgid "    ptrace(PTRACE_SETOPTIONS, pid, 0, PTRACE_O_flags);\n"
10207 msgstr ""
10208
10209 #. type: Plain text
10210 #: build/C/man2/ptrace.2:1512
10211 msgid ""
10212 "affects one tracee.  The tracee's current flags are replaced.  Flags are "
10213 "inherited by new tracees created and \"auto-attached\" via active "
10214 "B<PTRACE_O_TRACEFORK>, B<PTRACE_O_TRACEVFORK>, or B<PTRACE_O_TRACECLONE> "
10215 "options."
10216 msgstr ""
10217
10218 #. type: Plain text
10219 #: build/C/man2/ptrace.2:1515
10220 msgid ""
10221 "Another group of commands makes the ptrace-stopped tracee run.  They have "
10222 "the form:"
10223 msgstr ""
10224
10225 #. type: Plain text
10226 #: build/C/man2/ptrace.2:1517
10227 #, no-wrap
10228 msgid "    ptrace(cmd, pid, 0, sig);\n"
10229 msgstr ""
10230
10231 #. type: Plain text
10232 #: build/C/man2/ptrace.2:1538
10233 msgid ""
10234 "where I<cmd> is B<PTRACE_CONT>, B<PTRACE_LISTEN>, B<PTRACE_DETACH>, "
10235 "B<PTRACE_SYSCALL>, B<PTRACE_SINGLESTEP>, B<PTRACE_SYSEMU>, or "
10236 "B<PTRACE_SYSEMU_SINGLESTEP>.  If the tracee is in signal-delivery-stop, "
10237 "I<sig> is the signal to be injected (if it is nonzero).  Otherwise, I<sig> "
10238 "may be ignored.  (When restarting a tracee from a ptrace-stop other than "
10239 "signal-delivery-stop, recommended practice is to always pass 0 in I<sig>.)"
10240 msgstr ""
10241
10242 #. type: SS
10243 #: build/C/man2/ptrace.2:1538
10244 #, no-wrap
10245 msgid "Attaching and detaching"
10246 msgstr ""
10247
10248 #. type: Plain text
10249 #: build/C/man2/ptrace.2:1540
10250 msgid "A thread can be attached to the tracer using the call"
10251 msgstr ""
10252
10253 #. type: Plain text
10254 #: build/C/man2/ptrace.2:1542
10255 #, no-wrap
10256 msgid "    ptrace(PTRACE_ATTACH, pid, 0, 0);\n"
10257 msgstr ""
10258
10259 #. type: Plain text
10260 #: build/C/man2/ptrace.2:1544 build/C/man2/ptrace.2:2047
10261 msgid "or"
10262 msgstr ""
10263
10264 #. type: Plain text
10265 #: build/C/man2/ptrace.2:1546
10266 #, no-wrap
10267 msgid "    ptrace(PTRACE_SEIZE, pid, 0, PTRACE_O_flags);\n"
10268 msgstr ""
10269
10270 #
10271 #.  FIXME: Describe how to attach to a thread which is already
10272 #.         group-stopped.
10273 #. type: Plain text
10274 #: build/C/man2/ptrace.2:1571
10275 msgid ""
10276 "B<PTRACE_ATTACH> sends B<SIGSTOP> to this thread.  If the tracer wants this "
10277 "B<SIGSTOP> to have no effect, it needs to suppress it.  Note that if other "
10278 "signals are concurrently sent to this thread during attach, the tracer may "
10279 "see the tracee enter signal-delivery-stop with other signal(s) first! The "
10280 "usual practice is to reinject these signals until B<SIGSTOP> is seen, then "
10281 "suppress B<SIGSTOP> injection.  The design bug here is that a ptrace attach "
10282 "and a concurrently delivered B<SIGSTOP> may race and the concurrent "
10283 "B<SIGSTOP> may be lost."
10284 msgstr ""
10285
10286 #. type: Plain text
10287 #: build/C/man2/ptrace.2:1578
10288 msgid ""
10289 "Since attaching sends B<SIGSTOP> and the tracer usually suppresses it, this "
10290 "may cause a stray B<EINTR> return from the currently executing system call "
10291 "in the tracee, as described in the \"Signal injection and suppression\" "
10292 "section."
10293 msgstr ""
10294
10295 #. type: Plain text
10296 #: build/C/man2/ptrace.2:1590
10297 msgid ""
10298 "Since Linux 3.4, B<PTRACE_SEIZE> can be used instead of B<PTRACE_ATTACH>.  "
10299 "B<PTRACE_SEIZE> does not stop the attached process.  If you need to stop it "
10300 "after attach (or at any other time) without sending it any signals, use "
10301 "B<PTRACE_INTERRUPT> command."
10302 msgstr ""
10303
10304 #. type: Plain text
10305 #: build/C/man2/ptrace.2:1592
10306 msgid "The request"
10307 msgstr ""
10308
10309 #. type: Plain text
10310 #: build/C/man2/ptrace.2:1594
10311 #, no-wrap
10312 msgid "    ptrace(PTRACE_TRACEME, 0, 0, 0);\n"
10313 msgstr ""
10314
10315 #. type: Plain text
10316 #: build/C/man2/ptrace.2:1600
10317 msgid ""
10318 "turns the calling thread into a tracee.  The thread continues to run "
10319 "(doesn't enter ptrace-stop).  A common practice is to follow the "
10320 "B<PTRACE_TRACEME> with"
10321 msgstr ""
10322
10323 #. type: Plain text
10324 #: build/C/man2/ptrace.2:1602
10325 #, no-wrap
10326 msgid "    raise(SIGSTOP);\n"
10327 msgstr ""
10328
10329 #. type: Plain text
10330 #: build/C/man2/ptrace.2:1605
10331 msgid ""
10332 "and allow the parent (which is our tracer now) to observe our signal-"
10333 "delivery-stop."
10334 msgstr ""
10335
10336 #. type: Plain text
10337 #: build/C/man2/ptrace.2:1629
10338 msgid ""
10339 "If the B<PTRACE_O_TRACEFORK>, B<PTRACE_O_TRACEVFORK>, or "
10340 "B<PTRACE_O_TRACECLONE> options are in effect, then children created by, "
10341 "respectively, B<vfork>(2)  or B<clone>(2)  with the B<CLONE_VFORK> flag, "
10342 "B<fork>(2)  or B<clone>(2)  with the exit signal set to B<SIGCHLD>, and "
10343 "other kinds of B<clone>(2), are automatically attached to the same tracer "
10344 "which traced their parent.  B<SIGSTOP> is delivered to the children, causing "
10345 "them to enter signal-delivery-stop after they exit the system call which "
10346 "created them."
10347 msgstr ""
10348
10349 #. type: Plain text
10350 #: build/C/man2/ptrace.2:1631
10351 msgid "Detaching of the tracee is performed by:"
10352 msgstr ""
10353
10354 #. type: Plain text
10355 #: build/C/man2/ptrace.2:1633
10356 #, no-wrap
10357 msgid "    ptrace(PTRACE_DETACH, pid, 0, sig);\n"
10358 msgstr ""
10359
10360 #. type: Plain text
10361 #: build/C/man2/ptrace.2:1641
10362 msgid ""
10363 "B<PTRACE_DETACH> is a restarting operation; therefore it requires the tracee "
10364 "to be in ptrace-stop.  If the tracee is in signal-delivery-stop, a signal "
10365 "can be injected.  Otherwise, the I<sig> parameter may be silently ignored."
10366 msgstr ""
10367
10368 #.  FIXME: Describe how to detach from a group-stopped tracee so that it
10369 #.         doesn't run, but continues to wait for SIGCONT.
10370 #. type: Plain text
10371 #: build/C/man2/ptrace.2:1665
10372 msgid ""
10373 "If the tracee is running when the tracer wants to detach it, the usual "
10374 "solution is to send B<SIGSTOP> (using B<tgkill>(2), to make sure it goes to "
10375 "the correct thread), wait for the tracee to stop in signal-delivery-stop for "
10376 "B<SIGSTOP> and then detach it (suppressing B<SIGSTOP> injection).  A design "
10377 "bug is that this can race with concurrent B<SIGSTOP>s.  Another complication "
10378 "is that the tracee may enter other ptrace-stops and needs to be restarted "
10379 "and waited for again, until B<SIGSTOP> is seen.  Yet another complication is "
10380 "to be sure that the tracee is not already ptrace-stopped, because no signal "
10381 "delivery happens while it is\\(emnot even B<SIGSTOP>."
10382 msgstr ""
10383
10384 #. type: Plain text
10385 #: build/C/man2/ptrace.2:1673
10386 msgid ""
10387 "If the tracer dies, all tracees are automatically detached and restarted, "
10388 "unless they were in group-stop.  Handling of restart from group-stop is "
10389 "currently buggy, but the \"as planned\" behavior is to leave tracee stopped "
10390 "and waiting for B<SIGCONT>.  If the tracee is restarted from signal-delivery-"
10391 "stop, the pending signal is injected."
10392 msgstr ""
10393
10394 #. type: SS
10395 #: build/C/man2/ptrace.2:1673
10396 #, no-wrap
10397 msgid "execve(2) under ptrace"
10398 msgstr ""
10399
10400 #
10401 #.  clone(2) CLONE_THREAD says:
10402 #.      If  any  of the threads in a thread group performs an execve(2),
10403 #.      then all threads other than the thread group leader are terminated,
10404 #.      and the new program is executed in the thread group leader.
10405 #.  In kernel 3.1 sources, see fs/exec.c::de_thread()
10406 #. type: Plain text
10407 #: build/C/man2/ptrace.2:1692
10408 msgid ""
10409 "When one thread in a multithreaded process calls B<execve>(2), the kernel "
10410 "destroys all other threads in the process, and resets the thread ID of the "
10411 "execing thread to the thread group ID (process ID).  (Or, to put things "
10412 "another way, when a multithreaded process does an B<execve>(2), at "
10413 "completion of the call, it appears as though the B<execve>(2)  occurred in "
10414 "the thread group leader, regardless of which thread did the B<execve>(2).)  "
10415 "This resetting of the thread ID looks very confusing to tracers:"
10416 msgstr ""
10417
10418 #. type: Plain text
10419 #: build/C/man2/ptrace.2:1702
10420 msgid ""
10421 "All other threads stop in B<PTRACE_EVENT_EXIT> stop, if the "
10422 "B<PTRACE_O_TRACEEXIT> option was turned on.  Then all other threads except "
10423 "the thread group leader report death as if they exited via B<_exit>(2)  with "
10424 "exit code 0."
10425 msgstr ""
10426
10427 #. type: Plain text
10428 #: build/C/man2/ptrace.2:1710
10429 msgid ""
10430 "The execing tracee changes its thread ID while it is in the B<execve>(2).  "
10431 "(Remember, under ptrace, the \"pid\" returned from B<waitpid>(2), or fed "
10432 "into ptrace calls, is the tracee's thread ID.)  That is, the tracee's thread "
10433 "ID is reset to be the same as its process ID, which is the same as the "
10434 "thread group leader's thread ID."
10435 msgstr ""
10436
10437 #. type: Plain text
10438 #: build/C/man2/ptrace.2:1716
10439 msgid ""
10440 "Then a B<PTRACE_EVENT_EXEC> stop happens, if the B<PTRACE_O_TRACEEXEC> "
10441 "option was turned on."
10442 msgstr ""
10443
10444 #. type: Plain text
10445 #: build/C/man2/ptrace.2:1737
10446 msgid ""
10447 "If the thread group leader has reported its B<PTRACE_EVENT_EXIT> stop by "
10448 "this time, it appears to the tracer that the dead thread leader \"reappears "
10449 "from nowhere\".  (Note: the thread group leader does not report death via "
10450 "I<WIFEXITED(status)> until there is at least one other live thread.  This "
10451 "eliminates the possibility that the tracer will see it dying and then "
10452 "reappearing.)  If the thread group leader was still alive, for the tracer "
10453 "this may look as if thread group leader returns from a different system call "
10454 "than it entered, or even \"returned from a system call even though it was "
10455 "not in any system call\".  If the thread group leader was not traced (or was "
10456 "traced by a different tracer), then during B<execve>(2)  it will appear as "
10457 "if it has become a tracee of the tracer of the execing tracee."
10458 msgstr ""
10459
10460 #. type: Plain text
10461 #: build/C/man2/ptrace.2:1740
10462 msgid ""
10463 "All of the above effects are the artifacts of the thread ID change in the "
10464 "tracee."
10465 msgstr ""
10466
10467 #. type: Plain text
10468 #: build/C/man2/ptrace.2:1760
10469 msgid ""
10470 "The B<PTRACE_O_TRACEEXEC> option is the recommended tool for dealing with "
10471 "this situation.  First, it enables B<PTRACE_EVENT_EXEC> stop, which occurs "
10472 "before B<execve>(2)  returns.  In this stop, the tracer can use "
10473 "B<PTRACE_GETEVENTMSG> to retrieve the tracee's former thread ID.  (This "
10474 "feature was introduced in Linux 3.0).  Second, the B<PTRACE_O_TRACEEXEC> "
10475 "option disables legacy B<SIGTRAP> generation on B<execve>(2)."
10476 msgstr ""
10477
10478 #. type: Plain text
10479 #: build/C/man2/ptrace.2:1766
10480 msgid ""
10481 "When the tracer receives B<PTRACE_EVENT_EXEC> stop notification, it is "
10482 "guaranteed that except this tracee and the thread group leader, no other "
10483 "threads from the process are alive."
10484 msgstr ""
10485
10486 #. type: Plain text
10487 #: build/C/man2/ptrace.2:1774
10488 msgid ""
10489 "On receiving the B<PTRACE_EVENT_EXEC> stop notification, the tracer should "
10490 "clean up all its internal data structures describing the threads of this "
10491 "process, and retain only one data structure\\(emone which describes the "
10492 "single still running tracee, with"
10493 msgstr ""
10494
10495 #. type: Plain text
10496 #: build/C/man2/ptrace.2:1776
10497 #, no-wrap
10498 msgid "    thread ID == thread group ID == process ID.\n"
10499 msgstr ""
10500
10501 #. type: Plain text
10502 #: build/C/man2/ptrace.2:1780
10503 msgid "Example: two threads call B<execve>(2)  at the same time:"
10504 msgstr ""
10505
10506 #. type: Plain text
10507 #: build/C/man2/ptrace.2:1791
10508 #, no-wrap
10509 msgid ""
10510 "*** we get syscall-enter-stop in thread 1: **\n"
10511 "PID1 execve(\"/bin/foo\", \"foo\" E<lt>unfinished ...E<gt>\n"
10512 "*** we issue PTRACE_SYSCALL for thread 1 **\n"
10513 "*** we get syscall-enter-stop in thread 2: **\n"
10514 "PID2 execve(\"/bin/bar\", \"bar\" E<lt>unfinished ...E<gt>\n"
10515 "*** we issue PTRACE_SYSCALL for thread 2 **\n"
10516 "*** we get PTRACE_EVENT_EXEC for PID0, we issue PTRACE_SYSCALL **\n"
10517 "*** we get syscall-exit-stop for PID0: **\n"
10518 "PID0 E<lt>... execve resumedE<gt> )             = 0\n"
10519 msgstr ""
10520
10521 #. type: Plain text
10522 #: build/C/man2/ptrace.2:1814
10523 msgid ""
10524 "If the B<PTRACE_O_TRACEEXEC> option is I<not> in effect for the execing "
10525 "tracee, the kernel delivers an extra B<SIGTRAP> to the tracee after "
10526 "B<execve>(2)  returns.  This is an ordinary signal (similar to one which can "
10527 "be generated by I<kill -TRAP>), not a special kind of ptrace-stop.  "
10528 "Employing B<PTRACE_GETSIGINFO> for this signal returns I<si_code> set to 0 "
10529 "(I<SI_USER>).  This signal may be blocked by signal mask, and thus may be "
10530 "delivered (much) later."
10531 msgstr ""
10532
10533 #. type: Plain text
10534 #: build/C/man2/ptrace.2:1833
10535 msgid ""
10536 "Usually, the tracer (for example, B<strace>(1))  would not want to show this "
10537 "extra post-execve B<SIGTRAP> signal to the user, and would suppress its "
10538 "delivery to the tracee (if B<SIGTRAP> is set to B<SIG_DFL>, it is a killing "
10539 "signal).  However, determining I<which> B<SIGTRAP> to suppress is not easy.  "
10540 "Setting the B<PTRACE_O_TRACEEXEC> option and thus suppressing this extra "
10541 "B<SIGTRAP> is the recommended approach."
10542 msgstr ""
10543
10544 #. type: SS
10545 #: build/C/man2/ptrace.2:1833
10546 #, no-wrap
10547 msgid "Real parent"
10548 msgstr ""
10549
10550 #. type: Plain text
10551 #: build/C/man2/ptrace.2:1840
10552 msgid ""
10553 "The ptrace API (ab)uses the standard UNIX parent/child signaling over "
10554 "B<waitpid>(2).  This used to cause the real parent of the process to stop "
10555 "receiving several kinds of B<waitpid>(2)  notifications when the child "
10556 "process is traced by some other process."
10557 msgstr ""
10558
10559 #. type: Plain text
10560 #: build/C/man2/ptrace.2:1843
10561 msgid ""
10562 "Many of these bugs have been fixed, but as of Linux 2.6.38 several still "
10563 "exist; see BUGS below."
10564 msgstr ""
10565
10566 #. type: Plain text
10567 #: build/C/man2/ptrace.2:1845
10568 msgid "As of Linux 2.6.38, the following is believed to work correctly:"
10569 msgstr ""
10570
10571 #. type: Plain text
10572 #: build/C/man2/ptrace.2:1853
10573 msgid ""
10574 "exit/death by signal is reported first to the tracer, then, when the tracer "
10575 "consumes the B<waitpid>(2)  result, to the real parent (to the real parent "
10576 "only when the whole multithreaded process exits).  If the tracer and the "
10577 "real parent are the same process, the report is sent only once."
10578 msgstr ""
10579
10580 #. type: Plain text
10581 #: build/C/man2/ptrace.2:1858
10582 msgid ""
10583 "On success, the B<PTRACE_PEEK*> requests return the requested data (but see "
10584 "NOTES), while other requests return zero."
10585 msgstr ""
10586
10587 #. type: Plain text
10588 #: build/C/man2/ptrace.2:1868
10589 #, fuzzy
10590 #| msgid ""
10591 #| "On success, B<PTRACE_PEEK*> requests return the requested data, while "
10592 #| "other requests return zero.  On error, all requests return -1, and "
10593 #| "I<errno> is set appropriately.  Since the value returned by a successful "
10594 #| "B<PTRACE_PEEK*> request may be -1, the caller must check I<errno> after "
10595 #| "such requests to determine whether or not an error occurred."
10596 msgid ""
10597 "On error, all requests return -1, and I<errno> is set appropriately.  Since "
10598 "the value returned by a successful B<PTRACE_PEEK*> request may be -1, the "
10599 "caller must clear I<errno> before the call, and then check it afterward to "
10600 "determine whether or not an error occurred."
10601 msgstr ""
10602 "成功すると、 B<PTRACE_PEEK*> の場合は要求したデータを返し、 それ以外の場合は "
10603 "0 を返す。 エラーの場合は -1 を返し、 I<errno> が適切に設定される。 "
10604 "B<PTRACE_PEEK*> が成功して返す値も -1 になることがあるため、 そのような要求"
10605 "の場合には、呼び出し元は I<errno> を調べ、エラーか発生したのかどうかを判断し"
10606 "なければならない。"
10607
10608 #. type: Plain text
10609 #: build/C/man2/ptrace.2:1872
10610 msgid ""
10611 "(i386 only) There was an error with allocating or freeing a debug register."
10612 msgstr "(i386 のみ) デバッグレジスタの確保または解放でエラーが発生した。"
10613
10614 #. type: Plain text
10615 #: build/C/man2/ptrace.2:1883
10616 #, fuzzy
10617 #| msgid ""
10618 #| "There was an attempt to read from or write to an invalid area in the "
10619 #| "parent's or child's memory, probably because the area wasn't mapped or "
10620 #| "accessible.  Unfortunately, under Linux, different variations of this "
10621 #| "fault will return B<EIO> or B<EFAULT> more or less arbitrarily."
10622 msgid ""
10623 "There was an attempt to read from or write to an invalid area in the "
10624 "tracer's or the tracee's memory, probably because the area wasn't mapped or "
10625 "accessible.  Unfortunately, under Linux, different variations of this fault "
10626 "will return B<EIO> or B<EFAULT> more or less arbitrarily."
10627 msgstr ""
10628 "親プロセスまたは子プロセスのメモリの不正な領域に読み書きしようとした。 おそら"
10629 "くその領域がマッピングされていないか、 その領域へのアクセスが許されていないか"
10630 "である。 不運なことに、Linux ではこのようなエラーの場合、多かれ少なかれ 恣意"
10631 "的に B<EIO> を返したり B<EFAULT> を返したりすることがある。"
10632
10633 #. type: Plain text
10634 #: build/C/man2/ptrace.2:1886
10635 msgid "An attempt was made to set an invalid option."
10636 msgstr "不正なオプションを設定しようとした。"
10637
10638 #. type: Plain text
10639 #: build/C/man2/ptrace.2:1893
10640 #, fuzzy
10641 #| msgid ""
10642 #| "I<request> is invalid, or an attempt was made to read from or write to an "
10643 #| "invalid area in the parent's or child's memory, or there was a word-"
10644 #| "alignment violation, or an invalid signal was specified during a restart "
10645 #| "request."
10646 msgid ""
10647 "I<request> is invalid, or an attempt was made to read from or write to an "
10648 "invalid area in the tracer's or the tracee's memory, or there was a word-"
10649 "alignment violation, or an invalid signal was specified during a restart "
10650 "request."
10651 msgstr ""
10652 "I<request> が不正である。 または、親プロセスまたは子プロセスのメモリの 不正な"
10653 "領域に読み書きしようとした。 または、ワード境界違反があった。 または、実行再"
10654 "開の要求で不正なシグナルを指定した。"
10655
10656 #. type: Plain text
10657 #: build/C/man2/ptrace.2:1906
10658 #, fuzzy
10659 #| msgid ""
10660 #| "The specified process cannot be traced.  This could be because the parent "
10661 #| "has insufficient privileges (the required capability is "
10662 #| "B<CAP_SYS_PTRACE>); unprivileged processes cannot trace processes that "
10663 #| "they cannot send signals to or those running set-user-ID/set-group-ID "
10664 #| "programs, for obvious reasons.  Alternatively, the process may already be "
10665 #| "being traced, or be B<init>(8)  (PID 1)."
10666 msgid ""
10667 "The specified process cannot be traced.  This could be because the tracer "
10668 "has insufficient privileges (the required capability is B<CAP_SYS_PTRACE>); "
10669 "unprivileged processes cannot trace processes that they cannot send signals "
10670 "to or those running set-user-ID/set-group-ID programs, for obvious reasons.  "
10671 "Alternatively, the process may already be being traced, or (on kernels "
10672 "before 2.6.26) be B<init>(8)  (PID 1)."
10673 msgstr ""
10674 "指定したプロセスをトレースすることができない。これは親プロセスが 必要な権限 "
10675 "(必要なケーパビリティは B<CAP_SYS_PTRACE>)  を持っていないことが原因の場合が"
10676 "ある。 分かりやすい理由を挙げるなら、 非特権プロセスはシグナルを送ることがで"
10677 "きないプロセスをトレースできないし、 set-user-ID/set-group-ID プログラムを実"
10678 "行しているプロセスはトレースできない。 または、プロセスはすでにトレース中であ"
10679 "る、 または B<init>(8)  プロセス (PID が 1) である。"
10680
10681 #. type: Plain text
10682 #: build/C/man2/ptrace.2:1911
10683 #, fuzzy
10684 #| msgid ""
10685 #| "The specified process does not exist, or is not currently being traced by "
10686 #| "the caller, or is not stopped (for requests that require that)."
10687 msgid ""
10688 "The specified process does not exist, or is not currently being traced by "
10689 "the caller, or is not stopped (for requests that require a stopped tracee)."
10690 msgstr ""
10691 "指定したプロセスが存在しない。 または、指定したプロセスは呼び出したプロセス"
10692 "が 現在トレース中の子プロセスではない。 または、指定したプロセスが停止してい"
10693 "ない (停止していることが必要な要求の場合)。"
10694
10695 #. type: Plain text
10696 #: build/C/man2/ptrace.2:1913
10697 msgid "SVr4, 4.3BSD."
10698 msgstr "SVr4, 4.3BSD."
10699
10700 #. type: Plain text
10701 #: build/C/man2/ptrace.2:1928
10702 #, fuzzy
10703 #| msgid ""
10704 #| "Although arguments to B<ptrace>()  are interpreted according to the "
10705 #| "prototype given, glibc currently declares B<ptrace>()  as a variadic "
10706 #| "function with only the I<request> argument fixed.  This means that "
10707 #| "unneeded trailing arguments may be omitted, though doing so makes use of "
10708 #| "undocumented B<gcc>(1)  behavior."
10709 msgid ""
10710 "Although arguments to B<ptrace>()  are interpreted according to the "
10711 "prototype given, glibc currently declares B<ptrace>()  as a variadic "
10712 "function with only the I<request> argument fixed.  It is recommended to "
10713 "always supply four arguments, even if the requested operation does not use "
10714 "them, setting unused/ignored arguments to I<0L> or I<(void\\ *)\\ 0>."
10715 msgstr ""
10716 "B<ptrace>()  の引き数は上のようなプロトタイプに基づいて解釈されるが、 glibc "
10717 "では、現在のところ B<ptrace>()  は I<request> 引き数だけが固定の可変長引き数"
10718 "関数として 宣言されている。 これは必要なければ残りの引き数は省略可能であるこ"
10719 "とを意味するが、 それは B<gcc>(1)  の明文化されていない動作を利用していること"
10720 "になる。"
10721
10722 #. type: Plain text
10723 #: build/C/man2/ptrace.2:1940
10724 msgid ""
10725 "At the system call level, the B<PTRACE_PEEKTEXT>, B<PTRACE_PEEKDATA>, and "
10726 "B<PTRACE_PEEKUSER> requests have a different API: they store the result at "
10727 "the address specified by the I<data> parameter, and the return value is the "
10728 "error flag.  The glibc wrapper function provides the API given in "
10729 "DESCRIPTION above, with the result being returned via the function return "
10730 "value."
10731 msgstr ""
10732
10733 #.  See commit 00cd5c37afd5f431ac186dd131705048c0a11fdb
10734 #. type: Plain text
10735 #: build/C/man2/ptrace.2:1945
10736 msgid ""
10737 "In Linux kernels before 2.6.26, B<init>(8), the process with PID 1, may not "
10738 "be traced."
10739 msgstr ""
10740 "バージョン 2.6.26 より前の Linux カーネルでは、 B<init>(8) すなわち PID が 1 "
10741 "のプロセスはトレースすることができない。"
10742
10743 #.  See http://lkml.org/lkml/2008/5/8/375
10744 #. type: Plain text
10745 #: build/C/man2/ptrace.2:1952
10746 msgid ""
10747 "The layout of the contents of memory and the USER area are quite operating-"
10748 "system- and architecture-specific.  The offset supplied, and the data "
10749 "returned, might not entirely match with the definition of I<struct user>."
10750 msgstr ""
10751 "メモリや USER 領域の内容や配置はオペレーティングシステムごと、アーキテクチャ"
10752 "ごとに 非常に依存する。 オフセットが指定された場合、返されるデータは "
10753 "I<struct user> の定義と完全に一致しないこともありえる。"
10754
10755 #. type: Plain text
10756 #: build/C/man2/ptrace.2:1955
10757 msgid ""
10758 "The size of a \"word\" is determined by the operating-system variant (e.g., "
10759 "for 32-bit Linux it is 32 bits)."
10760 msgstr ""
10761 "「ワード (word) 」の大きさはオペレーティングシステムによって決まる。 (例え"
10762 "ば、32 ビットの Linux では 32 ビットである、など。)"
10763
10764 #. type: Plain text
10765 #: build/C/man2/ptrace.2:1963
10766 #, fuzzy
10767 #| msgid ""
10768 #| "This page documents the way the B<ptrace>()  call works currently in "
10769 #| "Linux.  Its behavior differs noticeably on other flavors of UNIX.  In any "
10770 #| "case, use of B<ptrace>()  is highly specific to the operating system and "
10771 #| "architecture."
10772 msgid ""
10773 "This page documents the way the B<ptrace>()  call works currently in Linux.  "
10774 "Its behavior differs significantly on other flavors of UNIX.  In any case, "
10775 "use of B<ptrace>()  is highly specific to the operating system and "
10776 "architecture."
10777 msgstr ""
10778 "このマニュアルは現在の Linux における B<ptrace>()  コールの動作について記述し"
10779 "ている。他の UNIX では その動作は著しく異なる。 いかなる場合も B<ptrace>()  "
10780 "を使うとオペレーションシステムやアーキテクチャに非常に依存したものになる。"
10781
10782 #. type: Plain text
10783 #: build/C/man2/ptrace.2:1974
10784 msgid ""
10785 "On hosts with 2.6 kernel headers, B<PTRACE_SETOPTIONS> is declared with a "
10786 "different value than the one for 2.4.  This leads to applications compiled "
10787 "with 2.6 kernel headers failing when run on 2.4 kernels.  This can be worked "
10788 "around by redefining B<PTRACE_SETOPTIONS> to B<PTRACE_OLDSETOPTIONS>, if "
10789 "that is defined."
10790 msgstr ""
10791 "カーネル 2.6 のヘッダがインストールされたホストでは、 B<PTRACE_SETOPTIONS> は"
10792 "カーネル 2.4 のヘッダとは異なる値で宣言される。 このため、カーネル 2.6 のヘッ"
10793 "ダでコンパイルされたアプリケーションは カーネル 2.4 では正しく動作しない。 こ"
10794 "の問題は、 B<PTRACE_SETOPTIONS> が定義されていた際は、 B<PTRACE_SETOPTIONS> "
10795 "を B<PTRACE_OLDSETOPTIONS> に定義し直すことで対処できる。"
10796
10797 #. type: Plain text
10798 #: build/C/man2/ptrace.2:1977
10799 msgid ""
10800 "Group-stop notifications are sent to the tracer, but not to real parent.  "
10801 "Last confirmed on 2.6.38.6."
10802 msgstr ""
10803
10804 #.  Note from Denys Vlasenko:
10805 #.      Here "exits" means any kind of death - _exit, exit_group,
10806 #.      signal death. Signal death and exit_group cases are trivial,
10807 #.      though: since signal death and exit_group kill all other threads
10808 #.      too, "until all other threads exit" thing happens rather soon
10809 #.      in these cases. Therefore, only _exit presents observably
10810 #.      puzzling behavior to ptrace users: thread leader _exit's,
10811 #.      but WIFEXITED isn't reported! We are trying to explain here
10812 #.      why it is so.
10813 #.   FIXME: ^^^ need to test/verify this scenario
10814 #. type: Plain text
10815 #: build/C/man2/ptrace.2:2008
10816 msgid ""
10817 "If a thread group leader is traced and exits by calling B<_exit>(2), a "
10818 "B<PTRACE_EVENT_EXIT> stop will happen for it (if requested), but the "
10819 "subsequent B<WIFEXITED> notification will not be delivered until all other "
10820 "threads exit.  As explained above, if one of other threads calls "
10821 "B<execve>(2), the death of the thread group leader will I<never> be "
10822 "reported.  If the execed thread is not traced by this tracer, the tracer "
10823 "will never know that B<execve>(2)  happened.  One possible workaround is to "
10824 "B<PTRACE_DETACH> the thread group leader instead of restarting it in this "
10825 "case.  Last confirmed on 2.6.38.6."
10826 msgstr ""
10827
10828 #. type: Plain text
10829 #: build/C/man2/ptrace.2:2018
10830 msgid ""
10831 "A B<SIGKILL> signal may still cause a B<PTRACE_EVENT_EXIT> stop before "
10832 "actual signal death.  This may be changed in the future; B<SIGKILL> is meant "
10833 "to always immediately kill tasks even under ptrace.  Last confirmed on "
10834 "2.6.38.6."
10835 msgstr ""
10836
10837 #. type: Plain text
10838 #: build/C/man2/ptrace.2:2036
10839 msgid ""
10840 "Some system calls return with B<EINTR> if a signal was sent to a tracee, but "
10841 "delivery was suppressed by the tracer.  (This is very typical operation: it "
10842 "is usually done by debuggers on every attach, in order to not introduce a "
10843 "bogus B<SIGSTOP>).  As of Linux 3.2.9, the following system calls are "
10844 "affected (this list is likely incomplete): B<epoll_wait>(2), and B<read>(2)  "
10845 "from an B<inotify>(7)  file descriptor.  The usual symptom of this bug is "
10846 "that when you attach to a quiescent process with the command"
10847 msgstr ""
10848
10849 #. type: Plain text
10850 #: build/C/man2/ptrace.2:2038
10851 #, no-wrap
10852 msgid "    strace -p E<lt>process-IDE<gt>\n"
10853 msgstr ""
10854
10855 #. type: Plain text
10856 #: build/C/man2/ptrace.2:2041
10857 msgid "then, instead of the usual and expected one-line output such as"
10858 msgstr ""
10859
10860 #. type: Plain text
10861 #: build/C/man2/ptrace.2:2044
10862 #, no-wrap
10863 msgid "    restart_syscall(E<lt>... resuming interrupted call ...E<gt>_\n"
10864 msgstr ""
10865
10866 #. type: Plain text
10867 #: build/C/man2/ptrace.2:2050
10868 #, no-wrap
10869 msgid "    select(6, [5], NULL, [5], NULL_\n"
10870 msgstr ""
10871
10872 #. type: Plain text
10873 #: build/C/man2/ptrace.2:2054
10874 msgid ""
10875 "('_' denotes the cursor position), you observe more than one line.  For "
10876 "example:"
10877 msgstr ""
10878
10879 #. type: Plain text
10880 #: build/C/man2/ptrace.2:2058
10881 #, no-wrap
10882 msgid ""
10883 "    clock_gettime(CLOCK_MONOTONIC, {15370, 690928118}) = 0\n"
10884 "    epoll_wait(4,_\n"
10885 msgstr ""
10886
10887 #. type: Plain text
10888 #: build/C/man2/ptrace.2:2079
10889 msgid ""
10890 "What is not visible here is that the process was blocked in "
10891 "B<epoll_wait>(2)  before B<strace>(1)  has attached to it.  Attaching caused "
10892 "B<epoll_wait>(2)  to return to user space with the error B<EINTR>.  In this "
10893 "particular case, the program reacted to B<EINTR> by checking the current "
10894 "time, and then executing B<epoll_wait>(2)  again.  (Programs which do not "
10895 "expect such \"stray\" B<EINTR> errors may behave in an unintended way upon "
10896 "an B<strace>(1)  attach.)"
10897 msgstr ""
10898
10899 #. type: Plain text
10900 #: build/C/man2/ptrace.2:2093
10901 msgid ""
10902 "B<gdb>(1), B<strace>(1), B<clone>(2), B<execve>(2), B<fork>(2), "
10903 "B<gettid>(2), B<sigaction>(2), B<tgkill>(2), B<vfork>(2), B<waitpid>(2), "
10904 "B<exec>(3), B<capabilities>(7), B<signal>(7)"
10905 msgstr ""
10906 "B<gdb>(1), B<strace>(1), B<clone>(2), B<execve>(2), B<fork>(2),\n"
10907 "B<gettid>(2), B<sigaction>(2), B<tgkill>(2), B<vfork>(2),\n"
10908 "B<waitpid>(2), B<exec>(3), B<capabilities>(7), B<signal>(7)"
10909
10910 #. type: TH
10911 #: build/C/man2/quotactl.2:27
10912 #, no-wrap
10913 msgid "QUOTACTL"
10914 msgstr "QUOTACTL"
10915
10916 #. type: TH
10917 #: build/C/man2/quotactl.2:27
10918 #, no-wrap
10919 msgid "2010-06-16"
10920 msgstr "2010-06-16"
10921
10922 #. type: Plain text
10923 #: build/C/man2/quotactl.2:30
10924 msgid "quotactl - manipulate disk quotas"
10925 msgstr "quotactl - ディスク quota を操作する"
10926
10927 #. type: Plain text
10928 #: build/C/man2/quotactl.2:34
10929 #, no-wrap
10930 msgid ""
10931 "B<#include E<lt>sys/quota.hE<gt>>\n"
10932 "B<#include E<lt>xfs/xqm.hE<gt>>\n"
10933 msgstr ""
10934 "B<#include E<lt>sys/quota.hE<gt>>\n"
10935 "B<#include E<lt>xfs/xqm.hE<gt>>\n"
10936
10937 #. type: Plain text
10938 #: build/C/man2/quotactl.2:37
10939 #, no-wrap
10940 msgid "B<int quotactl(int >I<cmd>B<, const char *>I<special>B<, int >I<id>B<, caddr_t >I<addr>B<);>\n"
10941 msgstr "B<int quotactl(int >I<cmd>B<, const char *>I<special>B<, int >I<id>B<, caddr_t >I<addr>B<);>\n"
10942
10943 #. type: Plain text
10944 #: build/C/man2/quotactl.2:49
10945 #, fuzzy
10946 #| msgid ""
10947 #| "The quota system defines for each user and/or group a soft limit and a "
10948 #| "hard limit bounding the amount of disk space that can be used on a given "
10949 #| "file system.  The hard limit cannot be crossed.  The soft limit can be "
10950 #| "crossed, but warnings will ensue.  Moreover, the user cannot be above the "
10951 #| "soft limit for more than one week (by default)  at a time: after this "
10952 #| "week the soft limit counts as hard limit."
10953 msgid ""
10954 "The quota system can be used to set per-user and per-group limits on the "
10955 "amount of disk space used on a filesystem.  For each user and/or group, a "
10956 "soft limit and a hard limit can be set for each filesystem.  The hard limit "
10957 "can't be exceeded.  The soft limit can be exceeded, but warnings will "
10958 "ensue.  Moreover, the user can't exceed the soft limit for more than one "
10959 "week (by default) at a time; after this time, the soft limit counts as a "
10960 "hard limit."
10961 msgstr ""
10962 "quota システムは、各々のユーザ及び/またはグループに対して、 ソフト・リミット"
10963 "及びハード・リミットを定める。これはあるファイル・システムで 使用する事が出来"
10964 "るディスク容量を制限する。 ハード・リミットは超過することは出来ない。 ソフ"
10965 "ト・リミットは超過する事が出来るが、警告が発せられる。 更に、(デフォルトで"
10966 "は) 一週間以上ソフト・リミットを超過したままに しておく事はできない: 一週間経"
10967 "過した後はハード・リミットを超過したと みなされる。"
10968
10969 #. type: Plain text
10970 #: build/C/man2/quotactl.2:74
10971 #, fuzzy
10972 #| msgid ""
10973 #| "The B<quotactl>()  system call manipulates these quota.  Its first "
10974 #| "argument is of the form B<QCMD(>I<subcmd>B<,>I<type>B<)> where I<type> is "
10975 #| "either B<USRQUOTA> or B<GRPQUOTA> (for user quota and group quota, "
10976 #| "respectively), and I<subcmd> is described below."
10977 msgid ""
10978 "The B<quotactl>()  call manipulates disk quotas.  The I<cmd> argument "
10979 "indicates a command to be applied to the user or group ID specified in "
10980 "I<id>.  To initialize the I<cmd> argument, use the I<QCMD(subcmd, type)> "
10981 "macro.  The I<type> value is either B<USRQUOTA>, for user quotas, or "
10982 "B<GRPQUOTA>, for group quotas.  The I<subcmd> value is described below."
10983 msgstr ""
10984 "B<quotactl>()  システムコールはこれらの quota に対する操作を行なう。 最初の引"
10985 "き数は B<QCMD(>I<subcmd>B<,>I<type>B<)> という形式である。 I<type> には、ユー"
10986 "ザー quota については B<USRQUOTA> を、グループ quota については B<GRPQUOTA> "
10987 "を指定する。 I<subcmd> は以下で説明する。"
10988
10989 #. type: Plain text
10990 #: build/C/man2/quotactl.2:79
10991 msgid ""
10992 "The I<special> argument is a pointer to a null-terminated string containing "
10993 "the pathname of the (mounted) block special device for the filesystem being "
10994 "manipulated."
10995 msgstr ""
10996
10997 #. type: Plain text
10998 #: build/C/man2/quotactl.2:87
10999 msgid ""
11000 "The I<addr> argument is the address of an optional, command-specific, data "
11001 "structure that is copied in or out of the system.  The interpretation of "
11002 "I<addr> is given with each command below."
11003 msgstr ""
11004
11005 #. type: Plain text
11006 #: build/C/man2/quotactl.2:91
11007 msgid "The I<subcmd> value is one of the following:"
11008 msgstr "I<subcmd> の値は以下のいずれかである"
11009
11010 #. type: TP
11011 #: build/C/man2/quotactl.2:91
11012 #, no-wrap
11013 msgid "B<Q_QUOTAON>"
11014 msgstr "B<Q_QUOTAON>"
11015
11016 #. type: Plain text
11017 #: build/C/man2/quotactl.2:98
11018 msgid ""
11019 "Turn on quotas for a filesystem.  The I<id> argument is the identification "
11020 "number of the quota format to be used.  Currently, there are three supported "
11021 "quota formats:"
11022 msgstr ""
11023
11024 #. type: TP
11025 #: build/C/man2/quotactl.2:99
11026 #, no-wrap
11027 msgid "B<QFMT_VFS_OLD>"
11028 msgstr ""
11029
11030 #. type: Plain text
11031 #: build/C/man2/quotactl.2:102
11032 msgid "The original quota format."
11033 msgstr ""
11034
11035 #. type: TP
11036 #: build/C/man2/quotactl.2:102
11037 #, no-wrap
11038 msgid "B<QFMT_VFS_V0>"
11039 msgstr ""
11040
11041 #. type: Plain text
11042 #: build/C/man2/quotactl.2:106
11043 msgid ""
11044 "The standard VFS v0 quota format, which can handle 32-bit UIDs and GIDs and "
11045 "quota limits up to 2^42 bytes and 2^32 inodes."
11046 msgstr ""
11047
11048 #. type: TP
11049 #: build/C/man2/quotactl.2:106
11050 #, no-wrap
11051 msgid "B<QFMT_VFS_V1>"
11052 msgstr ""
11053
11054 #. type: Plain text
11055 #: build/C/man2/quotactl.2:110
11056 msgid ""
11057 "A quota format that can handle 32-bit UIDs and GIDs and quota limits of 2^64 "
11058 "bytes and 2^64 inodes."
11059 msgstr ""
11060
11061 #. type: Plain text
11062 #: build/C/man2/quotactl.2:121
11063 msgid ""
11064 "The I<addr> argument points to the pathname of a file containing the quotas "
11065 "for the filesystem.  The quota file must exist; it is normally created with "
11066 "the B<quotacheck>(8)  program.  This operation requires privilege "
11067 "(B<CAP_SYS_ADMIN>)."
11068 msgstr ""
11069
11070 #. type: TP
11071 #: build/C/man2/quotactl.2:121
11072 #, no-wrap
11073 msgid "B<Q_QUOTAOFF>"
11074 msgstr "B<Q_QUOTAOFF>"
11075
11076 #. type: Plain text
11077 #: build/C/man2/quotactl.2:131
11078 msgid ""
11079 "Turn off quotas for a filesystem.  The I<addr> and I<id> arguments are "
11080 "ignored.  This operation requires privilege (B<CAP_SYS_ADMIN>)."
11081 msgstr ""
11082
11083 #. type: TP
11084 #: build/C/man2/quotactl.2:131
11085 #, no-wrap
11086 msgid "B<Q_GETQUOTA>"
11087 msgstr "B<Q_GETQUOTA>"
11088
11089 #. type: Plain text
11090 #: build/C/man2/quotactl.2:142
11091 #, fuzzy
11092 #| msgid ""
11093 #| "Get limits and current usage of disk space.  The I<addr> argument is a "
11094 #| "pointer to a dqblk structure (defined in I<E<lt>sys/quota.hE<gt>>)."
11095 msgid ""
11096 "Get disk quota limits and current usage for user or group I<id>.  The "
11097 "I<addr> argument is a pointer to a I<dqblk> structure defined in I<E<lt>sys/"
11098 "quota.hE<gt>> as follows:"
11099 msgstr ""
11100 "ディスク使用量の制限値と現在の使用量を得る。 I<addr> 引き数は (I<E<lt>sys/"
11101 "quota.hE<gt>> で定義された) dqblk 構造体を指すポインタである。"
11102
11103 #. type: Plain text
11104 #: build/C/man2/quotactl.2:147 build/C/man2/quotactl.2:234
11105 #, no-wrap
11106 msgid ""
11107 "/* uint64_t is an unsigned 64-bit integer;\n"
11108 "   uint32_t is an unsigned 32-bit integer */\n"
11109 msgstr ""
11110
11111 #. type: Plain text
11112 #: build/C/man2/quotactl.2:167
11113 #, no-wrap
11114 msgid ""
11115 "struct dqblk {          /* Definition since Linux 2.4.22 */\n"
11116 "    uint64_t dqb_bhardlimit;   /* absolute limit on disk\n"
11117 "                                  quota blocks alloc */\n"
11118 "    uint64_t dqb_bsoftlimit;   /* preferred limit on\n"
11119 "                                  disk quota blocks */\n"
11120 "    uint64_t dqb_curspace;     /* current quota block\n"
11121 "                                  count */\n"
11122 "    uint64_t dqb_ihardlimit;   /* maximum number of\n"
11123 "                                  allocated inodes */\n"
11124 "    uint64_t dqb_isoftlimit;   /* preferred inode limit */\n"
11125 "    uint64_t dqb_curinodes;    /* current number of\n"
11126 "                                  allocated inodes */\n"
11127 "    uint64_t dqb_btime;        /* time limit for excessive\n"
11128 "                                  disk use */\n"
11129 "    uint64_t dqb_itime;        /* time limit for excessive\n"
11130 "                                  files */\n"
11131 "    uint32_t dqb_valid;        /* bit mask of QIF_*\n"
11132 "                                  constants */\n"
11133 "};\n"
11134 msgstr ""
11135
11136 #. type: Plain text
11137 #: build/C/man2/quotactl.2:170
11138 #, no-wrap
11139 msgid ""
11140 "/* Flags in dqb_valid that indicate which fields in\n"
11141 "   dqblk structure are valid. */\n"
11142 msgstr ""
11143
11144 #. type: Plain text
11145 #: build/C/man2/quotactl.2:181
11146 #, no-wrap
11147 msgid ""
11148 "#define QIF_BLIMITS   1\n"
11149 "#define QIF_SPACE     2\n"
11150 "#define QIF_ILIMITS   4\n"
11151 "#define QIF_INODES    8\n"
11152 "#define QIF_BTIME     16\n"
11153 "#define QIF_ITIME     32\n"
11154 "#define QIF_LIMITS    (QIF_BLIMITS | QIF_ILIMITS)\n"
11155 "#define QIF_USAGE     (QIF_SPACE | QIF_INODES)\n"
11156 "#define QIF_TIMES     (QIF_BTIME | QIF_ITIME)\n"
11157 "#define QIF_ALL       (QIF_LIMITS | QIF_USAGE | QIF_TIMES)\n"
11158 msgstr ""
11159
11160 #. type: Plain text
11161 #: build/C/man2/quotactl.2:198
11162 msgid ""
11163 "The I<dqb_valid> field is a bit mask that is set to indicate the entries in "
11164 "the I<dqblk> structure that are valid.  Currently, the kernel fills in all "
11165 "entries of the I<dqblk> structure and marks them as valid in the "
11166 "I<dqb_valid> field.  Unprivileged users may retrieve only their own quotas; "
11167 "a privileged user (B<CAP_SYS_ADMIN>)  can retrieve the quotas of any user."
11168 msgstr ""
11169
11170 #. type: TP
11171 #: build/C/man2/quotactl.2:198
11172 #, no-wrap
11173 msgid "B<Q_SETQUOTA>"
11174 msgstr "B<Q_SETQUOTA>"
11175
11176 #. type: Plain text
11177 #: build/C/man2/quotactl.2:218
11178 msgid ""
11179 "Set quota information for user or group I<id>, using the information "
11180 "supplied in the I<dqblk> structure pointed to by I<addr>.  The I<dqb_valid> "
11181 "field of the I<dqblk> structure indicates which entries in the structure "
11182 "have been set by the caller.  This operation supersedes the B<Q_SETQLIM> and "
11183 "B<Q_SETUSE> operations in the previous quota interfaces.  This operation "
11184 "requires privilege (B<CAP_SYS_ADMIN>)."
11185 msgstr ""
11186
11187 #. type: TP
11188 #: build/C/man2/quotactl.2:218
11189 #, no-wrap
11190 msgid "B<Q_GETINFO>"
11191 msgstr "B<Q_GETINFO>"
11192
11193 #. type: Plain text
11194 #: build/C/man2/quotactl.2:229
11195 #, fuzzy
11196 #| msgid ""
11197 #| "Get limits and current usage of disk space.  The I<addr> argument is a "
11198 #| "pointer to a dqblk structure (defined in I<E<lt>sys/quota.hE<gt>>)."
11199 msgid ""
11200 "Get information (like grace times) about quotafile.  The I<addr> argument "
11201 "should be a pointer to a I<dqinfo> structure.  This structure is defined in "
11202 "I<E<lt>sys/quota.hE<gt>> as follows:"
11203 msgstr ""
11204 "ディスク使用量の制限値と現在の使用量を得る。 I<addr> 引き数は (I<E<lt>sys/"
11205 "quota.hE<gt>> で定義された) dqblk 構造体を指すポインタである。"
11206
11207 #. type: Plain text
11208 #: build/C/man2/quotactl.2:238
11209 #, no-wrap
11210 msgid ""
11211 "struct dqinfo {         /* Defined since kernel 2.4.22 */\n"
11212 "    uint64_t dqi_bgrace;    /* Time before block soft limit\n"
11213 "                               becomes hard limit */\n"
11214 msgstr ""
11215 "struct dqinfo {         /* Defined since kernel 2.4.22 */\n"
11216 "    uint64_t dqi_bgrace;    /* Time before block soft limit\n"
11217 "                               becomes hard limit */\n"
11218
11219 #. type: Plain text
11220 #: build/C/man2/quotactl.2:245
11221 #, no-wrap
11222 msgid ""
11223 "    uint64_t dqi_igrace;    /* Time before inode soft limit\n"
11224 "                               becomes hard limit */\n"
11225 "    uint32_t dqi_flags;     /* Flags for quotafile\n"
11226 "                               (DQF_*) */\n"
11227 "    uint32_t dqi_valid;\n"
11228 "};\n"
11229 msgstr ""
11230 "    uint64_t dqi_igrace;    /* Time before inode soft limit\n"
11231 "                               becomes hard limit */\n"
11232 "    uint32_t dqi_flags;     /* Flags for quotafile\n"
11233 "                               (DQF_*) */\n"
11234 "    uint32_t dqi_valid;\n"
11235 "};\n"
11236
11237 #. type: Plain text
11238 #: build/C/man2/quotactl.2:247
11239 #, no-wrap
11240 msgid "/* Bits for dqi_flags */\n"
11241 msgstr "/* Bits for dqi_flags */\n"
11242
11243 #. type: Plain text
11244 #: build/C/man2/quotactl.2:249
11245 #, no-wrap
11246 msgid "/* Quota format QFMT_VFS_OLD */\n"
11247 msgstr "/* Quota format QFMT_VFS_OLD */\n"
11248
11249 #. type: Plain text
11250 #: build/C/man2/quotactl.2:251
11251 #, no-wrap
11252 msgid "#define V1_DQF_RSQUASH\t1   /* Root squash enabled */\n"
11253 msgstr "#define V1_DQF_RSQUASH\t1   /* Root squash enabled */\n"
11254
11255 #. type: Plain text
11256 #: build/C/man2/quotactl.2:253
11257 #, no-wrap
11258 msgid "/* Other quota formats have no dqi_flags bits defined */\n"
11259 msgstr "/* Other quota formats have no dqi_flags bits defined */\n"
11260
11261 #. type: Plain text
11262 #: build/C/man2/quotactl.2:256
11263 #, no-wrap
11264 msgid ""
11265 "/* Flags in dqi_valid that indicate which fields in\n"
11266 "   dqinfo structure are valid. */\n"
11267 msgstr ""
11268 "/* Flags in dqi_valid that indicate which fields in\n"
11269 "   dqinfo structure are valid. */\n"
11270
11271 #. type: Plain text
11272 #: build/C/man2/quotactl.2:261
11273 #, no-wrap
11274 msgid ""
11275 "# define IIF_BGRACE\t1\n"
11276 "# define IIF_IGRACE\t2\n"
11277 "# define IIF_FLAGS\t4\n"
11278 "# define IIF_ALL        (IIF_BGRACE | IIF_IGRACE | IIF_FLAGS)\n"
11279 msgstr ""
11280 "# define IIF_BGRACE\t1\n"
11281 "# define IIF_IGRACE\t2\n"
11282 "# define IIF_FLAGS\t4\n"
11283 "# define IIF_ALL        (IIF_BGRACE | IIF_IGRACE | IIF_FLAGS)\n"
11284
11285 #. type: Plain text
11286 #: build/C/man2/quotactl.2:277
11287 msgid ""
11288 "The I<dqi_valid> field in the I<dqinfo> structure indicates the entries in "
11289 "the structure that are valid.  Currently, the kernel fills in all entries of "
11290 "the I<dqinfo> structure and marks them all as valid in the I<dqi_valid> "
11291 "field.  The I<id> argument is ignored."
11292 msgstr ""
11293
11294 #. type: TP
11295 #: build/C/man2/quotactl.2:277
11296 #, no-wrap
11297 msgid "B<Q_SETINFO>"
11298 msgstr "B<Q_SETINFO>"
11299
11300 #. type: Plain text
11301 #: build/C/man2/quotactl.2:301
11302 msgid ""
11303 "Set information about quotafile.  The I<addr> argument should be a pointer "
11304 "to a I<dqinfo> structure.  The I<dqi_valid> field of the I<dqinfo> structure "
11305 "indicates the entries in the structure that have been set by the caller.  "
11306 "This operation supersedes the B<Q_SETGRACE> and B<Q_SETFLAGS> operations in "
11307 "the previous quota interfaces.  The I<id> argument is ignored.  This "
11308 "operation requires privilege (B<CAP_SYS_ADMIN>)."
11309 msgstr ""
11310
11311 #. type: TP
11312 #: build/C/man2/quotactl.2:301
11313 #, no-wrap
11314 msgid "B<Q_GETFMT>"
11315 msgstr "B<Q_GETFMT>"
11316
11317 #. type: Plain text
11318 #: build/C/man2/quotactl.2:308
11319 msgid ""
11320 "Get quota format used on the specified filesystem.  The I<addr> argument "
11321 "should be a pointer to a 4-byte buffer where the format number will be "
11322 "stored."
11323 msgstr ""
11324
11325 #. type: TP
11326 #: build/C/man2/quotactl.2:308
11327 #, no-wrap
11328 msgid "B<Q_SYNC>"
11329 msgstr "B<Q_SYNC>"
11330
11331 #. type: Plain text
11332 #: build/C/man2/quotactl.2:319
11333 msgid ""
11334 "Update the on-disk copy of quota usages for a filesystem.  If I<special> is "
11335 "NULL, then all filesystems with active quotas are sync'ed.  The I<addr> and "
11336 "I<id> arguments are ignored."
11337 msgstr ""
11338
11339 #. type: TP
11340 #: build/C/man2/quotactl.2:319
11341 #, no-wrap
11342 msgid "B<Q_GETSTATS>"
11343 msgstr "B<Q_GETSTATS>"
11344
11345 #.  Q_GETSTATS was removed in kernel 2.4.22.
11346 #. type: Plain text
11347 #: build/C/man2/quotactl.2:339
11348 msgid ""
11349 "Get statistics and other generic information about the quota subsystem.  The "
11350 "I<addr> argument should be a pointer to a I<dqstats> structure in which data "
11351 "should be stored.  This structure is defined in I<E<lt>sys/quota.hE<gt>>.  "
11352 "The I<special> and I<id> arguments are ignored.  This operation is obsolete "
11353 "and not supported by recent kernels.  Files in I</proc/sys/fs/quota/> carry "
11354 "the information instead."
11355 msgstr ""
11356
11357 #. type: Plain text
11358 #: build/C/man2/quotactl.2:342
11359 msgid ""
11360 "For XFS filesystems making use of the XFS Quota Manager (XQM), the above "
11361 "commands are bypassed and the following commands are used:"
11362 msgstr ""
11363
11364 #. type: TP
11365 #: build/C/man2/quotactl.2:342
11366 #, no-wrap
11367 msgid "B<Q_XQUOTAON>"
11368 msgstr "B<Q_XQUOTAON>"
11369
11370 #. type: Plain text
11371 #: build/C/man2/quotactl.2:363
11372 msgid ""
11373 "Turn on quotas for an XFS filesystem.  XFS provides the ability to turn on/"
11374 "off quota limit enforcement with quota accounting.  Therefore, XFS expects "
11375 "I<addr> to be a pointer to an I<unsigned int> that contains either the flags "
11376 "B<XFS_QUOTA_UDQ_ACCT> and/or B<XFS_QUOTA_UDQ_ENFD> (for user quota), or "
11377 "B<XFS_QUOTA_GDQ_ACCT> and/or B<XFS_QUOTA_GDQ_ENFD> (for group quota), as "
11378 "defined in I<E<lt>xfs/xqm.hE<gt>>.  This operation requires privilege "
11379 "(B<CAP_SYS_ADMIN>)."
11380 msgstr ""
11381
11382 #. type: TP
11383 #: build/C/man2/quotactl.2:363
11384 #, no-wrap
11385 msgid "B<Q_XQUOTAOFF>"
11386 msgstr "B<Q_XQUOTAOFF>"
11387
11388 #. type: Plain text
11389 #: build/C/man2/quotactl.2:374
11390 msgid ""
11391 "Turn off quotas for an XFS filesystem.  As with B<Q_QUOTAON>, XFS "
11392 "filesystems expect a pointer to an I<unsigned int> that specifies whether "
11393 "quota accounting and/or limit enforcement need to be turned off.  This "
11394 "operation requires privilege (B<CAP_SYS_ADMIN>)."
11395 msgstr ""
11396
11397 #. type: TP
11398 #: build/C/man2/quotactl.2:374
11399 #, no-wrap
11400 msgid "B<Q_XGETQUOTA>"
11401 msgstr "B<Q_XGETQUOTA>"
11402
11403 #. type: Plain text
11404 #: build/C/man2/quotactl.2:388
11405 msgid ""
11406 "Get disk quota limits and current usage for user I<id>.  The I<addr> "
11407 "argument is a pointer to an I<fs_disk_quota> structure (defined in "
11408 "I<E<lt>xfs/xqm.hE<gt>>).  Unprivileged users may retrieve only their own "
11409 "quotas; a privileged user (B<CAP_SYS_ADMIN>)  may retrieve the quotas of any "
11410 "user."
11411 msgstr ""
11412
11413 #. type: TP
11414 #: build/C/man2/quotactl.2:388
11415 #, no-wrap
11416 msgid "B<Q_XSETQLIM>"
11417 msgstr "B<Q_XSETQLIM>"
11418
11419 #. type: Plain text
11420 #: build/C/man2/quotactl.2:400
11421 msgid ""
11422 "Set disk quota limits for user I<id>.  The I<addr> argument is a pointer to "
11423 "an I<fs_disk_quota> structure (defined in I<E<lt>xfs/xqm.hE<gt>>).  This "
11424 "operation requires privilege (B<CAP_SYS_ADMIN>)."
11425 msgstr ""
11426
11427 #. type: TP
11428 #: build/C/man2/quotactl.2:400
11429 #, no-wrap
11430 msgid "B<Q_XGETQSTAT>"
11431 msgstr "B<Q_XGETQSTAT>"
11432
11433 #. type: Plain text
11434 #: build/C/man2/quotactl.2:408
11435 msgid ""
11436 "Returns an I<fs_quota_stat> structure containing XFS filesystem-specific "
11437 "quota information.  This is useful for finding out how much space is used to "
11438 "store quota information, and also to get quotaon/off status of a given local "
11439 "XFS filesystem."
11440 msgstr ""
11441
11442 #. type: TP
11443 #: build/C/man2/quotactl.2:408
11444 #, no-wrap
11445 msgid "B<Q_XQUOTARM>"
11446 msgstr "B<Q_XQUOTARM>"
11447
11448 #. type: Plain text
11449 #: build/C/man2/quotactl.2:412
11450 msgid ""
11451 "Free the disk space taken by disk quotas.  Quotas must have already been "
11452 "turned off."
11453 msgstr ""
11454
11455 #. type: Plain text
11456 #: build/C/man2/quotactl.2:419
11457 msgid ""
11458 "There is no command equivalent to B<Q_SYNC> for XFS since B<sync>(1)  writes "
11459 "quota information to disk (in addition to the other filesystem metadata that "
11460 "it writes out)."
11461 msgstr ""
11462
11463 #. type: Plain text
11464 #: build/C/man2/quotactl.2:427
11465 msgid ""
11466 "On success, B<quotactl>()  returns 0; on error -1 is returned, and I<errno> "
11467 "is set to indicate the error."
11468 msgstr ""
11469 "成功すると、 B<quotactl>()  は 0 を返す。\n"
11470 "エラーの場合、-1 を返し、 I<errno> をエラーを示す値に設定する。"
11471
11472 #. type: Plain text
11473 #: build/C/man2/quotactl.2:434
11474 msgid "I<addr> or I<special> is invalid."
11475 msgstr ""
11476
11477 #. type: Plain text
11478 #: build/C/man2/quotactl.2:440
11479 msgid "I<cmd> or I<type> is invalid."
11480 msgstr ""
11481
11482 #. type: Plain text
11483 #: build/C/man2/quotactl.2:447
11484 msgid "The file specified by I<special> or I<addr> does not exist."
11485 msgstr ""
11486
11487 #. type: Plain text
11488 #: build/C/man2/quotactl.2:452
11489 msgid "The kernel has not been compiled with the B<CONFIG_QUOTA> option."
11490 msgstr ""
11491
11492 #. type: TP
11493 #: build/C/man2/quotactl.2:452
11494 #, no-wrap
11495 msgid "B<ENOTBLK>"
11496 msgstr "B<ENOTBLK>"
11497
11498 #. type: Plain text
11499 #: build/C/man2/quotactl.2:456
11500 msgid "I<special> is not a block device."
11501 msgstr "I<special> がブロックデバイスではない。"
11502
11503 #. type: Plain text
11504 #: build/C/man2/quotactl.2:461
11505 msgid ""
11506 "The caller lacked the required privilege (B<CAP_SYS_ADMIN>)  for the "
11507 "specified operation."
11508 msgstr ""
11509
11510 #. type: Plain text
11511 #: build/C/man2/quotactl.2:465
11512 msgid ""
11513 "No disk quota is found for the indicated user.  Quotas have not been turned "
11514 "on for this filesystem."
11515 msgstr ""
11516
11517 #. type: Plain text
11518 #: build/C/man2/quotactl.2:474
11519 msgid "If I<cmd> is B<Q_SETQUOTA>, B<quotactl>()  may also set I<errno> to:"
11520 msgstr ""
11521
11522 #. type: Plain text
11523 #: build/C/man2/quotactl.2:477
11524 msgid "Specified limits are out of range allowed by quota format."
11525 msgstr ""
11526
11527 #. type: Plain text
11528 #: build/C/man2/quotactl.2:486
11529 msgid "If I<cmd> is B<Q_QUOTAON>, B<quotactl>()  may also set I<errno> to:"
11530 msgstr ""
11531
11532 #. type: Plain text
11533 #: build/C/man2/quotactl.2:495
11534 msgid ""
11535 "The quota file pointed to by I<addr> exists, but is not a regular file; or, "
11536 "the quota file pointed to by I<addr> exists, but is not on the filesystem "
11537 "pointed to by I<special>."
11538 msgstr ""
11539
11540 #. type: Plain text
11541 #: build/C/man2/quotactl.2:501
11542 msgid ""
11543 "B<Q_QUOTAON> attempted, but another B<Q_QUOTAON> had already been performed."
11544 msgstr ""
11545
11546 #. type: Plain text
11547 #: build/C/man2/quotactl.2:504
11548 msgid "The quota file is corrupted."
11549 msgstr "quota ファイルが壊れている。"
11550
11551 #. type: Plain text
11552 #: build/C/man2/quotactl.2:507
11553 msgid "Specified quota format was not found."
11554 msgstr ""
11555
11556 #. type: Plain text
11557 #: build/C/man2/quotactl.2:512
11558 msgid "B<quota>(1), B<getrlimit>(2), B<quotacheck>(8), B<quotaon>(8)"
11559 msgstr "B<quota>(1), B<getrlimit>(2), B<quotacheck>(8), B<quotaon>(8)"
11560
11561 #. type: TH
11562 #: build/C/man2/sendfile.2:19
11563 #, no-wrap
11564 msgid "SENDFILE"
11565 msgstr "SENDFILE"
11566
11567 #. type: TH
11568 #: build/C/man2/sendfile.2:19
11569 #, no-wrap
11570 msgid "2011-09-14"
11571 msgstr "2011-09-14"
11572
11573 #. type: Plain text
11574 #: build/C/man2/sendfile.2:22
11575 msgid "sendfile - transfer data between file descriptors"
11576 msgstr "sendfile - ファイル・ディスクリプタ間でデータを転送する"
11577
11578 #. type: Plain text
11579 #: build/C/man2/sendfile.2:24
11580 msgid "B<#include E<lt>sys/sendfile.hE<gt>>"
11581 msgstr "B<#include E<lt>sys/sendfile.hE<gt>>"
11582
11583 #.  The below is too ugly. Comments about glibc versions belong
11584 #.  in the notes, not in the header.
11585 #.  .B #include <features.h>
11586 #.  .br
11587 #.  .B #if (__GLIBC__==2 && __GLIBC_MINOR__>=1) || __GLIBC__>2
11588 #.  .br
11589 #.  .B #include <sys/sendfile.h>
11590 #.  .br
11591 #.  #else
11592 #.  .br
11593 #.  .B #include <sys/types.h>
11594 #.  .br
11595 #.  .B /* No system prototype before glibc 2.1. */
11596 #.  .br
11597 #.  .BI "ssize_t sendfile(int" " out_fd" ", int" " in_fd" ", off_t *" #.                        offset ", size_t" " count" )
11598 #.  .br
11599 #.  .B #endif
11600 #. type: Plain text
11601 #: build/C/man2/sendfile.2:47
11602 msgid ""
11603 "B<ssize_t sendfile(int>I< out_fd>B<, int>I< in_fd>B<, off_t *>I<offset>B<, "
11604 "size_t>I< count>B<);>"
11605 msgstr ""
11606 "B<ssize_t sendfile(int>I< out_fd>B<, int>I< in_fd>B<, off_t *>I<offset>B<, "
11607 "size_t>I< count>B<);>"
11608
11609 #. type: Plain text
11610 #: build/C/man2/sendfile.2:57
11611 msgid ""
11612 "B<sendfile>()  copies data between one file descriptor and another.  Because "
11613 "this copying is done within the kernel, B<sendfile>()  is more efficient "
11614 "than the combination of B<read>(2)  and B<write>(2), which would require "
11615 "transferring data to and from user space."
11616 msgstr ""
11617 "B<sendfile>()  は、あるファイル・ディスクリプタから別の ファイル・ディスクリ"
11618 "プタへのデータのコピーを行う。 このコピーはカーネル内で行われるので、 "
11619 "B<sendfile>()  は、 B<read>(2)  と B<write>(2)  を組み合わせるよりも効率がよ"
11620 "い。 B<read>(2)  や B<write>(2)  ではユーザ空間との間でデータの転送が必要とな"
11621 "るからである。"
11622
11623 #. type: Plain text
11624 #: build/C/man2/sendfile.2:62
11625 msgid ""
11626 "I<in_fd> should be a file descriptor opened for reading and I<out_fd> should "
11627 "be a descriptor opened for writing."
11628 msgstr ""
11629 "I<in_fd> は読み込みのためにオープンされたファイル・ディスクリプタ、 "
11630 "I<out_fd> は書き込みのためにオープンされたディスクリプタでなければならない。"
11631
11632 #. type: Plain text
11633 #: build/C/man2/sendfile.2:83
11634 msgid ""
11635 "If I<offset> is not NULL, then it points to a variable holding the file "
11636 "offset from which B<sendfile>()  will start reading data from I<in_fd>.  "
11637 "When B<sendfile>()  returns, this variable will be set to the offset of the "
11638 "byte following the last byte that was read.  If I<offset> is not NULL, then "
11639 "B<sendfile>()  does not modify the current file offset of I<in_fd>; "
11640 "otherwise the current file offset is adjusted to reflect the number of bytes "
11641 "read from I<in_fd>."
11642 msgstr ""
11643 "I<offset> が NULL でない場合、 I<offset> は B<sendfile>()  が I<in_fd> のどこ"
11644 "からデータを読み始めるかを示すファイル・オフセットを保持する変数への ポインタ"
11645 "である。 B<sendfile>()  は復帰する時、この変数に最後に読み込んだバイトの 次の"
11646 "バイトのオフセットを書き込む。 I<offset> が NULL でない場合、 B<sendfile>()  "
11647 "は I<in_fd> のファイル・オフセットの現在値を変更しない。 NULL の場合は、ファ"
11648 "イル・オフセットの現在値を I<in_fd> から読み込んだバイト数を反映した位置に調"
11649 "整する。"
11650
11651 #. type: Plain text
11652 #: build/C/man2/sendfile.2:90
11653 msgid ""
11654 "If I<offset> is NULL, then data will be read from I<in_fd> starting at the "
11655 "current file offset, and the file offset will be updated by the call."
11656 msgstr ""
11657 "I<offset> が NULL の場合、データは I<in_fd> の現在のファイル・オフセットから"
11658 "読み出され、 ファイル・オフセットはこの呼び出しで更新される。"
11659
11660 #. type: Plain text
11661 #: build/C/man2/sendfile.2:93
11662 msgid "I<count> is the number of bytes to copy between the file descriptors."
11663 msgstr "I<count> は、ファイル・ディスクリプタ間でコピーするバイト数である。"
11664
11665 #. type: Plain text
11666 #: build/C/man2/sendfile.2:100
11667 msgid ""
11668 "The I<in_fd> argument must correspond to a file which supports B<mmap>(2)-"
11669 "like operations (i.e., it cannot be a socket)."
11670 msgstr ""
11671 "I<in_fd> 引き数は B<mmap>(2) 風の操作ができるファイルを指していなければなら"
11672 "な\n"
11673 "い (ソケットを指定することはできない)。"
11674
11675 #. type: Plain text
11676 #: build/C/man2/sendfile.2:108
11677 msgid ""
11678 "In Linux kernels before 2.6.33, I<out_fd> must refer to a socket.  Since "
11679 "Linux 2.6.33 it can be any file.  If it is a regular file, then "
11680 "B<sendfile>()  changes the file offset appropriately."
11681 msgstr ""
11682 "2.6.33 より前の Linux カーネルでは I<out_fd> はソケットを参照していなければ"
11683 "な\n"
11684 "らない。Linux 2.6.33 以降では、任意のファイルを参照することができる。\n"
11685 "通常のファイルの場合には B<sendfile>() はファイルオフセットを適切に変更する。"
11686
11687 #. type: Plain text
11688 #: build/C/man2/sendfile.2:115
11689 msgid ""
11690 "If the transfer was successful, the number of bytes written to I<out_fd> is "
11691 "returned.  On error, -1 is returned, and I<errno> is set appropriately."
11692 msgstr ""
11693 "転送に成功した場合、 I<out_fd> に書き込まれたバイト数を返す。エラーの場"
11694 "合、-1 を返し、 I<errno> に適切な値を設定する。"
11695
11696 #. type: Plain text
11697 #: build/C/man2/sendfile.2:121
11698 msgid ""
11699 "Nonblocking I/O has been selected using B<O_NONBLOCK> and the write would "
11700 "block."
11701 msgstr ""
11702 "B<O_NONBLOCK> を用いて非ブロック I/O が選択されたが、書き込みがブロックされ"
11703 "た。"
11704
11705 #. type: Plain text
11706 #: build/C/man2/sendfile.2:125
11707 msgid ""
11708 "The input file was not opened for reading or the output file was not opened "
11709 "for writing."
11710 msgstr ""
11711 "入力ファイルが読み込みのためにオープンされていないか、 出力ファイルが書き込み"
11712 "のためにオープンされていない。"
11713
11714 #. type: Plain text
11715 #: build/C/man2/sendfile.2:128
11716 msgid "Bad address."
11717 msgstr "アドレスがおかしい。"
11718
11719 #. type: Plain text
11720 #: build/C/man2/sendfile.2:134
11721 msgid ""
11722 "Descriptor is not valid or locked, or an B<mmap>(2)-like operation is not "
11723 "available for I<in_fd>."
11724 msgstr ""
11725 "ディスクリプタが有効でないか、ロックされている。もしくは B<mmap>(2)  風の操作"
11726 "が I<in_fd> では利用できない。"
11727
11728 #. type: Plain text
11729 #: build/C/man2/sendfile.2:138
11730 msgid "Unspecified error while reading from I<in_fd>."
11731 msgstr "I<in_fd> から読み込んでいるうちに予期しないエラーが起こった。"
11732
11733 #. type: Plain text
11734 #: build/C/man2/sendfile.2:142
11735 msgid "Insufficient memory to read from I<in_fd>."
11736 msgstr "I<in_fd> から読み込むための十分なメモリがない。"
11737
11738 #. type: Plain text
11739 #: build/C/man2/sendfile.2:148
11740 msgid ""
11741 "B<sendfile>()  is a new feature in Linux 2.2.  The include file I<E<lt>sys/"
11742 "sendfile.hE<gt>> is present since glibc 2.1."
11743 msgstr ""
11744 "B<sendfile> は Linux 2.2 の新しい機能である。 インクルードファイル "
11745 "I<E<lt>sys/sendfile.hE<gt>> は glibc 2.1 から存在している。"
11746
11747 #. type: Plain text
11748 #: build/C/man2/sendfile.2:150
11749 msgid "Not specified in POSIX.1-2001, or other standards."
11750 msgstr "POSIX.1-2001 や他の標準では規定されていない。"
11751
11752 #. type: Plain text
11753 #: build/C/man2/sendfile.2:155
11754 msgid ""
11755 "Other UNIX systems implement B<sendfile>()  with different semantics and "
11756 "prototypes.  It should not be used in portable programs."
11757 msgstr ""
11758 "他の UNIX システムでは、異なった方式やプロトタイプで B<sendfile>()  を実装し"
11759 "ている。移植性を考慮したプログラムでは使用すべきではない。"
11760
11761 #. type: Plain text
11762 #: build/C/man2/sendfile.2:165
11763 msgid ""
11764 "If you plan to use B<sendfile>()  for sending files to a TCP socket, but "
11765 "need to send some header data in front of the file contents, you will find "
11766 "it useful to employ the B<TCP_CORK> option, described in B<tcp>(7), to "
11767 "minimize the number of packets and to tune performance."
11768 msgstr ""
11769 "B<sendfile>()  を使って TCP ソケットにファイルを送ろうとしていて、 ファイルの"
11770 "内容の前にヘッダ・データを付け加える必要がある場合は、 パケット数を最小にして"
11771 "性能を上げるために B<tcp>(7)  に記述されている B<TCP_CORK> オプションを使うと"
11772 "いいだろう。"
11773
11774 #. type: Plain text
11775 #: build/C/man2/sendfile.2:171
11776 msgid ""
11777 "In Linux 2.4 and earlier, I<out_fd> could also refer to a regular file, and "
11778 "B<sendfile>()  changed the current offset of that file."
11779 msgstr ""
11780 "Linux 2.4 とそれ以前のバージョンでも、 I<out_fd> は通常のファイルを参照で"
11781 "き、\n"
11782 "B<sendfile>() はそのファイルのオフセットの現在値を変更していた。"
11783
11784 #. type: Plain text
11785 #: build/C/man2/sendfile.2:183
11786 msgid ""
11787 "The original Linux B<sendfile>()  system call was not designed to handle "
11788 "large file offsets.  Consequently, Linux 2.4 added B<sendfile64>(), with a "
11789 "wider type for the I<offset> argument.  The glibc B<sendfile>()  wrapper "
11790 "function transparently deals with the kernel differences."
11791 msgstr ""
11792 "元々の Linux B<sendfile>() システムコールは大きなファイルオフセットを\n"
11793 "扱えるように設計されていなかった。その結果、Linux 2.4 で、\n"
11794 "ビット幅の大きな I<offset> 引き数を持った B<sendfile64>() が追加された。\n"
11795 "glibc の B<sendfile>() のラッパー関数はカーネルによるこの違いを吸収している。"
11796
11797 #. type: Plain text
11798 #: build/C/man2/sendfile.2:192
11799 msgid ""
11800 "Applications may wish to fall back to B<read>(2)/B<write>(2)  in the case "
11801 "where B<sendfile>()  fails with B<EINVAL> or B<ENOSYS>."
11802 msgstr ""
11803 "B<sendfile>()  が B<EINVAL> や B<ENOSYS> で失敗するような場合は、 アプリケー"
11804 "ションは B<read>(2)/B<write>(2)  に戻すことを考えてもよいかもしれない。"
11805
11806 #. type: Plain text
11807 #: build/C/man2/sendfile.2:197
11808 msgid ""
11809 "The Linux-specific B<splice>(2)  call supports transferring data between "
11810 "arbitrary files (e.g., a pair of sockets)."
11811 msgstr ""
11812 "Linux 固有の B<splice>(2) システムコールは、任意のファイル間 (例えば、\n"
11813 "ソケット同士) でのデータ転送をサポートしている。"
11814
11815 #. type: Plain text
11816 #: build/C/man2/sendfile.2:202
11817 msgid "B<mmap>(2), B<open>(2), B<socket>(2), B<splice>(2)"
11818 msgstr "B<mmap>(2), B<open>(2), B<socket>(2), B<splice>(2)"
11819
11820 #. type: TH
11821 #: build/C/man2/set_tid_address.2:25
11822 #, no-wrap
11823 msgid "SET_TID_ADDRESS"
11824 msgstr "SET_TID_ADDRESS"
11825
11826 #. type: TH
11827 #: build/C/man2/set_tid_address.2:25
11828 #, no-wrap
11829 msgid "2012-07-19"
11830 msgstr "2012-07-19"
11831
11832 #. type: Plain text
11833 #: build/C/man2/set_tid_address.2:28
11834 msgid "set_tid_address - set pointer to thread ID"
11835 msgstr "set_tid_address - スレッド ID へのポインタを設定する"
11836
11837 #. type: Plain text
11838 #: build/C/man2/set_tid_address.2:31
11839 #, no-wrap
11840 msgid "B<#include E<lt>linux/unistd.hE<gt>>\n"
11841 msgstr "B<#include E<lt>linux/unistd.hE<gt>>\n"
11842
11843 #. type: Plain text
11844 #: build/C/man2/set_tid_address.2:33
11845 #, no-wrap
11846 msgid "B<long set_tid_address(int *>I<tidptr>B<);>\n"
11847 msgstr "B<long set_tid_address(int *>I<tidptr>B<);>\n"
11848
11849 #. type: Plain text
11850 #: build/C/man2/set_tid_address.2:40
11851 msgid ""
11852 "For each process, the kernel maintains two attributes (addresses) called "
11853 "I<set_child_tid> and I<clear_child_tid>.  These two attributes contain the "
11854 "value NULL by default."
11855 msgstr ""
11856 "各プロセスについて、カーネルは I<set_child_tid> と I<clear_child_tid> という "
11857 "2 つの属性を保持する。この 2 つの属性はデフォルトでは NULL である。"
11858
11859 #. type: TP
11860 #: build/C/man2/set_tid_address.2:40
11861 #, no-wrap
11862 msgid "I<set_child_tid>"
11863 msgstr "I<set_child_tid>"
11864
11865 #. type: Plain text
11866 #: build/C/man2/set_tid_address.2:51
11867 msgid ""
11868 "If a process is started using B<clone>(2)  with the B<CLONE_CHILD_SETTID> "
11869 "flag, I<set_child_tid> is set to the value passed in the I<ctid> argument of "
11870 "that system call."
11871 msgstr ""
11872 "プロセスが B<CLONE_CHILD_SETTID> フラグを指定した B<clone>(2)  によって開始さ"
11873 "れた場合、 I<set_child_tid> は B<clone>(2) のシステムコールの I<ctid> 引き数"
11874 "で渡された値に設定される。"
11875
11876 #. type: Plain text
11877 #: build/C/man2/set_tid_address.2:56
11878 msgid ""
11879 "When I<set_child_tid> is set, the very first thing the new process does is "
11880 "writing its PID at this address."
11881 msgstr ""
11882 "I<set_child_tid> が設定された場合、一番最初に新しいプロセスが行うことは、 こ"
11883 "のアドレスに自身の PID を書き込むことである。"
11884
11885 #. type: TP
11886 #: build/C/man2/set_tid_address.2:56
11887 #, no-wrap
11888 msgid "I<clear_child_tid>"
11889 msgstr "I<clear_child_tid>"
11890
11891 #. type: Plain text
11892 #: build/C/man2/set_tid_address.2:67
11893 msgid ""
11894 "If a process is started using B<clone>(2)  with the B<CLONE_CHILD_CLEARTID> "
11895 "flag, I<clear_child_tid> is set to the value passed in the I<ctid> argument "
11896 "of that system call."
11897 msgstr ""
11898 "プロセスが B<CLONE_CHILD_CLEARTID> フラグを指定した B<clone>(2) によって開始"
11899 "された場合、 I<clear_child_tid> は B<clone>(2) のシステムコールの I<ctid> 引"
11900 "き数で渡された値に設定される。"
11901
11902 #. type: Plain text
11903 #: build/C/man2/set_tid_address.2:74
11904 msgid ""
11905 "The system call B<set_tid_address>()  sets the I<clear_child_tid> value for "
11906 "the calling process to I<tidptr>."
11907 msgstr ""
11908 "システムコール B<set_tid_address>()  は呼び出し元プロセスの "
11909 "I<clear_child_tid> の値を I<tidptr> に設定する。"
11910
11911 #. type: Plain text
11912 #: build/C/man2/set_tid_address.2:82
11913 msgid ""
11914 "When a process whose I<clear_child_tid> is not NULL terminates, then, if the "
11915 "process is sharing memory with other processes or threads, then 0 is written "
11916 "at the address specified in I<clear_child_tid> and the kernel performs the "
11917 "following operation:"
11918 msgstr ""
11919 "I<clear_child_tid> が NULL でないプロセスが終了すると、そのプロセスが他のプロ"
11920 "セスまたはスレッドとメモリを共有していれば、 I<clear_child_tid> で指定された"
11921 "アドレスに 0 が書き込まれ、カーネルは以下の処理を実行する。"
11922
11923 #. type: Plain text
11924 #: build/C/man2/set_tid_address.2:84
11925 #, no-wrap
11926 msgid "    futex(clear_child_tid, FUTEX_WAKE, 1, NULL, NULL, 0);\n"
11927 msgstr "    futex(clear_child_tid, FUTEX_WAKE, 1, NULL, NULL, 0);\n"
11928
11929 #. type: Plain text
11930 #: build/C/man2/set_tid_address.2:88
11931 msgid ""
11932 "The effect of this operation is to wake a single process that is performing "
11933 "a futex wait on the memory location.  Errors from the futex wake operation "
11934 "are ignored."
11935 msgstr ""
11936 "この処理の結果、このメモリアドレスに対する futex wait を実行しているプロセス"
11937 "を一つ起こす (wake)。 futex wake 操作でのエラーは無視される。"
11938
11939 #. type: Plain text
11940 #: build/C/man2/set_tid_address.2:91
11941 msgid "B<set_tid_address>()  always returns the PID of the calling process."
11942 msgstr "B<set_tid_address>()  は常に現在のプロセスの PID を返す。"
11943
11944 #. type: Plain text
11945 #: build/C/man2/set_tid_address.2:94
11946 msgid "B<set_tid_address>()  always succeeds."
11947 msgstr "B<set_tid_address>()  は常に成功する。"
11948
11949 #. type: Plain text
11950 #: build/C/man2/set_tid_address.2:97
11951 msgid ""
11952 "This call is present since Linux 2.5.48.  Details as given here are valid "
11953 "since Linux 2.5.49."
11954 msgstr ""
11955 "この呼び出しは Linux 2.5.48 以降で存在する。 ここで書かれた詳細は Linux "
11956 "2.5.49 以降で有効である。"
11957
11958 #. type: Plain text
11959 #: build/C/man2/set_tid_address.2:102
11960 msgid "B<clone>(2), B<futex>(2)"
11961 msgstr "B<clone>(2), B<futex>(2)"
11962
11963 #. type: TH
11964 #: build/C/man2/splice.2:26
11965 #, no-wrap
11966 msgid "SPLICE"
11967 msgstr "SPLICE"
11968
11969 #. type: TH
11970 #: build/C/man2/splice.2:26 build/C/man2/tee.2:26 build/C/man2/vmsplice.2:26
11971 #, no-wrap
11972 msgid "2012-05-04"
11973 msgstr "2012-05-04"
11974
11975 #. type: Plain text
11976 #: build/C/man2/splice.2:29
11977 msgid "splice - splice data to/from a pipe"
11978 msgstr "splice - パイプとの間でデータを継ぎ合わせる"
11979
11980 #. type: Plain text
11981 #: build/C/man2/splice.2:33 build/C/man2/tee.2:33
11982 #, no-wrap
11983 msgid ""
11984 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
11985 "B<#include E<lt>fcntl.hE<gt>>\n"
11986 msgstr ""
11987 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
11988 "B<#include E<lt>fcntl.hE<gt>>\n"
11989
11990 #.  Return type was long before glibc 2.7
11991 #. type: Plain text
11992 #: build/C/man2/splice.2:38
11993 #, no-wrap
11994 msgid ""
11995 "B<ssize_t splice(int >I<fd_in>B<, loff_t *>I<off_in>B<, int >I<fd_out>B<,>\n"
11996 "B<               loff_t *>I<off_out>B<, size_t >I<len>B<, unsigned int >I<flags>B<);>\n"
11997 msgstr ""
11998 "B<ssize_t splice(int >I<fd_in>B<, loff_t *>I<off_in>B<, int >I<fd_out>B<,>\n"
11999 "B<               loff_t *>I<off_out>B<, size_t >I<len>B<, unsigned int >I<flags>B<);>\n"
12000
12001 #. type: Plain text
12002 #: build/C/man2/splice.2:50
12003 msgid ""
12004 "B<splice>()  moves data between two file descriptors without copying between "
12005 "kernel address space and user address space.  It transfers up to I<len> "
12006 "bytes of data from the file descriptor I<fd_in> to the file descriptor "
12007 "I<fd_out>, where one of the descriptors must refer to a pipe."
12008 msgstr ""
12009 "B<splice>()  は、カーネルアドレス空間とユーザアドレス空間との間のコピーを伴わ"
12010 "ずに、 2 つのファイルディスクリプタ間でデータの移動を行う。 ファイルディスク"
12011 "リプタ I<fd_in> からファイルディスクリプタ I<fd_out> へ最大 I<len> バイトを転"
12012 "送する。 2 つのファイルディスクリプタのうち一つは パイプを参照していなければ"
12013 "ならない。"
12014
12015 #. type: Plain text
12016 #: build/C/man2/splice.2:80
12017 msgid ""
12018 "If I<fd_in> refers to a pipe, then I<off_in> must be NULL.  If I<fd_in> does "
12019 "not refer to a pipe and I<off_in> is NULL, then bytes are read from I<fd_in> "
12020 "starting from the current file offset, and the current file offset is "
12021 "adjusted appropriately.  If I<fd_in> does not refer to a pipe and I<off_in> "
12022 "is not NULL, then I<off_in> must point to a buffer which specifies the "
12023 "starting offset from which bytes will be read from I<fd_in>; in this case, "
12024 "the current file offset of I<fd_in> is not changed.  Analogous statements "
12025 "apply for I<fd_out> and I<off_out>."
12026 msgstr ""
12027 "I<fd_in> がパイプを参照している場合、 I<off_in> は NULL でなければならない。 "
12028 "I<fd_in> がパイプを参照しておらず、 I<off_in> が NULL の場合、 I<fd_in> の現"
12029 "在のファイルオフセットから始まるバイトを読み出す。 現在のファイルオフセットは"
12030 "適切に調整される。 I<fd_in> がパイプを参照しておらず、 I<off_in> が NULL でな"
12031 "い場合、 I<off_in> は I<fd_in> からのデータ読み出しを開始する先頭オフセットを"
12032 "格納したバッファ へのポインタでなければならない。この場合、 I<fd_in> の現在の"
12033 "ファイルオフセットは変更されない。 I<fd_out> と I<off_out> に関しても同様であ"
12034 "る。"
12035
12036 #. type: Plain text
12037 #: build/C/man2/splice.2:85 build/C/man2/vmsplice.2:78
12038 msgid ""
12039 "The I<flags> argument is a bit mask that is composed by ORing together zero "
12040 "or more of the following values:"
12041 msgstr ""
12042 "I<flags> 引き数には、以下の値の 0 個以上をビット毎の論理和の形で指定する。"
12043
12044 #. type: TP
12045 #: build/C/man2/splice.2:85 build/C/man2/tee.2:62 build/C/man2/vmsplice.2:78
12046 #, no-wrap
12047 msgid "B<SPLICE_F_MOVE>"
12048 msgstr "B<SPLICE_F_MOVE>"
12049
12050 #. type: Plain text
12051 #: build/C/man2/splice.2:98
12052 msgid ""
12053 "Attempt to move pages instead of copying.  This is only a hint to the "
12054 "kernel: pages may still be copied if the kernel cannot move the pages from "
12055 "the pipe, or if the pipe buffers don't refer to full pages.  The initial "
12056 "implementation of this flag was buggy: therefore starting in Linux 2.6.21 it "
12057 "is a no-op (but is still permitted in a B<splice>()  call); in the future, a "
12058 "correct implementation may be restored."
12059 msgstr ""
12060 "ページのコピーでなく移動を試みる。 これはカーネルに対するヒントでしかない。 "
12061 "つまり、カーネルがパイプからページを移動できない場合や、 パイプバッファがペー"
12062 "ジ全部を参照していない場合は、 ページのコピーが行われることもある。 このフラ"
12063 "グの最初の実装にはバグがあった。そのため、 Linux 2.6.21 以降ではこのフラグの"
12064 "操作はできないようになっている (ただし、 B<splice>()  コールでこのフラグを指"
12065 "定することは今も認められている)。 将来、正しい実装が行われることだろう。"
12066
12067 #. type: TP
12068 #: build/C/man2/splice.2:98 build/C/man2/tee.2:68 build/C/man2/vmsplice.2:84
12069 #, no-wrap
12070 msgid "B<SPLICE_F_NONBLOCK>"
12071 msgstr "B<SPLICE_F_NONBLOCK>"
12072
12073 #. type: Plain text
12074 #: build/C/man2/splice.2:107
12075 msgid ""
12076 "Do not block on I/O.  This makes the splice pipe operations nonblocking, but "
12077 "B<splice>()  may nevertheless block because the file descriptors that are "
12078 "spliced to/from may block (unless they have the B<O_NONBLOCK> flag set)."
12079 msgstr ""
12080 "入出力時に停止 (block) しない。 このフラグを指定すると、 splice によるパイプ"
12081 "操作を非停止モード (nonblocking) で 行おうとするが、その場合でも "
12082 "B<splice>()  は停止することもある。なぜなら、データのやり取りを行う ファイル"
12083 "ディスクリプタは (B<O_NONBLOCK> フラグをセットされていない場合) 停止する可能"
12084 "性があるからである。"
12085
12086 #. type: TP
12087 #: build/C/man2/splice.2:107 build/C/man2/tee.2:73 build/C/man2/vmsplice.2:91
12088 #, no-wrap
12089 msgid "B<SPLICE_F_MORE>"
12090 msgstr "B<SPLICE_F_MORE>"
12091
12092 #. type: Plain text
12093 #: build/C/man2/splice.2:121
12094 msgid ""
12095 "More data will be coming in a subsequent splice.  This is a helpful hint "
12096 "when the I<fd_out> refers to a socket (see also the description of "
12097 "B<MSG_MORE> in B<send>(2), and the description of B<TCP_CORK> in B<tcp>(7))"
12098 msgstr ""
12099 "この後の splice でさらに転送されるデータがあることを示す。 このフラグは "
12100 "I<fd_out> がソケットを参照している場合に有用なヒントとなる (B<send>(2)  の "
12101 "B<MSG_MORE> や B<tcp>(7)  の B<TCP_CORK> の説明も参照)。"
12102
12103 #. type: TP
12104 #: build/C/man2/splice.2:121 build/C/man2/tee.2:79 build/C/man2/vmsplice.2:97
12105 #, no-wrap
12106 msgid "B<SPLICE_F_GIFT>"
12107 msgstr "B<SPLICE_F_GIFT>"
12108
12109 #. type: Plain text
12110 #: build/C/man2/splice.2:127
12111 msgid "Unused for B<splice>(); see B<vmsplice>(2)."
12112 msgstr "B<splice>()  では使用しない。 B<vmsplice>(2)  参照。"
12113
12114 #. type: Plain text
12115 #: build/C/man2/splice.2:136
12116 msgid ""
12117 "Upon successful completion, B<splice>()  returns the number of bytes spliced "
12118 "to or from the pipe.  A return value of 0 means that there was no data to "
12119 "transfer, and it would not make sense to block, because there are no writers "
12120 "connected to the write end of the pipe referred to by I<fd_in>."
12121 msgstr ""
12122 "成功して完了すると、 B<splice>()  はパイプから出し入れしたバイト数を返す。 返"
12123 "り値 0 はデータの転送が行わなかったことを示す。 この場合、処理を停止 (block) "
12124 "しても無意味である。 なぜなら、 I<fd_in> が参照するパイプの書き込み側に接続さ"
12125 "れている者がいないからである。"
12126
12127 #. type: Plain text
12128 #: build/C/man2/splice.2:142
12129 msgid ""
12130 "On error, B<splice>()  returns -1 and I<errno> is set to indicate the error."
12131 msgstr ""
12132 "エラーの場合、 B<splice>()  は -1 を返し、 I<errno> にエラーを示す値を設定す"
12133 "る。"
12134
12135 #. type: Plain text
12136 #: build/C/man2/splice.2:147
12137 msgid ""
12138 "One or both file descriptors are not valid, or do not have proper read-write "
12139 "mode."
12140 msgstr ""
12141 "ファイルディスクリプタの一方または両方が有効ではない、 もしくは適切な read-"
12142 "write モードではない。"
12143
12144 #.  The append-mode error is given since 2.6.27; in earlier kernels,
12145 #.  splice() in append mode was broken
12146 #. type: Plain text
12147 #: build/C/man2/splice.2:155
12148 msgid ""
12149 "Target filesystem doesn't support splicing; target file is opened in append "
12150 "mode; neither of the descriptors refers to a pipe; or offset given for "
12151 "nonseekable device."
12152 msgstr ""
12153 "対象のファイルシステムが splice に対応していない、 または対象のファイルが追記"
12154 "モードでオープンされている、 またはディスクリプタのどちらもパイプを参照してい"
12155 "ない、 または seek できないデバイスに対してオフセットが指定された。"
12156
12157 #. type: Plain text
12158 #: build/C/man2/splice.2:158 build/C/man2/tee.2:114
12159 #: build/C/man2/vmsplice.2:138
12160 msgid "Out of memory."
12161 msgstr "メモリ不足。"
12162
12163 #. type: TP
12164 #: build/C/man2/splice.2:158
12165 #, no-wrap
12166 msgid "B<ESPIPE>"
12167 msgstr "B<ESPIPE>"
12168
12169 #. type: Plain text
12170 #: build/C/man2/splice.2:165
12171 msgid ""
12172 "Either I<off_in> or I<off_out> was not NULL, but the corresponding file "
12173 "descriptor refers to a pipe."
12174 msgstr ""
12175 "I<off_in> か I<off_out> のいずれかが NULL ではないが、対応するファイルディス"
12176 "クリプタが パイプを参照している。"
12177
12178 #. type: Plain text
12179 #: build/C/man2/splice.2:170
12180 msgid ""
12181 "The B<splice>()  system call first appeared in Linux 2.6.17; library support "
12182 "was added to glibc in version 2.5."
12183 msgstr ""
12184 "B<splice>() システムコールは Linux 2.6.17 で初めて登場した。\n"
12185 "ライブラリによるサポートは glibc バージョン 2.5 で追加された。"
12186
12187 #. type: Plain text
12188 #: build/C/man2/splice.2:182
12189 msgid ""
12190 "The three system calls B<splice>(), B<vmsplice>(2), and B<tee>(2), provide "
12191 "user-space programs with full control over an arbitrary kernel buffer, "
12192 "implemented within the kernel using the same type of buffer that is used for "
12193 "a pipe.  In overview, these system calls perform the following tasks:"
12194 msgstr ""
12195 "3 つのシステムコール (B<splice>(), B<vmsplice>(2), B<tee>(2))  を使うと、ユー"
12196 "ザ空間プログラムは任意のカーネルバッファに対する 完全な制御ができる。カーネル"
12197 "バッファは、パイプに使用されているのと 同種のバッファを使ってカーネル内に実装"
12198 "されている。 大まかにいうと、これらのシステムコールは以下の仕事を行う:"
12199
12200 #. type: TP
12201 #: build/C/man2/splice.2:182
12202 #, no-wrap
12203 msgid "B<splice>()"
12204 msgstr "B<splice>()"
12205
12206 #. type: Plain text
12207 #: build/C/man2/splice.2:186
12208 msgid ""
12209 "moves data from the buffer to an arbitrary file descriptor, or vice versa, "
12210 "or from one buffer to another."
12211 msgstr ""
12212 "バッファから任意のファイルディスクリプタや、その逆方向、 もしくはあるバッファ"
12213 "から別のバッファへの、データ移動を行う。"
12214
12215 #. type: TP
12216 #: build/C/man2/splice.2:186
12217 #, no-wrap
12218 msgid "B<tee>(2)"
12219 msgstr "B<tee>(2)"
12220
12221 #. type: Plain text
12222 #: build/C/man2/splice.2:189
12223 msgid "\"copies\" the data from one buffer to another."
12224 msgstr "あるバッファから別のバッファへのデータ「コピー」を行う。"
12225
12226 #. type: TP
12227 #: build/C/man2/splice.2:189
12228 #, no-wrap
12229 msgid "B<vmsplice>(2)"
12230 msgstr "B<vmsplice>(2)"
12231
12232 #. type: Plain text
12233 #: build/C/man2/splice.2:192
12234 msgid "\"copies\" data from user space into the buffer."
12235 msgstr "ユーザ空間からバッファへのデータ「コピー」を行う。"
12236
12237 #.  Linus: Now, imagine using the above in a media server, for example.
12238 #.  Let's say that a year or two has passed, so that the video drivers
12239 #.  have been updated to be able to do the splice thing, and what can
12240 #.  you do? You can:
12241 #.  - splice from the (mpeg or whatever - let's just assume that the video
12242 #.    input is either digital or does the encoding on its own - like they
12243 #.    pretty much all do) video input into a pipe (remember: no copies - the
12244 #.    video input will just DMA directly into memory, and splice will just
12245 #.    set up the pages in the pipe buffer)
12246 #.  - tee that pipe to split it up
12247 #.  - splice one end to a file (ie "save the compressed stream to disk")
12248 #.  - splice the other end to a real-time video decoder window for your
12249 #.    real-time viewing pleasure.
12250 #.  Linus: Now, the advantage of splice()/tee() is that you can
12251 #.  do zero-copy movement of data, and unlike sendfile() you can
12252 #.  do it on _arbitrary_ data (and, as shown by "tee()", it's more
12253 #.  than just sending the data to somebody else: you can duplicate
12254 #.  the data and choose to forward it to two or more different
12255 #.  users - for things like logging etc.).
12256 #. type: Plain text
12257 #: build/C/man2/splice.2:223
12258 msgid ""
12259 "Though we talk of copying, actual copies are generally avoided.  The kernel "
12260 "does this by implementing a pipe buffer as a set of reference-counted "
12261 "pointers to pages of kernel memory.  The kernel creates \"copies\" of pages "
12262 "in a buffer by creating new pointers (for the output buffer) referring to "
12263 "the pages, and increasing the reference counts for the pages: only pointers "
12264 "are copied, not the pages of the buffer."
12265 msgstr ""
12266 "ここではコピーの話をしているが、実際のコピーは一般的に回避される。 カーネル"
12267 "は、パイプ・バッファをカーネルメモリのページへのポインタ集合として 実装し、"
12268 "ページへの参照回数を管理することで、これを実現している。 カーネルは、対象とな"
12269 "るページを参照する (出力バッファ用の) ポインタを 新規に作成することでバッファ"
12270 "内のページの「コピー」を作成し、 そのページの参照回数を増やす。つまり、ポイン"
12271 "タだけがコピーされ、 バッファのページはコピーされない。"
12272
12273 #. type: Plain text
12274 #: build/C/man2/splice.2:226
12275 msgid "See B<tee>(2)."
12276 msgstr "B<tee>(2)  参照。"
12277
12278 #. type: Plain text
12279 #: build/C/man2/splice.2:230
12280 msgid "B<sendfile>(2), B<tee>(2), B<vmsplice>(2)"
12281 msgstr "B<sendfile>(2), B<tee>(2), B<vmsplice>(2)"
12282
12283 #. type: TH
12284 #: build/C/man2/tee.2:26
12285 #, no-wrap
12286 msgid "TEE"
12287 msgstr "TEE"
12288
12289 #. type: Plain text
12290 #: build/C/man2/tee.2:29
12291 msgid "tee - duplicating pipe content"
12292 msgstr "tee - パイプの中身を複製する"
12293
12294 #. type: Plain text
12295 #: build/C/man2/tee.2:36
12296 #, no-wrap
12297 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"
12298 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"
12299
12300 #.  Example programs http://brick.kernel.dk/snaps
12301 #.  add a "tee(in, out1, out2)" system call that duplicates the pages
12302 #.  (again, incrementing their reference count, not copying the data) from
12303 #.  one pipe to two other pipes.
12304 #. type: Plain text
12305 #: build/C/man2/tee.2:56
12306 msgid ""
12307 "B<tee>()  duplicates up to I<len> bytes of data from the pipe referred to by "
12308 "the file descriptor I<fd_in> to the pipe referred to by the file descriptor "
12309 "I<fd_out>.  It does not consume the data that is duplicated from I<fd_in>; "
12310 "therefore, that data can be copied by a subsequent B<splice>(2)."
12311 msgstr ""
12312 "B<tee>()  は、ファイルディスクリプタ I<fd_in> が参照するパイプからファイル"
12313 "ディスクリプタ I<fd_out> が参照するパイプへ最大 I<len> バイトのデータを複製す"
12314 "る。 この操作では、複製されるデータは I<fd_in> からは消費されない。したがっ"
12315 "て、これらのデータをこの後の B<splice>(2)  でコピーすることができる。"
12316
12317 #. type: Plain text
12318 #: build/C/man2/tee.2:62
12319 msgid ""
12320 "I<flags> is a series of modifier flags, which share the name space with "
12321 "B<splice>(2)  and B<vmsplice>(2):"
12322 msgstr ""
12323 "I<flags> は一連の修飾フラグであり、 B<splice>(2)  や B<vmsplice>(2)  と共通の"
12324 "名前である。"
12325
12326 #. type: Plain text
12327 #: build/C/man2/tee.2:68
12328 msgid "Currently has no effect for B<tee>(); see B<splice>(2)."
12329 msgstr "現在のところ B<tee>()  では何の効果もない。 B<splice>(2)  参照。"
12330
12331 #.  Not used for vmsplice
12332 #.  May be in the future -- therefore EAGAIN
12333 #. type: Plain text
12334 #: build/C/man2/tee.2:73 build/C/man2/vmsplice.2:91
12335 msgid "Do not block on I/O; see B<splice>(2)  for further details."
12336 msgstr "入出力で停止 (block) しない。詳細は B<splice>(2)  参照。"
12337
12338 #. type: Plain text
12339 #: build/C/man2/tee.2:79
12340 msgid ""
12341 "Currently has no effect for B<tee>(), but may be implemented in the future; "
12342 "see B<splice>(2)."
12343 msgstr ""
12344 "現在のところ B<tee>()  では何の効果もないが、将来的には実装される可能性があ"
12345 "る。 B<splice>(2)  参照。"
12346
12347 #. type: Plain text
12348 #: build/C/man2/tee.2:85
12349 msgid "Unused for B<tee>(); see B<vmsplice>(2)."
12350 msgstr "B<tee>()  では未使用。 B<vmsplice>(2)  参照。"
12351
12352 #. type: Plain text
12353 #: build/C/man2/tee.2:94
12354 msgid ""
12355 "Upon successful completion, B<tee>()  returns the number of bytes that were "
12356 "duplicated between the input and output.  A return value of 0 means that "
12357 "there was no data to transfer, and it would not make sense to block, because "
12358 "there are no writers connected to the write end of the pipe referred to by "
12359 "I<fd_in>."
12360 msgstr ""
12361 "成功して完了すると、 B<tee>()  は入出力間で複製されたバイト数を返す。 返り値 "
12362 "0 はデータの転送が行われなかったことを示す。 この場合、処理を停止 (block) し"
12363 "ても無意味である。 なぜなら、 I<fd_in> が参照するパイプの書き込み側に接続され"
12364 "ている者がいないからである。"
12365
12366 #. type: Plain text
12367 #: build/C/man2/tee.2:100
12368 msgid ""
12369 "On error, B<tee>()  returns -1 and I<errno> is set to indicate the error."
12370 msgstr ""
12371 "エラーの場合、 B<tee>()  は -1 を返し、 I<errno> にエラーを示す値を設定する。"
12372
12373 #. type: Plain text
12374 #: build/C/man2/tee.2:111
12375 msgid ""
12376 "I<fd_in> or I<fd_out> does not refer to a pipe; or I<fd_in> and I<fd_out> "
12377 "refer to the same pipe."
12378 msgstr ""
12379 "I<fd_in> と I<fd_out> のどちらかがパイプを参照していない。もしくは I<fd_in> "
12380 "と I<fd_out> が同じパイプを参照している。"
12381
12382 #. type: Plain text
12383 #: build/C/man2/tee.2:119
12384 msgid ""
12385 "The B<tee>()  system call first appeared in Linux 2.6.17; library support "
12386 "was added to glibc in version 2.5."
12387 msgstr ""
12388 "B<tee>() システムコールは Linux 2.6.17 で初めて登場した。\n"
12389 "ライブラリによるサポートは glibc バージョン 2.5 で追加された。"
12390
12391 #. type: Plain text
12392 #: build/C/man2/tee.2:130
12393 msgid ""
12394 "Conceptually, B<tee>()  copies the data between the two pipes.  In reality "
12395 "no real data copying takes place though: under the covers, B<tee>()  assigns "
12396 "data in the output by merely grabbing a reference to the input."
12397 msgstr ""
12398 "概念としては、 B<tee>()  は二つのパイプ間でデータのコピーを行う。 しかし、実"
12399 "際には実データのコピーは行われない。 内部では、 B<tee>()  は入力側に対する参"
12400 "照だけを作成することで出力側にデータを 追加する。"
12401
12402 #. type: Plain text
12403 #: build/C/man2/tee.2:136
12404 msgid ""
12405 "The following example implements a basic B<tee>(1)  program using the "
12406 "B<tee>()  system call."
12407 msgstr ""
12408 "以下の例は、 B<tee>()  システムコールを使って、 基本的な B<tee>(1)  プログラ"
12409 "ムを実装したものである。"
12410
12411 #. type: Plain text
12412 #: build/C/man2/tee.2:145
12413 #, no-wrap
12414 msgid ""
12415 "#define _GNU_SOURCE\n"
12416 "#include E<lt>fcntl.hE<gt>\n"
12417 "#include E<lt>stdio.hE<gt>\n"
12418 "#include E<lt>stdlib.hE<gt>\n"
12419 "#include E<lt>unistd.hE<gt>\n"
12420 "#include E<lt>errno.hE<gt>\n"
12421 "#include E<lt>limits.hE<gt>\n"
12422 msgstr ""
12423 "#define _GNU_SOURCE\n"
12424 "#include E<lt>fcntl.hE<gt>\n"
12425 "#include E<lt>stdio.hE<gt>\n"
12426 "#include E<lt>stdlib.hE<gt>\n"
12427 "#include E<lt>unistd.hE<gt>\n"
12428 "#include E<lt>errno.hE<gt>\n"
12429 "#include E<lt>limits.hE<gt>\n"
12430
12431 #. type: Plain text
12432 #: build/C/man2/tee.2:151
12433 #, no-wrap
12434 msgid ""
12435 "int\n"
12436 "main(int argc, char *argv[])\n"
12437 "{\n"
12438 "    int fd;\n"
12439 "    int len, slen;\n"
12440 msgstr ""
12441 "int\n"
12442 "main(int argc, char *argv[])\n"
12443 "{\n"
12444 "    int fd;\n"
12445 "    int len, slen;\n"
12446
12447 #. type: Plain text
12448 #: build/C/man2/tee.2:156
12449 #, no-wrap
12450 msgid ""
12451 "    if (argc != 2) {\n"
12452 "        fprintf(stderr, \"Usage: %s E<lt>fileE<gt>\\en\", argv[0]);\n"
12453 "        exit(EXIT_FAILURE);\n"
12454 "    }\n"
12455 msgstr ""
12456 "    if (argc != 2) {\n"
12457 "        fprintf(stderr, \"Usage: %s E<lt>fileE<gt>\\en\", argv[0]);\n"
12458 "        exit(EXIT_FAILURE);\n"
12459 "    }\n"
12460
12461 #. type: Plain text
12462 #: build/C/man2/tee.2:162
12463 #, no-wrap
12464 msgid ""
12465 "    fd = open(argv[1], O_WRONLY | O_CREAT | O_TRUNC, 0644);\n"
12466 "    if (fd == -1) {\n"
12467 "        perror(\"open\");\n"
12468 "        exit(EXIT_FAILURE);\n"
12469 "    }\n"
12470 msgstr ""
12471 "    fd = open(argv[1], O_WRONLY | O_CREAT | O_TRUNC, 0644);\n"
12472 "    if (fd == -1) {\n"
12473 "        perror(\"open\");\n"
12474 "        exit(EXIT_FAILURE);\n"
12475 "    }\n"
12476
12477 #. type: Plain text
12478 #: build/C/man2/tee.2:169
12479 #, no-wrap
12480 msgid ""
12481 "    do {\n"
12482 "        /*\n"
12483 "         * tee stdin to stdout.\n"
12484 "         */\n"
12485 "        len = tee(STDIN_FILENO, STDOUT_FILENO,\n"
12486 "                  INT_MAX, SPLICE_F_NONBLOCK);\n"
12487 msgstr ""
12488 "    do {\n"
12489 "        /*\n"
12490 "         * tee stdin to stdout.\n"
12491 "         */\n"
12492 "        len = tee(STDIN_FILENO, STDOUT_FILENO,\n"
12493 "                  INT_MAX, SPLICE_F_NONBLOCK);\n"
12494
12495 #. type: Plain text
12496 #: build/C/man2/tee.2:178
12497 #, no-wrap
12498 msgid ""
12499 "        if (len E<lt> 0) {\n"
12500 "            if (errno == EAGAIN)\n"
12501 "                continue;\n"
12502 "            perror(\"tee\");\n"
12503 "            exit(EXIT_FAILURE);\n"
12504 "        } else\n"
12505 "            if (len == 0)\n"
12506 "                break;\n"
12507 msgstr ""
12508 "        if (len E<lt> 0) {\n"
12509 "            if (errno == EAGAIN)\n"
12510 "                continue;\n"
12511 "            perror(\"tee\");\n"
12512 "            exit(EXIT_FAILURE);\n"
12513 "        } else\n"
12514 "            if (len == 0)\n"
12515 "                break;\n"
12516
12517 #. type: Plain text
12518 #: build/C/man2/tee.2:192
12519 #, no-wrap
12520 msgid ""
12521 "        /*\n"
12522 "         * Consume stdin by splicing it to a file.\n"
12523 "         */\n"
12524 "        while (len E<gt> 0) {\n"
12525 "            slen = splice(STDIN_FILENO, NULL, fd, NULL,\n"
12526 "                          len, SPLICE_F_MOVE);\n"
12527 "            if (slen E<lt> 0) {\n"
12528 "                perror(\"splice\");\n"
12529 "                break;\n"
12530 "            }\n"
12531 "            len -= slen;\n"
12532 "        }\n"
12533 "    } while (1);\n"
12534 msgstr ""
12535 "        /*\n"
12536 "         * Consume stdin by splicing it to a file.\n"
12537 "         */\n"
12538 "        while (len E<gt> 0) {\n"
12539 "            slen = splice(STDIN_FILENO, NULL, fd, NULL,\n"
12540 "                          len, SPLICE_F_MOVE);\n"
12541 "            if (slen E<lt> 0) {\n"
12542 "                perror(\"splice\");\n"
12543 "                break;\n"
12544 "            }\n"
12545 "            len -= slen;\n"
12546 "        }\n"
12547 "    } while (1);\n"
12548
12549 #. type: Plain text
12550 #: build/C/man2/tee.2:196
12551 #, no-wrap
12552 msgid ""
12553 "    close(fd);\n"
12554 "    exit(EXIT_SUCCESS);\n"
12555 "}\n"
12556 msgstr ""
12557 "    close(fd);\n"
12558 "    exit(EXIT_SUCCESS);\n"
12559 "}\n"
12560
12561 #. type: Plain text
12562 #: build/C/man2/tee.2:200
12563 msgid "B<splice>(2), B<vmsplice>(2)"
12564 msgstr "B<splice>(2), B<vmsplice>(2)"
12565
12566 #. type: TH
12567 #: build/C/man2/vm86.2:26
12568 #, no-wrap
12569 msgid "VM86"
12570 msgstr "VM86"
12571
12572 #. type: TH
12573 #: build/C/man2/vm86.2:26
12574 #, no-wrap
12575 msgid "2009-02-20"
12576 msgstr "2009-02-20"
12577
12578 #. type: Plain text
12579 #: build/C/man2/vm86.2:29
12580 msgid "vm86old, vm86 - enter virtual 8086 mode"
12581 msgstr "vm86old, vm86 - 仮想 8086 モードへ移行する"
12582
12583 #. type: Plain text
12584 #: build/C/man2/vm86.2:31
12585 msgid "B<#include E<lt>sys/vm86.hE<gt>>"
12586 msgstr "B<#include E<lt>sys/vm86.hE<gt>>"
12587
12588 #. type: Plain text
12589 #: build/C/man2/vm86.2:33
12590 msgid "B<int vm86old(struct vm86_struct *>I<info>B<);>"
12591 msgstr "B<int vm86old(struct vm86_struct *>I<info>B<);>"
12592
12593 #. type: Plain text
12594 #: build/C/man2/vm86.2:35
12595 msgid "B<int vm86(unsigned long >I<fn>B<, struct vm86plus_struct *>I<v86>B<);>"
12596 msgstr ""
12597 "B<int vm86(unsigned long >I<fn>B<, struct vm86plus_struct *>I<v86>B<);>"
12598
12599 #. type: Plain text
12600 #: build/C/man2/vm86.2:48
12601 msgid ""
12602 "The system call B<vm86>()  was introduced in Linux 0.97p2.  In Linux 2.1.15 "
12603 "and 2.0.28, it was renamed to B<vm86old>(), and a new B<vm86>()  was "
12604 "introduced.  The definition of I<struct vm86_struct> was changed in 1.1.8 "
12605 "and 1.1.9."
12606 msgstr ""
12607 "B<vm86>()  システムコールは Linux 0.97p2 で導入された。 これは Linux 2.1.15 "
12608 "と 2.0.28 で B<vm86old>()  に名前が変更され、 新しい B<vm86>()  が導入され"
12609 "た。 I<struct vm86_struct> の定義は 1.1.8 と 1.1.9 で変更された。"
12610
12611 #. type: Plain text
12612 #: build/C/man2/vm86.2:52
12613 msgid ""
12614 "These calls cause the process to enter VM86 mode (virtual-8086 in Intel "
12615 "literature), and are used by B<dosemu>."
12616 msgstr ""
12617 "これらのコールによってプロセスは VM86 モード (Intel の文書では仮想 8086 モー"
12618 "ド) へと移行する。 これらのコールは B<dosemu> で使用される。"
12619
12620 #. type: Plain text
12621 #: build/C/man2/vm86.2:54
12622 msgid "VM86 mode is an emulation of real mode within a protected mode task."
12623 msgstr ""
12624 "VM86 モードはプロテクトモードタスクにおける リアルモードのエミュレーションで"
12625 "ある。"
12626
12627 #. type: Plain text
12628 #: build/C/man2/vm86.2:64
12629 msgid ""
12630 "This return value is specific to i386 and indicates a problem with getting "
12631 "user-space data."
12632 msgstr ""
12633 "この返り値は i386 固有のものであり、 ユーザー空間のデータを取得する際に問題が"
12634 "あったことを示す。"
12635
12636 #. type: Plain text
12637 #: build/C/man2/vm86.2:68
12638 msgid ""
12639 "This return value indicates the call is not implemented on the present "
12640 "architecture."
12641 msgstr ""
12642 "この返り値は、このコールが現在のアーキテクチャで実装されていないことを示す。"
12643
12644 #. type: Plain text
12645 #: build/C/man2/vm86.2:73
12646 msgid ""
12647 "Saved kernel stack exists.  (This is a kernel sanity check; the saved stack "
12648 "should exist only within vm86 mode itself.)"
12649 msgstr ""
12650 "保存されたカーネルスタックが既に存在している。(これはカーネルが通常の 状態で"
12651 "あるかをチェックしている。保存されたスタックは vm86 モードで しか存在しな"
12652 "い。)"
12653
12654 #. type: Plain text
12655 #: build/C/man2/vm86.2:76
12656 msgid ""
12657 "This call is specific to Linux on 32-bit Intel processors, and should not be "
12658 "used in programs intended to be portable."
12659 msgstr ""
12660 "この関数は 32 ビット Intel プロセッサ上の Linux 特有の関数であり、 移植を意図"
12661 "したプログラムでは使用すべきでない。"
12662
12663 #. type: TH
12664 #: build/C/man2/vmsplice.2:26
12665 #, no-wrap
12666 msgid "VMSPLICE"
12667 msgstr "VMSPLICE"
12668
12669 #. type: Plain text
12670 #: build/C/man2/vmsplice.2:29
12671 msgid "vmsplice - splice user pages into a pipe"
12672 msgstr "vmsplice - ユーザ・ページをパイプに継ぎ合わせる"
12673
12674 #. type: Plain text
12675 #: build/C/man2/vmsplice.2:34
12676 #, no-wrap
12677 msgid ""
12678 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
12679 "B<#include E<lt>fcntl.hE<gt>>\n"
12680 "B<#include E<lt>sys/uio.hE<gt>>\n"
12681 msgstr ""
12682 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
12683 "B<#include E<lt>fcntl.hE<gt>>\n"
12684 "B<#include E<lt>sys/uio.hE<gt>>\n"
12685
12686 #. type: Plain text
12687 #: build/C/man2/vmsplice.2:37
12688 #, no-wrap
12689 msgid ""
12690 "B<ssize_t vmsplice(int >I<fd>B<, const struct iovec *>I<iov>B<,>\n"
12691 "B<                 unsigned long >I<nr_segs>B<, unsigned int >I<flags>B<);>\n"
12692 msgstr ""
12693 "B<ssize_t vmsplice(int >I<fd>B<, const struct iovec *>I<iov>B<,>\n"
12694 "B<                 unsigned long >I<nr_segs>B<, unsigned int >I<flags>B<);>\n"
12695
12696 #.  Linus: vmsplice() system call to basically do a "write to
12697 #.  the buffer", but using the reference counting and VM traversal
12698 #.  to actually fill the buffer. This means that the user needs to
12699 #.  be careful not to reuse the user-space buffer it spliced into
12700 #.  the kernel-space one (contrast this to "write()", which copies
12701 #.  the actual data, and you can thus reuse the buffer immediately
12702 #.  after a successful write), but that is often easy to do.
12703 #. type: Plain text
12704 #: build/C/man2/vmsplice.2:57
12705 msgid ""
12706 "The B<vmsplice>()  system call maps I<nr_segs> ranges of user memory "
12707 "described by I<iov> into a pipe.  The file descriptor I<fd> must refer to a "
12708 "pipe."
12709 msgstr ""
12710 "B<vmsplice>()  システムコールは、 I<iov> で指定されたユーザ・メモリの "
12711 "I<nr_segs> の範囲をパイプにマッピングする。 I<fd> はパイプを参照していなけれ"
12712 "ばならない。"
12713
12714 #. type: Plain text
12715 #: build/C/man2/vmsplice.2:64
12716 msgid ""
12717 "The pointer I<iov> points to an array of I<iovec> structures as defined in "
12718 "I<E<lt>sys/uio.hE<gt>>:"
12719 msgstr ""
12720 "ポインタ I<iov> は I<iovec> 構造体の配列を指す。 I<iovec> 構造体は "
12721 "I<E<lt>sys/uio.hE<gt>> で以下のように定義されている:"
12722
12723 #. type: Plain text
12724 #: build/C/man2/vmsplice.2:71
12725 #, no-wrap
12726 msgid ""
12727 "struct iovec {\n"
12728 "    void  *iov_base;            /* Starting address */\n"
12729 "    size_t iov_len;             /* Number of bytes */\n"
12730 "};\n"
12731 msgstr ""
12732 "struct iovec {\n"
12733 "    void  *iov_base;            /* 開始アドレス */\n"
12734 "    size_t iov_len;             /* バイト数 */\n"
12735 "};\n"
12736
12737 #. type: Plain text
12738 #: build/C/man2/vmsplice.2:84
12739 msgid "Unused for B<vmsplice>(); see B<splice>(2)."
12740 msgstr "B<vmsplice>()  では未使用。 B<splice>(2)  参照。"
12741
12742 #. type: Plain text
12743 #: build/C/man2/vmsplice.2:97
12744 msgid ""
12745 "Currently has no effect for B<vmsplice>(), but may be implemented in the "
12746 "future; see B<splice>(2)."
12747 msgstr ""
12748 "現在のところ B<vmsplice>()  では何の効果もないが、将来的には実装される可能性"
12749 "がある。 B<splice>(2)  参照。"
12750
12751 #.  FIXME Explain the following line in a little more detail:
12752 #.  .... if we expect to later SPLICE_F_MOVE to the cache.
12753 #. type: Plain text
12754 #: build/C/man2/vmsplice.2:113
12755 msgid ""
12756 "The user pages are a gift to the kernel.  The application may not modify "
12757 "this memory ever, or page cache and on-disk data may differ.  Gifting pages "
12758 "to the kernel means that a subsequent B<splice>(2)  B<SPLICE_F_MOVE> can "
12759 "successfully move the pages; if this flag is not specified, then a "
12760 "subsequent B<splice>(2)  B<SPLICE_F_MOVE> must copy the pages.  Data must "
12761 "also be properly page aligned, both in memory and length."
12762 msgstr ""
12763 "ユーザ・ページがカーネルへ渡すもの (gift) であることを示す。 アプリケーション"
12764 "はこのメモリを絶対に変更してはならない。 さもなければ、ページキャッシュとディ"
12765 "スク上のデータは 一致しなくなるだろう。 ページをカーネルに渡すと、この次の "
12766 "B<splice>(2)  B<SPLICE_F_MOVE> でそのページの移動を行うことができる。 このフ"
12767 "ラグが指定されなかった場合、この次の B<splice>(2)  B<SPLICE_F_MOVE> でその"
12768 "ページのコピーを行わなければならない。 データはメモリ上でページ境界にあってい"
12769 "なければならず、 長さもページ境界の倍数でなければならない。"
12770
12771 #. type: Plain text
12772 #: build/C/man2/vmsplice.2:122
12773 msgid ""
12774 "Upon successful completion, B<vmsplice>()  returns the number of bytes "
12775 "transferred to the pipe.  On error, B<vmsplice>()  returns -1 and I<errno> "
12776 "is set to indicate the error."
12777 msgstr ""
12778 "成功して完了すると、 B<vmsplice>()  はパイプに転送したバイト数を返す。 エラー"
12779 "の場合、 B<vmplice>()  は -1 を返し、 I<errno> をエラーを示す値に設定する。"
12780
12781 #. type: Plain text
12782 #: build/C/man2/vmsplice.2:127
12783 msgid "I<fd> either not valid, or doesn't refer to a pipe."
12784 msgstr "I<fd> が有効でない、もしくはパイプを参照していない。"
12785
12786 #. type: Plain text
12787 #: build/C/man2/vmsplice.2:135
12788 msgid ""
12789 "I<nr_segs> is 0 or greater than B<IOV_MAX>; or memory not aligned if "
12790 "B<SPLICE_F_GIFT> set."
12791 msgstr ""
12792 "I<nr_segs> が 0 もしくは B<IOV_MAX> よりも大きい。または B<SPLICE_F_GIFT> が"
12793 "設定されたがメモリがページ境界にあっていない。"
12794
12795 #. type: Plain text
12796 #: build/C/man2/vmsplice.2:143
12797 msgid ""
12798 "The B<vmsplice>()  system call first appeared in Linux 2.6.17; library "
12799 "support was added to glibc in version 2.5."
12800 msgstr ""
12801 "B<vmsplice>() システムコールは Linux 2.6.17 で初めて登場した。\n"
12802 "ライブラリによるサポートは glibc バージョン 2.5 で追加された。"
12803
12804 #. type: Plain text
12805 #: build/C/man2/vmsplice.2:154
12806 msgid ""
12807 "B<vmsplice>()  follows the other vectorized read/write type functions when "
12808 "it comes to limitations on number of segments being passed in.  This limit "
12809 "is B<IOV_MAX> as defined in I<E<lt>limits.hE<gt>>.  At the time of this "
12810 "writing, that limit is 1024."
12811 msgstr ""
12812 "指定されたセグメント数が上限に達した場合、 B<vmsplice>()  は他のベクトル形式"
12813 "の read/write を行う関数と同じ動作をする。 上限は B<IOV_MAX> であり、 "
12814 "I<E<lt>limits.hE<gt>> で定義されている。 このドキュメントを書いた時点での値"
12815 "は 1024 である。"
12816
12817 #. type: Plain text
12818 #: build/C/man2/vmsplice.2:157
12819 msgid "B<splice>(2), B<tee>(2)"
12820 msgstr "B<splice>(2), B<tee>(2)"
12821
12822 #~ msgid "2013-12-12"
12823 #~ msgstr "2013-12-12"
12824
12825 #~ msgid "2012-04-25"
12826 #~ msgstr "2012-04-25"
12827
12828 #~ msgid "2003-01-01"
12829 #~ msgstr "2003-01-01"
12830
12831 #~ msgid ""
12832 #~ "This function will return the current B<personality>()  when I<persona> "
12833 #~ "equals 0xffffffff.  Otherwise, it will make the execution domain "
12834 #~ "referenced by I<persona> the new execution domain of the calling process."
12835 #~ msgstr ""
12836 #~ "B<personality ()> 関数は、 I<persona> が 0xffffffff の場合は現在の B<パー"
12837 #~ "ソナリティ> を返す。 それ以外の場合、 I<persona> により参照される実行ドメ"
12838 #~ "インを、 呼び出し元のプロセスの新しい実行ドメインとする。"
12839
12840 #~ msgid ""
12841 #~ "Depending on which operation was executed, the returned value for a "
12842 #~ "successful call can have differing meanings."
12843 #~ msgstr "どの操作が実行されたかによって、 成功時の返り値の意味が変わる。"
12844
12845 #~ msgid ""
12846 #~ "Returns 0 if the process was woken by a B<FUTEX_WAKE> call.  In case of "
12847 #~ "timeout, the operation fails with the error B<ETIMEDOUT>.  If the futex "
12848 #~ "was not equal to the expected value, the operation fails with the error "
12849 #~ "B<EWOULDBLOCK>.  Signals (see B<signal>(7))  or other spurious wakeups "
12850 #~ "cause B<FUTEX_WAIT> to fail with the error B<EINTR>."
12851 #~ msgstr ""
12852 #~ "プロセスが B<FUTEX_WAKE> の呼び出しで wake すると 0 を返す。 タイムアウト"
12853 #~ "の場合、操作はエラー B<ETIMEOUT> で失敗する。 futex が指定された値と等しく"
12854 #~ "ない場合、 エラー B<EWOULDBLOCK> で失敗する。 シグナルを受信するか "
12855 #~ "(B<signal>(7)  参照) 他の偽の wake があった場合には、エラー B<EINTR> で失"
12856 #~ "敗する。"
12857
12858 #~ msgid "An operation was not defined or error in page alignment."
12859 #~ msgstr ""
12860 #~ "操作が定義されていない。またはページ・アラインメントでエラーが発生した。"
12861
12862 #~ msgid ""
12863 #~ "Stop the child at the next B<execve>(2)  call with I<SIGTRAP | "
12864 #~ "PTRACE_EVENT_EXEC\\ E<lt>E<lt>\\ 8>."
12865 #~ msgstr ""
12866 #~ "次の B<execve>(2)  呼び出し時に I<SIGTRAP | PTRACE_EVENT_EXEC\\ E<lt>E<lt>"
12867 #~ "\\ 8> で子プロセスの動作を停止させる。"
12868
12869 #~ msgid ""
12870 #~ "Stop the child at the completion of the next B<vfork>(2)  call with "
12871 #~ "I<SIGTRAP | PTRACE_EVENT_VFORK_DONE\\ E<lt>E<lt>\\ 8>."
12872 #~ msgstr ""
12873 #~ "次の B<vfork>(2)  呼び出し時に I<SIGTRAP | PTRACE_EVENT_VFORK_DONE\\ "
12874 #~ "E<lt>E<lt>\\ 8> で子プロセスの動作を停止させる。"
12875
12876 #~ msgid ""
12877 #~ "Attaches to the process specified in I<pid>, making it a traced \"child\" "
12878 #~ "of the calling process; the behavior of the child is as if it had done a "
12879 #~ "B<PTRACE_TRACEME>.  The calling process actually becomes the parent of "
12880 #~ "the child process for most purposes (e.g., it will receive notification "
12881 #~ "of child events and appears in B<ps>(1)  output as the child's parent), "
12882 #~ "but a B<getppid>(2)  by the child will still return the PID of the "
12883 #~ "original parent.  The child is sent a B<SIGSTOP>, but will not "
12884 #~ "necessarily have stopped by the completion of this call; use B<wait>(2)  "
12885 #~ "to wait for the child to stop.  (I<addr> and I<data> are ignored.)"
12886 #~ msgstr ""
12887 #~ "I<pid> で指定されたプロセスに接続 (attach) し、それを呼び出し元のプロセス"
12888 #~ "の 子プロセスとしてトレースできるようにする。子プロセスは "
12889 #~ "B<PTRACE_TRACEME> したかのように振舞う。呼び出し元のプロセスはそのほとんど"
12890 #~ "の目的において、 その子プロセスの実際の親になる (例えば、子プロセスのイベ"
12891 #~ "ントの 通知を受けとったり、 B<ps>(1)  で親として表示されたりする)。しか"
12892 #~ "し、子プロセスで B<getppid>(2)  を実行した場合には元の親プロセスの PID が"
12893 #~ "返される。 子プロセスには B<SIGSTOP> が送られるが、この呼び出しが完了する"
12894 #~ "までに 必ずしも停止するとは限らない。子プロセスの停止を待つには "
12895 #~ "B<wait>(2)  を使用すること。(I<addr> と I<data> は無視される。)"
12896
12897 #~ msgid ""
12898 #~ "Tracing causes a few subtle differences in the semantics of traced "
12899 #~ "processes.  For example, if a process is attached to with "
12900 #~ "B<PTRACE_ATTACH>, its original parent can no longer receive notification "
12901 #~ "via B<wait>(2)  when it stops, and there is no way for the new parent to "
12902 #~ "effectively simulate this notification."
12903 #~ msgstr ""
12904 #~ "トレースすることによってトレースされるプロセスの動作に些細な違いが 起こる"
12905 #~ "ことがある。例えば、プロセスが B<PTRACE_ATTACH> によって接続された場合に"
12906 #~ "は、そのプロセスが停止した時でも本来の親は B<wait>(2)  を使って通知を受け"
12907 #~ "ることができず、新しい親が効率よく この通知を真似る方法もない。"
12908
12909 #~ msgid ""
12910 #~ "When the parent receives an event with B<PTRACE_EVENT_*> set, the child "
12911 #~ "is not in the normal signal delivery path.  This means the parent cannot "
12912 #~ "do B<ptrace>(PTRACE_CONT)  with a signal or B<ptrace>(PTRACE_KILL).  "
12913 #~ "B<kill>(2)  with a B<SIGKILL> signal can be used instead to kill the "
12914 #~ "child process after receiving one of these messages."
12915 #~ msgstr ""
12916 #~ "親プロセスが B<PTRACE_EVENT_*> がセットされたイベントを受信した場合、 子プ"
12917 #~ "ロセスは通常通りのシグナル配送が行われる状態にない。 つまり、親プロセス"
12918 #~ "が、 シグナルにより B<ptrace>(PTRACE_CONT)  を行ったり、 "
12919 #~ "B<ptrace>(PTRACE_KILL)  を行ったりできないということである。 こららのメッ"
12920 #~ "セージの受信後は、子プロセスを終了 (kill) するのに、 シグナル B<SIGKILL> "
12921 #~ "を指定して B<kill>(2)  を行う方法を代わりに使用できる。"
12922
12923 #~ msgid ""
12924 #~ "The SunOS man page describes B<ptrace>()  as \"unique and arcane\", which "
12925 #~ "it is.  The proc-based debugging interface present in Solaris 2 "
12926 #~ "implements a superset of B<ptrace>()  functionality in a more powerful "
12927 #~ "and uniform way."
12928 #~ msgstr ""
12929 #~ "SunOS のマニュアル・ページには B<ptrace>()  は「独特で不可解」と記述されて"
12930 #~ "おり、まさしくそうである。 Solaris 2 では proc ベースの デバッグのインター"
12931 #~ "フェースとして B<ptrace>()  の上位互換関数が実装され、より強力で一貫性のあ"
12932 #~ "るものとなっている。"
12933
12934 #~ msgid ""
12935 #~ "The second argument I<special> is the block special device these quota "
12936 #~ "apply to.  It must be mounted."
12937 #~ msgstr ""
12938 #~ "二番目の引き数 I<special> は quota を適用するデバイスのブロック・スペシャ"
12939 #~ "ル・ファイルである。 そのデバイスはマウントされていなくてはならない。"
12940
12941 #~ msgid ""
12942 #~ "The third argument I<id> is the user or group ID these quota apply to "
12943 #~ "(when relevant)."
12944 #~ msgstr ""
12945 #~ "三番目の引き数 I<id> には、(必要な場合に) quota を適用するユーザーもしくは"
12946 #~ "グループの ID を指定する。"
12947
12948 #~ msgid ""
12949 #~ "The fourth argument I<addr> is the address of a data structure, depending "
12950 #~ "on the command."
12951 #~ msgstr ""
12952 #~ "四番目の引き数 I<addr> には、コマンドごとに異ったデータ構造体のアドレスを"
12953 #~ "指定する。"
12954
12955 #~ msgid ""
12956 #~ "Enable quota.  The I<addr> argument is the pathname of the file "
12957 #~ "containing the quota for the file system."
12958 #~ msgstr ""
12959 #~ "quota を有効にする。 I<addr> 引き数には、そのファイル・システムの quota が"
12960 #~ "記録されているファイルの パス名を指定する。"
12961
12962 #~ msgid "Disable quota."
12963 #~ msgstr "quota を無効にする。"
12964
12965 #~ msgid "Set limits and current usage; I<addr> is as before."
12966 #~ msgstr "制限値と現在の使用量を設定する: I<addr> は同上。"
12967
12968 #~ msgid "Set limits; I<addr> is as before."
12969 #~ msgstr "制限値を設定する; I<addr> は同上。"
12970
12971 #~ msgid "Set usage."
12972 #~ msgstr "使用量を設定する。"
12973
12974 #~ msgid "Sync disk copy of a file system's quota."
12975 #~ msgstr "ファイル・システムの quota ファイルをディスクと同期させる。"
12976
12977 #~ msgid "Get collected stats."
12978 #~ msgstr "収集された統計を取得する。"
12979
12980 #~ msgid ""
12981 #~ "On success, B<quotactl>()  returns 0.  On error, -1 is returned, and "
12982 #~ "I<errno> is set appropriately."
12983 #~ msgstr ""
12984 #~ "B<quotactl>()  は、成功時には 0 を返す。エラー時は、-1 を返すとともに、 "
12985 #~ "I<errno> が適切な値に設定される。"
12986
12987 #~ msgid "B<Q_QUOTAON> was asked, but quotas were enabled already."
12988 #~ msgstr "B<Q_QUOTAON> の要求がなされたが、quota(s) は既に有効になっている。"
12989
12990 #~ msgid "Bad I<addr> value."
12991 #~ msgstr "I<addr> の値に誤りがある。"
12992
12993 #~ msgid ""
12994 #~ "I<type> is not a known quota type.  Or, I<special> could not be found."
12995 #~ msgstr ""
12996 #~ "I<type> が既知の quota の形式ではない。もしくは、 I<special> デバイスが見"
12997 #~ "付からなかった。"
12998
12999 #~ msgid "Too many open files: cannot open quota file."
13000 #~ msgstr "ファイルをオープンしすぎている: quota ファイルをオープン出来ない。"
13001
13002 #~ msgid "I<special> cannot be found in the mount table."
13003 #~ msgstr "I<special> がマウント・テーブル内に見当たらない。"
13004
13005 #~ msgid "The kernel was compiled without quota support."
13006 #~ msgstr "quota を使用可にしてカーネルをコンパイルしていない。"
13007
13008 #~ msgid ""
13009 #~ "The process was not root (for the file system), and B<Q_GETQUOTA> was "
13010 #~ "asked for another I<id> than that of the process itself, or anything "
13011 #~ "other than B<Q_GETSTATS> or B<Q_SYNC> was asked."
13012 #~ msgstr ""
13013 #~ "プロセスが (そのファイル・システムの) root のものではなく、 かつプロセス自"
13014 #~ "身のものとは異なる I<id> に対して B<Q_GETQUOTA> 要求を行なった。 もしく"
13015 #~ "は、 B<Q_GETSTATS>, B<Q_SYNC> 以外の要求がなされた。"
13016
13017 #~ msgid ""
13018 #~ "B<Q_GETQUOTA> or B<Q_SETQUOTA> or B<Q_SETUSE> or B<Q_SETQLIM> was asked "
13019 #~ "for a file system that didn't have quota enabled."
13020 #~ msgstr ""
13021 #~ "quota が有効になっていないファイル・システムに対して B<Q_GETQUOTA>, "
13022 #~ "B<Q_SETQUOTA>, B<Q_SETUSE>, B<Q_SETQLIM> のいずれかの要求がなされた。"