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.
8 "Project-Id-Version: PACKAGE VERSION\n"
9 "POT-Creation-Date: 2015-01-23 22:24+0900\n"
10 "PO-Revision-Date: 2015-01-27 02:55+0900\n"
11 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12 "Language-Team: LANGUAGE <LL@li.org>\n"
15 "Content-Type: text/plain; charset=UTF-8\n"
16 "Content-Transfer-Encoding: 8bit\n"
19 #: build/C/man2/arch_prctl.2:25
25 #: build/C/man2/arch_prctl.2:25
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:46
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
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:46 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
59 msgid "Linux Programmer's Manual"
60 msgstr "Linux Programmer's Manual"
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:47
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
79 #: build/C/man2/arch_prctl.2:28
80 msgid "arch_prctl - set architecture-specific thread state"
81 msgstr "arch_prctl - アーキテクチャー固有のスレッド状態を設定する"
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:49
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
100 #: build/C/man2/arch_prctl.2:31
102 msgid "B<#include E<lt>asm/prctl.hE<gt>>\n"
103 msgstr "B<#include E<lt>asm/prctl.hE<gt>>\n"
106 #: build/C/man2/arch_prctl.2:33
108 msgid "B<#include E<lt>sys/prctl.hE<gt>>\n"
109 msgstr "B<#include E<lt>sys/prctl.hE<gt>>\n"
112 #: build/C/man2/arch_prctl.2:36
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"
119 #. Return type was long before glibc 2.7
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:56
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
137 #: build/C/man2/arch_prctl.2:52
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."
144 "B<arch_prctl>() 関数はアーキテクチャー固有のプロセス状態またはスレッド状態を"
145 "設定する。 I<code> は副機能を選択し、引き数 I<addr> を副機能に渡す。 I<addr> "
146 "は、\"set\" 操作では I<unsigned long> として、\"get\" 操作では I<unsigned "
147 "long\\ *> として解釈される。"
150 #: build/C/man2/arch_prctl.2:54
151 msgid "Subfunctions for x86-64 are:"
152 msgstr "x86-64 の副機能は以下の通り:"
155 #: build/C/man2/arch_prctl.2:54
157 msgid "B<ARCH_SET_FS>"
158 msgstr "B<ARCH_SET_FS>"
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> に設定する。"
166 #: build/C/man2/arch_prctl.2:60
168 msgid "B<ARCH_GET_FS>"
169 msgstr "B<ARCH_GET_FS>"
172 #: build/C/man2/arch_prctl.2:68
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>."
177 "現在のスレッドの I<FS> レジスターの 64 ビットベース値を、 I<addr> が指す "
178 "I<unsigned long> の領域に格納する。"
181 #: build/C/man2/arch_prctl.2:68
183 msgid "B<ARCH_SET_GS>"
184 msgstr "B<ARCH_SET_GS>"
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> に設定する。"
192 #: build/C/man2/arch_prctl.2:74
194 msgid "B<ARCH_GET_GS>"
195 msgstr "B<ARCH_GET_GS>"
198 #: build/C/man2/arch_prctl.2:82
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>."
203 "現在のスレッドの I<GS> レジスターの 64 ビットベース値を、 I<addr> が指す "
204 "I<unsigned long> の領域に格納する。"
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:117 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:2551
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:1896 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:135 build/C/man2/tee.2:85 build/C/man2/vm86.2:54
217 #: build/C/man2/vmsplice.2:117
223 #: build/C/man2/arch_prctl.2:88
225 "On success, B<arch_prctl>() returns 0; on error, -1 is returned, and "
226 "I<errno> is set to indicate the error."
228 "成功すると、 B<arch_prctl>() は 0 を返す。エラーの場合、-1 を返し、 "
229 "I<errno> をエラーを示す値に設定する。"
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:124 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:2557 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:1911 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:150 build/C/man2/tee.2:100 build/C/man2/vm86.2:59
241 #: build/C/man2/vmsplice.2:126
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:2603
250 #: build/C/man2/process_vm_readv.2:267 build/C/man2/process_vm_readv.2:272
251 #: build/C/man2/ptrace.2:1915 build/C/man2/quotactl.2:428
252 #: build/C/man2/sendfile.2:125 build/C/man2/vm86.2:60
258 #: build/C/man2/arch_prctl.2:93
260 "I<addr> points to an unmapped address or is outside the process address "
263 "I<addr> がアンマップされたアドレスを指しているか、プロセスのアドレス空間の外"
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:129
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:2608
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:1926
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:161
276 #: build/C/man2/tee.2:107 build/C/man2/vmsplice.2:137
282 #: build/C/man2/arch_prctl.2:97
283 msgid "I<code> is not a valid subcommand."
284 msgstr "I<code> が有効なサブコマンドでない。"
287 #: build/C/man2/arch_prctl.2:97 build/C/man2/get_robust_list.2:99
288 #: build/C/man2/kexec_load.2:136 build/C/man2/lookup_dcookie.2:65
289 #: build/C/man2/pciconfig_read.2:105 build/C/man2/perf_event_open.2:2675
290 #: build/C/man2/pivot_root.2:120 build/C/man2/process_vm_readv.2:283
291 #: build/C/man2/ptrace.2:1936 build/C/man2/quotactl.2:456
292 #: build/C/man2/vm86.2:68
298 #. Man page written by Andi Kleen.
300 #: build/C/man2/arch_prctl.2:103
301 msgid "I<addr> is outside the process address space."
302 msgstr "I<addr> がプロセスのアドレス空間の外にある。"
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:145
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:2696
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:1954 build/C/man2/sendfile.2:148
313 #: build/C/man2/set_tid_address.2:97 build/C/man2/splice.2:184
314 #: build/C/man2/tee.2:125 build/C/man2/vm86.2:73 build/C/man2/vmsplice.2:153
316 msgid "CONFORMING TO"
320 #: build/C/man2/arch_prctl.2:107
322 "B<arch_prctl>() is a Linux/x86-64 extension and should not be used in "
323 "programs intended to be portable."
325 "B<arch_prctl>() は Linux/x86-64 拡張であり、移植性を意図したプログラムでは使"
329 #: build/C/man2/arch_prctl.2:107 build/C/man2/futex.2:305
330 #: build/C/man2/get_robust_list.2:118 build/C/man2/getunwind.2:99
331 #: build/C/man2/kexec_load.2:147 build/C/man2/lookup_dcookie.2:81
332 #: build/C/man2/modify_ldt.2:133 build/C/man2/perf_event_open.2:2701
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:1956
335 #: build/C/man2/sendfile.2:155 build/C/man2/splice.2:186
336 #: build/C/man2/tee.2:127 build/C/man2/vmsplice.2:155
342 #: build/C/man2/arch_prctl.2:110
344 "B<arch_prctl>() is supported only on Linux/x86-64 for 64-bit programs "
347 "B<arch_prctl>() は現在のところ Linux/x86-64 上の 64 ビットプログラムでのみサ"
351 #: build/C/man2/arch_prctl.2:112
352 msgid "The 64-bit base changes when a new 32-bit segment selector is loaded."
354 "新しい 32 ビットセグメントセレクタがロードされた場合、 64 ビットベースは変更"
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> が無効にされているカーネルもある。"
363 #: build/C/man2/arch_prctl.2:130
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."
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> フラグを指定して割り当てることができる。"
380 #: build/C/man2/arch_prctl.2:135
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 "
386 "バージョン 2.7 時点では、glibc には B<arch_prctl>() のプロトタイプがない。 "
387 "今のところユーザーは自分自身で宣言する必要がある。 これは将来の glibc のバー"
391 #: build/C/man2/arch_prctl.2:138
392 msgid "I<FS> may be already used by the threading library."
393 msgstr "I<FS> はスレッドライブラリで既に使われているかもしれない。"
396 #: build/C/man2/arch_prctl.2:138 build/C/man2/futex.2:319
397 #: build/C/man2/get_robust_list.2:127 build/C/man2/getunwind.2:111
398 #: build/C/man2/kexec_load.2:162 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:2832 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:2122 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:240 build/C/man2/tee.2:214
405 #: build/C/man2/vmsplice.2:164
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)"
416 #: build/C/man2/arch_prctl.2:145
417 msgid "AMD X86-64 Programmer's manual"
418 msgstr "AMD X86-64 Programmer's manual"
421 #: build/C/man2/arch_prctl.2:145 build/C/man2/futex.2:333
422 #: build/C/man2/get_robust_list.2:136 build/C/man2/getunwind.2:113
423 #: build/C/man2/kexec_load.2:165 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:2838 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:2137
429 #: build/C/man2/quotactl.2:512 build/C/man2/sendfile.2:203
430 #: build/C/man2/set_tid_address.2:103 build/C/man2/splice.2:244
431 #: build/C/man2/tee.2:217 build/C/man2/vm86.2:76 build/C/man2/vmsplice.2:167
437 #: build/C/man2/arch_prctl.2:153 build/C/man2/futex.2:341
438 #: build/C/man2/get_robust_list.2:144 build/C/man2/getunwind.2:121
439 #: build/C/man2/kexec_load.2:173 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:2846 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:2145
445 #: build/C/man2/quotactl.2:520 build/C/man2/sendfile.2:211
446 #: build/C/man2/set_tid_address.2:111 build/C/man2/splice.2:252
447 #: build/C/man2/tee.2:225 build/C/man2/vm86.2:84 build/C/man2/vmsplice.2:175
449 "This page is part of release 3.78 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-"
454 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.78 の一部\n"
455 "である。プロジェクトの説明とバグ報告に関する情報は\n"
456 "http://www.kernel.org/doc/man-pages/ に書かれている。"
459 #: build/C/man2/futex.2:53
465 #: build/C/man2/futex.2:53
471 #: build/C/man2/futex.2:56
472 msgid "futex - fast user-space locking"
473 msgstr "futex - 高速ユーザー空間ロック"
476 #: build/C/man2/futex.2:61
479 "B<#include E<lt>linux/futex.hE<gt>>\n"
480 "B<#include E<lt>sys/time.hE<gt>>\n"
482 "B<#include E<lt>linux/futex.hE<gt>>\n"
483 "B<#include E<lt>sys/time.hE<gt>>\n"
486 #: build/C/man2/futex.2:64
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"
491 #. int *? void *? u32 *?
493 #: build/C/man2/futex.2:67
495 msgid "B< int *>I<uaddr2>B<, int >I<val3>B<);>\n"
496 msgstr "B< int *>I<uaddr2>B<, int >I<val3>B<);>\n"
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."
505 "I<注>: このシステムコールには glibc のラッパー関数は存在しない。「注意」の節"
509 #: build/C/man2/futex.2:86
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)."
519 "B<futex>() システムコールは、 指定したアドレスの値が変更されるのをプログラム"
520 "が待つ手段や 特定のアドレスに対して待機中のプロセスを wake (起床) させる手段"
521 "を提供する (プロセスが異なれば同じメモリーに対するアドレスも同じではないかも"
522 "しれないが、 カーネルは異なる位置にマップされた同じメモリーを B<futex>() で"
523 "使えるよう内部でマップする)。 通常は、このシステムコールは B<futex>(7) に書"
524 "かれているように、 共有メモリー中のロックが競合する場合の処理を実装するのに用"
528 #: build/C/man2/futex.2:93
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 "
535 "B<futex>(7) の操作がユーザー空間で競合なく完了しなかった場合、 カーネルに仲"
536 "裁させるためにシステムコールを呼ぶ必要がある。 仲裁というのは、呼び出しプロセ"
537 "スを sleep (起床待ち) させたり、反対に 待ちプロセスを wake させたりすることを"
541 #: build/C/man2/futex.2:100
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."
548 "この関数を呼び出すプロセスは B<futex>(7) に記述されているセマンティクスに忠"
549 "実であることが要求される。 このセマンティクスには移植不可能なアセンブリ命令を"
550 "書くことが含まれる。 このことは言い換えると futex のユーザーのほとんどは実際"
551 "はライブラリの作者であり、 一般アプリケーションの開発者ではないということであ"
555 #: build/C/man2/futex.2:108
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>."
561 "I<uaddr> 引き数は、カウンターを格納する、 アラインメントの揃った int 型変数を"
562 "指している必要がある。 実行する操作は I<op> 引き数を介して、値 I<val> ととも"
566 #: build/C/man2/futex.2:110
567 msgid "Five operations are currently defined:"
568 msgstr "現在のところ 5 つの操作が定義されている:"
571 #: build/C/man2/futex.2:110 build/C/man2/futex.2:223
573 msgid "B<FUTEX_WAIT>"
574 msgstr "B<FUTEX_WAIT>"
577 #: build/C/man2/futex.2:133
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."
587 "この操作は futex アドレス I<uaddr> に指定された値 I<val> がまだ格納されている"
588 "かどうかを不可分操作で検証し、 sleep 状態で この futex アドレスに対して "
589 "B<FUTEX_WAKE> が実行されるのを待つ。 I<timeout> 引き数が NULL でない場合、そ"
590 "の内容は待ち時間の最大値を表す (この停止時間はシステムクロックの粒度に切り上"
591 "げられ、 カーネルのスケジューリング遅延により少しだけ長くなる可能性がある)。 "
592 "NULL の場合、 呼び出しは無限に停止する。 引き数 I<uaddr2> と I<val3> は無視さ"
596 #: build/C/man2/futex.2:141
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."
602 "B<futex>(7) に照らし合わせると、この呼び出しは カウントのデクリメントで負の"
603 "値 (競合を表す) になった場合に実行され、 別のプロセスがその futex を解放し "
604 "B<FUTEX_WAKE> の操作を実行するまで sleep する。"
607 #: build/C/man2/futex.2:141 build/C/man2/futex.2:229
609 msgid "B<FUTEX_WAKE>"
610 msgstr "B<FUTEX_WAKE>"
613 #: build/C/man2/futex.2:152
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."
619 "この操作では指定した futex アドレスに対して待ち状態の (すなわち "
620 "B<FUTEX_WAIT> 中の) 最大 I<val> 個のプロセスを wake させる。 引き数 "
621 "I<timeout>, I<uaddr2>, I<val3> は無視される。"
624 #: build/C/man2/futex.2:158
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 "
630 "B<futex>(4) に照らし合わせると、 この操作は カウントのインクリメントで待ちプ"
631 "ロセスがあると判明し、 futex 値が 1 に設定された (利用可能であることを表す) "
635 #: build/C/man2/futex.2:158
637 msgid "B<FUTEX_FD> (present up to and including Linux 2.6.25)"
638 msgstr "B<FUTEX_FD> (Linux 2.6.25 以前)"
640 #. , suitable for .BR poll (2).
642 #: build/C/man2/futex.2:174
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."
650 "非同期の wake に対応するため、この操作はファイルディスクリプターを futex に "
651 "関連づける。 別のプロセスが B<FUTEX_WAKE> を実行すると、プロセスは I<val> で"
652 "渡されたシグナル番号のシグナルを受信する。 呼び出しプロセスは使用後、返された"
653 "ファイルディスクリプターを クローズしなければならない。 引き数 I<timeout>, "
654 "I<uaddr2>, I<val3> は無視される。"
657 #: build/C/man2/futex.2:179
659 "To prevent race conditions, the caller should test if the futex has been "
660 "upped after B<FUTEX_FD> returns."
662 "競合状態を防止するため、呼び出しプロセスは B<FUTEX_FD> が返ったあと futex が "
663 "up されたかどうかを確認しなければならない。"
666 #: build/C/man2/futex.2:183
668 "Because it was inherently racy, B<FUTEX_FD> has been removed from Linux "
671 "B<FUTEX_FD> はもともと競合が起きやすかったため、 Linux 2.6.26 以降で削除され"
675 #: build/C/man2/futex.2:183
677 msgid "B<FUTEX_REQUEUE> (since Linux 2.5.70)"
678 msgstr "B<FUTEX_REQUEUE> (Linux 2.5.70 以降)"
681 #: build/C/man2/futex.2:198
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."
689 "この操作は、 B<FUTEX_WAKE> が使われていて、かつ wake されている全てのプロセス"
690 "が 他の futex を取得する必要がある場合に、 「獣の群れの暴走 (thundering "
691 "herd)」効果を避けるために導入された。 この呼び出しは I<val> 個のプロセスを "
692 "wake し、アドレス I<uaddr2> で futex を待っている他の全てのプロセスを再度"
693 "キューにいれる。 引き数 I<timeout> と I<val3> は無視される。"
696 #: build/C/man2/futex.2:198
698 msgid "B<FUTEX_CMP_REQUEUE> (since Linux 2.6.7)"
699 msgstr "B<FUTEX_CMP_REQUEUE> (Linux 2.6.7 以降)"
702 #: build/C/man2/futex.2:216
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."
710 "故意に B<FUTEX_REQUEUE> を使う場合に競合が起こるため、 B<FUTEX_CMP_REQUEUE> "
711 "が導入された。これは B<FUTEX_REQUEUE> と似ているが、場所 I<uaddr> に値 "
712 "I<val3> がまだ保持されているかを最初にチェックする。 保持されていない場合、操"
713 "作はエラー B<EAGAIN> で失敗する。引き数 I<timeout> は無視される。"
716 #: build/C/man2/futex.2:223
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:"
722 "エラーの場合、全ての操作で -1 が返り、 I<errno> がエラーの内容を示す値に設定"
723 "される。成功時の返り値は操作によって異なり、以下のリストに書かれている通りで"
727 #: build/C/man2/futex.2:229
729 "Returns 0 if the process was woken by a B<FUTEX_WAKE> call. See ERRORS for "
730 "the various possible error returns."
732 "そのプロセスが B<FUTEX_WAKE> により wake された場合 0 を返す。発生する可能性"
733 "があるエラーについては「エラー」の節を参照。"
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 したプロセスの数を返す。"
741 #: build/C/man2/futex.2:232
747 #: build/C/man2/futex.2:235
748 msgid "Returns the new file descriptor associated with the futex."
749 msgstr "futex に関連づけられた新たなファイルディスクリプターを返す。"
752 #: build/C/man2/futex.2:235
754 msgid "B<FUTEX_REQUEUE>"
755 msgstr "B<FUTEX_REQUEUE>"
758 #: build/C/man2/futex.2:238
760 msgid "B<FUTEX_CMP_REQUEUE>"
761 msgstr "B<FUTEX_CMP_REQUEUE>"
764 #: build/C/man2/futex.2:242 build/C/man2/perf_event_open.2:2579
765 #: build/C/man2/quotactl.2:486
771 #: build/C/man2/futex.2:245
772 msgid "No read access to futex memory."
773 msgstr "futex メモリーに読み込みアクセス権がなかった。"
776 #: build/C/man2/futex.2:245 build/C/man2/sendfile.2:116
777 #: build/C/man2/splice.2:151 build/C/man2/tee.2:101
778 #: build/C/man2/vmsplice.2:127
784 #: build/C/man2/futex.2:256
786 "B<FUTEX_CMP_REQUEUE> detected that the value pointed to by I<uaddr> is not "
787 "equal to the expected value I<val3>. (This probably indicates a race; use "
788 "the safe B<FUTEX_WAKE> now.)"
790 "B<FUTEX_CMP_REQUEUE> で、I<uaddr> が指す値が期待値 I<val3> と異なる状況が検出"
791 "された。 (これは競合を示しているかもしれない。この場合は安全な B<FUTEX_WAKE> "
795 #: build/C/man2/futex.2:261
796 msgid "Error retrieving I<timeout> information from user space."
797 msgstr "ユーザー空間から I<timeout> の情報を取得する際にエラーが発生した。"
800 #: build/C/man2/futex.2:261
806 #: build/C/man2/futex.2:268
808 "A B<FUTEX_WAIT> operation was interrupted by a signal (see B<signal>(7)) or "
811 "B<FUTEX_WAIT> 操作がシグナル (B<signal>(7) 参照) もしくは偽の wakeup により中"
815 #: build/C/man2/futex.2:271
816 msgid "Invalid argument."
820 #: build/C/man2/futex.2:271
826 #: build/C/man2/futex.2:274
827 msgid "The system limit on the total number of open files has been reached."
828 msgstr "オープンされているファイルの総数がシステムの制限に達した。"
831 #: build/C/man2/futex.2:274 build/C/man2/modify_ldt.2:126
832 #: build/C/man2/pciconfig_read.2:93 build/C/man2/perf_event_open.2:2661
833 #: build/C/man2/quotactl.2:447 build/C/man2/vm86.2:64
839 #: build/C/man2/futex.2:278
840 msgid "Invalid operation specified in I<op>."
841 msgstr "I<op> に無効な操作が指定された。"
844 #: build/C/man2/futex.2:278
847 msgstr "B<ETIMEDOUT>"
850 #: build/C/man2/futex.2:283
851 msgid "Timeout during the B<FUTEX_WAIT> operation."
852 msgstr "B<FUTEX_WAIT> 操作でタイムアウトが発生した。"
855 #: build/C/man2/futex.2:283
857 msgid "B<EWOULDBLOCK>"
858 msgstr "B<EWOULDBLOCK>"
861 #: build/C/man2/futex.2:293
863 "I<op> was B<FUTEX_WAIT> and the value pointed to by I<uaddr> was not equal "
864 "to the expected value I<val> at the time of the call."
866 "I<op> が B<FUTEX_WAIT> で、その呼び出しにおいて I<uaddr> が指す値が期待値 "
870 #: build/C/man2/futex.2:293 build/C/man2/get_robust_list.2:116
871 #: build/C/man2/getunwind.2:94 build/C/man2/kexec_load.2:141
872 #: build/C/man2/lookup_dcookie.2:73 build/C/man2/perfmonctl.2:196
873 #: build/C/man2/pivot_root.2:125 build/C/man2/process_vm_readv.2:292
874 #: build/C/man2/sendfile.2:142 build/C/man2/set_tid_address.2:94
875 #: build/C/man2/splice.2:179 build/C/man2/tee.2:120
876 #: build/C/man2/vmsplice.2:148
882 #: build/C/man2/futex.2:303
884 "Initial futex support was merged in Linux 2.5.7 but with different semantics "
885 "from what was described above. A 4-argument system call with the semantics "
886 "described in this page was introduced in Linux 2.5.40. In Linux 2.5.70, one "
887 "argument was added. In Linux 2.6.7, a sixth argument was added\\(emmessy, "
888 "especially on the s390 architecture."
890 "最初の futex 対応は Linux 2.5.7 で組み込まれたが、 上記のセマンティクスとは異"
891 "なる。 4 つの引き数のここに書かれているセマンティクスを持つ システムコール"
892 "は、Linux 2.5.40 で導入された。 Linux 2.5.70 では 1 つの引き数が追加された。 "
893 "Linux 2.6.7 では 6 番目の引き数が追加された。 これは汚く、s390 アーキテク"
897 #: build/C/man2/futex.2:305 build/C/man2/kexec_load.2:147
898 #: build/C/man2/set_tid_address.2:99 build/C/man2/splice.2:186
899 #: build/C/man2/tee.2:127 build/C/man2/vmsplice.2:155
900 msgid "This system call is Linux-specific."
901 msgstr "このシステムコールは Linux 固有である。"
905 #. Futexes were designed and worked on by
906 #. Hubertus Franke (IBM Thomas J. Watson Research Center),
907 #. Matthew Kirkwood, Ingo Molnar (Red Hat)
908 #. and Rusty Russell (IBM Linux Technology Center).
909 #. This page written by bert hubert.
911 #: build/C/man2/futex.2:319
913 "To reiterate, bare futexes are not intended as an easy-to-use abstraction "
914 "for end-users. (There is no wrapper function for this system call in "
915 "glibc.) Implementors are expected to be assembly literate and to have read "
916 "the sources of the futex user-space library referenced below."
918 "繰り返すが、裸の futex はエンドユーザーが容易に使うことのできる概念として 意"
919 "図されたものではない (glibc にはこのシステムコールに対するラッパー関数はな"
920 "い)。 実装者は、アセンブリ言語に慣れており、以下に挙げる futex ユーザー空間ラ"
921 "イブラリの ソースを読み終えていることが要求される。"
924 #: build/C/man2/futex.2:322
925 msgid "B<restart_syscall>(2), B<futex>(7)"
926 msgstr "B<restart_syscall>(2), B<futex>(7)"
929 #: build/C/man2/futex.2:325
931 "I<Fuss, Futexes and Furwocks: Fast Userlevel Locking in Linux> (proceedings "
932 "of the Ottawa Linux Symposium 2002), online at"
934 "I<Fuss, Futexes and Furwocks: Fast Userlevel Locking in Linux> (proceedings "
935 "of the Ottawa Linux Symposium 2002), online at"
938 #: build/C/man2/futex.2:328
940 "E<.UR http://kernel.org\\:/doc\\:/ols\\:/2002\\:/ols2002-pages-479-495.pdf> "
943 "E<.UR http://kernel.org\\:/doc\\:/ols\\:/2002\\:/ols2002-pages-479-495.pdf> "
947 #: build/C/man2/futex.2:330
948 msgid "Futex example library, futex-*.tar.bz2 at"
949 msgstr "futex の使用例ライブラリ, futex-*.tar.bz2"
952 #: build/C/man2/futex.2:333
954 "E<.UR ftp://ftp.kernel.org\\:/pub\\:/linux\\:/kernel\\:/people\\:/rusty/> E<."
957 "E<.UR ftp://ftp.kernel.org\\:/pub\\:/linux\\:/kernel\\:/people\\:/rusty/> E<."
961 #: build/C/man2/get_robust_list.2:29
963 msgid "GET_ROBUST_LIST"
964 msgstr "GET_ROBUST_LIST"
967 #: build/C/man2/get_robust_list.2:29 build/C/man2/ptrace.2:46
973 #: build/C/man2/get_robust_list.2:29
975 msgid "Linux System Calls"
976 msgstr "Linux System Calls"
979 #: build/C/man2/get_robust_list.2:32
980 msgid "get_robust_list, set_robust_list - get/set list of robust futexes"
984 #: build/C/man2/get_robust_list.2:37
987 "B<#include E<lt>linux/futex.hE<gt>>\n"
988 "B<#include E<lt>sys/types.hE<gt>>\n"
989 "B<#include E<lt>syscall.hE<gt>>\n"
991 "B<#include E<lt>linux/futex.hE<gt>>\n"
992 "B<#include E<lt>sys/types.hE<gt>>\n"
993 "B<#include E<lt>syscall.hE<gt>>\n"
996 #: build/C/man2/get_robust_list.2:41
999 "B<long get_robust_list(int >I<pid>B<, struct robust_list_head **>I<head_ptr>B<,>\n"
1000 "B< size_t *>I<len_ptr>B<);>\n"
1001 "B<long set_robust_list(struct robust_list_head *>I<head>B<, size_t >I<len>B<);>\n"
1005 #: build/C/man2/get_robust_list.2:45
1006 msgid "I<Note>: There are no glibc wrappers for these system calls; see NOTES."
1008 "I<注意>: これらのシステムコールには glibc ラッパー関数は存在しない。 「注意」"
1012 #: build/C/man2/get_robust_list.2:50
1014 "The robust futex implementation needs to maintain per-thread lists of robust "
1015 "futexes which are unlocked when the thread exits. These lists are managed "
1016 "in user space; the kernel is notified about only the location of the head of "
1021 #: build/C/man2/get_robust_list.2:66
1023 "The B<get_robust_list>() system call returns the head of the robust futex "
1024 "list of the thread whose thread ID is specified in I<pid>. If I<pid> is 0, "
1025 "the head of the list for the calling thread is returned. The list head is "
1026 "stored in the location pointed to by I<head_ptr>. The size of the object "
1027 "pointed to by I<**head_ptr> is stored in I<len_ptr>."
1031 #: build/C/man2/get_robust_list.2:78
1033 "The B<set_robust_list>() system call requests the kernel to record the head "
1034 "of the list of robust futexes owned by the calling thread. The I<head> "
1035 "argument is the list head to record. The I<len> argument should be "
1040 #: build/C/man2/get_robust_list.2:85
1042 "The B<set_robust_list>() and B<get_robust_list>() system calls return zero "
1043 "when the operation is successful, an error code otherwise."
1047 #: build/C/man2/get_robust_list.2:89
1049 "The B<set_robust_list>() system call can fail with the following error:"
1053 #: build/C/man2/get_robust_list.2:95
1055 "I<len> does not match the size of structure B<struct robust_list_head> "
1056 "expected by kernel."
1060 #: build/C/man2/get_robust_list.2:99
1062 "The B<get_robust_list>() system call can fail with the following errors:"
1066 #: build/C/man2/get_robust_list.2:107
1068 "The calling process does not have permission to see the robust futex list of "
1069 "the thread with the thread ID I<pid>, and does not have the "
1070 "B<CAP_SYS_PTRACE> capability."
1074 #: build/C/man2/get_robust_list.2:107 build/C/man2/perf_event_open.2:2688
1075 #: build/C/man2/process_vm_readv.2:287 build/C/man2/ptrace.2:1949
1076 #: build/C/man2/quotactl.2:461 build/C/man2/quotactl.2:504
1082 #: build/C/man2/get_robust_list.2:112
1083 msgid "No thread with the thread ID I<pid> could be found."
1087 #: build/C/man2/get_robust_list.2:116
1089 "The head of the robust futex list can't be stored at the location I<head>."
1093 #: build/C/man2/get_robust_list.2:118
1094 msgid "These system calls were added in Linux 2.6.17."
1095 msgstr "これらのシステムコールは Linux 2.6.17 で追加された。"
1098 #: build/C/man2/get_robust_list.2:123
1100 "These system calls are not needed by normal applications. No support for "
1101 "them is provided in glibc. In the unlikely event that you want to call them "
1102 "directly, use B<syscall>(2)."
1104 "通常のアプリケーションでは、これらのシステムコールは必要ではない。 glibc によ"
1105 "るサポートは提供されていない。おそらくないと思うが、このシステムコールを直接"
1106 "呼び出したい場合は B<syscall>(2) を使うこと。"
1109 #: build/C/man2/get_robust_list.2:127
1111 "A thread can have only one robust futex list; therefore applications that "
1112 "wish to use this functionality should use the robust mutexes provided by "
1116 #. .BR pthread_mutexattr_setrobust_np (3)
1118 #: build/C/man2/get_robust_list.2:130
1120 msgstr "B<futex>(2)"
1122 #. http://lwn.net/Articles/172149/
1124 #: build/C/man2/get_robust_list.2:136
1126 "I<Documentation/robust-futexes.txt> and I<Documentation/robust-futex-ABI."
1127 "txt> in the Linux kernel source tree"
1131 #: build/C/man2/getunwind.2:27
1137 #: build/C/man2/getunwind.2:27
1143 #: build/C/man2/getunwind.2:30
1144 msgid "getunwind - copy the unwind data to caller's buffer"
1148 #: build/C/man2/getunwind.2:34
1151 "B<#include E<lt>syscall.hE<gt>>\n"
1152 "B<#include E<lt>linux/unwind.hE<gt>>\n"
1154 "B<#include E<lt>syscall.hE<gt>>\n"
1155 "B<#include E<lt>linux/unwind.hE<gt>>\n"
1158 #: build/C/man2/getunwind.2:36
1160 msgid "B<long getunwind(void >I<*buf>B<, size_t >I<buf_size>B<);>\n"
1164 #: build/C/man2/getunwind.2:42
1165 msgid "I<Note: this function is obsolete.>"
1169 #: build/C/man2/getunwind.2:52
1171 "The IA-64-specific B<getunwind>() system call copies the kernel's call "
1172 "frame unwind data into the buffer pointed to by I<buf> and returns the size "
1173 "of the unwind data; this data describes the gate page (kernel code that is "
1174 "mapped into user space)."
1178 #: build/C/man2/getunwind.2:64
1180 "The size of the buffer I<buf> is specified in I<buf_size>. The data is "
1181 "copied only if I<buf_size> is greater than or equal to the size of the "
1182 "unwind data and I<buf> is not NULL; otherwise, no data is copied, and the "
1183 "call succeeds, returning the size that would be needed to store the unwind "
1188 #: build/C/man2/getunwind.2:68
1190 "The first part of the unwind data contains an unwind table. The rest "
1191 "contains the associated unwind information, in no particular order. The "
1192 "unwind table contains entries of the following form:"
1196 #: build/C/man2/getunwind.2:73
1199 " u64 start; (64-bit address of start of function)\n"
1200 " u64 end; (64-bit address of end of function)\n"
1201 " u64 info; (BUF-relative offset to unwind info)\n"
1205 #: build/C/man2/getunwind.2:81
1207 "An entry whose I<start> value is zero indicates the end of the table. For "
1208 "more information about the format, see the I<IA-64 Software Conventions and "
1209 "Runtime Architecture> manual."
1213 #: build/C/man2/getunwind.2:88
1215 "On success, B<getunwind>() returns the size of the unwind data. On error, "
1216 "-1 is returned and I<errno> is set to indicate the error."
1218 "成功すると、 B<getunwind> は unwind されたデータのサイズを返す。 エラーの場"
1219 "合、 -1 が返り、 I<errno> にエラーを示す値が設定される。"
1222 #: build/C/man2/getunwind.2:94
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>."
1229 #: build/C/man2/getunwind.2:96
1230 msgid "This system call is available since Linux 2.4."
1234 #: build/C/man2/getunwind.2:99
1236 "This system call is Linux-specific, and is available only on the IA-64 "
1241 #: build/C/man2/getunwind.2:107
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))."
1249 #: build/C/man2/getunwind.2:111
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)."
1254 "glibc はこのシステムコールに対するラッパー関数を提供していない。おそらくない"
1255 "と思うが、このシステムコールを呼び出したい場合は B<syscall>(2) を使うこと。"
1258 #: build/C/man2/getunwind.2:113
1259 msgid "B<getauxval>(3)"
1260 msgstr "B<getauxval>(3)"
1263 #: build/C/man2/kexec_load.2:26
1269 #: build/C/man2/kexec_load.2:26 build/C/man2/process_vm_readv.2:29
1275 #: build/C/man2/kexec_load.2:29
1276 msgid "kexec_load - load a new kernel for later execution"
1277 msgstr "kexec_load - 新しいカーネルを後で実行するためにロードする"
1280 #: build/C/man2/kexec_load.2:31
1281 msgid "B<#include E<lt>linux/kexec.hE<gt>>"
1282 msgstr "B<#include E<lt>linux/kexec.hE<gt>>"
1285 #: build/C/man2/kexec_load.2:33
1287 "B<long kexec_load(unsigned long >I<entry>B<, unsigned long >I<nr_segments>B<,"
1290 "B<long kexec_load(unsigned long >I<entry>B<, unsigned long >I<nr_segments>B<,"
1294 #: build/C/man2/kexec_load.2:36
1295 msgid "B< struct kexec_segment *>I<segments>B<, unsigned long >I<flags>B<);>"
1296 msgstr "B< struct kexec_segment *>I<segments>B<, unsigned long >I<flags>B<);>"
1299 #: build/C/man2/kexec_load.2:44
1301 "The B<kexec_load>() system call loads a new kernel that can be executed "
1302 "later by B<reboot>(2)."
1304 "B<kexec_load>() システムコールは、新しいカーネルをロードし、\n"
1305 "その後の B<reboot>(2) で実行できるようにする。"
1308 #: build/C/man2/kexec_load.2:50
1310 "The I<flags> argument is a bit mask that controls the operation of the "
1311 "call. The following values can be specified in I<flags>:"
1313 "I<flags> 引き数は、システムコールの呼び出しの動作を制御するマスクビットであ"
1314 "る。 I<flags> には以下の値を指定できる。"
1317 #: build/C/man2/kexec_load.2:50
1319 msgid "B<KEXEC_ON_CRASH> (since Linux 2.6.13)"
1320 msgstr "B<KEXEC_ON_CRASH> (Linux 2.6.13 以降)"
1322 #. FIXME Explain in more detail how KEXEC_ON_CRASH is actually used
1324 #: build/C/man2/kexec_load.2:54
1325 msgid "Execute the new kernel automatically on a system crash."
1326 msgstr "システムのクラッシュ時に、新しいカーネルを自動的に実行する。"
1329 #: build/C/man2/kexec_load.2:54
1331 msgid "B<KEXEC_PRESERVE_CONTEXT> (since Linux 2.6.27)"
1332 msgstr "B<KEXEC_PRESERVE_CONTEXT> (Linux 2.6.27 以降)"
1335 #: build/C/man2/kexec_load.2:64
1337 "Preserve the system hardware and software states before executing the new "
1338 "kernel. This could be used for system suspend. This flag is available only "
1339 "if the kernel was configured with B<CONFIG_KEXEC_JUMP>, and is effective "
1340 "only if I<nr_segments> is greater than 0."
1343 "システムのハードウェアとソフトウェアの状態を保存する。\n"
1344 "システムの中断時 (suspend) などで使用できる。\n"
1345 "このフラグは、カーネルの設定で B<CONFIG_KEXEC_JUMP> が有効の場合のみ\n"
1346 "利用可能であり、 I<nr_segments> が 0 より大きい場合のみ効果がある。"
1349 #: build/C/man2/kexec_load.2:85
1351 "The high-order bits (corresponding to the mask 0xffff0000) of I<flags> "
1352 "contain the architecture of the to-be-executed kernel. Specify (OR) the "
1353 "constant B<KEXEC_ARCH_DEFAULT> to use the current architecture, or one of "
1354 "the following architecture constants B<KEXEC_ARCH_386>, B<KEXEC_ARCH_68K>, "
1355 "B<KEXEC_ARCH_X86_64>, B<KEXEC_ARCH_PPC>, B<KEXEC_ARCH_PPC64>, "
1356 "B<KEXEC_ARCH_IA_64>, B<KEXEC_ARCH_ARM>, B<KEXEC_ARCH_S390>, "
1357 "B<KEXEC_ARCH_SH>, B<KEXEC_ARCH_MIPS>, and B<KEXEC_ARCH_MIPS_LE>. The "
1358 "architecture must be executable on the CPU of the system."
1360 "I<flags> の上位ビット (マスク 0xffff0000 に対応) には、\n"
1361 "実行されるカーネルのアーキテクチャーが入る。\n"
1362 "現在のアーキテクチャーを使うことを意味する定数 B<KEXEC_ARCH_DEFAULT> か、\n"
1363 "アーキテクチャー定数 B<KEXEC_ARCH_386>, B<KEXEC_ARCH_68K>, "
1364 "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 で実行可能なものでなければならない。"
1372 #: build/C/man2/kexec_load.2:100
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 kernel imposes an (arbitrary) limit of 16 on the "
1377 "number of segments. The I<segments> argument is an array of "
1378 "I<kexec_segment> structures which define the kernel layout:"
1380 "I<entry> 引き数は、カーネルイメージの物理エントリーアドレスである。 "
1381 "I<nr_segments> 引き数は、 I<segments> ポインターが指すセグメントの数である。 "
1382 "なお、セグメント数には、カーネルにより 16 という (強制的な) 上限が課される。 "
1383 "I<segments> 引き数は I<kexec_segment> 構造体の配列で、 この構造体によりカーネ"
1387 #: build/C/man2/kexec_load.2:109
1390 "struct kexec_segment {\n"
1391 " void *buf; /* Buffer in user space */\n"
1392 " size_t bufsz; /* Buffer length in user space */\n"
1393 " void *mem; /* Physical address of kernel */\n"
1394 " size_t memsz; /* Physical address length */\n"
1397 "struct kexec_segment {\n"
1398 " void *buf; /* Buffer in user space */\n"
1399 " size_t bufsz; /* Buffer length in user space */\n"
1400 " void *mem; /* Physical address of kernel */\n"
1401 " size_t memsz; /* Physical address length */\n"
1404 #. FIXME Explain the details of how the kernel image defined by segments
1405 #. is copied from the calling process into previously reserved memory.
1407 #: build/C/man2/kexec_load.2:117
1409 "The kernel image defined by I<segments> is copied from the calling process "
1410 "into previously reserved memory."
1412 "I<segments> で定義されたカーネルイメージは、\n"
1413 "呼び出したプロセスから予約済みメモリーにコピーされる。"
1416 #: build/C/man2/kexec_load.2:124
1418 "On success, B<kexec_load>() returns 0. On error, -1 is returned and "
1419 "I<errno> is set to indicate the error."
1421 "成功すると、 B<kexec_load> は 0 を返す。\n"
1422 "エラーの場合、 -1 が返り、 I<errno> にエラーを示す値が設定される。"
1425 #: build/C/man2/kexec_load.2:125 build/C/man2/pivot_root.2:110
1426 #: build/C/man2/ptrace.2:1912 build/C/man2/quotactl.2:495
1432 #: build/C/man2/kexec_load.2:129
1434 "Another crash kernel is already being loaded or a crash kernel is already in "
1437 "別のクラッシュカーネルがすでにロードされているか、\n"
1438 "クラッシュカーネルがすでに使用されている。"
1440 #. KEXEC_SEGMENT_MAX == 16
1442 #: build/C/man2/kexec_load.2:136
1443 msgid "I<flags> is invalid; or I<nr_segments> is too large"
1444 msgstr "I<flags> が無効である。 I<nr_segments> が大きすぎる。"
1447 #: build/C/man2/kexec_load.2:141
1448 msgid "The caller does not have the B<CAP_SYS_BOOT> capability."
1449 msgstr "呼び出し側が B<CAP_SYS_BOOT> ケーパビリティを持っていない。"
1452 #: build/C/man2/kexec_load.2:145
1453 msgid "The B<kexec_load>() system call first appeared in Linux 2.6.13."
1454 msgstr "B<kexec_load>() システムコールは Linux 2.6.13 で初めて登場した。"
1457 #: build/C/man2/kexec_load.2:152
1459 "Currently, there is no glibc support for B<kexec_load>(). Call it using "
1462 "現在のところ、 B<kexec_load>() は glibc ではサポートされていない。\n"
1463 "B<syscall>(2) を使って呼び出すこと。"
1465 #. FIXME . Andi submitted a patch for this.
1466 #. Check if it got accepted later.
1468 #: build/C/man2/kexec_load.2:159
1470 "The required constants are in the Linux kernel source file I<linux/kexec.h>, "
1471 "which is not currently exported to glibc. Therefore, these constants must "
1472 "be defined manually."
1474 "必要な定数は Linux カーネルのソースファイル I<linux/kexec.h> で定義されてい"
1476 "が、現在のところ glibc には公開されていない。\n"
1477 "そのため、これらの定数は手動で定義しなければならない。"
1480 #: build/C/man2/kexec_load.2:162
1482 "This system call is available only if the kernel was configured with "
1485 "このシステムコールは、カーネルの設定で B<CONFIG_KEXEC> が有効になって\n"
1489 #: build/C/man2/kexec_load.2:165
1490 msgid "B<reboot>(2), B<syscall>(2)"
1491 msgstr "B<reboot>(2), B<syscall>(2)"
1494 #: build/C/man2/lookup_dcookie.2:27
1496 msgid "LOOKUP_DCOOKIE"
1497 msgstr "LOOKUP_DCOOKIE"
1500 #: build/C/man2/lookup_dcookie.2:27
1506 #: build/C/man2/lookup_dcookie.2:30
1507 msgid "lookup_dcookie - return a directory entry's path"
1508 msgstr "lookup_dcookie - ディレクトリエントリーのパス名を返す"
1511 #: build/C/man2/lookup_dcookie.2:32
1513 "B<int lookup_dcookie(u64 >I<cookie>B<, char *>I<buffer>B<, size_t >I<len>B<);"
1516 "B<int lookup_dcookie(u64 >I<cookie>B<, char *>I<buffer>B<, size_t >I<len>B<);"
1520 #: build/C/man2/lookup_dcookie.2:38
1522 "Look up the full path of the directory entry specified by the value "
1523 "I<cookie>. The cookie is an opaque identifier uniquely identifying a "
1524 "particular directory entry. The buffer given is filled in with the full "
1525 "path of the directory entry."
1527 "I<cookie> 値で指定されたディレクトリエントリーのフルパス名を検索する。 "
1528 "cookie は、個々のディレクトリエントリーを区別する内部識別子 (opaque "
1529 "identifier) である。引き数で指定されたバッファーに、ディレクトリエントリーの "
1533 #: build/C/man2/lookup_dcookie.2:43
1535 "For B<lookup_dcookie>() to return successfully, the kernel must still hold "
1536 "a cookie reference to the directory entry."
1538 "B<lookup_dcookie>() が正常に値を返すためには、カーネルがディレクトリエント"
1539 "リーへの cookie 参照を 保持していなければならない。"
1542 #: build/C/man2/lookup_dcookie.2:50
1544 "On success, B<lookup_dcookie>() returns the length of the path string "
1545 "copied into the buffer. On error, -1 is returned, and I<errno> is set "
1548 "成功した場合、 B<lookup_dcookie>() はバッファーにコピーしたパス文字列の長さ"
1549 "を返す。 エラーの場合は -1 を返し、 I<errno> に適切な値を設定する。"
1552 #: build/C/man2/lookup_dcookie.2:54
1553 msgid "The buffer was not valid."
1554 msgstr "バッファーが有効でなかった。"
1557 #: build/C/man2/lookup_dcookie.2:58
1559 "The kernel has no registered cookie/directory entry mappings at the time of "
1560 "lookup, or the cookie does not refer to a valid directory entry."
1562 "検索が行われた時、cookie とディレクトリエントリーのマッピングがカーネルに 登"
1563 "録されていなかったか、または cookie が有効なディレクトリエントリーを 参照して"
1567 #: build/C/man2/lookup_dcookie.2:58
1569 msgid "B<ENAMETOOLONG>"
1570 msgstr "B<ENAMETOOLONG>"
1573 #: build/C/man2/lookup_dcookie.2:61
1574 msgid "The name could not fit in the buffer."
1575 msgstr "名前がバッファーに入り切らなかった。"
1578 #: build/C/man2/lookup_dcookie.2:61 build/C/man2/process_vm_readv.2:278
1579 #: build/C/man2/sendfile.2:138 build/C/man2/splice.2:169
1580 #: build/C/man2/tee.2:117 build/C/man2/vmsplice.2:145
1586 #: build/C/man2/lookup_dcookie.2:65
1588 "The kernel could not allocate memory for the temporary buffer holding the "
1591 "カーネルが、パス名を保持する一時バッファー用のメモリーを割り当てることが でき"
1595 #: build/C/man2/lookup_dcookie.2:70
1597 "The process does not have the capability B<CAP_SYS_ADMIN> required to look "
1600 "プロセスが cookie 値を検索するのに必要なケーパビリティ B<CAP_SYS_ADMIN> を"
1604 #: build/C/man2/lookup_dcookie.2:70 build/C/man2/quotactl.2:474
1610 #: build/C/man2/lookup_dcookie.2:73
1612 "The buffer was not large enough to hold the path of the directory entry."
1614 "バッファーが、ディレクトリエントリーのパス名を収容するのに 十分な大きさではな"
1618 #: build/C/man2/lookup_dcookie.2:78
1620 "Available since Linux 2.5.43. The B<ENAMETOOLONG> error return was added in "
1623 "Linux 2.5.43 以降で利用できる。 エラー B<ENAMETOOLONG> を返す仕様は 2.5.70 で"
1627 #: build/C/man2/lookup_dcookie.2:81
1628 msgid "B<lookup_dcookie>() is Linux-specific."
1629 msgstr "B<lookup_dcookie>() は Linux 独自の関数である。"
1632 #: build/C/man2/lookup_dcookie.2:85
1634 "B<lookup_dcookie>() is a special-purpose system call, currently used only "
1635 "by the oprofile profiler. It relies on a kernel driver to register cookies "
1636 "for directory entries."
1638 "B<lookup_dcookie>() は特殊な用途に使われるシステムコールで、現在のところ "
1639 "oprofile profiler で 使われているだけである。"
1642 #: build/C/man2/lookup_dcookie.2:88
1644 "The path returned may be suffixed by the string \" (deleted)\" if the "
1645 "directory entry has been removed."
1647 "指定されたディレクトリエントリーが削除されていた場合、返されるパス名の最後に "
1648 "\" (deleted)\" という文字列が付加されることがある。"
1651 #: build/C/man2/modify_ldt.2:24
1657 #: build/C/man2/modify_ldt.2:24 build/C/man2/pivot_root.2:10
1663 #: build/C/man2/modify_ldt.2:27
1664 msgid "modify_ldt - get or set ldt"
1665 msgstr "modify_ldt - ldt を設定または取得する"
1668 #: build/C/man2/modify_ldt.2:30
1670 msgid "B<#include E<lt>sys/types.hE<gt>>\n"
1671 msgstr "B<#include E<lt>sys/types.hE<gt>>\n"
1674 #: build/C/man2/modify_ldt.2:32
1676 msgid "B<int modify_ldt(int >I<func>B<, void *>I<ptr>B<, unsigned long >I<bytecount>B<);>\n"
1677 msgstr "B<int modify_ldt(int >I<func>B<, void *>I<ptr>B<, unsigned long >I<bytecount>B<);>\n"
1680 #: build/C/man2/modify_ldt.2:41
1682 "B<modify_ldt>() reads or writes the local descriptor table (ldt) for a "
1683 "process. The ldt is a per-process memory management table used by the i386 "
1684 "processor. For more information on this table, see an Intel 386 processor "
1687 "B<modify_ldt>() はプロセスのローカルディスクリプターテーブル (local "
1688 "descriptor table; ldt) を読み書きする。 ldt は i386 プロセッサで使用されるプ"
1689 "ロセスごとのメモリー管理テーブルである。 このテーブルに関してのより詳しい情報"
1690 "は Intel 386 processor handbook を 参照すること。"
1693 #: build/C/man2/modify_ldt.2:51
1695 "When I<func> is 0, B<modify_ldt>() reads the ldt into the memory pointed to "
1696 "by I<ptr>. The number of bytes read is the smaller of I<bytecount> and the "
1697 "actual size of the ldt."
1699 "I<func> が 0 ならば、 B<modify_ldt>() は ldt を I<ptr> が指しているメモリー"
1700 "に読み込む。 読み込むバイト数は実際の ldt のサイズか I<bytecount> より小さい"
1703 #. FIXME Should this page say something about func == 2 and func == 0x11?
1704 #. In Linux 2.4, func == 2 returned "the default ldt"
1705 #. In Linux 2.6, func == 2 is a nop, returning a zeroed out structure.
1706 #. Linux 2.4 and 2.6 implement an operation for func == 0x11
1708 #: build/C/man2/modify_ldt.2:69
1710 "When I<func> is 1, B<modify_ldt>() modifies one ldt entry. I<ptr> points "
1711 "to a I<user_desc> structure and I<bytecount> must equal the size of this "
1714 "I<func> が 1 ならば、 B<modify_ldt>() は ldt エントリーの一つを変更する。 "
1715 "I<ptr> は I<user_desc> 構造体を指し、 I<bytecount> はこの構造体の大きさに等し"
1719 #: build/C/man2/modify_ldt.2:73
1720 msgid "The I<user_desc> structure is defined in I<E<lt>asm/ldt.hE<gt>> as:"
1722 "I<user_desc> 構造体は I<E<lt>asm/ldt.hE<gt>> で以下のように定義されている:"
1725 #: build/C/man2/modify_ldt.2:87
1728 "struct user_desc {\n"
1729 " unsigned int entry_number;\n"
1730 " unsigned long base_addr;\n"
1731 " unsigned int limit;\n"
1732 " unsigned int seg_32bit:1;\n"
1733 " unsigned int contents:2;\n"
1734 " unsigned int read_exec_only:1;\n"
1735 " unsigned int limit_in_pages:1;\n"
1736 " unsigned int seg_not_present:1;\n"
1737 " unsigned int useable:1;\n"
1740 "struct user_desc {\n"
1741 " unsigned int entry_number;\n"
1742 " unsigned long base_addr;\n"
1743 " unsigned int limit;\n"
1744 " unsigned int seg_32bit:1;\n"
1745 " unsigned int contents:2;\n"
1746 " unsigned int read_exec_only:1;\n"
1747 " unsigned int limit_in_pages:1;\n"
1748 " unsigned int seg_not_present:1;\n"
1749 " unsigned int useable:1;\n"
1753 #. The ldt is specific for the calling process. Any attempts to change
1754 #. the ldt to include the address space of another process or the kernel
1755 #. will result in a segmentation violation when trying to access the memory
1756 #. outside of the process address space. The memory protection is enforced
1757 #. at the paging layer.
1759 #: build/C/man2/modify_ldt.2:98
1760 msgid "In Linux 2.4 and earlier, this structure was named I<modify_ldt_ldt_s>."
1762 "Linux 2.4 以前では、この構造体は I<modify_ldt_ldt_s> という名前であった。"
1765 #: build/C/man2/modify_ldt.2:108
1767 "On success, B<modify_ldt>() returns either the actual number of bytes read "
1768 "(for reading) or 0 (for writing). On failure, B<modify_ldt>() returns -1 "
1769 "and sets I<errno> to indicate the error."
1771 "成功した場合は、 B<modify_ldt>() は (読み込みの場合は) 実際に読み込んだバイ"
1772 "ト数、 または (書き込みの場合は) 0 を返す。 失敗した場合は B<modify_ldt>() "
1773 "は -1 を返し、 I<errno> をエラーを示す値に設定する。"
1776 #: build/C/man2/modify_ldt.2:113
1777 msgid "I<ptr> points outside the address space."
1778 msgstr "I<ptr> がアドレス空間の外を指している。"
1781 #: build/C/man2/modify_ldt.2:126
1783 "I<ptr> is 0, or I<func> is 1 and I<bytecount> is not equal to the size of "
1784 "the structure I<modify_ldt_ldt_s>, or I<func> is 1 and the new ldt entry has "
1787 "I<ptr> が 0 である、 または I<func> が 1 で I<bytecount> が "
1788 "I<modify_ldt_ldt_s> 構造体のサイズと等しくないか、 I<func> が 1 で新しい ldt "
1792 #: build/C/man2/modify_ldt.2:130
1793 msgid "I<func> is neither 0 nor 1."
1794 msgstr "I<func> が 0 でも 1 でもない。"
1797 #: build/C/man2/modify_ldt.2:133
1799 "This call is Linux-specific and should not be used in programs intended to "
1802 "このコールは Linux 特有であり、移植を意図したプログラムでは 使用してはいけな"
1806 #: build/C/man2/modify_ldt.2:136 build/C/man2/perfmonctl.2:205
1807 #: build/C/man2/pivot_root.2:134
1809 "Glibc does not provide a wrapper for this system call; call it using "
1812 "glibc はこのシステムコールに対するラッパー関数を提供していない。 "
1813 "B<syscall>(2) を使って呼び出すこと。"
1816 #: build/C/man2/modify_ldt.2:138
1821 #: build/C/man2/nfsservctl.2:8
1827 #: build/C/man2/nfsservctl.2:8
1833 #: build/C/man2/nfsservctl.2:11
1834 msgid "nfsservctl - syscall interface to kernel nfs daemon"
1835 msgstr "nfsservctl - カーネル nfs デーモンのためのインターフェース"
1838 #: build/C/man2/nfsservctl.2:14
1840 msgid "B<#include E<lt>linux/nfsd/syscall.hE<gt>>\n"
1841 msgstr "B<#include E<lt>linux/nfsd/syscall.hE<gt>>\n"
1844 #: build/C/man2/nfsservctl.2:17
1847 "B<long nfsservctl(int >I<cmd>B<, struct nfsctl_arg *>I<argp>B<,>\n"
1848 "B< union nfsctl_res *>I<resp>B<);>\n"
1850 "B<long nfsservctl(int >I<cmd>B<, struct nfsctl_arg *>I<argp>B<,>\n"
1851 "B< union nfsctl_res *>I<resp>B<);>\n"
1854 #: build/C/man2/nfsservctl.2:21
1855 msgid "I<Note>: Since Linux 3.1, this system call no longer exists."
1856 msgstr "I<注意>: Linux 3.1 以降では、このシステムコールはもはや存在しない。"
1859 #: build/C/man2/nfsservctl.2:35
1863 " * These are the commands understood by nfsctl().\n"
1865 "#define NFSCTL_SVC 0 /* This is a server process. */\n"
1866 "#define NFSCTL_ADDCLIENT 1 /* Add an NFS client. */\n"
1867 "#define NFSCTL_DELCLIENT 2 /* Remove an NFS client. */\n"
1868 "#define NFSCTL_EXPORT 3 /* Export a filesystem. */\n"
1869 "#define NFSCTL_UNEXPORT 4 /* Unexport a filesystem. */\n"
1870 "#define NFSCTL_UGIDUPDATE 5 /* Update a client's UID/GID map\n"
1871 " (only in Linux 2.4.x and earlier). */\n"
1872 "#define NFSCTL_GETFH 6 /* Get a file handle (used by mountd)\n"
1873 " (only in Linux 2.4.x and earlier). */\n"
1876 " * nfsctl() によって理解されるコマンド\n"
1878 "#define NFSCTL_SVC 0 /* サーバープロセス */\n"
1879 "#define NFSCTL_ADDCLIENT 1 /* NFS クライアントを追加 */\n"
1880 "#define NFSCTL_DELCLIENT 2 /* NFS クライアンドを削除 */\n"
1881 "#define NFSCTL_EXPORT 3 /* ファイルシステムのエクスポート */\n"
1882 "#define NFSCTL_UNEXPORT 4 /* ファイルシステムのアンエクスポート */\n"
1883 "#define NFSCTL_UGIDUPDATE 5 /* UID/GID マップの更新\n"
1884 " (Linux 2.4.x とそれ以前のみ) */\n"
1885 "#define NFSCTL_GETFH 6 /* (mountd で使用される) fh の取得\n"
1886 " (Linux 2.4.x とそれ以前のみ) */\n"
1889 #: build/C/man2/nfsservctl.2:47
1892 "struct nfsctl_arg {\n"
1893 " int ca_version; /* safeguard */\n"
1895 " struct nfsctl_svc u_svc;\n"
1896 " struct nfsctl_client u_client;\n"
1897 " struct nfsctl_export u_export;\n"
1898 " struct nfsctl_uidmap u_umap;\n"
1899 " struct nfsctl_fhparm u_getfh;\n"
1900 " unsigned int u_debug;\n"
1904 "struct nfsctl_arg {\n"
1905 " int ca_version; /* safeguard */\n"
1907 " struct nfsctl_svc u_svc;\n"
1908 " struct nfsctl_client u_client;\n"
1909 " struct nfsctl_export u_export;\n"
1910 " struct nfsctl_uidmap u_umap;\n"
1911 " struct nfsctl_fhparm u_getfh;\n"
1912 " unsigned int u_debug;\n"
1917 #: build/C/man2/nfsservctl.2:52
1920 "union nfsctl_res {\n"
1921 " struct knfs_fh cr_getfh;\n"
1922 " unsigned int cr_debug;\n"
1925 "union nfsctl_res {\n"
1926 " struct knfs_fh cr_getfh;\n"
1927 " unsigned int cr_debug;\n"
1931 #: build/C/man2/nfsservctl.2:58 build/C/man2/pivot_root.2:105
1932 #: build/C/man2/vm86.2:59
1934 "On success, zero is returned. On error, -1 is returned, and I<errno> is set "
1937 "成功した場合は 0 が返される。エラーの場合は -1 が返され、 I<errno> が適切に設"
1941 #: build/C/man2/nfsservctl.2:60
1942 msgid "This call is Linux-specific."
1943 msgstr "このコールは Linux 特有である。"
1946 #: build/C/man2/outb.2:26
1952 #: build/C/man2/outb.2:26
1958 #: build/C/man2/outb.2:31
1960 "outb, outw, outl, outsb, outsw, outsl, inb, inw, inl, insb, insw, insl, "
1961 "outb_p, outw_p, outl_p, inb_p, inw_p, inl_p - port I/O"
1963 "outb, outw, outl, outsb, outsw, outsl, inb, inw, inl, insb, insw, insl, "
1964 "outb_p, outw_p, outl_p, inb_p, inw_p, inl_p - ポート入出力"
1967 #: build/C/man2/outb.2:34
1969 msgid "B<#include E<lt>sys/io.hE<gt>>\n"
1970 msgstr "B<#include E<lt>sys/io.hE<gt>>\n"
1973 #: build/C/man2/outb.2:41
1976 "B<unsigned char inb(unsigned short int >I<port>B<);>\n"
1977 "B<unsigned char inb_p(unsigned short int >I<port>B<);>\n"
1978 "B<unsigned short int inw(unsigned short int >I<port>B<);>\n"
1979 "B<unsigned short int inw_p(unsigned short int >I<port>B<);>\n"
1980 "B<unsigned int inl(unsigned short int >I<port>B<);>\n"
1981 "B<unsigned int inl_p(unsigned short int >I<port>B<);>\n"
1983 "B<unsigned char inb(unsigned short int >I<port>B<);>\n"
1984 "B<unsigned char inb_p(unsigned short int >I<port>B<);>\n"
1985 "B<unsigned short int inw(unsigned short int >I<port>B<);>\n"
1986 "B<unsigned short int inw_p(unsigned short int >I<port>B<);>\n"
1987 "B<unsigned int inl(unsigned short int >I<port>B<);>\n"
1988 "B<unsigned int inl_p(unsigned short int >I<port>B<);>\n"
1991 #: build/C/man2/outb.2:48
1994 "B<void outb(unsigned char >I<value>B<, unsigned short int >I<port>B<);>\n"
1995 "B<void outb_p(unsigned char >I<value>B<, unsigned short int >I<port>B<);>\n"
1996 "B<void outw(unsigned short int >I<value>B<, unsigned short int >I<port>B<);>\n"
1997 "B<void outw_p(unsigned short int >I<value>B<, unsigned short int >I<port>B<);>\n"
1998 "B<void outl(unsigned int >I<value>B<, unsigned short int >I<port>B<);>\n"
1999 "B<void outl_p(unsigned int >I<value>B<, unsigned short int >I<port>B<);>\n"
2001 "B<void outb(unsigned char >I<value>B<, unsigned short int >I<port>B<);>\n"
2002 "B<void outb_p(unsigned char >I<value>B<, unsigned short int >I<port>B<);>\n"
2003 "B<void outw(unsigned short int >I<value>B<, unsigned short int >I<port>B<);>\n"
2004 "B<void outw_p(unsigned short int >I<value>B<, unsigned short int >I<port>B<);>\n"
2005 "B<void outl(unsigned int >I<value>B<, unsigned short int >I<port>B<);>\n"
2006 "B<void outl_p(unsigned int >I<value>B<, unsigned short int >I<port>B<);>\n"
2009 #: build/C/man2/outb.2:61
2012 "B<void insb(unsigned short int >I<port>B<, void *>I<addr>B<,>\n"
2013 "B< unsigned long int >I<count>B<);>\n"
2014 "B<void insw(unsigned short int >I<port>B<, void *>I<addr>B<,>\n"
2015 "B< unsigned long int >I<count>B<);>\n"
2016 "B<void insl(unsigned short int >I<port>B<, void *>I<addr>B<,>\n"
2017 "B< unsigned long int >I<count>B<);>\n"
2018 "B<void outsb(unsigned short int >I<port>B<, const void *>I<addr>B<,>\n"
2019 "B< unsigned long int >I<count>B<);>\n"
2020 "B<void outsw(unsigned short int >I<port>B<, const void *>I<addr>B<,>\n"
2021 "B< unsigned long int >I<count>B<);>\n"
2022 "B<void outsl(unsigned short int >I<port>B<, const void *>I<addr>B<,>\n"
2023 "B< unsigned long int >I<count>B<);>\n"
2025 "B<void insb(unsigned short int >I<port>B<, void *>I<addr>B<,>\n"
2026 "B< unsigned long int >I<count>B<);>\n"
2027 "B<void insw(unsigned short int >I<port>B<, void *>I<addr>B<,>\n"
2028 "B< unsigned long int >I<count>B<);>\n"
2029 "B<void insl(unsigned short int >I<port>B<, void *>I<addr>B<,>\n"
2030 "B< unsigned long int >I<count>B<);>\n"
2031 "B<void outsb(unsigned short int >I<port>B<, const void *>I<addr>B<,>\n"
2032 "B< unsigned long int >I<count>B<);>\n"
2033 "B<void outsw(unsigned short int >I<port>B<, const void *>I<addr>B<,>\n"
2034 "B< unsigned long int >I<count>B<);>\n"
2035 "B<void outsl(unsigned short int >I<port>B<, const void *>I<addr>B<,>\n"
2036 "B< unsigned long int >I<count>B<);>\n"
2039 #: build/C/man2/outb.2:67
2041 "This family of functions is used to do low-level port input and output. The "
2042 "out* functions do port output, the in* functions do port input; the b-suffix "
2043 "functions are byte-width and the w-suffix functions word-width; the _p-"
2044 "suffix functions pause until the I/O completes."
2046 "この一連の関数はポートに対する低レベルの入出力に使用する。 out* 関数はポート"
2047 "出力、in* 関数はポート入力を行う。 語尾に b がついている関数はバイト単位、w "
2048 "がついている関数はワード単位である。 _p がついている関数は I/O が終了するまで"
2051 #. , given the following information
2052 #. in addition to that given in
2055 #: build/C/man2/outb.2:73
2057 "They are primarily designed for internal kernel use, but can be used from "
2060 "これらの関数はもともとカーネル内部での使用を想定して設計されているが、 ユー"
2064 #: build/C/man2/outb.2:78
2066 "You must compile with B<-O> or B<-O2> or similar. The functions are defined "
2067 "as inline macros, and will not be substituted in without optimization "
2068 "enabled, causing unresolved references at link time."
2070 "B<-O> や B<-O2> などを指定してコンパイルしなければならない。 これらの関数はイ"
2071 "ンラインマクロとして定義されており、 最適化を行わないと関数の展開が行われ"
2072 "ず、 リンクの時に「解決できない参照(unresolved reference)」が発生する。"
2075 #: build/C/man2/outb.2:87
2077 "You use B<ioperm>(2) or alternatively B<iopl>(2) to tell the kernel to "
2078 "allow the user space application to access the I/O ports in question. "
2079 "Failure to do this will cause the application to receive a segmentation "
2082 "ユーザー空間のアプリケーションが I/O ポートにアクセスすることを カーネルに教"
2083 "えるために B<ioperm>(2) もしくは B<iopl>(2) を使用すること。これを忘れると"
2084 "アプリケーションはセグメンテーション違反 (segmentation fault) を受けとること"
2088 #: build/C/man2/outb.2:96
2090 "B<outb>() and friends are hardware-specific. The I<value> argument is "
2091 "passed first and the I<port> argument is passed second, which is the "
2092 "opposite order from most DOS implementations."
2094 "B<outb>() とその仲間はハードウェア特有である。 I<value> 引数が最初に渡さ"
2095 "れ、 I<port> 引数が二番目に渡される。 この順序はほとんどの DOS での実装とは逆"
2099 #: build/C/man2/outb.2:99
2100 msgid "B<ioperm>(2), B<iopl>(2)"
2101 msgstr "B<ioperm>(2), B<iopl>(2)"
2104 #: build/C/man2/pciconfig_read.2:8
2106 msgid "PCICONFIG_READ"
2107 msgstr "PCICONFIG_READ"
2110 #: build/C/man2/pciconfig_read.2:8
2116 #: build/C/man2/pciconfig_read.2:11
2118 "pciconfig_read, pciconfig_write, pciconfig_iobase - pci device information "
2121 "pciconfig_read, pciconfig_write, pciconfig_iobase - pci デバイス情報を扱う"
2124 #: build/C/man2/pciconfig_read.2:14
2126 msgid "B<#include E<lt>pci.hE<gt>>\n"
2127 msgstr "B<#include E<lt>pci.hE<gt>>\n"
2130 #: build/C/man2/pciconfig_read.2:21
2133 "B<int pciconfig_read(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_write(unsigned long >I<bus>B<, unsigned long >I<dfn>B<,>\n"
2136 "B< unsigned long >I<off>B<, unsigned long >I<len>B<, void *>I<buf>B<);>\n"
2137 "B<int pciconfig_iobase(long >I<which>B<, unsigned long >I<bus>B<,>\n"
2138 "B< unsigned long >I<devfn>B<);>\n"
2140 "B<int pciconfig_read(unsigned long >I<bus>B<, unsigned long >I<dfn>B<,>\n"
2141 "B< unsigned long >I<off>B<, unsigned long >I<len>B<, void *>I<buf>B<);>\n"
2142 "B<int pciconfig_write(unsigned long >I<bus>B<, unsigned long >I<dfn>B<,>\n"
2143 "B< unsigned long >I<off>B<, unsigned long >I<len>B<, void *>I<buf>B<);>\n"
2144 "B<int pciconfig_iobase(long >I<which>B<, unsigned long >I<bus>B<,>\n"
2145 "B< unsigned long >I<devfn>B<);>\n"
2148 #: build/C/man2/pciconfig_read.2:27
2150 "Most of the interaction with PCI devices is already handled by the kernel "
2151 "PCI layer, and thus these calls should not normally need to be accessed from "
2154 "PCI デバイスとのやり取り (interaction) は カーネル PCI レイヤですでに処理され"
2155 "ているので、 通常はこららの関数をユーザー空間からアクセスする必要はない。"
2158 #: build/C/man2/pciconfig_read.2:27 build/C/man2/pciconfig_read.2:51
2160 msgid "B<pciconfig_read>()"
2161 msgstr "B<pciconfig_read>()"
2164 #: build/C/man2/pciconfig_read.2:36
2165 msgid "Reads to I<buf> from device I<dev> at offset I<off> value."
2166 msgstr "デバイス I<dev> のオフセット I<off> の値を I<buf> に読み込む。"
2169 #: build/C/man2/pciconfig_read.2:36 build/C/man2/pciconfig_read.2:57
2171 msgid "B<pciconfig_write>()"
2172 msgstr "B<pciconfig_write>()"
2175 #: build/C/man2/pciconfig_read.2:45
2176 msgid "Writes from I<buf> to device I<dev> at offset I<off> value."
2177 msgstr "デバイス I<dev> のオフセット I<off> に I<buf> の値を書き込む。"
2180 #: build/C/man2/pciconfig_read.2:45 build/C/man2/pciconfig_read.2:63
2182 msgid "B<pciconfig_iobase>()"
2183 msgstr "B<pciconfig_iobase>()"
2186 #: build/C/man2/pciconfig_read.2:50
2188 "You pass it a bus/devfn pair and get a physical address for either the "
2189 "memory offset (for things like prep, this is 0xc0000000), the IO base for "
2190 "PIO cycles, or the ISA holes if any."
2192 "bus/devfn ペアをこの関数に渡し、 メモリーオフセット (prep のようなものでは、"
2193 "この値は 0xc0000000 である) と PIO サイクルの IO ベースの物理アドレスを取得す"
2194 "る。 また、もしあるならば ISA hole の物理アドレスを取得する。"
2197 #: build/C/man2/pciconfig_read.2:57 build/C/man2/pciconfig_read.2:63
2199 "On success zero is returned. On error, -1 is returned and I<errno> is set "
2202 "成功した場合、0 が返される。 エラーの場合、-1 が返され、 I<errno> が適切に設"
2206 #: build/C/man2/pciconfig_read.2:77
2208 "Returns information on locations of various I/O regions in physical memory "
2209 "according to the I<which> value. Values for I<which> are: "
2210 "B<IOBASE_BRIDGE_NUMBER>, B<IOBASE_MEMORY>, B<IOBASE_IO>, B<IOBASE_ISA_IO>, "
2211 "B<IOBASE_ISA_MEM>."
2213 "I<which> の値に基づいて、物理メモリー内の様々な I/O 領域の位置情報が返され"
2214 "る。 I<which> の値は、 B<IOBASE_BRIDGE_NUMBER>, B<IOBASE_MEMORY>, "
2215 "B<IOBASE_IO>, B<IOBASE_ISA_IO>, B<IOBASE_ISA_MEM> である。"
2218 #: build/C/man2/pciconfig_read.2:84
2219 msgid "I<len> value is invalid. This does not apply to B<pciconfig_iobase>()."
2221 "I<len> の値が無効である。 このエラーは B<pciconfig_iobase>() には適用されな"
2225 #: build/C/man2/pciconfig_read.2:84 build/C/man2/ptrace.2:1929
2226 #: build/C/man2/sendfile.2:134
2232 #: build/C/man2/pciconfig_read.2:87
2237 #: build/C/man2/pciconfig_read.2:87 build/C/man2/perf_event_open.2:2640
2243 #: build/C/man2/pciconfig_read.2:93
2245 "For B<pciconfig_iobase>(), \"hose\" value is NULL. For the other calls, "
2246 "could not find a slot."
2248 "B<pciconfig_iobase>() の場合、でホース (hose) の値が NULL である。 他の呼び"
2249 "出しの場合、スロット (slot) が見つからない。"
2252 #: build/C/man2/pciconfig_read.2:98
2253 msgid "The system has not implemented these calls (B<CONFIG_PCI> not defined)."
2255 "このシステムはこれらの呼び出しを実装していない。 (B<CONFIG_PCI> が定義されて"
2259 #: build/C/man2/pciconfig_read.2:98 build/C/man2/perf_event_open.2:2668
2261 msgid "B<EOPNOTSUPP>"
2262 msgstr "B<EOPNOTSUPP>"
2265 #: build/C/man2/pciconfig_read.2:105
2267 "This return value is valid only for B<pciconfig_iobase>(). It is returned "
2268 "if the value for I<which> is invalid."
2270 "この返り値は B<pciconfig_iobase>() でのみ有効である。 このエラーは I<which> "
2274 #: build/C/man2/pciconfig_read.2:112
2276 "User does not have the B<CAP_SYS_ADMIN> capability. This does not apply to "
2277 "B<pciconfig_iobase>()."
2279 "ユーザーが B<CAP_SYS_ADMIN> 権限を持っていない。 このエラーは "
2280 "B<pciconfig_iobase>() には適用されない。"
2283 #: build/C/man2/pciconfig_read.2:114
2284 msgid "These calls are Linux-specific, available since Linux 2.0.26/2.1.11."
2286 "これらの呼び出しは Linux 特有のものであり、 Linux 2.0.26/2.1.11 から使用可能"
2290 #: build/C/man2/pciconfig_read.2:116
2291 msgid "B<capabilities>(7)"
2292 msgstr "B<capabilities>(7)"
2295 #: build/C/man2/perf_event_open.2:27
2297 msgid "PERF_EVENT_OPEN"
2298 msgstr "PERF_EVENT_OPEN"
2301 #: build/C/man2/perf_event_open.2:27
2307 #: build/C/man2/perf_event_open.2:30
2308 msgid "perf_event_open - set up performance monitoring"
2312 #: build/C/man2/perf_event_open.2:34
2315 "B<#include E<lt>linux/perf_event.hE<gt>>\n"
2316 "B<#include E<lt>linux/hw_breakpoint.hE<gt>>\n"
2318 "B<#include E<lt>linux/perf_event.hE<gt>>\n"
2319 "B<#include E<lt>linux/hw_breakpoint.hE<gt>>\n"
2322 #: build/C/man2/perf_event_open.2:38
2325 "B<int perf_event_open(struct perf_event_attr *>I<attr>B<,>\n"
2326 "B< pid_t >I<pid>B<, int >I<cpu>B<, int >I<group_fd>B<,>\n"
2327 "B< unsigned long >I<flags>B<);>\n"
2329 "B<int perf_event_open(struct perf_event_attr *>I<attr>B<,>\n"
2330 "B< pid_t >I<pid>B<, int >I<cpu>B<, int >I<group_fd>B<,>\n"
2331 "B< unsigned long >I<flags>B<);>\n"
2334 #: build/C/man2/perf_event_open.2:47
2336 "Given a list of parameters, B<perf_event_open>() returns a file descriptor, "
2337 "for use in subsequent system calls (B<read>(2), B<mmap>(2), B<prctl>(2), "
2338 "B<fcntl>(2), etc.)."
2342 #: build/C/man2/perf_event_open.2:55
2344 "A call to B<perf_event_open>() creates a file descriptor that allows "
2345 "measuring performance information. Each file descriptor corresponds to one "
2346 "event that is measured; these can be grouped together to measure multiple "
2347 "events simultaneously."
2351 #: build/C/man2/perf_event_open.2:62
2353 "Events can be enabled and disabled in two ways: via B<ioctl>(2) and via "
2354 "B<prctl>(2). When an event is disabled it does not count or generate "
2355 "overflows but does continue to exist and maintain its count value."
2359 #: build/C/man2/perf_event_open.2:76
2361 "Events come in two flavors: counting and sampled. A I<counting> event is "
2362 "one that is used for counting the aggregate number of events that occur. In "
2363 "general, counting event results are gathered with a B<read>(2) call. A "
2364 "I<sampling> event periodically writes measurements to a buffer that can then "
2365 "be accessed via B<mmap>(2)."
2369 #: build/C/man2/perf_event_open.2:76
2375 #: build/C/man2/perf_event_open.2:83
2377 "The I<pid> and I<cpu> arguments allow specifying which process and CPU to "
2382 #: build/C/man2/perf_event_open.2:83
2384 msgid "B<pid == 0> and B<cpu == -1>"
2385 msgstr "B<pid == 0> and B<cpu == -1>"
2388 #: build/C/man2/perf_event_open.2:86
2389 msgid "This measures the calling process/thread on any CPU."
2393 #: build/C/man2/perf_event_open.2:86
2395 msgid "B<pid == 0> and B<cpu E<gt>= 0>"
2396 msgstr "B<pid == 0> and B<cpu E<gt>= 0>"
2399 #: build/C/man2/perf_event_open.2:90
2401 "This measures the calling process/thread only when running on the specified "
2406 #: build/C/man2/perf_event_open.2:90
2408 msgid "B<pid E<gt> 0> and B<cpu == -1>"
2409 msgstr "B<pid E<gt> 0> and B<cpu == -1>"
2412 #: build/C/man2/perf_event_open.2:93
2413 msgid "This measures the specified process/thread on any CPU."
2417 #: build/C/man2/perf_event_open.2:93
2419 msgid "B<pid E<gt> 0> and B<cpu E<gt>= 0>"
2420 msgstr "B<pid E<gt> 0> and B<cpu E<gt>= 0>"
2423 #: build/C/man2/perf_event_open.2:97
2425 "This measures the specified process/thread only when running on the "
2430 #: build/C/man2/perf_event_open.2:97
2432 msgid "B<pid == -1> and B<cpu E<gt>= 0>"
2433 msgstr "B<pid == -1> and B<cpu E<gt>= 0>"
2436 #: build/C/man2/perf_event_open.2:105
2438 "This measures all processes/threads on the specified CPU. This requires "
2439 "B<CAP_SYS_ADMIN> capability or a I</proc/sys/kernel/perf_event_paranoid> "
2440 "value of less than 1."
2444 #: build/C/man2/perf_event_open.2:105
2446 msgid "B<pid == -1> and B<cpu == -1>"
2447 msgstr "B<pid == -1> and B<cpu == -1>"
2450 #: build/C/man2/perf_event_open.2:108
2451 msgid "This setting is invalid and will return an error."
2455 #: build/C/man2/perf_event_open.2:130
2457 "The I<group_fd> argument allows event groups to be created. An event group "
2458 "has one event which is the group leader. The leader is created first, with "
2459 "I<group_fd> = -1. The rest of the group members are created with subsequent "
2460 "B<perf_event_open>() calls with I<group_fd> being set to the file "
2461 "descriptor of the group leader. (A single event on its own is created with "
2462 "I<group_fd> = -1 and is considered to be a group with only 1 member.) An "
2463 "event group is scheduled onto the CPU as a unit: it will be put onto the CPU "
2464 "only if all of the events in the group can be put onto the CPU. This means "
2465 "that the values of the member events can be meaningfully compared\\(emadded, "
2466 "divided (to get ratios), and so on\\(emwith each other, since they have "
2467 "counted events for the same set of executed instructions."
2471 #: build/C/man2/perf_event_open.2:134
2473 "The I<flags> argument is formed by ORing together zero or more of the "
2476 "I<flags> 引き数には、以下の値の 0 個以上をビット毎の論理和の形で指定する。"
2479 #: build/C/man2/perf_event_open.2:134
2481 msgid "B<PERF_FLAG_FD_CLOEXEC> (since Linux 3.14)"
2482 msgstr "B<PERF_FLAG_FD_CLOEXEC> (Linux 3.14 以降)"
2484 #. commit a21b0b354d4ac39be691f51c53562e2c24443d9e
2486 #: build/C/man2/perf_event_open.2:151
2488 "This flag enables the close-on-exec flag for the created event file "
2489 "descriptor, so that the file descriptor is automatically closed on "
2490 "B<execve>(2). Setting the close-on-exec flags at creation time, rather than "
2491 "later with B<fcntl>(2), avoids potential race conditions where the calling "
2492 "thread invokes B<perf_event_open>() and B<fcntl>(2) at the same time as "
2493 "another thread calls B<fork>(2) then B<execve>(2)."
2497 #: build/C/man2/perf_event_open.2:151
2499 msgid "B<PERF_FLAG_FD_NO_GROUP>"
2500 msgstr "B<PERF_FLAG_FD_NO_GROUP>"
2503 #: build/C/man2/perf_event_open.2:159
2505 "This flag tells the event to ignore the I<group_fd> parameter except for the "
2506 "purpose of setting up output redirection using the B<PERF_FLAG_FD_OUTPUT> "
2511 #: build/C/man2/perf_event_open.2:159
2513 msgid "B<PERF_FLAG_FD_OUTPUT> (broken since Linux 2.6.35)"
2514 msgstr "B<PERF_FLAG_FD_OUTPUT> (Linux 2.6.35 以降では正しく動作しない)"
2517 #: build/C/man2/perf_event_open.2:164
2519 "This flag re-routes the event's sampled output to instead be included in the "
2520 "mmap buffer of the event specified by I<group_fd>."
2524 #: build/C/man2/perf_event_open.2:164
2526 msgid "B<PERF_FLAG_PID_CGROUP> (since Linux 2.6.39)"
2527 msgstr "B<PERF_FLAG_PID_CGROUP> (Linux 2.6.39 以降)"
2529 #. commit e5d1367f17ba6a6fed5fd8b74e4d5720923e0c25
2531 #: build/C/man2/perf_event_open.2:188
2533 "This flag activates per-container system-wide monitoring. A container is an "
2534 "abstraction that isolates a set of resources for finer-grained control "
2535 "(CPUs, memory, etc.). In this mode, the event is measured only if the "
2536 "thread running on the monitored CPU belongs to the designated container "
2537 "(cgroup). The cgroup is identified by passing a file descriptor opened on "
2538 "its directory in the cgroupfs filesystem. For instance, if the cgroup to "
2539 "monitor is called I<test>, then a file descriptor opened on I</dev/cgroup/"
2540 "test> (assuming cgroupfs is mounted on I</dev/cgroup>) must be passed as "
2541 "the I<pid> parameter. cgroup monitoring is available only for system-wide "
2542 "events and may therefore require extra permissions."
2546 #: build/C/man2/perf_event_open.2:193
2548 "The I<perf_event_attr> structure provides detailed configuration information "
2549 "for the event being created."
2553 #: build/C/man2/perf_event_open.2:200
2556 "struct perf_event_attr {\n"
2557 " __u32 type; /* Type of event */\n"
2558 " __u32 size; /* Size of attribute structure */\n"
2559 " __u64 config; /* Type-specific configuration */\n"
2561 "struct perf_event_attr {\n"
2562 " __u32 type; /* Type of event */\n"
2563 " __u32 size; /* Size of attribute structure */\n"
2564 " __u64 config; /* Type-specific configuration */\n"
2567 #: build/C/man2/perf_event_open.2:205
2571 " __u64 sample_period; /* Period of sampling */\n"
2572 " __u64 sample_freq; /* Frequency of sampling */\n"
2576 " __u64 sample_period; /* Period of sampling */\n"
2577 " __u64 sample_freq; /* Frequency of sampling */\n"
2581 #: build/C/man2/perf_event_open.2:208
2584 " __u64 sample_type; /* Specifies values included in sample */\n"
2585 " __u64 read_format; /* Specifies values returned in read */\n"
2587 " __u64 sample_type; /* Specifies values included in sample */\n"
2588 " __u64 read_format; /* Specifies values returned in read */\n"
2591 #: build/C/man2/perf_event_open.2:236
2594 " __u64 disabled : 1, /* off by default */\n"
2595 " inherit : 1, /* children inherit it */\n"
2596 " pinned : 1, /* must always be on PMU */\n"
2597 " exclusive : 1, /* only group on PMU */\n"
2598 " exclude_user : 1, /* don't count user */\n"
2599 " exclude_kernel : 1, /* don't count kernel */\n"
2600 " exclude_hv : 1, /* don't count hypervisor */\n"
2601 " exclude_idle : 1, /* don't count when idle */\n"
2602 " mmap : 1, /* include mmap data */\n"
2603 " comm : 1, /* include comm data */\n"
2604 " freq : 1, /* use freq, not period */\n"
2605 " inherit_stat : 1, /* per task counts */\n"
2606 " enable_on_exec : 1, /* next exec enables */\n"
2607 " task : 1, /* trace fork/exit */\n"
2608 " watermark : 1, /* wakeup_watermark */\n"
2609 " precise_ip : 2, /* skid constraint */\n"
2610 " mmap_data : 1, /* non-exec mmap data */\n"
2611 " sample_id_all : 1, /* sample_type all events */\n"
2612 " exclude_host : 1, /* don't count in host */\n"
2613 " exclude_guest : 1, /* don't count in guest */\n"
2614 " exclude_callchain_kernel : 1,\n"
2615 " /* exclude kernel callchains */\n"
2616 " exclude_callchain_user : 1,\n"
2617 " /* exclude user callchains */\n"
2618 " mmap2 : 1, /* include mmap with inode data */\n"
2619 " comm_exec : 1, /* flag comm events that are due to exec */\n"
2620 " __reserved_1 : 39;\n"
2622 " __u64 disabled : 1, /* off by default */\n"
2623 " inherit : 1, /* children inherit it */\n"
2624 " pinned : 1, /* must always be on PMU */\n"
2625 " exclusive : 1, /* only group on PMU */\n"
2626 " exclude_user : 1, /* don't count user */\n"
2627 " exclude_kernel : 1, /* don't count kernel */\n"
2628 " exclude_hv : 1, /* don't count hypervisor */\n"
2629 " exclude_idle : 1, /* don't count when idle */\n"
2630 " mmap : 1, /* include mmap data */\n"
2631 " comm : 1, /* include comm data */\n"
2632 " freq : 1, /* use freq, not period */\n"
2633 " inherit_stat : 1, /* per task counts */\n"
2634 " enable_on_exec : 1, /* next exec enables */\n"
2635 " task : 1, /* trace fork/exit */\n"
2636 " watermark : 1, /* wakeup_watermark */\n"
2637 " precise_ip : 2, /* skid constraint */\n"
2638 " mmap_data : 1, /* non-exec mmap data */\n"
2639 " sample_id_all : 1, /* sample_type all events */\n"
2640 " exclude_host : 1, /* don't count in host */\n"
2641 " exclude_guest : 1, /* don't count in guest */\n"
2642 " exclude_callchain_kernel : 1,\n"
2643 " /* exclude kernel callchains */\n"
2644 " exclude_callchain_user : 1,\n"
2645 " /* exclude user callchains */\n"
2646 " mmap2 : 1, /* include mmap with inode data */\n"
2647 " comm_exec : 1, /* flag comm events that are due to exec */\n"
2648 " __reserved_1 : 39;\n"
2651 #: build/C/man2/perf_event_open.2:241
2655 " __u32 wakeup_events; /* wakeup every n events */\n"
2656 " __u32 wakeup_watermark; /* bytes before wakeup */\n"
2660 " __u32 wakeup_events; /* wakeup every n events */\n"
2661 " __u32 wakeup_watermark; /* bytes before wakeup */\n"
2665 #: build/C/man2/perf_event_open.2:243
2667 msgid " __u32 bp_type; /* breakpoint type */\n"
2668 msgstr " __u32 bp_type; /* breakpoint type */\n"
2671 #: build/C/man2/perf_event_open.2:248
2675 " __u64 bp_addr; /* breakpoint address */\n"
2676 " __u64 config1; /* extension of config */\n"
2680 " __u64 bp_addr; /* breakpoint address */\n"
2681 " __u64 config1; /* extension of config */\n"
2685 #: build/C/man2/perf_event_open.2:258
2689 " __u64 bp_len; /* breakpoint length */\n"
2690 " __u64 config2; /* extension of config1 */\n"
2692 " __u64 branch_sample_type; /* enum perf_branch_sample_type */\n"
2693 " __u64 sample_regs_user; /* user regs to dump on samples */\n"
2694 " __u32 sample_stack_user; /* size of stack to dump on\n"
2696 " __u32 __reserved_2; /* Align to u64 */\n"
2699 " __u64 bp_len; /* breakpoint length */\n"
2700 " __u64 config2; /* extension of config1 */\n"
2702 " __u64 branch_sample_type; /* enum perf_branch_sample_type */\n"
2703 " __u64 sample_regs_user; /* user regs to dump on samples */\n"
2704 " __u32 sample_stack_user; /* size of stack to dump on\n"
2706 " __u32 __reserved_2; /* Align to u64 */\n"
2709 #: build/C/man2/perf_event_open.2:260
2715 #: build/C/man2/perf_event_open.2:266
2717 "The fields of the I<perf_event_attr> structure are described in more detail "
2722 #: build/C/man2/perf_event_open.2:266 build/C/man2/perf_event_open.2:1627
2728 #: build/C/man2/perf_event_open.2:270
2730 "This field specifies the overall event type. It has one of the following "
2735 #: build/C/man2/perf_event_open.2:271
2737 msgid "B<PERF_TYPE_HARDWARE>"
2738 msgstr "B<PERF_TYPE_HARDWARE>"
2741 #: build/C/man2/perf_event_open.2:278
2743 "This indicates one of the \"generalized\" hardware events provided by the "
2744 "kernel. See the I<config> field definition for more details."
2748 #: build/C/man2/perf_event_open.2:278
2750 msgid "B<PERF_TYPE_SOFTWARE>"
2751 msgstr "B<PERF_TYPE_SOFTWARE>"
2754 #: build/C/man2/perf_event_open.2:282
2756 "This indicates one of the software-defined events provided by the kernel "
2757 "(even if no hardware support is available)."
2761 #: build/C/man2/perf_event_open.2:282
2763 msgid "B<PERF_TYPE_TRACEPOINT>"
2764 msgstr "B<PERF_TYPE_TRACEPOINT>"
2767 #: build/C/man2/perf_event_open.2:286
2769 "This indicates a tracepoint provided by the kernel tracepoint infrastructure."
2773 #: build/C/man2/perf_event_open.2:286
2775 msgid "B<PERF_TYPE_HW_CACHE>"
2776 msgstr "B<PERF_TYPE_HW_CACHE>"
2779 #: build/C/man2/perf_event_open.2:292
2781 "This indicates a hardware cache event. This has a special encoding, "
2782 "described in the I<config> field definition."
2786 #: build/C/man2/perf_event_open.2:292
2788 msgid "B<PERF_TYPE_RAW>"
2789 msgstr "B<PERF_TYPE_RAW>"
2792 #: build/C/man2/perf_event_open.2:296
2794 "This indicates a \"raw\" implementation-specific event in the I<config> "
2799 #: build/C/man2/perf_event_open.2:296
2801 msgid "B<PERF_TYPE_BREAKPOINT> (since Linux 2.6.33)"
2802 msgstr "B<PERF_TYPE_BREAKPOINT> (Linux 2.6.33 以降)"
2804 #. commit 24f1e32c60c45c89a997c73395b69c8af6f0a84e
2806 #: build/C/man2/perf_event_open.2:302
2808 "This indicates a hardware breakpoint as provided by the CPU. Breakpoints "
2809 "can be read/write accesses to an address as well as execution of an "
2810 "instruction address."
2814 #: build/C/man2/perf_event_open.2:302
2820 #: build/C/man2/perf_event_open.2:321
2822 "Since Linux 2.6.39, B<perf_event_open>() can support multiple PMUs. To "
2823 "enable this, a value exported by the kernel can be used in the I<type> field "
2824 "to indicate which PMU to use. The value to use can be found in the sysfs "
2825 "filesystem: there is a subdirectory per PMU instance under I</sys/bus/"
2826 "event_source/devices>. In each subdirectory there is a I<type> file whose "
2827 "content is an integer that can be used in the I<type> field. For instance, "
2828 "I</sys/bus/event_source/devices/cpu/type> contains the value for the core "
2829 "CPU PMU, which is usually 4."
2833 #: build/C/man2/perf_event_open.2:322 build/C/man2/perf_event_open.2:1559
2839 #: build/C/man2/perf_event_open.2:331
2841 "The size of the I<perf_event_attr> structure for forward/backward "
2842 "compatibility. Set this using I<sizeof(struct perf_event_attr)> to allow "
2843 "the kernel to see the struct size at the time of compilation."
2847 #: build/C/man2/perf_event_open.2:346
2849 "The related define B<PERF_ATTR_SIZE_VER0> is set to 64; this was the size of "
2850 "the first published struct. B<PERF_ATTR_SIZE_VER1> is 72, corresponding to "
2851 "the addition of breakpoints in Linux 2.6.33. B<PERF_ATTR_SIZE_VER2> is 80 "
2852 "corresponding to the addition of branch sampling in Linux 3.4. "
2853 "B<PERF_ATTR_SIZE_VER3> is 96 corresponding to the addition of "
2854 "I<sample_regs_user> and I<sample_stack_user> in Linux 3.7."
2858 #: build/C/man2/perf_event_open.2:346
2864 #: build/C/man2/perf_event_open.2:357
2866 "This specifies which event you want, in conjunction with the I<type> field. "
2867 "The I<config1> and I<config2> fields are also taken into account in cases "
2868 "where 64 bits is not enough to fully specify the event. The encoding of "
2869 "these fields are event dependent."
2873 #: build/C/man2/perf_event_open.2:368
2875 "There are various ways to set the I<config> field that are dependent on the "
2876 "value of the previously described I<type> field. What follows are various "
2877 "possible settings for I<config> separated out by I<type>."
2881 #: build/C/man2/perf_event_open.2:378
2883 "If I<type> is B<PERF_TYPE_HARDWARE>, we are measuring one of the generalized "
2884 "hardware CPU events. Not all of these are available on all platforms. Set "
2885 "I<config> to one of the following:"
2889 #: build/C/man2/perf_event_open.2:379
2891 msgid "B<PERF_COUNT_HW_CPU_CYCLES>"
2892 msgstr "B<PERF_COUNT_HW_CPU_CYCLES>"
2895 #: build/C/man2/perf_event_open.2:383
2896 msgid "Total cycles. Be wary of what happens during CPU frequency scaling."
2900 #: build/C/man2/perf_event_open.2:383
2902 msgid "B<PERF_COUNT_HW_INSTRUCTIONS>"
2903 msgstr "B<PERF_COUNT_HW_INSTRUCTIONS>"
2906 #: build/C/man2/perf_event_open.2:388
2908 "Retired instructions. Be careful, these can be affected by various issues, "
2909 "most notably hardware interrupt counts."
2913 #: build/C/man2/perf_event_open.2:388
2915 msgid "B<PERF_COUNT_HW_CACHE_REFERENCES>"
2916 msgstr "B<PERF_COUNT_HW_CACHE_REFERENCES>"
2919 #: build/C/man2/perf_event_open.2:395
2921 "Cache accesses. Usually this indicates Last Level Cache accesses but this "
2922 "may vary depending on your CPU. This may include prefetches and coherency "
2923 "messages; again this depends on the design of your CPU."
2927 #: build/C/man2/perf_event_open.2:395
2929 msgid "B<PERF_COUNT_HW_CACHE_MISSES>"
2930 msgstr "B<PERF_COUNT_HW_CACHE_MISSES>"
2933 #: build/C/man2/perf_event_open.2:402
2935 "Cache misses. Usually this indicates Last Level Cache misses; this is "
2936 "intended to be used in conjunction with the "
2937 "B<PERF_COUNT_HW_CACHE_REFERENCES> event to calculate cache miss rates."
2941 #: build/C/man2/perf_event_open.2:402
2943 msgid "B<PERF_COUNT_HW_BRANCH_INSTRUCTIONS>"
2944 msgstr "B<PERF_COUNT_HW_BRANCH_INSTRUCTIONS>"
2947 #: build/C/man2/perf_event_open.2:407
2949 "Retired branch instructions. Prior to Linux 2.6.34, this used the wrong "
2950 "event on AMD processors."
2954 #: build/C/man2/perf_event_open.2:407
2956 msgid "B<PERF_COUNT_HW_BRANCH_MISSES>"
2957 msgstr "B<PERF_COUNT_HW_BRANCH_MISSES>"
2960 #: build/C/man2/perf_event_open.2:410
2961 msgid "Mispredicted branch instructions."
2965 #: build/C/man2/perf_event_open.2:410
2967 msgid "B<PERF_COUNT_HW_BUS_CYCLES>"
2968 msgstr "B<PERF_COUNT_HW_BUS_CYCLES>"
2971 #: build/C/man2/perf_event_open.2:413
2972 msgid "Bus cycles, which can be different from total cycles."
2976 #: build/C/man2/perf_event_open.2:413
2978 msgid "B<PERF_COUNT_HW_STALLED_CYCLES_FRONTEND> (since Linux 3.0)"
2979 msgstr "B<PERF_COUNT_HW_STALLED_CYCLES_FRONTEND> (Linux 3.0 以降)"
2982 #: build/C/man2/perf_event_open.2:416
2983 msgid "Stalled cycles during issue."
2987 #: build/C/man2/perf_event_open.2:416
2989 msgid "B<PERF_COUNT_HW_STALLED_CYCLES_BACKEND> (since Linux 3.0)"
2990 msgstr "B<PERF_COUNT_HW_STALLED_CYCLES_BACKEND> (Linux 3.0 以降)"
2993 #: build/C/man2/perf_event_open.2:419
2994 msgid "Stalled cycles during retirement."
2998 #: build/C/man2/perf_event_open.2:419
3000 msgid "B<PERF_COUNT_HW_REF_CPU_CYCLES> (since Linux 3.3)"
3001 msgstr "B<PERF_COUNT_HW_REF_CPU_CYCLES> (Linux 3.3 以降)"
3003 #. commit c37e17497e01fc0f5d2d6feb5723b210b3ab8890
3005 #: build/C/man2/perf_event_open.2:423
3006 msgid "Total cycles; not affected by CPU frequency scaling."
3010 #: build/C/man2/perf_event_open.2:433
3012 "If I<type> is B<PERF_TYPE_SOFTWARE>, we are measuring software events "
3013 "provided by the kernel. Set I<config> to one of the following:"
3017 #: build/C/man2/perf_event_open.2:434
3019 msgid "B<PERF_COUNT_SW_CPU_CLOCK>"
3020 msgstr "B<PERF_COUNT_SW_CPU_CLOCK>"
3023 #: build/C/man2/perf_event_open.2:437
3024 msgid "This reports the CPU clock, a high-resolution per-CPU timer."
3028 #: build/C/man2/perf_event_open.2:437
3030 msgid "B<PERF_COUNT_SW_TASK_CLOCK>"
3031 msgstr "B<PERF_COUNT_SW_TASK_CLOCK>"
3034 #: build/C/man2/perf_event_open.2:440
3035 msgid "This reports a clock count specific to the task that is running."
3039 #: build/C/man2/perf_event_open.2:440
3041 msgid "B<PERF_COUNT_SW_PAGE_FAULTS>"
3042 msgstr "B<PERF_COUNT_SW_PAGE_FAULTS>"
3045 #: build/C/man2/perf_event_open.2:443
3046 msgid "This reports the number of page faults."
3050 #: build/C/man2/perf_event_open.2:443
3052 msgid "B<PERF_COUNT_SW_CONTEXT_SWITCHES>"
3053 msgstr "B<PERF_COUNT_SW_CONTEXT_SWITCHES>"
3056 #: build/C/man2/perf_event_open.2:448
3058 "This counts context switches. Until Linux 2.6.34, these were all reported "
3059 "as user-space events, after that they are reported as happening in the "
3064 #: build/C/man2/perf_event_open.2:448
3066 msgid "B<PERF_COUNT_SW_CPU_MIGRATIONS>"
3067 msgstr "B<PERF_COUNT_SW_CPU_MIGRATIONS>"
3070 #: build/C/man2/perf_event_open.2:452
3071 msgid "This reports the number of times the process has migrated to a new CPU."
3075 #: build/C/man2/perf_event_open.2:452
3077 msgid "B<PERF_COUNT_SW_PAGE_FAULTS_MIN>"
3078 msgstr "B<PERF_COUNT_SW_PAGE_FAULTS_MIN>"
3081 #: build/C/man2/perf_event_open.2:456
3083 "This counts the number of minor page faults. These did not require disk I/O "
3088 #: build/C/man2/perf_event_open.2:456
3090 msgid "B<PERF_COUNT_SW_PAGE_FAULTS_MAJ>"
3091 msgstr "B<PERF_COUNT_SW_PAGE_FAULTS_MAJ>"
3094 #: build/C/man2/perf_event_open.2:460
3096 "This counts the number of major page faults. These required disk I/O to "
3101 #: build/C/man2/perf_event_open.2:460
3103 msgid "B<PERF_COUNT_SW_ALIGNMENT_FAULTS> (since Linux 2.6.33)"
3104 msgstr "B<PERF_COUNT_SW_ALIGNMENT_FAULTS> (Linux 2.6.33 以降)"
3106 #. commit f7d7986060b2890fc26db6ab5203efbd33aa2497
3108 #: build/C/man2/perf_event_open.2:467
3110 "This counts the number of alignment faults. These happen when unaligned "
3111 "memory accesses happen; the kernel can handle these but it reduces "
3112 "performance. This happens only on some architectures (never on x86)."
3116 #: build/C/man2/perf_event_open.2:467
3118 msgid "B<PERF_COUNT_SW_EMULATION_FAULTS> (since Linux 2.6.33)"
3119 msgstr "B<PERF_COUNT_SW_EMULATION_FAULTS> (Linux 2.6.33 以降)"
3121 #. commit f7d7986060b2890fc26db6ab5203efbd33aa2497
3123 #: build/C/man2/perf_event_open.2:474
3125 "This counts the number of emulation faults. The kernel sometimes traps on "
3126 "unimplemented instructions and emulates them for user space. This can "
3127 "negatively impact performance."
3131 #: build/C/man2/perf_event_open.2:474
3133 msgid "B<PERF_COUNT_SW_DUMMY> (since Linux 3.12)"
3134 msgstr "B<PERF_COUNT_SW_DUMMY> (Linux 3.12 以降)"
3136 #. commit fa0097ee690693006ab1aea6c01ad3c851b65c77
3138 #: build/C/man2/perf_event_open.2:482
3140 "This is a placeholder event that counts nothing. Informational sample "
3141 "record types such as mmap or comm must be associated with an active event. "
3142 "This dummy event allows gathering such records without requiring a counting "
3147 #: build/C/man2/perf_event_open.2:495
3149 "If I<type> is B<PERF_TYPE_TRACEPOINT>, then we are measuring kernel "
3150 "tracepoints. The value to use in I<config> can be obtained from under "
3151 "debugfs I<tracing/events/*/*/id> if ftrace is enabled in the kernel."
3155 #: build/C/man2/perf_event_open.2:506
3157 "If I<type> is B<PERF_TYPE_HW_CACHE>, then we are measuring a hardware CPU "
3158 "cache event. To calculate the appropriate I<config> value use the following "
3163 #: build/C/man2/perf_event_open.2:511
3166 " (perf_hw_cache_id) | (perf_hw_cache_op_id E<lt>E<lt> 8) |\n"
3167 " (perf_hw_cache_op_result_id E<lt>E<lt> 16)\n"
3169 " (perf_hw_cache_id) | (perf_hw_cache_op_id E<lt>E<lt> 8) |\n"
3170 " (perf_hw_cache_op_result_id E<lt>E<lt> 16)\n"
3173 #: build/C/man2/perf_event_open.2:516
3174 msgid "where I<perf_hw_cache_id> is one of:"
3178 #: build/C/man2/perf_event_open.2:517
3180 msgid "B<PERF_COUNT_HW_CACHE_L1D>"
3181 msgstr "B<PERF_COUNT_HW_CACHE_L1D>"
3184 #: build/C/man2/perf_event_open.2:520
3185 msgid "for measuring Level 1 Data Cache"
3189 #: build/C/man2/perf_event_open.2:520
3191 msgid "B<PERF_COUNT_HW_CACHE_L1I>"
3192 msgstr "B<PERF_COUNT_HW_CACHE_L1I>"
3195 #: build/C/man2/perf_event_open.2:523
3196 msgid "for measuring Level 1 Instruction Cache"
3200 #: build/C/man2/perf_event_open.2:523
3202 msgid "B<PERF_COUNT_HW_CACHE_LL>"
3203 msgstr "B<PERF_COUNT_HW_CACHE_LL>"
3206 #: build/C/man2/perf_event_open.2:526
3207 msgid "for measuring Last-Level Cache"
3211 #: build/C/man2/perf_event_open.2:526
3213 msgid "B<PERF_COUNT_HW_CACHE_DTLB>"
3214 msgstr "B<PERF_COUNT_HW_CACHE_DTLB>"
3217 #: build/C/man2/perf_event_open.2:529
3218 msgid "for measuring the Data TLB"
3222 #: build/C/man2/perf_event_open.2:529
3224 msgid "B<PERF_COUNT_HW_CACHE_ITLB>"
3225 msgstr "B<PERF_COUNT_HW_CACHE_ITLB>"
3228 #: build/C/man2/perf_event_open.2:532
3229 msgid "for measuring the Instruction TLB"
3233 #: build/C/man2/perf_event_open.2:532
3235 msgid "B<PERF_COUNT_HW_CACHE_BPU>"
3236 msgstr "B<PERF_COUNT_HW_CACHE_BPU>"
3239 #: build/C/man2/perf_event_open.2:535
3240 msgid "for measuring the branch prediction unit"
3244 #: build/C/man2/perf_event_open.2:535
3246 msgid "B<PERF_COUNT_HW_CACHE_NODE> (since Linux 3.1)"
3247 msgstr "B<PERF_COUNT_HW_CACHE_NODE> (Linux 3.1 以降)"
3249 #. commit 89d6c0b5bdbb1927775584dcf532d98b3efe1477
3251 #: build/C/man2/perf_event_open.2:539
3252 msgid "for measuring local memory accesses"
3256 #: build/C/man2/perf_event_open.2:544
3257 msgid "and I<perf_hw_cache_op_id> is one of"
3261 #: build/C/man2/perf_event_open.2:545
3263 msgid "B<PERF_COUNT_HW_CACHE_OP_READ>"
3264 msgstr "B<PERF_COUNT_HW_CACHE_OP_READ>"
3267 #: build/C/man2/perf_event_open.2:548
3268 msgid "for read accesses"
3272 #: build/C/man2/perf_event_open.2:548
3274 msgid "B<PERF_COUNT_HW_CACHE_OP_WRITE>"
3275 msgstr "B<PERF_COUNT_HW_CACHE_OP_WRITE>"
3278 #: build/C/man2/perf_event_open.2:551
3279 msgid "for write accesses"
3283 #: build/C/man2/perf_event_open.2:551
3285 msgid "B<PERF_COUNT_HW_CACHE_OP_PREFETCH>"
3286 msgstr "B<PERF_COUNT_HW_CACHE_OP_PREFETCH>"
3289 #: build/C/man2/perf_event_open.2:554
3290 msgid "for prefetch accesses"
3294 #: build/C/man2/perf_event_open.2:559
3295 msgid "and I<perf_hw_cache_op_result_id> is one of"
3299 #: build/C/man2/perf_event_open.2:560
3301 msgid "B<PERF_COUNT_HW_CACHE_RESULT_ACCESS>"
3302 msgstr "B<PERF_COUNT_HW_CACHE_RESULT_ACCESS>"
3305 #: build/C/man2/perf_event_open.2:563
3306 msgid "to measure accesses"
3310 #: build/C/man2/perf_event_open.2:563
3312 msgid "B<PERF_COUNT_HW_CACHE_RESULT_MISS>"
3313 msgstr "B<PERF_COUNT_HW_CACHE_RESULT_MISS>"
3316 #: build/C/man2/perf_event_open.2:566
3317 msgid "to measure misses"
3321 #: build/C/man2/perf_event_open.2:584
3323 "If I<type> is B<PERF_TYPE_RAW>, then a custom \"raw\" I<config> value is "
3324 "needed. Most CPUs support events that are not covered by the \"generalized"
3325 "\" events. These are implementation defined; see your CPU manual (for "
3326 "example the Intel Volume 3B documentation or the AMD BIOS and Kernel "
3327 "Developer Guide). The libpfm4 library can be used to translate from the "
3328 "name in the architectural manuals to the raw hex value B<perf_event_open>() "
3329 "expects in this field."
3333 #: build/C/man2/perf_event_open.2:593
3335 "If I<type> is B<PERF_TYPE_BREAKPOINT>, then leave I<config> set to zero. "
3336 "Its parameters are set in other places."
3340 #: build/C/man2/perf_event_open.2:594
3342 msgid "I<sample_period>, I<sample_freq>"
3343 msgstr "I<sample_period>, I<sample_freq>"
3346 #: build/C/man2/perf_event_open.2:606
3348 "A \"sampling\" event is one that generates an overflow notification every N "
3349 "events, where N is given by I<sample_period>. A sampling event has "
3350 "I<sample_period> E<gt> 0. When an overflow occurs, requested data is "
3351 "recorded in the mmap buffer. The I<sample_type> field controls what data is "
3352 "recorded on each overflow."
3356 #: build/C/man2/perf_event_open.2:616
3358 "I<sample_freq> can be used if you wish to use frequency rather than period. "
3359 "In this case, you set the I<freq> flag. The kernel will adjust the sampling "
3360 "period to try and achieve the desired rate. The rate of adjustment is a "
3365 #: build/C/man2/perf_event_open.2:616
3367 msgid "I<sample_type>"
3368 msgstr "I<sample_type>"
3371 #: build/C/man2/perf_event_open.2:628
3373 "The various bits in this field specify which values to include in the "
3374 "sample. They will be recorded in a ring-buffer, which is available to user "
3375 "space using B<mmap>(2). The order in which the values are saved in the "
3376 "sample are documented in the MMAP Layout subsection below; it is not the "
3377 "I<enum perf_event_sample_format> order."
3381 #: build/C/man2/perf_event_open.2:629
3383 msgid "B<PERF_SAMPLE_IP>"
3384 msgstr "B<PERF_SAMPLE_IP>"
3387 #: build/C/man2/perf_event_open.2:632
3388 msgid "Records instruction pointer."
3392 #: build/C/man2/perf_event_open.2:632
3394 msgid "B<PERF_SAMPLE_TID>"
3395 msgstr "B<PERF_SAMPLE_TID>"
3398 #: build/C/man2/perf_event_open.2:635
3399 msgid "Records the process and thread IDs."
3403 #: build/C/man2/perf_event_open.2:635
3405 msgid "B<PERF_SAMPLE_TIME>"
3406 msgstr "B<PERF_SAMPLE_TIME>"
3409 #: build/C/man2/perf_event_open.2:638
3410 msgid "Records a timestamp."
3414 #: build/C/man2/perf_event_open.2:638
3416 msgid "B<PERF_SAMPLE_ADDR>"
3417 msgstr "B<PERF_SAMPLE_ADDR>"
3420 #: build/C/man2/perf_event_open.2:641
3421 msgid "Records an address, if applicable."
3425 #: build/C/man2/perf_event_open.2:641
3427 msgid "B<PERF_SAMPLE_READ>"
3428 msgstr "B<PERF_SAMPLE_READ>"
3431 #: build/C/man2/perf_event_open.2:644
3433 "Record counter values for all events in a group, not just the group leader."
3437 #: build/C/man2/perf_event_open.2:644
3439 msgid "B<PERF_SAMPLE_CALLCHAIN>"
3440 msgstr "B<PERF_SAMPLE_CALLCHAIN>"
3443 #: build/C/man2/perf_event_open.2:647
3444 msgid "Records the callchain (stack backtrace)."
3448 #: build/C/man2/perf_event_open.2:647
3450 msgid "B<PERF_SAMPLE_ID>"
3451 msgstr "B<PERF_SAMPLE_ID>"
3454 #: build/C/man2/perf_event_open.2:650
3455 msgid "Records a unique ID for the opened event's group leader."
3459 #: build/C/man2/perf_event_open.2:650
3461 msgid "B<PERF_SAMPLE_CPU>"
3462 msgstr "B<PERF_SAMPLE_CPU>"
3465 #: build/C/man2/perf_event_open.2:653
3466 msgid "Records CPU number."
3470 #: build/C/man2/perf_event_open.2:653
3472 msgid "B<PERF_SAMPLE_PERIOD>"
3473 msgstr "B<PERF_SAMPLE_PERIOD>"
3476 #: build/C/man2/perf_event_open.2:656
3477 msgid "Records the current sampling period."
3481 #: build/C/man2/perf_event_open.2:656
3483 msgid "B<PERF_SAMPLE_STREAM_ID>"
3484 msgstr "B<PERF_SAMPLE_STREAM_ID>"
3487 #: build/C/man2/perf_event_open.2:664
3489 "Records a unique ID for the opened event. Unlike B<PERF_SAMPLE_ID> the "
3490 "actual ID is returned, not the group leader. This ID is the same as the one "
3491 "returned by B<PERF_FORMAT_ID>."
3495 #: build/C/man2/perf_event_open.2:664
3497 msgid "B<PERF_SAMPLE_RAW>"
3498 msgstr "B<PERF_SAMPLE_RAW>"
3501 #: build/C/man2/perf_event_open.2:668
3503 "Records additional data, if applicable. Usually returned by tracepoint "
3508 #: build/C/man2/perf_event_open.2:668
3510 msgid "B<PERF_SAMPLE_BRANCH_STACK> (since Linux 3.4)"
3511 msgstr "B<PERF_SAMPLE_BRANCH_STACK> (Linux 3.4 以降)"
3513 #. commit bce38cd53e5ddba9cb6d708c4ef3d04a4016ec7e
3515 #: build/C/man2/perf_event_open.2:674
3517 "This provides a record of recent branches, as provided by CPU branch "
3518 "sampling hardware (such as Intel Last Branch Record). Not all hardware "
3519 "supports this feature."
3523 #: build/C/man2/perf_event_open.2:678
3525 "See the I<branch_sample_type> field for how to filter which branches are "
3530 #: build/C/man2/perf_event_open.2:678
3532 msgid "B<PERF_SAMPLE_REGS_USER> (since Linux 3.7)"
3533 msgstr "B<PERF_SAMPLE_REGS_USER> (Linux 3.7 以降)"
3535 #. commit 4018994f3d8785275ef0e7391b75c3462c029e56
3537 #: build/C/man2/perf_event_open.2:683
3539 "Records the current user-level CPU register state (the values in the process "
3540 "before the kernel was called)."
3544 #: build/C/man2/perf_event_open.2:683
3546 msgid "B<PERF_SAMPLE_STACK_USER> (since Linux 3.7)"
3547 msgstr "B<PERF_SAMPLE_STACK_USER> (Linux 3.7 以降)"
3549 #. commit c5ebcedb566ef17bda7b02686e0d658a7bb42ee7
3551 #: build/C/man2/perf_event_open.2:687
3552 msgid "Records the user level stack, allowing stack unwinding."
3556 #: build/C/man2/perf_event_open.2:687
3558 msgid "B<PERF_SAMPLE_WEIGHT> (since Linux 3.10)"
3559 msgstr "B<PERF_SAMPLE_WEIGHT> (Linux 3.10 以降)"
3561 #. commit c3feedf2aaf9ac8bad6f19f5d21e4ee0b4b87e9c
3563 #: build/C/man2/perf_event_open.2:694
3565 "Records a hardware provided weight value that expresses how costly the "
3566 "sampled event was. This allows the hardware to highlight expensive events "
3571 #: build/C/man2/perf_event_open.2:694
3573 msgid "B<PERF_SAMPLE_DATA_SRC> (since Linux 3.10)"
3574 msgstr "B<PERF_SAMPLE_DATA_SRC> (Linux 3.10 以降)"
3576 #. commit d6be9ad6c960f43800a6f118932bc8a5a4eadcd1
3578 #: build/C/man2/perf_event_open.2:701
3580 "Records the data source: where in the memory hierarchy the data associated "
3581 "with the sampled instruction came from. This is only available if the "
3582 "underlying hardware supports this feature."
3586 #: build/C/man2/perf_event_open.2:701
3588 msgid "B<PERF_SAMPLE_IDENTIFIER> (since Linux 3.12)"
3589 msgstr "B<PERF_SAMPLE_IDENTIFIER> (Linux 3.12 以降)"
3591 #. commit ff3d527cebc1fa3707c617bfe9e74f53fcfb0955
3593 #: build/C/man2/perf_event_open.2:709
3595 "Places the B<SAMPLE_ID> value in a fixed position in the record, either at "
3596 "the beginning (for sample events) or at the end (if a non-sample event)."
3600 #: build/C/man2/perf_event_open.2:721
3602 "This was necessary because a sample stream may have records from various "
3603 "different event sources with different I<sample_type> settings. Parsing the "
3604 "event stream properly was not possible because the format of the record was "
3605 "needed to find B<SAMPLE_ID>, but the format could not be found without "
3606 "knowing what event the sample belonged to (causing a circular dependency)."
3610 #: build/C/man2/perf_event_open.2:731
3612 "The B<PERF_SAMPLE_IDENTIFIER> setting makes the event stream always parsable "
3613 "by putting B<SAMPLE_ID> in a fixed location, even though it means having "
3614 "duplicate B<SAMPLE_ID> values in records."
3618 #: build/C/man2/perf_event_open.2:731
3620 msgid "B<PERF_SAMPLE_TRANSACTION> (since Linux 3.13)"
3621 msgstr "B<PERF_SAMPLE_TRANSACTION> (Linux 3.13 以降)"
3623 #. commit fdfbbd07e91f8fe387140776f3fd94605f0c89e5
3625 #: build/C/man2/perf_event_open.2:736
3627 "Records reasons for transactional memory abort events (for example, from "
3628 "Intel TSX transactional memory support)."
3632 #: build/C/man2/perf_event_open.2:744
3634 "The I<precise_ip> setting must be greater than 0 and a transactional memory "
3635 "abort event must be measured or no values will be recorded. Also note that "
3636 "some perf_event measurements, such as sampled cycle counting, may cause "
3637 "extraneous aborts (by causing an interrupt during a transaction)."
3641 #: build/C/man2/perf_event_open.2:745
3643 msgid "I<read_format>"
3644 msgstr "I<read_format>"
3647 #: build/C/man2/perf_event_open.2:752
3649 "This field specifies the format of the data returned by B<read>(2) on a "
3650 "B<perf_event_open>() file descriptor."
3654 #: build/C/man2/perf_event_open.2:753
3656 msgid "B<PERF_FORMAT_TOTAL_TIME_ENABLED>"
3657 msgstr "B<PERF_FORMAT_TOTAL_TIME_ENABLED>"
3660 #: build/C/man2/perf_event_open.2:760
3662 "Adds the 64-bit I<time_enabled> field. This can be used to calculate "
3663 "estimated totals if the PMU is overcommitted and multiplexing is happening."
3667 #: build/C/man2/perf_event_open.2:760
3669 msgid "B<PERF_FORMAT_TOTAL_TIME_RUNNING>"
3670 msgstr "B<PERF_FORMAT_TOTAL_TIME_RUNNING>"
3673 #: build/C/man2/perf_event_open.2:767
3675 "Adds the 64-bit I<time_running> field. This can be used to calculate "
3676 "estimated totals if the PMU is overcommitted and multiplexing is happening."
3680 #: build/C/man2/perf_event_open.2:767
3682 msgid "B<PERF_FORMAT_ID>"
3683 msgstr "B<PERF_FORMAT_ID>"
3686 #: build/C/man2/perf_event_open.2:770
3687 msgid "Adds a 64-bit unique value that corresponds to the event group."
3691 #: build/C/man2/perf_event_open.2:770
3693 msgid "B<PERF_FORMAT_GROUP>"
3694 msgstr "B<PERF_FORMAT_GROUP>"
3697 #: build/C/man2/perf_event_open.2:773
3698 msgid "Allows all counter values in an event group to be read with one read."
3702 #: build/C/man2/perf_event_open.2:774
3705 msgstr "I<disabled>"
3708 #: build/C/man2/perf_event_open.2:784
3710 "The I<disabled> bit specifies whether the counter starts out disabled or "
3711 "enabled. If disabled, the event can later be enabled by B<ioctl>(2), "
3712 "B<prctl>(2), or I<enable_on_exec>."
3716 #: build/C/man2/perf_event_open.2:795
3718 "When creating an event group, typically the group leader is initialized with "
3719 "I<disabled> set to 1 and any child events are initialized with I<disabled> "
3720 "set to 0. Despite I<disabled> being 0, the child events will not start "
3721 "until the group leader is enabled."
3725 #: build/C/man2/perf_event_open.2:795
3731 #: build/C/man2/perf_event_open.2:804
3733 "The I<inherit> bit specifies that this counter should count events of child "
3734 "tasks as well as the task specified. This applies only to new children, not "
3735 "to any existing children at the time the counter is created (nor to any new "
3736 "children of existing children)."
3740 #: build/C/man2/perf_event_open.2:809
3742 "Inherit does not work for some combinations of I<read_format>s, such as "
3743 "B<PERF_FORMAT_GROUP>."
3747 #: build/C/man2/perf_event_open.2:809
3753 #: build/C/man2/perf_event_open.2:822
3755 "The I<pinned> bit specifies that the counter should always be on the CPU if "
3756 "at all possible. It applies only to hardware counters and only to group "
3757 "leaders. If a pinned counter cannot be put onto the CPU (e.g., because "
3758 "there are not enough hardware counters or because of a conflict with some "
3759 "other event), then the counter goes into an 'error' state, where reads "
3760 "return end-of-file (i.e., B<read>(2) returns 0) until the counter is "
3761 "subsequently enabled or disabled."
3765 #: build/C/man2/perf_event_open.2:822
3767 msgid "I<exclusive>"
3768 msgstr "I<exclusive>"
3771 #: build/C/man2/perf_event_open.2:831
3773 "The I<exclusive> bit specifies that when this counter's group is on the CPU, "
3774 "it should be the only group using the CPU's counters. In the future this "
3775 "may allow monitoring programs to support PMU features that need to run alone "
3776 "so that they do not disrupt other hardware counters."
3780 #: build/C/man2/perf_event_open.2:838
3782 "Note that many unexpected situations may prevent events with the "
3783 "I<exclusive> bit set from ever running. This includes any users running a "
3784 "system-wide measurement as well as any kernel use of the performance "
3785 "counters (including the commonly enabled NMI Watchdog Timer interface)."
3789 #: build/C/man2/perf_event_open.2:838
3791 msgid "I<exclude_user>"
3792 msgstr "I<exclude_user>"
3795 #: build/C/man2/perf_event_open.2:841
3797 "If this bit is set, the count excludes events that happen in user space."
3801 #: build/C/man2/perf_event_open.2:841
3803 msgid "I<exclude_kernel>"
3804 msgstr "I<exclude_kernel>"
3807 #: build/C/man2/perf_event_open.2:844
3809 "If this bit is set, the count excludes events that happen in kernel-space."
3813 #: build/C/man2/perf_event_open.2:844
3815 msgid "I<exclude_hv>"
3816 msgstr "I<exclude_hv>"
3819 #: build/C/man2/perf_event_open.2:852
3821 "If this bit is set, the count excludes events that happen in the "
3822 "hypervisor. This is mainly for PMUs that have built-in support for handling "
3823 "this (such as POWER). Extra support is needed for handling hypervisor "
3824 "measurements on most machines."
3828 #: build/C/man2/perf_event_open.2:852
3830 msgid "I<exclude_idle>"
3831 msgstr "I<exclude_idle>"
3834 #: build/C/man2/perf_event_open.2:855
3835 msgid "If set, don't count when the CPU is idle."
3839 #: build/C/man2/perf_event_open.2:855
3845 #: build/C/man2/perf_event_open.2:869
3847 "The I<mmap> bit enables generation of B<PERF_RECORD_MMAP> samples for every "
3848 "B<mmap>(2) call that has B<PROT_EXEC> set. This allows tools to notice new "
3849 "executable code being mapped into a program (dynamic shared libraries for "
3850 "example) so that addresses can be mapped back to the original code."
3854 #: build/C/man2/perf_event_open.2:869 build/C/man2/perf_event_open.2:1719
3860 #: build/C/man2/perf_event_open.2:887
3862 "The I<comm> bit enables tracking of process command name as modified by the "
3863 "B<exec>(2) and B<prctl>(PR_SET_NAME) system calls as well as writing to I</"
3864 "proc/self/comm>. If the I<comm_exec> flag is also successfully set "
3865 "(possible since Linux 3.16), then the misc flag "
3866 "B<PERF_RECORD_MISC_COMM_EXEC> can be used to differentiate the B<exec>(2) "
3867 "case from the others."
3871 #: build/C/man2/perf_event_open.2:887
3877 #: build/C/man2/perf_event_open.2:894
3879 "If this bit is set, then I<sample_frequency> not I<sample_period> is used "
3880 "when setting up the sampling interval."
3884 #: build/C/man2/perf_event_open.2:894
3886 msgid "I<inherit_stat>"
3887 msgstr "I<inherit_stat>"
3890 #: build/C/man2/perf_event_open.2:901
3892 "This bit enables saving of event counts on context switch for inherited "
3893 "tasks. This is meaningful only if the I<inherit> field is set."
3897 #: build/C/man2/perf_event_open.2:901
3899 msgid "I<enable_on_exec>"
3900 msgstr "I<enable_on_exec>"
3903 #: build/C/man2/perf_event_open.2:906
3905 "If this bit is set, a counter is automatically enabled after a call to "
3910 #: build/C/man2/perf_event_open.2:906
3916 #: build/C/man2/perf_event_open.2:910
3918 "If this bit is set, then fork/exit notifications are included in the ring "
3923 #: build/C/man2/perf_event_open.2:910
3925 msgid "I<watermark>"
3926 msgstr "I<watermark>"
3929 #: build/C/man2/perf_event_open.2:918
3931 "If set, have an overflow notification happen when we cross the "
3932 "I<wakeup_watermark> boundary. Otherwise, overflow notifications happen "
3933 "after I<wakeup_events> samples."
3937 #: build/C/man2/perf_event_open.2:918
3939 msgid "I<precise_ip> (since Linux 2.6.35)"
3940 msgstr "I<precise_ip> (Linux 2.6.35 以降)"
3943 #: build/C/man2/perf_event_open.2:928
3945 "This controls the amount of skid. Skid is how many instructions execute "
3946 "between an event of interest happening and the kernel being able to stop and "
3947 "record the event. Smaller skid is better and allows more accurate reporting "
3948 "of which events correspond to which instructions, but hardware is often "
3949 "limited with how small this can be."
3953 #: build/C/man2/perf_event_open.2:930
3954 msgid "The values of this are the following:"
3958 #: build/C/man2/perf_event_open.2:931
3964 #: build/C/man2/perf_event_open.2:935
3965 msgid "B<SAMPLE_IP> can have arbitrary skid."
3969 #: build/C/man2/perf_event_open.2:935
3975 #: build/C/man2/perf_event_open.2:939
3976 msgid "B<SAMPLE_IP> must have constant skid."
3980 #: build/C/man2/perf_event_open.2:939
3986 #: build/C/man2/perf_event_open.2:943
3987 msgid "B<SAMPLE_IP> requested to have 0 skid."
3991 #: build/C/man2/perf_event_open.2:943
3997 #: build/C/man2/perf_event_open.2:949
3998 msgid "B<SAMPLE_IP> must have 0 skid. See also B<PERF_RECORD_MISC_EXACT_IP>."
4002 #: build/C/man2/perf_event_open.2:950
4004 msgid "I<mmap_data> (since Linux 2.6.36)"
4005 msgstr "I<mmap_data> (Linux 2.6.36 以降)"
4008 #: build/C/man2/perf_event_open.2:962
4010 "The counterpart of the I<mmap> field. This enables generation of "
4011 "B<PERF_RECORD_MMAP> samples for B<mmap>(2) calls that do not have "
4012 "B<PROT_EXEC> set (for example data and SysV shared memory)."
4016 #: build/C/man2/perf_event_open.2:962
4018 msgid "I<sample_id_all> (since Linux 2.6.38)"
4019 msgstr "I<sample_id_all> (Linux 2.6.38 以降)"
4022 #: build/C/man2/perf_event_open.2:970
4024 "If set, then TID, TIME, ID, STREAM_ID, and CPU can additionally be included "
4025 "in non-B<PERF_RECORD_SAMPLE>s if the corresponding I<sample_type> is "
4030 #: build/C/man2/perf_event_open.2:978
4032 "If B<PERF_SAMPLE_IDENTIFIER> is specified, then an additional ID value is "
4033 "included as the last value to ease parsing the record stream. This may lead "
4034 "to the I<id> value appearing twice."
4038 #: build/C/man2/perf_event_open.2:980
4039 msgid "The layout is described by this pseudo-structure:"
4043 #: build/C/man2/perf_event_open.2:990
4046 "struct sample_id {\n"
4047 " { u32 pid, tid; } /* if PERF_SAMPLE_TID set */\n"
4048 " { u64 time; } /* if PERF_SAMPLE_TIME set */\n"
4049 " { u64 id; } /* if PERF_SAMPLE_ID set */\n"
4050 " { u64 stream_id;} /* if PERF_SAMPLE_STREAM_ID set */\n"
4051 " { u32 cpu, res; } /* if PERF_SAMPLE_CPU set */\n"
4052 " { u64 id; } /* if PERF_SAMPLE_IDENTIFIER set */\n"
4055 "struct sample_id {\n"
4056 " { u32 pid, tid; } /* if PERF_SAMPLE_TID set */\n"
4057 " { u64 time; } /* if PERF_SAMPLE_TIME set */\n"
4058 " { u64 id; } /* if PERF_SAMPLE_ID set */\n"
4059 " { u64 stream_id;} /* if PERF_SAMPLE_STREAM_ID set */\n"
4060 " { u32 cpu, res; } /* if PERF_SAMPLE_CPU set */\n"
4061 " { u64 id; } /* if PERF_SAMPLE_IDENTIFIER set */\n"
4065 #: build/C/man2/perf_event_open.2:991
4067 msgid "I<exclude_host> (since Linux 3.2)"
4068 msgstr "I<exclude_host> (Linux 3.2 以降)"
4071 #: build/C/man2/perf_event_open.2:994
4072 msgid "Do not measure time spent in VM host."
4076 #: build/C/man2/perf_event_open.2:994
4078 msgid "I<exclude_guest> (since Linux 3.2)"
4079 msgstr "I<exclude_guest> (Linux 3.2 以降)"
4082 #: build/C/man2/perf_event_open.2:997
4083 msgid "Do not measure time spent in VM guest."
4087 #: build/C/man2/perf_event_open.2:997
4089 msgid "I<exclude_callchain_kernel> (since Linux 3.7)"
4090 msgstr "I<exclude_callchain_kernel> (Linux 3.7 以降)"
4093 #: build/C/man2/perf_event_open.2:1000
4094 msgid "Do not include kernel callchains."
4098 #: build/C/man2/perf_event_open.2:1000
4100 msgid "I<exclude_callchain_user> (since Linux 3.7)"
4101 msgstr "I<exclude_callchain_user> (Linux 3.7 以降)"
4104 #: build/C/man2/perf_event_open.2:1003
4105 msgid "Do not include user callchains."
4109 #: build/C/man2/perf_event_open.2:1003
4111 msgid "I<mmap2> (since Linux 3.16)"
4112 msgstr "I<mmap2> (Linux 3.16 以降)"
4115 #: build/C/man2/perf_event_open.2:1010
4117 "Generate an extended executable mmap record that contains enough additional "
4118 "information to uniquely identify shared mappings. The I<mmap> flag must "
4119 "also be set for this to work."
4123 #: build/C/man2/perf_event_open.2:1010
4125 msgid "I<comm_exec> (since Linux 3.16)"
4126 msgstr "I<comm_exec> (Linux 3.16 以降)"
4129 #: build/C/man2/perf_event_open.2:1025
4131 "This is purely a feature-detection flag, it does not change kernel "
4132 "behavior. If this flag can successfully be set, then, when I<comm> is "
4133 "enabled, the B<PERF_RECORD_MISC_COMM_EXEC> flag will be set in the I<misc> "
4134 "field of a comm record header if the rename event being reported was caused "
4135 "by a call to B<exec>(2). This allows tools to distinguish between the "
4136 "various types of process renaming."
4140 #: build/C/man2/perf_event_open.2:1025
4142 msgid "I<wakeup_events>, I<wakeup_watermark>"
4143 msgstr "I<wakeup_events>, I<wakeup_watermark>"
4146 #: build/C/man2/perf_event_open.2:1035
4148 "This union sets how many samples (I<wakeup_events>) or bytes "
4149 "(I<wakeup_watermark>) happen before an overflow notification happens. "
4150 "Which one is used is selected by the I<watermark> bit flag."
4154 #: build/C/man2/perf_event_open.2:1045
4156 "I<wakeup_events> only counts B<PERF_RECORD_SAMPLE> record types. To receive "
4157 "overflow notification for all B<PERF_RECORD> types choose watermark and set "
4158 "I<wakeup_watermark> to 1."
4162 #: build/C/man2/perf_event_open.2:1050
4164 "Prior to Linux 3.0 setting I<wakeup_events> to 0 resulted in no overflow "
4165 "notifications; more recent kernels treat 0 the same as 1."
4169 #: build/C/man2/perf_event_open.2:1050
4171 msgid "I<bp_type> (since Linux 2.6.33)"
4172 msgstr "I<bp_type> (Linux 2.6.33 以降)"
4175 #: build/C/man2/perf_event_open.2:1054
4176 msgid "This chooses the breakpoint type. It is one of:"
4180 #: build/C/man2/perf_event_open.2:1055
4182 msgid "B<HW_BREAKPOINT_EMPTY>"
4183 msgstr "B<HW_BREAKPOINT_EMPTY>"
4186 #: build/C/man2/perf_event_open.2:1058
4187 msgid "No breakpoint."
4191 #: build/C/man2/perf_event_open.2:1058
4193 msgid "B<HW_BREAKPOINT_R>"
4194 msgstr "B<HW_BREAKPOINT_R>"
4197 #: build/C/man2/perf_event_open.2:1061
4198 msgid "Count when we read the memory location."
4202 #: build/C/man2/perf_event_open.2:1061
4204 msgid "B<HW_BREAKPOINT_W>"
4205 msgstr "B<HW_BREAKPOINT_W>"
4208 #: build/C/man2/perf_event_open.2:1064
4209 msgid "Count when we write the memory location."
4213 #: build/C/man2/perf_event_open.2:1064
4215 msgid "B<HW_BREAKPOINT_RW>"
4216 msgstr "B<HW_BREAKPOINT_RW>"
4219 #: build/C/man2/perf_event_open.2:1067
4220 msgid "Count when we read or write the memory location."
4224 #: build/C/man2/perf_event_open.2:1067
4226 msgid "B<HW_BREAKPOINT_X>"
4227 msgstr "B<HW_BREAKPOINT_X>"
4230 #: build/C/man2/perf_event_open.2:1070
4231 msgid "Count when we execute code at the memory location."
4235 #: build/C/man2/perf_event_open.2:1079
4237 "The values can be combined via a bitwise or, but the combination of "
4238 "B<HW_BREAKPOINT_R> or B<HW_BREAKPOINT_W> with B<HW_BREAKPOINT_X> is not "
4243 #: build/C/man2/perf_event_open.2:1080
4245 msgid "I<bp_addr> (since Linux 2.6.33)"
4246 msgstr "I<bp_addr> (Linux 2.6.33 以降)"
4249 #: build/C/man2/perf_event_open.2:1087
4251 "I<bp_addr> address of the breakpoint. For execution breakpoints this is the "
4252 "memory address of the instruction of interest; for read and write "
4253 "breakpoints it is the memory address of the memory location of interest."
4257 #: build/C/man2/perf_event_open.2:1087
4259 msgid "I<config1> (since Linux 2.6.39)"
4260 msgstr "I<config1> (Linux 2.6.39 以降)"
4263 #: build/C/man2/perf_event_open.2:1094
4265 "I<config1> is used for setting events that need an extra register or "
4266 "otherwise do not fit in the regular config field. Raw OFFCORE_EVENTS on "
4267 "Nehalem/Westmere/SandyBridge use this field on 3.3 and later kernels."
4271 #: build/C/man2/perf_event_open.2:1094
4273 msgid "I<bp_len> (since Linux 2.6.33)"
4274 msgstr "I<bp_len> (Linux 2.6.33 以降)"
4277 #: build/C/man2/perf_event_open.2:1108
4279 "I<bp_len> is the length of the breakpoint being measured if I<type> is "
4280 "B<PERF_TYPE_BREAKPOINT>. Options are B<HW_BREAKPOINT_LEN_1>, "
4281 "B<HW_BREAKPOINT_LEN_2>, B<HW_BREAKPOINT_LEN_4>, B<HW_BREAKPOINT_LEN_8>. For "
4282 "an execution breakpoint, set this to I<sizeof(long)>."
4286 #: build/C/man2/perf_event_open.2:1108
4288 msgid "I<config2> (since Linux 2.6.39)"
4289 msgstr "I<config2> (Linux 2.6.39 以降)"
4292 #: build/C/man2/perf_event_open.2:1115
4293 msgid "I<config2> is a further extension of the I<config1> field."
4297 #: build/C/man2/perf_event_open.2:1115
4299 msgid "I<branch_sample_type> (since Linux 3.4)"
4300 msgstr "I<branch_sample_type> (Linux 3.4 以降)"
4303 #: build/C/man2/perf_event_open.2:1121
4305 "If B<PERF_SAMPLE_BRANCH_STACK> is enabled, then this specifies what branches "
4306 "to include in the branch record."
4310 #: build/C/man2/perf_event_open.2:1127
4312 "The first part of the value is the privilege level, which is a combination "
4313 "of one of the following values. If the user does not set privilege level "
4314 "explicitly, the kernel will use the event's privilege level. Event and "
4315 "branch privilege levels do not have to match."
4319 #: build/C/man2/perf_event_open.2:1128
4321 msgid "B<PERF_SAMPLE_BRANCH_USER>"
4325 #: build/C/man2/perf_event_open.2:1131
4326 msgid "Branch target is in user space."
4330 #: build/C/man2/perf_event_open.2:1131
4332 msgid "B<PERF_SAMPLE_BRANCH_KERNEL>"
4336 #: build/C/man2/perf_event_open.2:1134
4337 msgid "Branch target is in kernel space."
4341 #: build/C/man2/perf_event_open.2:1134
4343 msgid "B<PERF_SAMPLE_BRANCH_HV>"
4347 #: build/C/man2/perf_event_open.2:1137
4348 msgid "Branch target is in hypervisor."
4352 #: build/C/man2/perf_event_open.2:1137
4354 msgid "B<PERF_SAMPLE_BRANCH_PLM_ALL>"
4358 #: build/C/man2/perf_event_open.2:1140
4359 msgid "A convenience value that is the three preceding values ORed together."
4363 #: build/C/man2/perf_event_open.2:1144
4365 "In addition to the privilege value, at least one or more of the following "
4370 #: build/C/man2/perf_event_open.2:1145
4372 msgid "B<PERF_SAMPLE_BRANCH_ANY>"
4376 #: build/C/man2/perf_event_open.2:1148
4377 msgid "Any branch type."
4381 #: build/C/man2/perf_event_open.2:1148
4383 msgid "B<PERF_SAMPLE_BRANCH_ANY_CALL>"
4387 #: build/C/man2/perf_event_open.2:1151
4388 msgid "Any call branch."
4392 #: build/C/man2/perf_event_open.2:1151
4394 msgid "B<PERF_SAMPLE_BRANCH_ANY_RETURN>"
4398 #: build/C/man2/perf_event_open.2:1154
4399 msgid "Any return branch."
4403 #: build/C/man2/perf_event_open.2:1154
4405 msgid "B<PERF_SAMPLE_BRANCH_IND_CALL>"
4409 #: build/C/man2/perf_event_open.2:1157
4410 msgid "Indirect calls."
4414 #: build/C/man2/perf_event_open.2:1157
4416 msgid "B<PERF_SAMPLE_BRANCH_COND> (since Linux 3.16)"
4417 msgstr "B<PERF_SAMPLE_BRANCH_COND> (Linux 3.16 以降)"
4419 #. commit bac52139f0b7ab31330e98fd87fc5a2664951050
4421 #: build/C/man2/perf_event_open.2:1161
4422 msgid "Conditional branches."
4426 #: build/C/man2/perf_event_open.2:1161
4428 msgid "B<PERF_SAMPLE_BRANCH_ABORT_TX> (since Linux 3.11)"
4429 msgstr "B<PERF_SAMPLE_BRANCH_ABORT_TX> (Linux 3.11 以降)"
4431 #. commit 135c5612c460f89657c4698fe2ea753f6f667963
4433 #: build/C/man2/perf_event_open.2:1165
4434 msgid "Transactional memory aborts."
4438 #: build/C/man2/perf_event_open.2:1165
4440 msgid "B<PERF_SAMPLE_BRANCH_IN_TX> (since Linux 3.11)"
4441 msgstr "B<PERF_SAMPLE_BRANCH_IN_TX> (Linux 3.11 以降)"
4443 #. commit 135c5612c460f89657c4698fe2ea753f6f667963
4445 #: build/C/man2/perf_event_open.2:1169
4446 msgid "Branch in transactional memory transaction."
4450 #: build/C/man2/perf_event_open.2:1169
4452 msgid "B<PERF_SAMPLE_BRANCH_NO_TX> (since Linux 3.11)"
4453 msgstr "B<PERF_SAMPLE_BRANCH_NO_TX> (Linux 3.11 以降)"
4455 #. commit 135c5612c460f89657c4698fe2ea753f6f667963
4457 #: build/C/man2/perf_event_open.2:1173
4458 msgid "Branch not in transactional memory transaction."
4462 #: build/C/man2/perf_event_open.2:1175
4464 msgid "I<sample_regs_user> (since Linux 3.7)"
4465 msgstr "I<sample_regs_user> (Linux 3.7 以降)"
4468 #: build/C/man2/perf_event_open.2:1181
4470 "This bit mask defines the set of user CPU registers to dump on samples. The "
4471 "layout of the register mask is architecture-specific and described in the "
4472 "kernel header I<arch/ARCH/include/uapi/asm/perf_regs.h>."
4476 #: build/C/man2/perf_event_open.2:1181
4478 msgid "I<sample_stack_user> (since Linux 3.7)"
4479 msgstr "I<sample_stack_user> (Linux 3.7 以降)"
4482 #: build/C/man2/perf_event_open.2:1186
4484 "This defines the size of the user stack to dump if B<PERF_SAMPLE_STACK_USER> "
4489 #: build/C/man2/perf_event_open.2:1186
4491 msgid "Reading results"
4495 #: build/C/man2/perf_event_open.2:1196
4497 "Once a B<perf_event_open>() file descriptor has been opened, the values of "
4498 "the events can be read from the file descriptor. The values that are there "
4499 "are specified by the I<read_format> field in the I<attr> structure at open "
4504 #: build/C/man2/perf_event_open.2:1201
4506 "If you attempt to read into a buffer that is not big enough to hold the data "
4507 "B<ENOSPC> is returned"
4511 #: build/C/man2/perf_event_open.2:1203
4512 msgid "Here is the layout of the data returned by a read:"
4516 #: build/C/man2/perf_event_open.2:1203 build/C/man2/perf_event_open.2:1221
4517 #: build/C/man2/ptrace.2:1735 build/C/man2/ptrace.2:1745
4518 #: build/C/man2/ptrace.2:1753 build/C/man2/ptrace.2:1759
4519 #: build/C/man2/ptrace.2:1888 build/C/man2/splice.2:55
4520 #: build/C/man2/splice.2:61 build/C/man2/splice.2:70
4526 #: build/C/man2/perf_event_open.2:1207
4528 "If B<PERF_FORMAT_GROUP> was specified to allow reading all events in a group "
4533 #: build/C/man2/perf_event_open.2:1219
4536 "struct read_format {\n"
4537 " u64 nr; /* The number of events */\n"
4538 " u64 time_enabled; /* if PERF_FORMAT_TOTAL_TIME_ENABLED */\n"
4539 " u64 time_running; /* if PERF_FORMAT_TOTAL_TIME_RUNNING */\n"
4541 " u64 value; /* The value of the event */\n"
4542 " u64 id; /* if PERF_FORMAT_ID */\n"
4548 #: build/C/man2/perf_event_open.2:1227
4549 msgid "If B<PERF_FORMAT_GROUP> was I<not> specified:"
4553 #: build/C/man2/perf_event_open.2:1236
4556 "struct read_format {\n"
4557 " u64 value; /* The value of the event */\n"
4558 " u64 time_enabled; /* if PERF_FORMAT_TOTAL_TIME_ENABLED */\n"
4559 " u64 time_running; /* if PERF_FORMAT_TOTAL_TIME_RUNNING */\n"
4560 " u64 id; /* if PERF_FORMAT_ID */\n"
4565 #: build/C/man2/perf_event_open.2:1240
4566 msgid "The values read are as follows:"
4570 #: build/C/man2/perf_event_open.2:1240
4576 #: build/C/man2/perf_event_open.2:1246
4578 "The number of events in this file descriptor. Only available if "
4579 "B<PERF_FORMAT_GROUP> was specified."
4583 #: build/C/man2/perf_event_open.2:1246
4585 msgid "I<time_enabled>, I<time_running>"
4589 #: build/C/man2/perf_event_open.2:1258
4591 "Total time the event was enabled and running. Normally these are the same. "
4592 "If more events are started, then available counter slots on the PMU, then "
4593 "multiplexing happens and events run only part of the time. In that case, "
4594 "the I<time_enabled> and I<time running> values can be used to scale an "
4595 "estimated value for the count."
4599 #: build/C/man2/perf_event_open.2:1258
4605 #: build/C/man2/perf_event_open.2:1261
4606 msgid "An unsigned 64-bit value containing the counter result."
4610 #: build/C/man2/perf_event_open.2:1261 build/C/man2/perf_event_open.2:1690
4611 #: build/C/man2/perf_event_open.2:1856
4617 #: build/C/man2/perf_event_open.2:1267
4619 "A globally unique value for this particular event, only there if "
4620 "B<PERF_FORMAT_ID> was specified in I<read_format>."
4624 #: build/C/man2/perf_event_open.2:1267
4630 #: build/C/man2/perf_event_open.2:1277
4632 "When using B<perf_event_open>() in sampled mode, asynchronous events (like "
4633 "counter overflow or B<PROT_EXEC> mmap tracking) are logged into a ring-"
4634 "buffer. This ring-buffer is created and accessed through B<mmap>(2)."
4638 #: build/C/man2/perf_event_open.2:1283
4640 "The mmap size should be 1+2^n pages, where the first page is a metadata page "
4641 "(I<struct perf_event_mmap_page>) that contains various bits of information "
4642 "such as where the ring-buffer head is."
4646 #: build/C/man2/perf_event_open.2:1286
4648 "Before kernel 2.6.39, there is a bug that means you must allocate a mmap "
4649 "ring buffer when sampling even if you do not plan to access it."
4653 #: build/C/man2/perf_event_open.2:1288
4654 msgid "The structure of the first metadata mmap page is as follows:"
4658 #: build/C/man2/perf_event_open.2:1317
4661 "struct perf_event_mmap_page {\n"
4662 " __u32 version; /* version number of this structure */\n"
4663 " __u32 compat_version; /* lowest version this is compat with */\n"
4664 " __u32 lock; /* seqlock for synchronization */\n"
4665 " __u32 index; /* hardware counter identifier */\n"
4666 " __s64 offset; /* add to hardware counter value */\n"
4667 " __u64 time_enabled; /* time event active */\n"
4668 " __u64 time_running; /* time event on CPU */\n"
4670 " __u64 capabilities;\n"
4672 " __u64 cap_usr_time / cap_usr_rdpmc / cap_bit0 : 1,\n"
4673 " cap_bit0_is_deprecated : 1,\n"
4674 " cap_user_rdpmc : 1,\n"
4675 " cap_user_time : 1,\n"
4676 " cap_user_time_zero : 1,\n"
4679 " __u16 pmc_width;\n"
4680 " __u16 time_shift;\n"
4681 " __u32 time_mult;\n"
4682 " __u64 time_offset;\n"
4683 " __u64 __reserved[120]; /* Pad to 1k */\n"
4684 " __u64 data_head; /* head in the data section */\n"
4685 " __u64 data_tail; /* user-space written tail */\n"
4690 #: build/C/man2/perf_event_open.2:1323
4692 "The following list describes the fields in the I<perf_event_mmap_page> "
4693 "structure in more detail:"
4697 #: build/C/man2/perf_event_open.2:1323
4703 #: build/C/man2/perf_event_open.2:1326
4704 msgid "Version number of this structure."
4708 #: build/C/man2/perf_event_open.2:1326
4710 msgid "I<compat_version>"
4714 #: build/C/man2/perf_event_open.2:1329
4715 msgid "The lowest version this is compatible with."
4719 #: build/C/man2/perf_event_open.2:1329
4725 #: build/C/man2/perf_event_open.2:1332
4726 msgid "A seqlock for synchronization."
4730 #: build/C/man2/perf_event_open.2:1332
4736 #: build/C/man2/perf_event_open.2:1335
4737 msgid "A unique hardware counter identifier."
4741 #: build/C/man2/perf_event_open.2:1335
4747 #: build/C/man2/perf_event_open.2:1340
4749 "When using rdpmc for reads this offset value must be added to the one "
4750 "returned by rdpmc to get the current total event count."
4754 #: build/C/man2/perf_event_open.2:1340
4756 msgid "I<time_enabled>"
4760 #: build/C/man2/perf_event_open.2:1343
4761 msgid "Time the event was active."
4765 #: build/C/man2/perf_event_open.2:1343
4767 msgid "I<time_running>"
4771 #: build/C/man2/perf_event_open.2:1346
4772 msgid "Time the event was running."
4776 #: build/C/man2/perf_event_open.2:1346
4778 msgid "I<cap_usr_time> / I<cap_usr_rdpmc> / I<cap_bit0> (since Linux 3.4)"
4782 #: build/C/man2/perf_event_open.2:1359
4784 "There was a bug in the definition of I<cap_usr_time> and I<cap_usr_rdpmc> "
4785 "from Linux 3.4 until Linux 3.11. Both bits were defined to point to the "
4786 "same location, so it was impossible to know if I<cap_usr_time> or "
4787 "I<cap_usr_rdpmc> were actually set."
4791 #: build/C/man2/perf_event_open.2:1367
4793 "Starting with Linux 3.12, these are renamed to I<cap_bit0> and you should "
4794 "use the I<cap_user_time> and I<cap_user_rdpmc> fields instead."
4798 #: build/C/man2/perf_event_open.2:1368
4800 msgid "I<cap_bit0_is_deprecated> (since Linux 3.12)"
4801 msgstr "I<cap_bit0_is_deprecated> (Linux 3.12 以降)"
4804 #: build/C/man2/perf_event_open.2:1376
4806 "If set, this bit indicates that the kernel supports the properly separated "
4807 "I<cap_user_time> and I<cap_user_rdpmc> bits."
4811 #: build/C/man2/perf_event_open.2:1383
4813 "If not-set, it indicates an older kernel where I<cap_usr_time> and "
4814 "I<cap_usr_rdpmc> map to the same bit and thus both features should be used "
4819 #: build/C/man2/perf_event_open.2:1384
4821 msgid "I<cap_user_rdpmc> (since Linux 3.12)"
4822 msgstr "I<cap_user_rdpmc> (Linux 3.12 以降)"
4825 #: build/C/man2/perf_event_open.2:1389
4827 "If the hardware supports user-space read of performance counters without "
4828 "syscall (this is the \"rdpmc\" instruction on x86), then the following code "
4829 "can be used to do a read:"
4833 #: build/C/man2/perf_event_open.2:1395
4836 "u32 seq, time_mult, time_shift, idx, width;\n"
4837 "u64 count, enabled, running;\n"
4838 "u64 cyc, time_offset;\n"
4840 "u32 seq, time_mult, time_shift, idx, width;\n"
4841 "u64 count, enabled, running;\n"
4842 "u64 cyc, time_offset;\n"
4845 #: build/C/man2/perf_event_open.2:1401
4849 " seq = pc-E<gt>lock;\n"
4851 " enabled = pc-E<gt>time_enabled;\n"
4852 " running = pc-E<gt>time_running;\n"
4855 " seq = pc-E<gt>lock;\n"
4857 " enabled = pc-E<gt>time_enabled;\n"
4858 " running = pc-E<gt>time_running;\n"
4861 #: build/C/man2/perf_event_open.2:1408
4864 " if (pc-E<gt>cap_usr_time && enabled != running) {\n"
4866 " time_offset = pc-E<gt>time_offset;\n"
4867 " time_mult = pc-E<gt>time_mult;\n"
4868 " time_shift = pc-E<gt>time_shift;\n"
4871 " if (pc-E<gt>cap_usr_time && enabled != running) {\n"
4873 " time_offset = pc-E<gt>time_offset;\n"
4874 " time_mult = pc-E<gt>time_mult;\n"
4875 " time_shift = pc-E<gt>time_shift;\n"
4879 #: build/C/man2/perf_event_open.2:1411
4882 " idx = pc-E<gt>index;\n"
4883 " count = pc-E<gt>offset;\n"
4885 " idx = pc-E<gt>index;\n"
4886 " count = pc-E<gt>offset;\n"
4889 #: build/C/man2/perf_event_open.2:1416
4892 " if (pc-E<gt>cap_usr_rdpmc && idx) {\n"
4893 " width = pc-E<gt>pmc_width;\n"
4894 " count += rdpmc(idx - 1);\n"
4897 " if (pc-E<gt>cap_usr_rdpmc && idx) {\n"
4898 " width = pc-E<gt>pmc_width;\n"
4899 " count += rdpmc(idx - 1);\n"
4903 #: build/C/man2/perf_event_open.2:1419
4907 "} while (pc-E<gt>lock != seq);\n"
4910 "} while (pc-E<gt>lock != seq);\n"
4913 #: build/C/man2/perf_event_open.2:1421
4915 msgid "I<cap_user_time> (since Linux 3.12)"
4916 msgstr "I<cap_user_time> (Linux 3.12 以降)"
4919 #: build/C/man2/perf_event_open.2:1425
4921 "This bit indicates the hardware has a constant, nonstop timestamp counter "
4926 #: build/C/man2/perf_event_open.2:1425
4928 msgid "I<cap_user_time_zero> (since Linux 3.12)"
4929 msgstr "I<cap_user_time_zero> (Linux 3.12 以降)"
4932 #: build/C/man2/perf_event_open.2:1431
4934 "Indicates the presence of I<time_zero> which allows mapping timestamp values "
4935 "to the hardware clock."
4939 #: build/C/man2/perf_event_open.2:1431
4941 msgid "I<pmc_width>"
4942 msgstr "I<pmc_width>"
4945 #: build/C/man2/perf_event_open.2:1438
4947 "If I<cap_usr_rdpmc>, this field provides the bit-width of the value read "
4948 "using the rdpmc or equivalent instruction. This can be used to sign extend "
4953 #: build/C/man2/perf_event_open.2:1444
4956 "pmc E<lt>E<lt>= 64 - pmc_width;\n"
4957 "pmc E<gt>E<gt>= 64 - pmc_width; // signed shift right\n"
4960 "pmc E<lt>E<lt>= 64 - pmc_width;\n"
4961 "pmc E<gt>E<gt>= 64 - pmc_width; // signed shift right\n"
4965 #: build/C/man2/perf_event_open.2:1446
4967 msgid "I<time_shift>, I<time_mult>, I<time_offset>"
4968 msgstr "I<time_shift>, I<time_mult>, I<time_offset>"
4971 #: build/C/man2/perf_event_open.2:1453
4973 "If I<cap_usr_time>, these fields can be used to compute the time delta since "
4974 "time_enabled (in nanoseconds) using rdtsc or similar."
4978 #: build/C/man2/perf_event_open.2:1461
4983 " quot = (cyc E<gt>E<gt> time_shift);\n"
4984 " rem = cyc & ((1 E<lt>E<lt> time_shift) - 1);\n"
4985 " delta = time_offset + quot * time_mult +\n"
4986 " ((rem * time_mult) E<gt>E<gt> time_shift);\n"
4990 " quot = (cyc E<gt>E<gt> time_shift);\n"
4991 " rem = cyc & ((1 E<lt>E<lt> time_shift) - 1);\n"
4992 " delta = time_offset + quot * time_mult +\n"
4993 " ((rem * time_mult) E<gt>E<gt> time_shift);\n"
4996 #: build/C/man2/perf_event_open.2:1473
4998 "Where I<time_offset>, I<time_mult>, I<time_shift>, and I<cyc> are read in "
4999 "the seqcount loop described above. This delta can then be added to enabled "
5000 "and possible running (if idx), improving the scaling:"
5004 #: build/C/man2/perf_event_open.2:1481
5007 " enabled += delta;\n"
5009 " running += delta;\n"
5010 " quot = count / running;\n"
5011 " rem = count % running;\n"
5012 " count = quot * enabled + (rem * enabled) / running;\n"
5014 " enabled += delta;\n"
5016 " running += delta;\n"
5017 " quot = count / running;\n"
5018 " rem = count % running;\n"
5019 " count = quot * enabled + (rem * enabled) / running;\n"
5022 #: build/C/man2/perf_event_open.2:1482
5024 msgid "I<time_zero> (since Linux 3.12)"
5025 msgstr "I<time_zero> (Linux 3.12 以降)"
5028 #: build/C/man2/perf_event_open.2:1490
5030 "If I<cap_usr_time_zero> is set, then the hardware clock (the TSC timestamp "
5031 "counter on x86) can be calculated from the I<time_zero>, I<time_mult>, and "
5032 "I<time_shift> values:"
5036 #: build/C/man2/perf_event_open.2:1496
5039 " time = timestamp - time_zero;\n"
5040 " quot = time / time_mult;\n"
5041 " rem = time % time_mult;\n"
5042 " cyc = (quot E<lt>E<lt> time_shift) + (rem E<lt>E<lt> time_shift) / time_mult;\n"
5044 " time = timestamp - time_zero;\n"
5045 " quot = time / time_mult;\n"
5046 " rem = time % time_mult;\n"
5047 " cyc = (quot E<lt>E<lt> time_shift) + (rem E<lt>E<lt> time_shift) / time_mult;\n"
5050 #: build/C/man2/perf_event_open.2:1499
5051 msgid "And vice versa:"
5055 #: build/C/man2/perf_event_open.2:1505
5058 " quot = cyc E<gt>E<gt> time_shift;\n"
5059 " rem = cyc & ((1 E<lt>E<lt> time_shift) - 1);\n"
5060 " timestamp = time_zero + quot * time_mult +\n"
5061 " ((rem * time_mult) E<gt>E<gt> time_shift);\n"
5063 " quot = cyc E<gt>E<gt> time_shift;\n"
5064 " rem = cyc & ((1 E<lt>E<lt> time_shift) - 1);\n"
5065 " timestamp = time_zero + quot * time_mult +\n"
5066 " ((rem * time_mult) E<gt>E<gt> time_shift);\n"
5069 #: build/C/man2/perf_event_open.2:1506
5071 msgid "I<data_head>"
5072 msgstr "I<data_head>"
5075 #: build/C/man2/perf_event_open.2:1512
5077 "This points to the head of the data section. The value continuously "
5078 "increases, it does not wrap. The value needs to be manually wrapped by the "
5079 "size of the mmap buffer before accessing the samples."
5083 #: build/C/man2/perf_event_open.2:1517
5085 "On SMP-capable platforms, after reading the I<data_head> value, user space "
5086 "should issue an rmb()."
5090 #: build/C/man2/perf_event_open.2:1517
5092 msgid "I<data_tail>"
5093 msgstr "I<data_tail>"
5096 #: build/C/man2/perf_event_open.2:1525
5098 "When the mapping is B<PROT_WRITE>, the I<data_tail> value should be written "
5099 "by user space to reflect the last read data. In this case, the kernel will "
5100 "not overwrite unread data."
5104 #: build/C/man2/perf_event_open.2:1527
5105 msgid "The following 2^n ring-buffer pages have the layout described below."
5109 #: build/C/man2/perf_event_open.2:1541
5111 "If I<perf_event_attr.sample_id_all> is set, then all event types will have "
5112 "the sample_type selected fields related to where/when (identity) an event "
5113 "took place (TID, TIME, ID, CPU, STREAM_ID) described in "
5114 "B<PERF_RECORD_SAMPLE> below, it will be stashed just after the "
5115 "I<perf_event_header> and the fields already present for the existing fields, "
5116 "that is, at the end of the payload. That way a newer perf.data file will be "
5117 "supported by older perf tools, with these new optional fields being ignored."
5121 #: build/C/man2/perf_event_open.2:1543
5122 msgid "The mmap values start with a header:"
5126 #: build/C/man2/perf_event_open.2:1551
5129 "struct perf_event_header {\n"
5135 "struct perf_event_header {\n"
5142 #: build/C/man2/perf_event_open.2:1559
5144 "Below, we describe the I<perf_event_header> fields in more detail. For ease "
5145 "of reading, the fields with shorter descriptions are presented first."
5149 #: build/C/man2/perf_event_open.2:1562
5150 msgid "This indicates the size of the record."
5154 #: build/C/man2/perf_event_open.2:1562
5160 #: build/C/man2/perf_event_open.2:1567
5161 msgid "The I<misc> field contains additional information about the sample."
5165 #: build/C/man2/perf_event_open.2:1572
5167 "The CPU mode can be determined from this value by masking with "
5168 "B<PERF_RECORD_MISC_CPUMODE_MASK> and looking for one of the following (note "
5169 "these are not bit masks, only one can be set at a time):"
5173 #: build/C/man2/perf_event_open.2:1573
5175 msgid "B<PERF_RECORD_MISC_CPUMODE_UNKNOWN>"
5176 msgstr "B<PERF_RECORD_MISC_CPUMODE_UNKNOWN>"
5179 #: build/C/man2/perf_event_open.2:1576
5180 msgid "Unknown CPU mode."
5184 #: build/C/man2/perf_event_open.2:1576
5186 msgid "B<PERF_RECORD_MISC_KERNEL>"
5187 msgstr "B<PERF_RECORD_MISC_KERNEL>"
5190 #: build/C/man2/perf_event_open.2:1579
5191 msgid "Sample happened in the kernel."
5195 #: build/C/man2/perf_event_open.2:1579
5197 msgid "B<PERF_RECORD_MISC_USER>"
5198 msgstr "B<PERF_RECORD_MISC_USER>"
5201 #: build/C/man2/perf_event_open.2:1582
5202 msgid "Sample happened in user code."
5206 #: build/C/man2/perf_event_open.2:1582
5208 msgid "B<PERF_RECORD_MISC_HYPERVISOR>"
5209 msgstr "B<PERF_RECORD_MISC_HYPERVISOR>"
5212 #: build/C/man2/perf_event_open.2:1585
5213 msgid "Sample happened in the hypervisor."
5217 #: build/C/man2/perf_event_open.2:1585
5219 msgid "B<PERF_RECORD_MISC_GUEST_KERNEL> (since Linux2.6.35)"
5220 msgstr "B<PERF_RECORD_MISC_GUEST_KERNEL> (Linux 2.6.35 以降)"
5222 #. commit 39447b386c846bbf1c56f6403c5282837486200f
5224 #: build/C/man2/perf_event_open.2:1589
5225 msgid "Sample happened in the guest kernel."
5229 #: build/C/man2/perf_event_open.2:1589
5231 msgid "B<PERF_RECORD_MISC_GUEST_USER (since Linux2.6.35)>"
5232 msgstr "B<PERF_RECORD_MISC_GUEST_USER (Linux 2.6.35 以降)>"
5234 #. commit 39447b386c846bbf1c56f6403c5282837486200f
5236 #: build/C/man2/perf_event_open.2:1593
5237 msgid "Sample happened in guest user code."
5241 #: build/C/man2/perf_event_open.2:1597
5242 msgid "In addition, one of the following bits can be set:"
5246 #: build/C/man2/perf_event_open.2:1597
5248 msgid "B<PERF_RECORD_MISC_MMAP_DATA> (since Linux 3.10)"
5249 msgstr "B<PERF_RECORD_MISC_MMAP_DATA> (Linux 3.10 以降)"
5251 #. commit 2fe85427e3bf65d791700d065132772fc26e4d75
5253 #: build/C/man2/perf_event_open.2:1602
5255 "This is set when the mapping is not executable; otherwise the mapping is "
5260 #: build/C/man2/perf_event_open.2:1602
5262 msgid "B<PERF_RECORD_MISC_COMM_EXEC> (since Linux 3.16)"
5263 msgstr "B<PERF_RECORD_MISC_COMM_EXEC> (Linux 3.16 以降)"
5265 #. commit 82b897782d10fcc4930c9d4a15b175348fdd2871
5267 #: build/C/man2/perf_event_open.2:1614
5269 "This is set for a B<PERF_RECORD_COMM> record on kernels more recent than "
5270 "Linux 3.16 if a process name change was caused by an B<exec>(2) system "
5271 "call. It is an alias for B<PERF_RECORD_MISC_MMAP_DATA> since the two values "
5272 "would not be set in the same record."
5276 #: build/C/man2/perf_event_open.2:1614
5278 msgid "B<PERF_RECORD_MISC_EXACT_IP>"
5279 msgstr "B<PERF_RECORD_MISC_EXACT_IP>"
5282 #: build/C/man2/perf_event_open.2:1622
5284 "This indicates that the content of B<PERF_SAMPLE_IP> points to the actual "
5285 "instruction that triggered the event. See also I<perf_event_attr."
5290 #: build/C/man2/perf_event_open.2:1622
5292 msgid "B<PERF_RECORD_MISC_EXT_RESERVED> (since Linux 2.6.35)"
5293 msgstr "B<PERF_RECORD_MISC_EXT_RESERVED> (Linux 2.6.35 以降)"
5295 #. commit 1676b8a077c352085d52578fb4f29350b58b6e74
5297 #: build/C/man2/perf_event_open.2:1626
5298 msgid "This indicates there is extended data available (currently not used)."
5302 #: build/C/man2/perf_event_open.2:1636
5304 "The I<type> value is one of the below. The values in the corresponding "
5305 "record (that follows the header) depend on the I<type> selected as shown."
5309 #: build/C/man2/perf_event_open.2:1638
5311 msgid "B<PERF_RECORD_MMAP>"
5312 msgstr "B<PERF_RECORD_MMAP>"
5315 #: build/C/man2/perf_event_open.2:1645
5317 "The MMAP events record the B<PROT_EXEC> mappings so that we can correlate "
5318 "user-space IPs to code. They have the following structure:"
5322 #: build/C/man2/perf_event_open.2:1656
5326 " struct perf_event_header header;\n"
5331 " char filename[];\n"
5335 " struct perf_event_header header;\n"
5340 " char filename[];\n"
5344 #: build/C/man2/perf_event_open.2:1659 build/C/man2/perf_event_open.2:1713
5345 #: build/C/man2/perf_event_open.2:2232
5351 #: build/C/man2/perf_event_open.2:1662 build/C/man2/perf_event_open.2:1716
5352 #: build/C/man2/perf_event_open.2:2235
5353 msgid "is the process ID."
5357 #: build/C/man2/perf_event_open.2:1662 build/C/man2/perf_event_open.2:1716
5358 #: build/C/man2/perf_event_open.2:2235
5364 #: build/C/man2/perf_event_open.2:1665 build/C/man2/perf_event_open.2:1719
5365 #: build/C/man2/perf_event_open.2:2238
5366 msgid "is the thread ID."
5370 #: build/C/man2/perf_event_open.2:1665 build/C/man2/perf_event_open.2:1849
5371 #: build/C/man2/perf_event_open.2:2238
5377 #: build/C/man2/perf_event_open.2:1674
5379 "is the address of the allocated memory. I<len> is the length of the "
5380 "allocated memory. I<pgoff> is the page offset of the allocated memory. "
5381 "I<filename> is a string describing the backing of the allocated memory."
5385 #: build/C/man2/perf_event_open.2:1675
5387 msgid "B<PERF_RECORD_LOST>"
5388 msgstr "B<PERF_RECORD_LOST>"
5391 #: build/C/man2/perf_event_open.2:1678
5392 msgid "This record indicates when events are lost."
5396 #: build/C/man2/perf_event_open.2:1687
5400 " struct perf_event_header header;\n"
5403 " struct sample_id sample_id;\n"
5407 " struct perf_event_header header;\n"
5410 " struct sample_id sample_id;\n"
5414 #: build/C/man2/perf_event_open.2:1693
5415 msgid "is the unique event ID for the samples that were lost."
5419 #: build/C/man2/perf_event_open.2:1693
5425 #: build/C/man2/perf_event_open.2:1696
5426 msgid "is the number of events that were lost."
5430 #: build/C/man2/perf_event_open.2:1697
5432 msgid "B<PERF_RECORD_COMM>"
5433 msgstr "B<PERF_RECORD_COMM>"
5436 #: build/C/man2/perf_event_open.2:1700
5437 msgid "This record indicates a change in the process name."
5441 #: build/C/man2/perf_event_open.2:1710
5445 " struct perf_event_header header;\n"
5449 " struct sample_id sample_id;\n"
5453 " struct perf_event_header header;\n"
5457 " struct sample_id sample_id;\n"
5461 #: build/C/man2/perf_event_open.2:1722
5462 msgid "is a string containing the new name of the process."
5466 #: build/C/man2/perf_event_open.2:1723
5468 msgid "B<PERF_RECORD_EXIT>"
5469 msgstr "B<PERF_RECORD_EXIT>"
5472 #: build/C/man2/perf_event_open.2:1726
5473 msgid "This record indicates a process exit event."
5477 #: build/C/man2/perf_event_open.2:1736 build/C/man2/perf_event_open.2:1766
5481 " struct perf_event_header header;\n"
5485 " struct sample_id sample_id;\n"
5489 " struct perf_event_header header;\n"
5493 " struct sample_id sample_id;\n"
5497 #: build/C/man2/perf_event_open.2:1738
5499 msgid "B<PERF_RECORD_THROTTLE>, B<PERF_RECORD_UNTHROTTLE>"
5500 msgstr "B<PERF_RECORD_THROTTLE>, B<PERF_RECORD_UNTHROTTLE>"
5503 #: build/C/man2/perf_event_open.2:1741
5504 msgid "This record indicates a throttle/unthrottle event."
5508 #: build/C/man2/perf_event_open.2:1751
5512 " struct perf_event_header header;\n"
5516 " struct sample_id sample_id;\n"
5520 " struct perf_event_header header;\n"
5524 " struct sample_id sample_id;\n"
5528 #: build/C/man2/perf_event_open.2:1753
5530 msgid "B<PERF_RECORD_FORK>"
5531 msgstr "B<PERF_RECORD_FORK>"
5534 #: build/C/man2/perf_event_open.2:1756
5535 msgid "This record indicates a fork event."
5539 #: build/C/man2/perf_event_open.2:1768
5541 msgid "B<PERF_RECORD_READ>"
5542 msgstr "B<PERF_RECORD_READ>"
5545 #: build/C/man2/perf_event_open.2:1771
5546 msgid "This record indicates a read event."
5550 #: build/C/man2/perf_event_open.2:1780
5554 " struct perf_event_header header;\n"
5556 " struct read_format values;\n"
5557 " struct sample_id sample_id;\n"
5561 " struct perf_event_header header;\n"
5563 " struct read_format values;\n"
5564 " struct sample_id sample_id;\n"
5568 #: build/C/man2/perf_event_open.2:1782
5570 msgid "B<PERF_RECORD_SAMPLE>"
5571 msgstr "B<PERF_RECORD_SAMPLE>"
5574 #: build/C/man2/perf_event_open.2:1785
5575 msgid "This record indicates a sample."
5579 #: build/C/man2/perf_event_open.2:1817
5583 " struct perf_event_header header;\n"
5584 " u64 sample_id; /* if PERF_SAMPLE_IDENTIFIER */\n"
5585 " u64 ip; /* if PERF_SAMPLE_IP */\n"
5586 " u32 pid, tid; /* if PERF_SAMPLE_TID */\n"
5587 " u64 time; /* if PERF_SAMPLE_TIME */\n"
5588 " u64 addr; /* if PERF_SAMPLE_ADDR */\n"
5589 " u64 id; /* if PERF_SAMPLE_ID */\n"
5590 " u64 stream_id; /* if PERF_SAMPLE_STREAM_ID */\n"
5591 " u32 cpu, res; /* if PERF_SAMPLE_CPU */\n"
5592 " u64 period; /* if PERF_SAMPLE_PERIOD */\n"
5593 " struct read_format v; /* if PERF_SAMPLE_READ */\n"
5594 " u64 nr; /* if PERF_SAMPLE_CALLCHAIN */\n"
5595 " u64 ips[nr]; /* if PERF_SAMPLE_CALLCHAIN */\n"
5596 " u32 size; /* if PERF_SAMPLE_RAW */\n"
5597 " char data[size]; /* if PERF_SAMPLE_RAW */\n"
5598 " u64 bnr; /* if PERF_SAMPLE_BRANCH_STACK */\n"
5599 " struct perf_branch_entry lbr[bnr];\n"
5600 " /* if PERF_SAMPLE_BRANCH_STACK */\n"
5601 " u64 abi; /* if PERF_SAMPLE_REGS_USER */\n"
5602 " u64 regs[weight(mask)];\n"
5603 " /* if PERF_SAMPLE_REGS_USER */\n"
5604 " u64 size; /* if PERF_SAMPLE_STACK_USER */\n"
5605 " char data[size]; /* if PERF_SAMPLE_STACK_USER */\n"
5606 " u64 dyn_size; /* if PERF_SAMPLE_STACK_USER */\n"
5607 " u64 weight; /* if PERF_SAMPLE_WEIGHT */\n"
5608 " u64 data_src; /* if PERF_SAMPLE_DATA_SRC */\n"
5609 " u64 transaction;/* if PERF_SAMPLE_TRANSACTION */\n"
5613 " struct perf_event_header header;\n"
5614 " u64 sample_id; /* if PERF_SAMPLE_IDENTIFIER */\n"
5615 " u64 ip; /* if PERF_SAMPLE_IP */\n"
5616 " u32 pid, tid; /* if PERF_SAMPLE_TID */\n"
5617 " u64 time; /* if PERF_SAMPLE_TIME */\n"
5618 " u64 addr; /* if PERF_SAMPLE_ADDR */\n"
5619 " u64 id; /* if PERF_SAMPLE_ID */\n"
5620 " u64 stream_id; /* if PERF_SAMPLE_STREAM_ID */\n"
5621 " u32 cpu, res; /* if PERF_SAMPLE_CPU */\n"
5622 " u64 period; /* if PERF_SAMPLE_PERIOD */\n"
5623 " struct read_format v; /* if PERF_SAMPLE_READ */\n"
5624 " u64 nr; /* if PERF_SAMPLE_CALLCHAIN */\n"
5625 " u64 ips[nr]; /* if PERF_SAMPLE_CALLCHAIN */\n"
5626 " u32 size; /* if PERF_SAMPLE_RAW */\n"
5627 " char data[size]; /* if PERF_SAMPLE_RAW */\n"
5628 " u64 bnr; /* if PERF_SAMPLE_BRANCH_STACK */\n"
5629 " struct perf_branch_entry lbr[bnr];\n"
5630 " /* if PERF_SAMPLE_BRANCH_STACK */\n"
5631 " u64 abi; /* if PERF_SAMPLE_REGS_USER */\n"
5632 " u64 regs[weight(mask)];\n"
5633 " /* if PERF_SAMPLE_REGS_USER */\n"
5634 " u64 size; /* if PERF_SAMPLE_STACK_USER */\n"
5635 " char data[size]; /* if PERF_SAMPLE_STACK_USER */\n"
5636 " u64 dyn_size; /* if PERF_SAMPLE_STACK_USER */\n"
5637 " u64 weight; /* if PERF_SAMPLE_WEIGHT */\n"
5638 " u64 data_src; /* if PERF_SAMPLE_DATA_SRC */\n"
5639 " u64 transaction;/* if PERF_SAMPLE_TRANSACTION */\n"
5643 #: build/C/man2/perf_event_open.2:1819
5645 msgid "I<sample_id>"
5646 msgstr "I<sample_id>"
5649 #: build/C/man2/perf_event_open.2:1829
5651 "If B<PERF_SAMPLE_IDENTIFIER> is enabled, a 64-bit unique ID is included. "
5652 "This is a duplication of the B<PERF_SAMPLE_ID> I<id> value, but included at "
5653 "the beginning of the sample so parsers can easily obtain the value."
5657 #: build/C/man2/perf_event_open.2:1829
5663 #: build/C/man2/perf_event_open.2:1835
5665 "If B<PERF_SAMPLE_IP> is enabled, then a 64-bit instruction pointer value is "
5670 #: build/C/man2/perf_event_open.2:1835
5672 msgid "I<pid>, I<tid>"
5673 msgstr "I<pid>, I<tid>"
5676 #: build/C/man2/perf_event_open.2:1841
5678 "If B<PERF_SAMPLE_TID> is enabled, then a 32-bit process ID and 32-bit thread "
5683 #: build/C/man2/perf_event_open.2:1841
5689 #: build/C/man2/perf_event_open.2:1849
5691 "If B<PERF_SAMPLE_TIME> is enabled, then a 64-bit timestamp is included. "
5692 "This is obtained via local_clock() which is a hardware timestamp if "
5693 "available and the jiffies value if not."
5697 #: build/C/man2/perf_event_open.2:1856
5699 "If B<PERF_SAMPLE_ADDR> is enabled, then a 64-bit address is included. This "
5700 "is usually the address of a tracepoint, breakpoint, or software event; "
5701 "otherwise the value is 0."
5705 #: build/C/man2/perf_event_open.2:1864
5707 "If B<PERF_SAMPLE_ID> is enabled, a 64-bit unique ID is included. If the "
5708 "event is a member of an event group, the group leader ID is returned. This "
5709 "ID is the same as the one returned by B<PERF_FORMAT_ID>."
5713 #: build/C/man2/perf_event_open.2:1864
5715 msgid "I<stream_id>"
5716 msgstr "I<stream_id>"
5719 #: build/C/man2/perf_event_open.2:1874
5721 "If B<PERF_SAMPLE_STREAM_ID> is enabled, a 64-bit unique ID is included. "
5722 "Unlike B<PERF_SAMPLE_ID> the actual ID is returned, not the group leader. "
5723 "This ID is the same as the one returned by B<PERF_FORMAT_ID>."
5727 #: build/C/man2/perf_event_open.2:1874
5729 msgid "I<cpu>, I<res>"
5730 msgstr "I<cpu>, I<res>"
5733 #: build/C/man2/perf_event_open.2:1881
5735 "If B<PERF_SAMPLE_CPU> is enabled, this is a 32-bit value indicating which "
5736 "CPU was being used, in addition to a reserved (unused) 32-bit value."
5740 #: build/C/man2/perf_event_open.2:1881
5746 #: build/C/man2/perf_event_open.2:1887
5748 "If B<PERF_SAMPLE_PERIOD> is enabled, a 64-bit value indicating the current "
5749 "sampling period is written."
5753 #: build/C/man2/perf_event_open.2:1887
5759 #: build/C/man2/perf_event_open.2:1898
5761 "If B<PERF_SAMPLE_READ> is enabled, a structure of type read_format is "
5762 "included which has values for all events in the event group. The values "
5763 "included depend on the I<read_format> value used at B<perf_event_open>() "
5768 #: build/C/man2/perf_event_open.2:1898
5770 msgid "I<nr>, I<ips[nr]>"
5771 msgstr "I<nr>, I<ips[nr]>"
5774 #: build/C/man2/perf_event_open.2:1906
5776 "If B<PERF_SAMPLE_CALLCHAIN> is enabled, then a 64-bit number is included "
5777 "which indicates how many following 64-bit instruction pointers will follow. "
5778 "This is the current callchain."
5782 #: build/C/man2/perf_event_open.2:1906
5784 msgid "I<size>, I<data[size]>"
5785 msgstr "I<size>, I<data[size]>"
5788 #: build/C/man2/perf_event_open.2:1913
5790 "If B<PERF_SAMPLE_RAW> is enabled, then a 32-bit value indicating size is "
5791 "included followed by an array of 8-bit values of length size. The values "
5792 "are padded with 0 to have 64-bit alignment."
5796 #: build/C/man2/perf_event_open.2:1918
5798 "This RAW record data is opaque with respect to the ABI. The ABI doesn't "
5799 "make any promises with respect to the stability of its content, it may vary "
5800 "depending on event, hardware, and kernel version."
5804 #: build/C/man2/perf_event_open.2:1918
5806 msgid "I<bnr>, I<lbr[bnr]>"
5807 msgstr "I<bnr>, I<lbr[bnr]>"
5810 #: build/C/man2/perf_event_open.2:1927
5812 "If B<PERF_SAMPLE_BRANCH_STACK> is enabled, then a 64-bit value indicating "
5813 "the number of records is included, followed by I<bnr> I<perf_branch_entry> "
5814 "structures which each include the fields:"
5818 #: build/C/man2/perf_event_open.2:1928
5824 #: build/C/man2/perf_event_open.2:1931
5825 msgid "This indicates the source instruction (may not be a branch)."
5829 #: build/C/man2/perf_event_open.2:1931
5835 #: build/C/man2/perf_event_open.2:1934
5836 msgid "The branch target."
5840 #: build/C/man2/perf_event_open.2:1934
5846 #: build/C/man2/perf_event_open.2:1937
5847 msgid "The branch target was mispredicted."
5851 #: build/C/man2/perf_event_open.2:1937
5853 msgid "I<predicted>"
5854 msgstr "I<predicted>"
5857 #: build/C/man2/perf_event_open.2:1940
5858 msgid "The branch target was predicted."
5862 #: build/C/man2/perf_event_open.2:1940
5864 msgid "I<in_tx> (since Linux 3.11)"
5865 msgstr "I<in_tx> (Linux 3.11 以降)"
5868 #: build/C/man2/perf_event_open.2:1943
5869 msgid "The branch was in a transactional memory transaction."
5873 #: build/C/man2/perf_event_open.2:1943
5875 msgid "I<abort> (since Linux 3.11)"
5876 msgstr "I<abort> (Linux 3.11 以降)"
5879 #: build/C/man2/perf_event_open.2:1946
5880 msgid "The branch was in an aborted transactional memory transaction."
5884 #: build/C/man2/perf_event_open.2:1950
5886 "The entries are from most to least recent, so the first entry has the most "
5891 #: build/C/man2/perf_event_open.2:1957
5893 "Support for I<mispred> and I<predicted> is optional; if not supported, both "
5898 #: build/C/man2/perf_event_open.2:1961
5900 "The type of branches recorded is specified by the I<branch_sample_type> "
5905 #: build/C/man2/perf_event_open.2:1963
5907 msgid "I<abi>, I<regs[weight(mask)]>"
5908 msgstr "I<abi>, I<regs[weight(mask)]>"
5911 #: build/C/man2/perf_event_open.2:1968
5913 "If B<PERF_SAMPLE_REGS_USER> is enabled, then the user CPU registers are "
5918 #: build/C/man2/perf_event_open.2:1974
5920 "The I<abi> field is one of B<PERF_SAMPLE_REGS_ABI_NONE>, "
5921 "B<PERF_SAMPLE_REGS_ABI_32> or B<PERF_SAMPLE_REGS_ABI_64>."
5925 #: build/C/man2/perf_event_open.2:1984
5927 "The I<regs> field is an array of the CPU registers that were specified by "
5928 "the I<sample_regs_user> attr field. The number of values is the number of "
5929 "bits set in the I<sample_regs_user> bit mask."
5933 #: build/C/man2/perf_event_open.2:1984
5935 msgid "I<size>, I<data[size]>, I<dyn_size>"
5936 msgstr "I<size>, I<data[size]>, I<dyn_size>"
5939 #: build/C/man2/perf_event_open.2:2000
5941 "If B<PERF_SAMPLE_STACK_USER> is enabled, then the user stack is recorded. "
5942 "This can be used to generate stack backtraces. I<size> is the size "
5943 "requested by the user in I<sample_stack_user> or else the maximum record "
5944 "size. I<data> is the stack data (a raw dump of the memory pointed to by the "
5945 "stack pointer at the time of sampling). I<dyn_size> is the amount of data "
5946 "actually dumped (can be less than I<size>)."
5950 #: build/C/man2/perf_event_open.2:2000
5956 #: build/C/man2/perf_event_open.2:2008
5958 "If B<PERF_SAMPLE_WEIGHT> is enabled, then a 64-bit value provided by the "
5959 "hardware is recorded that indicates how costly the event was. This allows "
5960 "expensive events to stand out more clearly in profiles."
5964 #: build/C/man2/perf_event_open.2:2008
5967 msgstr "I<data_src>"
5970 #: build/C/man2/perf_event_open.2:2014
5972 "If B<PERF_SAMPLE_DATA_SRC> is enabled, then a 64-bit value is recorded that "
5973 "is made up of the following fields:"
5977 #: build/C/man2/perf_event_open.2:2015
5983 #: build/C/man2/perf_event_open.2:2018
5984 msgid "Type of opcode, a bitwise combination of:"
5988 #: build/C/man2/perf_event_open.2:2021
5990 msgid "B<PERF_MEM_OP_NA>"
5991 msgstr "B<PERF_MEM_OP_NA>"
5994 #: build/C/man2/perf_event_open.2:2024 build/C/man2/perf_event_open.2:2049
5995 #: build/C/man2/perf_event_open.2:2100 build/C/man2/perf_event_open.2:2124
5996 #: build/C/man2/perf_event_open.2:2140
5997 msgid "Not available"
6001 #: build/C/man2/perf_event_open.2:2024
6003 msgid "B<PERF_MEM_OP_LOAD>"
6004 msgstr "B<PERF_MEM_OP_LOAD>"
6007 #: build/C/man2/perf_event_open.2:2027
6008 msgid "Load instruction"
6012 #: build/C/man2/perf_event_open.2:2027
6014 msgid "B<PERF_MEM_OP_STORE>"
6015 msgstr "B<PERF_MEM_OP_STORE>"
6018 #: build/C/man2/perf_event_open.2:2030
6019 msgid "Store instruction"
6023 #: build/C/man2/perf_event_open.2:2030
6025 msgid "B<PERF_MEM_OP_PFETCH>"
6026 msgstr "B<PERF_MEM_OP_PFETCH>"
6029 #: build/C/man2/perf_event_open.2:2033
6034 #: build/C/man2/perf_event_open.2:2033
6036 msgid "B<PERF_MEM_OP_EXEC>"
6037 msgstr "B<PERF_MEM_OP_EXEC>"
6040 #: build/C/man2/perf_event_open.2:2036
6041 msgid "Executable code"
6045 #: build/C/man2/perf_event_open.2:2038
6051 #: build/C/man2/perf_event_open.2:2043
6053 "Memory hierarchy level hit or miss, a bitwise combination of the following, "
6054 "shifted left by B<PERF_MEM_LVL_SHIFT>:"
6058 #: build/C/man2/perf_event_open.2:2046
6060 msgid "B<PERF_MEM_LVL_NA>"
6061 msgstr "B<PERF_MEM_LVL_NA>"
6064 #: build/C/man2/perf_event_open.2:2049
6066 msgid "B<PERF_MEM_LVL_HIT>"
6067 msgstr "B<PERF_MEM_LVL_HIT>"
6070 #: build/C/man2/perf_event_open.2:2052 build/C/man2/perf_event_open.2:2143
6075 #: build/C/man2/perf_event_open.2:2052
6077 msgid "B<PERF_MEM_LVL_MISS>"
6078 msgstr "B<PERF_MEM_LVL_MISS>"
6081 #: build/C/man2/perf_event_open.2:2055 build/C/man2/perf_event_open.2:2146
6086 #: build/C/man2/perf_event_open.2:2055
6088 msgid "B<PERF_MEM_LVL_L1>"
6089 msgstr "B<PERF_MEM_LVL_L1>"
6092 #: build/C/man2/perf_event_open.2:2058
6093 msgid "Level 1 cache"
6097 #: build/C/man2/perf_event_open.2:2058
6099 msgid "B<PERF_MEM_LVL_LFB>"
6100 msgstr "B<PERF_MEM_LVL_LFB>"
6103 #: build/C/man2/perf_event_open.2:2061
6104 msgid "Line fill buffer"
6108 #: build/C/man2/perf_event_open.2:2061
6110 msgid "B<PERF_MEM_LVL_L2>"
6111 msgstr "B<PERF_MEM_LVL_L2>"
6114 #: build/C/man2/perf_event_open.2:2064
6115 msgid "Level 2 cache"
6119 #: build/C/man2/perf_event_open.2:2064
6121 msgid "B<PERF_MEM_LVL_L3>"
6122 msgstr "B<PERF_MEM_LVL_L3>"
6125 #: build/C/man2/perf_event_open.2:2067
6126 msgid "Level 3 cache"
6130 #: build/C/man2/perf_event_open.2:2067
6132 msgid "B<PERF_MEM_LVL_LOC_RAM>"
6133 msgstr "B<PERF_MEM_LVL_LOC_RAM>"
6136 #: build/C/man2/perf_event_open.2:2070
6141 #: build/C/man2/perf_event_open.2:2070
6143 msgid "B<PERF_MEM_LVL_REM_RAM1>"
6144 msgstr "B<PERF_MEM_LVL_REM_RAM1>"
6147 #: build/C/man2/perf_event_open.2:2073
6148 msgid "Remote DRAM 1 hop"
6152 #: build/C/man2/perf_event_open.2:2073
6154 msgid "B<PERF_MEM_LVL_REM_RAM2>"
6155 msgstr "B<PERF_MEM_LVL_REM_RAM2>"
6158 #: build/C/man2/perf_event_open.2:2076
6159 msgid "Remote DRAM 2 hops"
6163 #: build/C/man2/perf_event_open.2:2076
6165 msgid "B<PERF_MEM_LVL_REM_CCE1>"
6166 msgstr "B<PERF_MEM_LVL_REM_CCE1>"
6169 #: build/C/man2/perf_event_open.2:2079
6170 msgid "Remote cache 1 hop"
6174 #: build/C/man2/perf_event_open.2:2079
6176 msgid "B<PERF_MEM_LVL_REM_CCE2>"
6177 msgstr "B<PERF_MEM_LVL_REM_CCE2>"
6180 #: build/C/man2/perf_event_open.2:2082
6181 msgid "Remote cache 2 hops"
6185 #: build/C/man2/perf_event_open.2:2082
6187 msgid "B<PERF_MEM_LVL_IO>"
6188 msgstr "B<PERF_MEM_LVL_IO>"
6191 #: build/C/man2/perf_event_open.2:2085
6196 #: build/C/man2/perf_event_open.2:2085
6198 msgid "B<PERF_MEM_LVL_UNC>"
6199 msgstr "B<PERF_MEM_LVL_UNC>"
6202 #: build/C/man2/perf_event_open.2:2088
6203 msgid "Uncached memory"
6207 #: build/C/man2/perf_event_open.2:2090
6209 msgid "I<mem_snoop>"
6210 msgstr "I<mem_snoop>"
6213 #: build/C/man2/perf_event_open.2:2094
6215 "Snoop mode, a bitwise combination of the following, shifted left by "
6216 "B<PERF_MEM_SNOOP_SHIFT>:"
6220 #: build/C/man2/perf_event_open.2:2097
6222 msgid "B<PERF_MEM_SNOOP_NA>"
6223 msgstr "B<PERF_MEM_SNOOP_NA>"
6226 #: build/C/man2/perf_event_open.2:2100
6228 msgid "B<PERF_MEM_SNOOP_NONE>"
6229 msgstr "B<PERF_MEM_SNOOP_NONE>"
6232 #: build/C/man2/perf_event_open.2:2103
6237 #: build/C/man2/perf_event_open.2:2103
6239 msgid "B<PERF_MEM_SNOOP_HIT>"
6240 msgstr "B<PERF_MEM_SNOOP_HIT>"
6243 #: build/C/man2/perf_event_open.2:2106
6248 #: build/C/man2/perf_event_open.2:2106
6250 msgid "B<PERF_MEM_SNOOP_MISS>"
6251 msgstr "B<PERF_MEM_SNOOP_MISS>"
6254 #: build/C/man2/perf_event_open.2:2109
6259 #: build/C/man2/perf_event_open.2:2109
6261 msgid "B<PERF_MEM_SNOOP_HITM>"
6262 msgstr "B<PERF_MEM_SNOOP_HITM>"
6265 #: build/C/man2/perf_event_open.2:2112
6266 msgid "Snoop hit modified"
6270 #: build/C/man2/perf_event_open.2:2114
6273 msgstr "I<mem_lock>"
6276 #: build/C/man2/perf_event_open.2:2118
6278 "Lock instruction, a bitwise combination of the following, shifted left by "
6279 "B<PERF_MEM_LOCK_SHIFT>:"
6283 #: build/C/man2/perf_event_open.2:2121
6285 msgid "B<PERF_MEM_LOCK_NA>"
6286 msgstr "B<PERF_MEM_LOCK_NA>"
6289 #: build/C/man2/perf_event_open.2:2124
6291 msgid "B<PERF_MEM_LOCK_LOCKED>"
6292 msgstr "B<PERF_MEM_LOCK_LOCKED>"
6295 #: build/C/man2/perf_event_open.2:2127
6296 msgid "Locked transaction"
6300 #: build/C/man2/perf_event_open.2:2129
6303 msgstr "I<mem_dtlb>"
6306 #: build/C/man2/perf_event_open.2:2134
6308 "TLB access hit or miss, a bitwise combination of the following, shifted left "
6309 "by B<PERF_MEM_TLB_SHIFT>:"
6313 #: build/C/man2/perf_event_open.2:2137
6315 msgid "B<PERF_MEM_TLB_NA>"
6316 msgstr "B<PERF_MEM_TLB_NA>"
6319 #: build/C/man2/perf_event_open.2:2140
6321 msgid "B<PERF_MEM_TLB_HIT>"
6322 msgstr "B<PERF_MEM_TLB_HIT>"
6325 #: build/C/man2/perf_event_open.2:2143
6327 msgid "B<PERF_MEM_TLB_MISS>"
6328 msgstr "B<PERF_MEM_TLB_MISS>"
6331 #: build/C/man2/perf_event_open.2:2146
6333 msgid "B<PERF_MEM_TLB_L1>"
6334 msgstr "B<PERF_MEM_TLB_L1>"
6337 #: build/C/man2/perf_event_open.2:2149
6342 #: build/C/man2/perf_event_open.2:2149
6344 msgid "B<PERF_MEM_TLB_L2>"
6345 msgstr "B<PERF_MEM_TLB_L2>"
6348 #: build/C/man2/perf_event_open.2:2152
6353 #: build/C/man2/perf_event_open.2:2152
6355 msgid "B<PERF_MEM_TLB_WK>"
6356 msgstr "B<PERF_MEM_TLB_WK>"
6359 #: build/C/man2/perf_event_open.2:2155
6360 msgid "Hardware walker"
6364 #: build/C/man2/perf_event_open.2:2155
6366 msgid "B<PERF_MEM_TLB_OS>"
6367 msgstr "B<PERF_MEM_TLB_OS>"
6370 #: build/C/man2/perf_event_open.2:2158
6371 msgid "OS fault handler"
6375 #: build/C/man2/perf_event_open.2:2161
6377 msgid "I<transaction>"
6378 msgstr "I<transaction>"
6381 #: build/C/man2/perf_event_open.2:2167
6383 "If the B<PERF_SAMPLE_TRANSACTION> flag is set, then a 64-bit field is "
6384 "recorded describing the sources of any transactional memory aborts."
6388 #: build/C/man2/perf_event_open.2:2169
6389 msgid "The field is a bitwise combination of the following values:"
6393 #: build/C/man2/perf_event_open.2:2170
6395 msgid "B<PERF_TXN_ELISION>"
6396 msgstr "B<PERF_TXN_ELISION>"
6399 #: build/C/man2/perf_event_open.2:2173
6400 msgid "Abort from an elision type transaction (Intel-CPU-specific)."
6404 #: build/C/man2/perf_event_open.2:2173
6406 msgid "B<PERF_TXN_TRANSACTION>"
6407 msgstr "B<PERF_TXN_TRANSACTION>"
6410 #: build/C/man2/perf_event_open.2:2176
6411 msgid "Abort from a generic transaction."
6415 #: build/C/man2/perf_event_open.2:2176
6417 msgid "B<PERF_TXN_SYNC>"
6418 msgstr "B<PERF_TXN_SYNC>"
6421 #: build/C/man2/perf_event_open.2:2179
6422 msgid "Synchronous abort (related to the reported instruction)."
6426 #: build/C/man2/perf_event_open.2:2179
6428 msgid "B<PERF_TXN_ASYNC>"
6429 msgstr "B<PERF_TXN_ASYNC>"
6432 #: build/C/man2/perf_event_open.2:2182
6433 msgid "Asynchronous abort (not related to the reported instruction)."
6437 #: build/C/man2/perf_event_open.2:2182
6439 msgid "B<PERF_TXN_RETRY>"
6440 msgstr "B<PERF_TXN_RETRY>"
6443 #: build/C/man2/perf_event_open.2:2185
6444 msgid "Retryable abort (retrying the transaction may have succeeded)."
6448 #: build/C/man2/perf_event_open.2:2185
6450 msgid "B<PERF_TXN_CONFLICT>"
6451 msgstr "B<PERF_TXN_CONFLICT>"
6454 #: build/C/man2/perf_event_open.2:2188
6455 msgid "Abort due to memory conflicts with other threads."
6459 #: build/C/man2/perf_event_open.2:2188
6461 msgid "B<PERF_TXN_CAPACITY_WRITE>"
6465 #: build/C/man2/perf_event_open.2:2191
6466 msgid "Abort due to write capacity overflow."
6470 #: build/C/man2/perf_event_open.2:2191
6472 msgid "B<PERF_TXN_CAPACITY_READ>"
6476 #: build/C/man2/perf_event_open.2:2194
6477 msgid "Abort due to read capacity overflow."
6481 #: build/C/man2/perf_event_open.2:2201
6483 "In addition, a user-specified abort code can be obtained from the high 32 "
6484 "bits of the field by shifting right by B<PERF_TXN_ABORT_SHIFT> and masking "
6485 "with B<PERF_TXN_ABORT_MASK>."
6489 #: build/C/man2/perf_event_open.2:2202
6491 msgid "B<PERF_RECORD_MMAP2>"
6492 msgstr "B<PERF_RECORD_MMAP2>"
6495 #: build/C/man2/perf_event_open.2:2211
6497 "This record includes extended information on B<mmap>(2) calls returning "
6498 "executable mappings. The format is similar to that of the "
6499 "B<PERF_RECORD_MMAP> record, but includes extra values that allow uniquely "
6500 "identifying shared mappings."
6504 #: build/C/man2/perf_event_open.2:2230
6508 " struct perf_event_header header;\n"
6517 " u64 ino_generation;\n"
6520 " char filename[];\n"
6521 " struct sample_id sample_id;\n"
6525 " struct perf_event_header header;\n"
6534 " u64 ino_generation;\n"
6537 " char filename[];\n"
6538 " struct sample_id sample_id;\n"
6542 #: build/C/man2/perf_event_open.2:2241
6543 msgid "is the address of the allocated memory."
6547 #: build/C/man2/perf_event_open.2:2241
6553 #: build/C/man2/perf_event_open.2:2244
6554 msgid "is the length of the allocated memory."
6558 #: build/C/man2/perf_event_open.2:2244
6564 #: build/C/man2/perf_event_open.2:2247
6565 msgid "is the page offset of the allocated memory."
6569 #: build/C/man2/perf_event_open.2:2247
6575 #: build/C/man2/perf_event_open.2:2250
6576 msgid "is the major ID of the underlying device."
6580 #: build/C/man2/perf_event_open.2:2250
6586 #: build/C/man2/perf_event_open.2:2253
6587 msgid "is the minor ID of the underlying device."
6591 #: build/C/man2/perf_event_open.2:2253
6597 #: build/C/man2/perf_event_open.2:2256
6598 msgid "is the inode number."
6602 #: build/C/man2/perf_event_open.2:2256
6604 msgid "I<ino_generation>"
6605 msgstr "I<ino_generation>"
6608 #: build/C/man2/perf_event_open.2:2259
6609 msgid "is the inode generation."
6613 #: build/C/man2/perf_event_open.2:2259
6619 #: build/C/man2/perf_event_open.2:2262
6620 msgid "is the protection information."
6624 #: build/C/man2/perf_event_open.2:2262
6630 #: build/C/man2/perf_event_open.2:2265
6631 msgid "is the flags information."
6635 #: build/C/man2/perf_event_open.2:2265
6638 msgstr "I<filename>"
6641 #: build/C/man2/perf_event_open.2:2268
6642 msgid "is a string describing the backing of the allocated memory."
6646 #: build/C/man2/perf_event_open.2:2270
6648 msgid "Overflow handling"
6652 #: build/C/man2/perf_event_open.2:2283
6654 "Events can be set to notify when a threshold is crossed, indicating an "
6655 "overflow. Overflow conditions can be captured by monitoring the event file "
6656 "descriptor with B<poll>(2), B<select>(2), or B<epoll>(2). Alternately, a "
6657 "SIGIO signal handler can be created and the event configured with "
6658 "B<fcntl>(2) to generate SIGIO signals."
6662 #: build/C/man2/perf_event_open.2:2287
6664 "Overflows are only generated by sampling events (I<sample_period> must have "
6669 #: build/C/man2/perf_event_open.2:2289
6670 msgid "There are two ways to generate overflow notifications."
6674 #: build/C/man2/perf_event_open.2:2299
6676 "The first is to set a I<wakeup_events> or I<wakeup_watermark> value that "
6677 "will trigger if a certain number of samples or bytes have been written to "
6678 "the mmap ring buffer. In this case B<POLL_IN> is indicated."
6682 #: build/C/man2/perf_event_open.2:2311
6684 "The other way is by use of the B<PERF_EVENT_IOC_REFRESH> ioctl. This ioctl "
6685 "adds to a counter that decrements each time the event overflows. When "
6686 "nonzero, B<POLL_IN> is indicated, but once the counter reaches 0 B<POLL_HUP> "
6687 "is indicated and the underlying event is disabled."
6691 #: build/C/man2/perf_event_open.2:2316
6693 "Starting with Linux 3.18, B<POLL_HUP> is indicated if the event being "
6694 "monitored is attached to a different process and that process exits."
6698 #: build/C/man2/perf_event_open.2:2316
6700 msgid "rdpmc instruction"
6704 #: build/C/man2/perf_event_open.2:2323
6706 "Starting with Linux 3.4 on x86, you can use the I<rdpmc> instruction to get "
6707 "low-latency reads without having to enter the kernel. Note that using "
6708 "I<rdpmc> is not necessarily faster than other methods for reading event "
6713 #: build/C/man2/perf_event_open.2:2328
6715 "Support for this can be detected with the I<cap_usr_rdpmc> field in the mmap "
6716 "page; documentation on how to calculate event values can be found in that "
6721 #: build/C/man2/perf_event_open.2:2328
6723 msgid "perf_event ioctl calls"
6727 #: build/C/man2/perf_event_open.2:2333
6728 msgid "Various ioctls act on B<perf_event_open>() file descriptors:"
6732 #: build/C/man2/perf_event_open.2:2333
6734 msgid "B<PERF_EVENT_IOC_ENABLE>"
6735 msgstr "B<PERF_EVENT_IOC_ENABLE>"
6738 #: build/C/man2/perf_event_open.2:2337
6740 "This enables the individual event or event group specified by the file "
6741 "descriptor argument."
6745 #: build/C/man2/perf_event_open.2:2343
6747 "If the B<PERF_IOC_FLAG_GROUP> bit is set in the ioctl argument, then all "
6748 "events in a group are enabled, even if the event specified is not the group "
6749 "leader (but see BUGS)."
6753 #: build/C/man2/perf_event_open.2:2343
6755 msgid "B<PERF_EVENT_IOC_DISABLE>"
6756 msgstr "B<PERF_EVENT_IOC_DISABLE>"
6759 #: build/C/man2/perf_event_open.2:2347
6761 "This disables the individual counter or event group specified by the file "
6762 "descriptor argument."
6766 #: build/C/man2/perf_event_open.2:2354
6768 "Enabling or disabling the leader of a group enables or disables the entire "
6769 "group; that is, while the group leader is disabled, none of the counters in "
6770 "the group will count. Enabling or disabling a member of a group other than "
6771 "the leader affects only that counter; disabling a non-leader stops that "
6772 "counter from counting but doesn't affect any other counter."
6776 #: build/C/man2/perf_event_open.2:2360
6778 "If the B<PERF_IOC_FLAG_GROUP> bit is set in the ioctl argument, then all "
6779 "events in a group are disabled, even if the event specified is not the group "
6780 "leader (but see BUGS)."
6784 #: build/C/man2/perf_event_open.2:2360
6786 msgid "B<PERF_EVENT_IOC_REFRESH>"
6787 msgstr "B<PERF_EVENT_IOC_REFRESH>"
6790 #: build/C/man2/perf_event_open.2:2374
6792 "Non-inherited overflow counters can use this to enable a counter for a "
6793 "number of overflows specified by the argument, after which it is disabled. "
6794 "Subsequent calls of this ioctl add the argument value to the current count. "
6795 "An overflow notification with B<POLL_IN> set will happen on each overflow "
6796 "until the count reaches 0; when that happens a notification with B<POLL_HUP> "
6797 "set is sent and the event is disabled. Using an argument of 0 is considered "
6798 "undefined behavior."
6802 #: build/C/man2/perf_event_open.2:2374
6804 msgid "B<PERF_EVENT_IOC_RESET>"
6805 msgstr "B<PERF_EVENT_IOC_RESET>"
6808 #: build/C/man2/perf_event_open.2:2384
6810 "Reset the event count specified by the file descriptor argument to zero. "
6811 "This resets only the counts; there is no way to reset the multiplexing "
6812 "I<time_enabled> or I<time_running> values."
6816 #: build/C/man2/perf_event_open.2:2390
6818 "If the B<PERF_IOC_FLAG_GROUP> bit is set in the ioctl argument, then all "
6819 "events in a group are reset, even if the event specified is not the group "
6820 "leader (but see BUGS)."
6824 #: build/C/man2/perf_event_open.2:2390
6826 msgid "B<PERF_EVENT_IOC_PERIOD>"
6827 msgstr "B<PERF_EVENT_IOC_PERIOD>"
6830 #: build/C/man2/perf_event_open.2:2393
6831 msgid "This updates the overflow period for the event."
6835 #: build/C/man2/perf_event_open.2:2398
6837 "Since Linux 3.7 (on ARM) and Linux 3.14 (all other architectures), the new "
6838 "period takes effect immediately. On older kernels, the new period did not "
6839 "take effect until after the next overflow."
6843 #: build/C/man2/perf_event_open.2:2401
6845 "The argument is a pointer to a 64-bit value containing the desired new "
6850 #: build/C/man2/perf_event_open.2:2404
6852 "Prior to Linux 2.6.36 this ioctl always failed due to a bug in the kernel."
6856 #: build/C/man2/perf_event_open.2:2405
6858 msgid "B<PERF_EVENT_IOC_SET_OUTPUT>"
6862 #: build/C/man2/perf_event_open.2:2410
6864 "This tells the kernel to report event notifications to the specified file "
6865 "descriptor rather than the default one. The file descriptors must all be on "
6870 #: build/C/man2/perf_event_open.2:2413
6872 "The argument specifies the desired file descriptor, or -1 if output should "
6877 #: build/C/man2/perf_event_open.2:2413
6879 msgid "B<PERF_EVENT_IOC_SET_FILTER> (since Linux 2.6.33)"
6880 msgstr "B<PERF_EVENT_IOC_SET_FILTER> (Linux 2.6.33 以降)"
6882 #. commit 6fb2915df7f0747d9044da9dbff5b46dc2e20830
6884 #: build/C/man2/perf_event_open.2:2417
6885 msgid "This adds an ftrace filter to this event."
6889 #: build/C/man2/perf_event_open.2:2419
6890 msgid "The argument is a pointer to the desired ftrace filter."
6894 #: build/C/man2/perf_event_open.2:2419
6896 msgid "B<PERF_EVENT_IOC_ID> (since Linux 3.12)"
6897 msgstr "B<PERF_EVENT_IOC_ID> (Linux 3.12 以降)"
6899 #. commit cf4957f17f2a89984915ea808876d9c82225b862
6901 #: build/C/man2/perf_event_open.2:2423
6902 msgid "This returns the event ID value for the given event file descriptor."
6906 #: build/C/man2/perf_event_open.2:2426
6908 "The argument is a pointer to a 64-bit unsigned integer to hold the result."
6912 #: build/C/man2/perf_event_open.2:2426
6918 #: build/C/man2/perf_event_open.2:2439
6920 "A process can enable or disable all the event groups that are attached to it "
6921 "using the B<prctl>(2) B<PR_TASK_PERF_EVENTS_ENABLE> and "
6922 "B<PR_TASK_PERF_EVENTS_DISABLE> operations. This applies to all counters on "
6923 "the calling process, whether created by this process or by another, and does "
6924 "not affect any counters that this process has created on other processes. "
6925 "It enables or disables only the group leaders, not any other members in the "
6930 #: build/C/man2/perf_event_open.2:2439
6932 msgid "perf_event related configuration files"
6936 #: build/C/man2/perf_event_open.2:2442
6937 msgid "Files in I</proc/sys/kernel/>"
6941 #: build/C/man2/perf_event_open.2:2443
6943 msgid "I</proc/sys/kernel/perf_event_paranoid>"
6947 #: build/C/man2/perf_event_open.2:2449
6949 "The I<perf_event_paranoid> file can be set to restrict access to the "
6950 "performance counters."
6954 #: build/C/man2/perf_event_open.2:2450
6960 #: build/C/man2/perf_event_open.2:2452
6961 msgid "only allow user-space measurements."
6965 #: build/C/man2/perf_event_open.2:2452
6971 #: build/C/man2/perf_event_open.2:2454
6972 msgid "allow both kernel and user measurements (default)."
6976 #: build/C/man2/perf_event_open.2:2454
6982 #: build/C/man2/perf_event_open.2:2456
6983 msgid "allow access to CPU-specific data but not raw tracepoint samples."
6987 #: build/C/man2/perf_event_open.2:2456
6993 #: build/C/man2/perf_event_open.2:2458
6994 msgid "no restrictions."
6998 #: build/C/man2/perf_event_open.2:2464
7000 "The existence of the I<perf_event_paranoid> file is the official method for "
7001 "determining if a kernel supports B<perf_event_open>()."
7005 #: build/C/man2/perf_event_open.2:2464
7007 msgid "I</proc/sys/kernel/perf_event_max_sample_rate>"
7011 #: build/C/man2/perf_event_open.2:2473
7013 "This sets the maximum sample rate. Setting this too high can allow users to "
7014 "sample at a rate that impacts overall machine performance and potentially "
7015 "lock up the machine. The default value is 100000 (samples per second)."
7019 #: build/C/man2/perf_event_open.2:2473
7021 msgid "I</proc/sys/kernel/perf_event_mlock_kb>"
7025 #: build/C/man2/perf_event_open.2:2479
7027 "Maximum number of pages an unprivileged user can B<mlock>(2). The default "
7032 #: build/C/man2/perf_event_open.2:2483
7033 msgid "Files in I</sys/bus/event_source/devices/>"
7037 #: build/C/man2/perf_event_open.2:2489
7039 "Since Linux 2.6.34, the kernel supports having multiple PMUs available for "
7040 "monitoring. Information on how to program these PMUs can be found under I</"
7041 "sys/bus/event_source/devices/>. Each subdirectory corresponds to a "
7046 #: build/C/man2/perf_event_open.2:2489
7048 msgid "I</sys/bus/event_source/devices/*/type> (since Linux 2.6.38)"
7049 msgstr "I</sys/bus/event_source/devices/*/type> (Linux 2.6.38 以降)"
7052 #: build/C/man2/perf_event_open.2:2496
7054 "This contains an integer that can be used in the I<type> field of "
7055 "I<perf_event_attr> to indicate that you wish to use this PMU."
7059 #: build/C/man2/perf_event_open.2:2496
7061 msgid "I</sys/bus/event_source/devices/*/rdpmc> (since Linux 3.4)"
7062 msgstr "I</sys/bus/event_source/devices/*/rdpmc> (Linux 3.4 以降)"
7065 #: build/C/man2/perf_event_open.2:2501
7067 "If this file is 1, then direct user-space access to the performance counter "
7068 "registers is allowed via the rdpmc instruction. This can be disabled by "
7069 "echoing 0 to the file."
7073 #: build/C/man2/perf_event_open.2:2501
7075 msgid "I</sys/bus/event_source/devices/*/format/> (since Linux 3.4)"
7076 msgstr "I</sys/bus/event_source/devices/*/format/> (Linux 3.4 以降)"
7079 #: build/C/man2/perf_event_open.2:2509
7081 "This subdirectory contains information on the architecture-specific "
7082 "subfields available for programming the various I<config> fields in the "
7083 "I<perf_event_attr> struct."
7087 #: build/C/man2/perf_event_open.2:2520
7089 "The content of each file is the name of the config field, followed by a "
7090 "colon, followed by a series of integer bit ranges separated by commas. For "
7091 "example, the file I<event> may contain the value I<config1:1,6-10,44> which "
7092 "indicates that event is an attribute that occupies bits 1,6-10, and 44 of "
7093 "I<perf_event_attr::config1>."
7097 #: build/C/man2/perf_event_open.2:2520
7099 msgid "I</sys/bus/event_source/devices/*/events/> (since Linux 3.4)"
7100 msgstr "I</sys/bus/event_source/devices/*/events/> (Linux 3.4 以降)"
7103 #: build/C/man2/perf_event_open.2:2529
7105 "This subdirectory contains files with predefined events. The contents are "
7106 "strings describing the event settings expressed in terms of the fields found "
7107 "in the previously mentioned I<./format/> directory. These are not "
7108 "necessarily complete lists of all events supported by a PMU, but usually a "
7109 "subset of events deemed useful or interesting."
7113 #: build/C/man2/perf_event_open.2:2537
7115 "The content of each file is a list of attribute names separated by commas. "
7116 "Each entry has an optional value (either hex or decimal). If no value is "
7117 "specified, then it is assumed to be a single-bit field with a value of 1. "
7118 "An example entry may look like this: I<event=0x2,inv,ldlat=3>."
7122 #: build/C/man2/perf_event_open.2:2537
7124 msgid "I</sys/bus/event_source/devices/*/uevent>"
7125 msgstr "I</sys/bus/event_source/devices/*/uevent>"
7128 #: build/C/man2/perf_event_open.2:2541
7130 "This file is the standard kernel device interface for injecting hotplug "
7135 #: build/C/man2/perf_event_open.2:2541
7137 msgid "I</sys/bus/event_source/devices/*/cpumask> (since Linux 3.7)"
7138 msgstr "I</sys/bus/event_source/devices/*/cpumask> (Linux 3.7 以降)"
7141 #: build/C/man2/perf_event_open.2:2550
7143 "The I<cpumask> file contains a comma-separated list of integers that "
7144 "indicate a representative CPU number for each socket (package) on the "
7145 "motherboard. This is needed when setting up uncore or northbridge events, "
7146 "as those PMUs present socket-wide events."
7150 #: build/C/man2/perf_event_open.2:2557
7152 "B<perf_event_open>() returns the new file descriptor, or -1 if an error "
7153 "occurred (in which case, I<errno> is set appropriately)."
7157 #: build/C/man2/perf_event_open.2:2562
7159 "The errors returned by B<perf_event_open>() can be inconsistent, and may "
7160 "vary across processor architectures and performance monitoring units."
7164 #: build/C/man2/perf_event_open.2:2562
7170 #: build/C/man2/perf_event_open.2:2579
7172 "Returned if the I<perf_event_attr> I<size> value is too small (smaller than "
7173 "B<PERF_ATTR_SIZE_VER0>), too big (larger than the page size), or larger than "
7174 "the kernel supports and the extra bytes are not zero. When B<E2BIG> is "
7175 "returned, the I<perf_event_attr> I<size> field is overwritten by the kernel "
7176 "to be the size of the structure it was expecting."
7180 #: build/C/man2/perf_event_open.2:2593
7182 "Returned when the requested event requires B<CAP_SYS_ADMIN> permissions (or "
7183 "a more permissive perf_event paranoid setting). Some common cases where an "
7184 "unprivileged process may encounter this error: attaching to a process owned "
7185 "by a different user; monitoring all processes on a given CPU (i.e., "
7186 "specifying the I<pid> argument as -1); and not setting I<exclude_kernel> "
7187 "when the paranoid setting requires it."
7191 #: build/C/man2/perf_event_open.2:2593 build/C/man2/sendfile.2:121
7192 #: build/C/man2/splice.2:157 build/C/man2/vmsplice.2:133
7198 #: build/C/man2/perf_event_open.2:2603
7200 "Returned if the I<group_fd> file descriptor is not valid, or, if "
7201 "B<PERF_FLAG_PID_CGROUP> is set, the cgroup file descriptor in I<pid> is not "
7206 #: build/C/man2/perf_event_open.2:2608
7207 msgid "Returned if the I<attr> pointer points at an invalid memory address."
7211 #: build/C/man2/perf_event_open.2:2634
7213 "Returned if the specified event is invalid. There are many possible reasons "
7214 "for this. A not-exhaustive list: I<sample_freq> is higher than the maximum "
7215 "setting; the I<cpu> to monitor does not exist; I<read_format> is out of "
7216 "range; I<sample_type> is out of range; the I<flags> value is out of range; "
7217 "I<exclusive> or I<pinned> set and the event is not a group leader; the event "
7218 "I<config> values are out of range or set reserved bits; the generic event "
7219 "selected is not supported; or there is not enough room to add the selected "
7224 #: build/C/man2/perf_event_open.2:2634
7230 #: build/C/man2/perf_event_open.2:2640
7232 "Each opened event uses one file descriptor. If a large number of events are "
7233 "opened the per-user file descriptor limit (often 1024) will be hit and no "
7234 "more events can be created."
7238 #: build/C/man2/perf_event_open.2:2644
7240 "Returned when the event involves a feature not supported by the current CPU."
7244 #: build/C/man2/perf_event_open.2:2644 build/C/man2/quotactl.2:440
7250 #: build/C/man2/perf_event_open.2:2651
7252 "Returned if the I<type> setting is not valid. This error is also returned "
7253 "for some unsupported generic events."
7257 #: build/C/man2/perf_event_open.2:2651
7263 #: build/C/man2/perf_event_open.2:2661
7265 "Prior to Linux 3.3, if there was not enough room for the event, B<ENOSPC> "
7266 "was returned. In Linux 3.3, this was changed to B<EINVAL>. B<ENOSPC> is "
7267 "still returned if you try to add more breakpoint events than supported by "
7272 #: build/C/man2/perf_event_open.2:2668
7274 "Returned if B<PERF_SAMPLE_STACK_USER> is set in I<sample_type> and it is not "
7275 "supported by hardware."
7279 #: build/C/man2/perf_event_open.2:2675
7281 "Returned if an event requiring a specific hardware feature is requested but "
7282 "there is no hardware support. This includes requesting low-skid events if "
7283 "not supported, branch tracing if it is not available, sampling if no PMU "
7284 "interrupt is available, and branch stacks for software events."
7288 #: build/C/man2/perf_event_open.2:2680
7290 "Returned on many (but not all) architectures when an unsupported "
7291 "I<exclude_hv>, I<exclude_idle>, I<exclude_user>, or I<exclude_kernel> "
7292 "setting is specified."
7296 #: build/C/man2/perf_event_open.2:2688
7298 "It can also happen, as with B<EACCES>, when the requested event requires "
7299 "B<CAP_SYS_ADMIN> permissions (or a more permissive perf_event paranoid "
7300 "setting). This includes setting a breakpoint on a kernel address, and "
7301 "(since Linux 3.13) setting a kernel function-trace tracepoint."
7305 #: build/C/man2/perf_event_open.2:2691
7306 msgid "Returned if attempting to attach to a process that does not exist."
7310 #: build/C/man2/perf_event_open.2:2691
7316 #: build/C/man2/perf_event_open.2:2696
7318 "B<perf_event_open>() was introduced in Linux 2.6.31 but was called "
7319 "B<perf_counter_open>(). It was renamed in Linux 2.6.32."
7323 #: build/C/man2/perf_event_open.2:2701
7325 "This B<perf_event_open>() system call Linux- specific and should not be "
7326 "used in programs intended to be portable."
7328 "B<perf_event_open>() システムコールは Linux 固有であり、 移植を意図したプログ"
7332 #: build/C/man2/perf_event_open.2:2705
7334 "Glibc does not provide a wrapper for this system call; call it using "
7335 "B<syscall>(2). See the example below."
7337 "glibc はこのシステムコールに対するラッパー関数を提供していない。 "
7338 "B<syscall>(2) を使って呼び出すこと。 以下の例を参照。"
7341 #: build/C/man2/perf_event_open.2:2711
7343 "The official way of knowing if B<perf_event_open>() support is enabled is "
7344 "checking for the existence of the file I</proc/sys/kernel/"
7345 "perf_event_paranoid>."
7349 #: build/C/man2/perf_event_open.2:2711 build/C/man2/pivot_root.2:134
7350 #: build/C/man2/ptrace.2:2006
7356 #: build/C/man2/perf_event_open.2:2718
7358 "The B<F_SETOWN_EX> option to B<fcntl>(2) is needed to properly get overflow "
7359 "signals in threads. This was introduced in Linux 2.6.32."
7363 #: build/C/man2/perf_event_open.2:2726
7365 "Prior to Linux 2.6.33 (at least for x86), the kernel did not check if events "
7366 "could be scheduled together until read time. The same happens on all known "
7367 "kernels if the NMI watchdog is enabled. This means to see if a given set of "
7368 "events works you have to B<perf_event_open>(), start, then read before you "
7369 "know for sure you can get valid measurements."
7373 #: build/C/man2/perf_event_open.2:2730
7375 "Prior to Linux 2.6.34, event constraints were not enforced by the kernel. "
7376 "In that case, some events would silently return \"0\" if the kernel "
7377 "scheduled them in an improper counter slot."
7381 #: build/C/man2/perf_event_open.2:2733
7383 "Prior to Linux 2.6.34, there was a bug when multiplexing where the wrong "
7384 "results could be returned."
7388 #: build/C/man2/perf_event_open.2:2736
7390 "Kernels from Linux 2.6.35 to Linux 2.6.39 can quickly crash the kernel if "
7391 "\"inherit\" is enabled and many threads are started."
7395 #: build/C/man2/perf_event_open.2:2740
7397 "Prior to Linux 2.6.35, B<PERF_FORMAT_GROUP> did not work with attached "
7402 #: build/C/man2/perf_event_open.2:2745
7404 "In older Linux 2.6 versions, refreshing an event group leader refreshed all "
7405 "siblings, and refreshing with a parameter of 0 enabled infinite refresh. "
7406 "This behavior is unsupported and should not be relied on."
7410 #: build/C/man2/perf_event_open.2:2751
7412 "There is a bug in the kernel code between Linux 2.6.36 and Linux 3.0 that "
7413 "ignores the \"watermark\" field and acts as if a wakeup_event was chosen if "
7414 "the union has a nonzero value in it."
7418 #: build/C/man2/perf_event_open.2:2757
7420 "From Linux 2.6.31 to Linux 3.4, the B<PERF_IOC_FLAG_GROUP> ioctl argument "
7421 "was broken and would repeatedly operate on the event specified rather than "
7422 "iterating across all sibling events in a group."
7426 #: build/C/man2/perf_event_open.2:2768
7428 "From Linux 3.4 to Linux 3.11, the mmap I<cap_usr_rdpmc> and I<cap_usr_time> "
7429 "bits mapped to the same location. Code should migrate to the new "
7430 "I<cap_user_rdpmc> and I<cap_user_time> fields instead."
7434 #: build/C/man2/perf_event_open.2:2773
7436 "Always double-check your results! Various generalized events have had wrong "
7437 "values. For example, retired branches measured the wrong thing on AMD "
7438 "machines until Linux 2.6.35."
7442 #: build/C/man2/perf_event_open.2:2773 build/C/man2/process_vm_readv.2:311
7443 #: build/C/man2/splice.2:237 build/C/man2/tee.2:136
7449 #: build/C/man2/perf_event_open.2:2777
7451 "The following is a short example that measures the total instruction count "
7452 "of a call to B<printf>(3)."
7456 #: build/C/man2/perf_event_open.2:2786
7459 "#include E<lt>stdlib.hE<gt>\n"
7460 "#include E<lt>stdio.hE<gt>\n"
7461 "#include E<lt>unistd.hE<gt>\n"
7462 "#include E<lt>string.hE<gt>\n"
7463 "#include E<lt>sys/ioctl.hE<gt>\n"
7464 "#include E<lt>linux/perf_event.hE<gt>\n"
7465 "#include E<lt>asm/unistd.hE<gt>\n"
7467 "#include E<lt>stdlib.hE<gt>\n"
7468 "#include E<lt>stdio.hE<gt>\n"
7469 "#include E<lt>unistd.hE<gt>\n"
7470 "#include E<lt>string.hE<gt>\n"
7471 "#include E<lt>sys/ioctl.hE<gt>\n"
7472 "#include E<lt>linux/perf_event.hE<gt>\n"
7473 "#include E<lt>asm/unistd.hE<gt>\n"
7476 #: build/C/man2/perf_event_open.2:2792
7480 "perf_event_open(struct perf_event_attr *hw_event, pid_t pid,\n"
7481 " int cpu, int group_fd, unsigned long flags)\n"
7486 "perf_event_open(struct perf_event_attr *hw_event, pid_t pid,\n"
7487 " int cpu, int group_fd, unsigned long flags)\n"
7492 #: build/C/man2/perf_event_open.2:2797
7495 " ret = syscall(__NR_perf_event_open, hw_event, pid, cpu,\n"
7496 " group_fd, flags);\n"
7500 " ret = syscall(__NR_perf_event_open, hw_event, pid, cpu,\n"
7501 " group_fd, flags);\n"
7506 #: build/C/man2/perf_event_open.2:2804
7510 "main(int argc, char **argv)\n"
7512 " struct perf_event_attr pe;\n"
7513 " long long count;\n"
7517 "main(int argc, char **argv)\n"
7519 " struct perf_event_attr pe;\n"
7520 " long long count;\n"
7524 #: build/C/man2/perf_event_open.2:2812
7527 " memset(&pe, 0, sizeof(struct perf_event_attr));\n"
7528 " pe.type = PERF_TYPE_HARDWARE;\n"
7529 " pe.size = sizeof(struct perf_event_attr);\n"
7530 " pe.config = PERF_COUNT_HW_INSTRUCTIONS;\n"
7531 " pe.disabled = 1;\n"
7532 " pe.exclude_kernel = 1;\n"
7533 " pe.exclude_hv = 1;\n"
7535 " memset(&pe, 0, sizeof(struct perf_event_attr));\n"
7536 " pe.type = PERF_TYPE_HARDWARE;\n"
7537 " pe.size = sizeof(struct perf_event_attr);\n"
7538 " pe.config = PERF_COUNT_HW_INSTRUCTIONS;\n"
7539 " pe.disabled = 1;\n"
7540 " pe.exclude_kernel = 1;\n"
7541 " pe.exclude_hv = 1;\n"
7544 #: build/C/man2/perf_event_open.2:2818
7547 " fd = perf_event_open(&pe, 0, -1, -1, 0);\n"
7548 " if (fd == -1) {\n"
7549 " fprintf(stderr, \"Error opening leader %llx\\en\", pe.config);\n"
7550 " exit(EXIT_FAILURE);\n"
7553 " fd = perf_event_open(&pe, 0, -1, -1, 0);\n"
7554 " if (fd == -1) {\n"
7555 " fprintf(stderr, \"Error opening leader %llx\\en\", pe.config);\n"
7556 " exit(EXIT_FAILURE);\n"
7560 #: build/C/man2/perf_event_open.2:2821
7563 " ioctl(fd, PERF_EVENT_IOC_RESET, 0);\n"
7564 " ioctl(fd, PERF_EVENT_IOC_ENABLE, 0);\n"
7566 " ioctl(fd, PERF_EVENT_IOC_RESET, 0);\n"
7567 " ioctl(fd, PERF_EVENT_IOC_ENABLE, 0);\n"
7570 #: build/C/man2/perf_event_open.2:2823
7572 msgid " printf(\"Measuring instruction count for this printf\\en\");\n"
7573 msgstr " printf(\"Measuring instruction count for this printf\\en\");\n"
7576 #: build/C/man2/perf_event_open.2:2826
7579 " ioctl(fd, PERF_EVENT_IOC_DISABLE, 0);\n"
7580 " read(fd, &count, sizeof(long long));\n"
7582 " ioctl(fd, PERF_EVENT_IOC_DISABLE, 0);\n"
7583 " read(fd, &count, sizeof(long long));\n"
7586 #: build/C/man2/perf_event_open.2:2828
7588 msgid " printf(\"Used %lld instructions\\en\", count);\n"
7589 msgstr " printf(\"Used %lld instructions\\en\", count);\n"
7592 #: build/C/man2/perf_event_open.2:2831
7602 #: build/C/man2/perf_event_open.2:2838
7603 msgid "B<fcntl>(2), B<mmap>(2), B<open>(2), B<prctl>(2), B<read>(2)"
7604 msgstr "B<fcntl>(2), B<mmap>(2), B<open>(2), B<prctl>(2), B<read>(2)"
7607 #: build/C/man2/perfmonctl.2:27
7613 #: build/C/man2/perfmonctl.2:27
7619 #: build/C/man2/perfmonctl.2:30
7620 msgid "perfmonctl - interface to IA-64 performance monitoring unit"
7621 msgstr "perfmonctl - IA-64 の PMU (性能監視ユニット) のインターフェース"
7624 #: build/C/man2/perfmonctl.2:34
7627 "B<#include E<lt>syscall.hE<gt>>\n"
7628 "B<#include E<lt>perfmon.hE<gt>>\n"
7630 "B<#include E<lt>syscall.hE<gt>>\n"
7631 "B<#include E<lt>perfmon.hE<gt>>\n"
7634 #: build/C/man2/perfmonctl.2:36
7636 msgid "B<long perfmonctl(int >I<fd>B<, int >I<cmd>B<, void *>I<arg>B<, int >I<narg>B<);>\n"
7637 msgstr "B<long perfmonctl(int >I<fd>B<, int >I<cmd>B<, void *>I<arg>B<, int >I<narg>B<);>\n"
7640 #: build/C/man2/perfmonctl.2:47
7642 "The IA-64-specific B<perfmonctl>() system call provides an interface to the "
7643 "PMU (performance monitoring unit). The PMU consists of PMD (performance "
7644 "monitoring data) registers and PMC (performance monitoring control) "
7645 "registers, which gather hardware statistics."
7646 msgstr "IA-64 固有の B<perfmonctl>() システムコールは PMU (性能監視ユニット; performance monitoring unit) へのインターフェースを提供する。 PMU は PMD (performance monitoring data) レジスターと PMC (performance monitoring control) レジスターで構成され、 ハードウェアの統計を収集する。"
7649 #: build/C/man2/perfmonctl.2:57
7651 "B<perfmonctl>() applies the operation I<cmd> to the input arguments "
7652 "specified by I<arg>. The number of arguments is defined by I<narg>. The "
7653 "I<fd> argument specifies the perfmon context to operate on."
7654 msgstr "B<perfmonctl>() は、 操作 I<cmd> を I<arg> で指定された入力引き数で行う。 引き数の数は I<narg> で規定される。 I<fd> 引き数は操作対象の perfmon コンテキストを指定する。"
7657 #: build/C/man2/perfmonctl.2:61
7658 msgid "Supported values for I<cmd> are:"
7659 msgstr "I<cmd> に指定できる値は以下のとおりである。"
7662 #: build/C/man2/perfmonctl.2:61
7664 msgid "B<PFM_CREATE_CONTEXT>"
7665 msgstr "B<PFM_CREATE_CONTEXT>"
7668 #: build/C/man2/perfmonctl.2:65
7670 msgid "B<perfmonctl(int >I<fd>B<, PFM_CREATE_CONTEXT, pfarg_context_t *>I<ctxt>B<, 1);>\n"
7671 msgstr "B<perfmonctl(int >I<fd>B<, PFM_CREATE_CONTEXT, pfarg_context_t *>I<ctxt>B<, 1);>\n"
7674 #: build/C/man2/perfmonctl.2:67
7675 msgid "Set up a context."
7676 msgstr "コンテキストを用意する。"
7679 #: build/C/man2/perfmonctl.2:74
7681 "The I<fd> parameter is ignored. A new perfmon context is created as "
7682 "specified in I<ctxt> and its file descriptor is returned in I<ctxt-"
7684 msgstr "I<fd> 引き数は無視される。 新しい perfmon コンテキストを I<ctxt> で指定した内容で作成し、 そのファイルディスクリプターを I<ctxt-E<gt>ctx_fd> で返す。"
7687 #: build/C/man2/perfmonctl.2:86
7689 "The file descriptor can be used in subsequent calls to B<perfmonctl>() and "
7690 "can be used to read event notifications (type I<pfm_msg_t>) using "
7691 "B<read>(2). The file descriptor is pollable using B<select>(2), B<poll>(2), "
7693 msgstr "ファイルディスクリプターはそれ以降の B<perfmonctl>() の呼び出しで使用したり、 B<read>(2) を使ってイベント通知 (I<pfm_msg_t> 型) を読み出したりするのに使用できる。 このファイルディスクリプターは B<select>(2), B<poll>(2), B<epoll>(7) で状態監視 (ポーリング) することができる。"
7696 #: build/C/man2/perfmonctl.2:90
7698 "The context can be destroyed by calling B<close>(2) on the file descriptor."
7699 msgstr "コンテキストを破棄するには、 そのファイルディスクリプターに対して B<close>(2) を呼び出す。"
7702 #: build/C/man2/perfmonctl.2:90
7704 msgid "B<PFM_WRITE_PMCS>"
7705 msgstr "B<PFM_WRITE_PMCS>"
7708 #: build/C/man2/perfmonctl.2:95
7710 msgid "B<perfmonctl(int >I<fd>B<, PFM_WRITE_PMCS, pfarg_reg_t *>I<pmcs>B<, n);>\n"
7711 msgstr "B<perfmonctl(int >I<fd>B<, PFM_WRITE_PMCS, pfarg_reg_t *>I<pmcs>B<, n);>\n"
7714 #: build/C/man2/perfmonctl.2:97
7715 msgid "Set PMC registers."
7716 msgstr "PMC レジスターを設定する。"
7719 #: build/C/man2/perfmonctl.2:97
7721 msgid "B<PFM_WRITE_PMDS>"
7722 msgstr "B<PFM_WRITE_PMDS>"
7725 #: build/C/man2/perfmonctl.2:101
7727 msgid "B<perfmonctl(int >I<fd>B<, PFM_WRITE_PMDS, pfarg_reg_t *>I<pmds>B<, n);>\n"
7728 msgstr "B<perfmonctl(int >I<fd>B<, PFM_WRITE_PMDS, pfarg_reg_t *>I<pmds>B<, n);>\n"
7732 #: build/C/man2/perfmonctl.2:104
7733 msgid "Set PMD registers."
7734 msgstr "PMD レジスターを設定する。"
7737 #: build/C/man2/perfmonctl.2:104
7739 msgid "B<PFM_READ_PMDS>"
7740 msgstr "B<PFM_READ_PMDS>"
7743 #: build/C/man2/perfmonctl.2:109
7745 msgid "B<perfmonctl(int >I<fd>B<, PFM_READ_PMDS, pfarg_reg_t *>I<pmds>B<, n);>\n"
7746 msgstr "B<perfmonctl(int >I<fd>B<, PFM_READ_PMDS, pfarg_reg_t *>I<pmds>B<, n);>\n"
7749 #: build/C/man2/perfmonctl.2:111
7750 msgid "Read PMD registers."
7751 msgstr "PMD レジスターを読み出す。"
7754 #: build/C/man2/perfmonctl.2:111
7756 msgid "B<PFM_START>"
7757 msgstr "B<PFM_START>"
7759 #. .BI "perfmonctl(int " fd ", PFM_START, arg, 1);
7761 #: build/C/man2/perfmonctl.2:117
7763 msgid "B<perfmonctl(int >I<fd>B<, PFM_START, NULL, 0);>\n"
7764 msgstr "B<perfmonctl(int >I<fd>B<, PFM_START, NULL, 0);>\n"
7767 #: build/C/man2/perfmonctl.2:119
7768 msgid "Start monitoring."
7772 #: build/C/man2/perfmonctl.2:119
7775 msgstr "B<PFM_STOP>"
7778 #: build/C/man2/perfmonctl.2:124
7780 msgid "B<perfmonctl(int >I<fd>B<, PFM_STOP, NULL, 0);>\n"
7781 msgstr "B<perfmonctl(int >I<fd>B<, PFM_STOP, NULL, 0);>\n"
7784 #: build/C/man2/perfmonctl.2:126
7785 msgid "Stop monitoring."
7789 #: build/C/man2/perfmonctl.2:126
7791 msgid "B<PFM_LOAD_CONTEXT>"
7792 msgstr "B<PFM_LOAD_CONTEXT>"
7795 #: build/C/man2/perfmonctl.2:131
7797 msgid "B<perfmonctl(int >I<fd>B<, PFM_LOAD_CONTEXT, pfarg_load_t *>I<largs>B<, 1);>\n"
7798 msgstr "B<perfmonctl(int >I<fd>B<, PFM_LOAD_CONTEXT, pfarg_load_t *>I<largs>B<, 1);>\n"
7801 #: build/C/man2/perfmonctl.2:133
7802 msgid "Attach the context to a thread."
7803 msgstr "指定したコンテキストをスレッドに接続する。"
7806 #: build/C/man2/perfmonctl.2:133
7808 msgid "B<PFM_UNLOAD_CONTEXT>"
7809 msgstr "B<PFM_UNLOAD_CONTEXT>"
7812 #: build/C/man2/perfmonctl.2:138
7814 msgid "B<perfmonctl(int >I<fd>B<, PFM_UNLOAD_CONTEXT, NULL, 0);>\n"
7815 msgstr "B<perfmonctl(int >I<fd>B<, PFM_UNLOAD_CONTEXT, NULL, 0);>\n"
7818 #: build/C/man2/perfmonctl.2:140
7819 msgid "Detach the context from a thread."
7820 msgstr "指定したコンテキストをスレッドが切り離す。"
7823 #: build/C/man2/perfmonctl.2:140
7825 msgid "B<PFM_RESTART>"
7826 msgstr "B<PFM_RESTART>"
7829 #: build/C/man2/perfmonctl.2:145
7831 msgid "B<perfmonctl(int >I<fd>B<, PFM_RESTART, NULL, 0);>\n"
7832 msgstr "B<perfmonctl(int >I<fd>B<, PFM_RESTART, NULL, 0);>\n"
7835 #: build/C/man2/perfmonctl.2:147
7836 msgid "Restart monitoring after receiving an overflow notification."
7837 msgstr "オーバーフロー通知を受信した後、 監視を再開する。"
7840 #: build/C/man2/perfmonctl.2:147
7842 msgid "B<PFM_GET_FEATURES>"
7843 msgstr "B<PFM_GET_FEATURES>"
7846 #: build/C/man2/perfmonctl.2:152
7848 msgid "B<perfmonctl(int >I<fd>B<, PFM_GET_FEARURES, pfarg_features_t *>I<arg>B<, 1);>\n"
7849 msgstr "B<perfmonctl(int >I<fd>B<, PFM_GET_FEARURES, pfarg_features_t *>I<arg>B<, 1);>\n"
7852 #: build/C/man2/perfmonctl.2:153
7854 msgid "B<PFM_DEBUG>"
7855 msgstr "B<PFM_DEBUG>"
7858 #: build/C/man2/perfmonctl.2:158
7860 msgid "B<perfmonctl(int >I<fd>B<, PFM_DEBUG, >I<val>B<, 0);>\n"
7861 msgstr "B<perfmonctl(int >I<fd>B<, PFM_DEBUG, >I<val>B<, 0);>\n"
7864 #: build/C/man2/perfmonctl.2:162
7865 msgid "If I<val> is nonzero, enable debugging mode, otherwise disable."
7866 msgstr "I<val> が 0 以外の場合、デバッグモードを有効にする。 そうでない場合、 無効にする。"
7869 #: build/C/man2/perfmonctl.2:162
7871 msgid "B<PFM_GET_PMC_RESET_VAL>"
7872 msgstr "B<PFM_GET_PMC_RESET_VAL>"
7875 #: build/C/man2/perfmonctl.2:167
7877 msgid "B<perfmonctl(int >I<fd>B<, PFM_GET_PMC_RESET_VAL, pfarg_reg_t * >I<req>B<, n);>\n"
7878 msgstr "B<perfmonctl(int >I<fd>B<, PFM_GET_PMC_RESET_VAL, pfarg_reg_t * >I<req>B<, n);>\n"
7884 #. .B PFM_CREATE_EVTSETS
7885 #. create or modify event sets
7887 #. .BI "perfmonctl(int " fd ", PFM_CREATE_EVTSETS, pfarg_setdesc_t *desc , n);
7890 #. .B PFM_DELETE_EVTSETS
7891 #. delete event sets
7893 #. .BI "perfmonctl(int " fd ", PFM_DELETE_EVTSET, pfarg_setdesc_t *desc , n);
7896 #. .B PFM_GETINFO_EVTSETS
7897 #. get information about event sets
7899 #. .BI "perfmonctl(int " fd ", PFM_GETINFO_EVTSETS, pfarg_setinfo_t *info, n);
7902 #: build/C/man2/perfmonctl.2:190
7903 msgid "Reset PMC registers to default values."
7904 msgstr "PMC レジスターをデフォルト値にリセットする。"
7907 #: build/C/man2/perfmonctl.2:196
7909 "B<perfmonctl>() returns zero when the operation is successful. On error, "
7910 "-1 is returned and I<errno> is set to indicate the cause of the error."
7911 msgstr "B<perfmonctl>() は操作が成功すると 0 を返す。 エラーの場合、 -1 が返り、 I<errno> にエラーの原因を示す値が設定される。"
7914 #: build/C/man2/perfmonctl.2:199
7915 msgid "B<perfmonctl>() is available since Linux 2.4."
7916 msgstr "B<perfmonctl>() は Linux 2.4 以降で利用可能である。"
7919 #: build/C/man2/perfmonctl.2:202
7921 "B<perfmonctl>() is Linux-specific and is available only on the IA-64 "
7923 msgstr "B<perfmonctl>() は Linux 固有で、 IA-64 アーキテクチャーでのみ利用できる。"
7926 #: build/C/man2/perfmonctl.2:207
7928 msgstr "B<gprof>(1)"
7931 #: build/C/man2/perfmonctl.2:209
7932 msgid "The perfmon2 interface specification"
7933 msgstr "perfmon2 インターフェース仕様"
7936 #: build/C/man2/personality.2:32
7939 msgstr "PERSONALITY"
7942 #: build/C/man2/personality.2:32
7948 #: build/C/man2/personality.2:35
7949 msgid "personality - set the process execution domain"
7950 msgstr "personality - プロセスを実行するドメインを設定する"
7953 #: build/C/man2/personality.2:37
7954 msgid "B<#include E<lt>sys/personality.hE<gt>>"
7955 msgstr "B<#include E<lt>sys/personality.hE<gt>>"
7958 #: build/C/man2/personality.2:39
7959 msgid "B<int personality(unsigned long >I<persona>B<);>"
7960 msgstr "B<int personality(unsigned long >I<persona>B<);>"
7963 #: build/C/man2/personality.2:47
7965 "Linux supports different execution domains, or personalities, for each "
7966 "process. Among other things, execution domains tell Linux how to map signal "
7967 "numbers into signal actions. The execution domain system allows Linux to "
7968 "provide limited support for binaries compiled under other UNIX-like "
7969 "operating systems."
7971 "Linux は、プロセス毎の異なる実行ドメイン、すなわち パーソナリティ "
7972 "(personality) をサポートしている。 実行ドメインは Linux にシグナル番号にどの"
7973 "シグナルを割り付けるかを 教えたりする。また、実行ドメインシステムにより、 "
7974 "Linux は、 他の UNIX 風のオペレーティングシステムでコンパイルされたバイナリに"
7975 "対する限定的なサポートを提供している。"
7978 #: build/C/man2/personality.2:59
7980 "If I<persona> is not 0xffffffff, then B<personality>() sets the caller's "
7981 "execution domain to the value specified by I<persona>. Specifying "
7982 "I<persona> as 0xffffffff provides a way of retrieving the current persona "
7983 "without changing it."
7985 "I<persona> が 0xffffffff 以外の場合、 B<personality>() は呼び出し元の実行ドメ"
7986 "インを I<persona> で指定された値に設定する。 I<persona> に 0xffffffff を指定"
7987 "すると、変更を行わず、現在の persona 値を取得できる。"
7990 #: build/C/man2/personality.2:62
7992 "A list of the available execution domains can be found in I<E<lt>sys/"
7993 "personality.hE<gt>>."
7995 "利用可能な実行ドメインのリストは I<E<lt>sys/personality.hE<gt>> にある。"
7998 #: build/C/man2/personality.2:69
8000 "On success, the previous I<persona> is returned. On error, -1 is returned, "
8001 "and I<errno> is set appropriately."
8003 "成功した場合、以前の I<persona> が返される。エラーの場合は、-1 が返され、 "
8004 "I<errno> が適切に設定される。"
8007 #: build/C/man2/personality.2:73
8008 msgid "The kernel was unable to change the personality."
8009 msgstr "カーネルがパーソナリティを変更できなかった。"
8012 #: build/C/man2/personality.2:77
8014 "B<personality>() is Linux-specific and should not be used in programs "
8015 "intended to be portable."
8017 "B<personality>() は Linux 固有であり、移植を意図したプログラムで使用すべきで"
8021 #: build/C/man2/pivot_root.2:10
8027 #: build/C/man2/pivot_root.2:13
8028 msgid "pivot_root - change the root filesystem"
8029 msgstr "pivot_root - root ファイルシステムを変更する"
8032 #: build/C/man2/pivot_root.2:15
8034 "B<int pivot_root(const char *>I<new_root>B<, const char *>I<put_old>B<);>"
8036 "B<int pivot_root(const char *>I<new_root>B<, const char *>I<put_old>B<);>"
8040 #. capability is required.
8042 #: build/C/man2/pivot_root.2:27
8044 "B<pivot_root>() moves the root filesystem of the calling process to the "
8045 "directory I<put_old> and makes I<new_root> the new root filesystem of the "
8048 "B<pivot_root>() は呼び出し元のプロセスの root ファイルシステムを I<put_old> "
8049 "ディレクトリに移動し、 I<new_root> を呼び出し元のプロセスの新しい root ファイ"
8053 #: build/C/man2/pivot_root.2:34
8055 "The typical use of B<pivot_root>() is during system startup, when the "
8056 "system mounts a temporary root filesystem (e.g., an B<initrd>), then mounts "
8057 "the real root filesystem, and eventually turns the latter into the current "
8058 "root of all relevant processes or threads."
8060 "B<pivot_root>() の典型的な利用法は、システムの起動中にシステムが一時的な "
8061 "root ファイルシステム (例えば B<initrd>) をマウントし、これに続いて本当の "
8062 "root ファイルシステムをマウントし、 後者を必要な全てのプロセス・スレッドの カ"
8063 "レント root に変更するような場合である。"
8066 #: build/C/man2/pivot_root.2:46
8068 "B<pivot_root>() may or may not change the current root and the current "
8069 "working directory of any processes or threads which use the old root "
8070 "directory. The caller of B<pivot_root>() must ensure that processes with "
8071 "root or current working directory at the old root operate correctly in "
8072 "either case. An easy way to ensure this is to change their root and current "
8073 "working directory to I<new_root> before invoking B<pivot_root>()."
8075 "古い root ディレクトリを使っていた全てのプロセスやスレッドの カレント root と"
8076 "カレントワーキングディレクトリを、 B<pivot_root>() が変更するかどうかはわか"
8077 "らない。 B<pivot_root>() の呼びだしプロセスは、古い root やカレントワーキン"
8078 "グディレクトリを使っていた プロセスが、いずれの場合でも正しく動作することを保"
8079 "証しなければならない。 これを簡単に行うには、それらのプロセスの root と カレ"
8080 "ントワーキングディレクトリを B<pivot_root>() を呼び出す前に I<new_root> に変"
8084 #: build/C/man2/pivot_root.2:64
8086 "The paragraph above is intentionally vague because the implementation of "
8087 "B<pivot_root>() may change in the future. At the time of writing, "
8088 "B<pivot_root>() changes root and current working directory of each process "
8089 "or thread to I<new_root> if they point to the old root directory. This is "
8090 "necessary in order to prevent kernel threads from keeping the old root "
8091 "directory busy with their root and current working directory, even if they "
8092 "never access the filesystem in any way. In the future, there may be a "
8093 "mechanism for kernel threads to explicitly relinquish any access to the "
8094 "filesystem, such that this fairly intrusive mechanism can be removed from "
8097 "上記の段落は、将来 B<pivot_root>() が変更されるかも知れないことを鑑みて、わ"
8098 "ざと曖昧に書いてある。 本ページを記述している時点では、 B<pivot_root>() は古"
8099 "い root ディレクトリを用いている全てのプロセス・スレッドの root と カレント"
8100 "ワーキングディレクトリを I<new_root> に変更する。これはカーネルのスレッドが古"
8101 "い root ディレクトリを busy 状態にしないために必要である。これらのスレッドが "
8102 "古いディレクトリを root やカレントワーキングディレクトリとしていると、 ファイ"
8103 "ルシステムに一切アクセスしない場合でも 古い root が busy になってしまうからで"
8104 "ある。 将来は、カーネルスレッドがあらゆるファイルシステムへのアクセスを 明示"
8105 "的に放棄するメカニズムができ、このでしゃばりな機能は B<pivot_root>() から削"
8109 #: build/C/man2/pivot_root.2:72
8111 "Note that this also applies to the calling process: B<pivot_root>() may or "
8112 "may not affect its current working directory. It is therefore recommended "
8113 "to call B<chdir(\"/\")> immediately after B<pivot_root>()."
8115 "これは呼び出し元のプロセスについても当てはまることに注意。 B<pivot_root>() "
8116 "がカレントプロセスのカレントワーキングディレクトリに影響するかどうかは 分から"
8117 "ない。したがって B<pivot_root>() の直後に B<chdir(\"/\")> を呼び出すとよい。"
8120 #: build/C/man2/pivot_root.2:74
8121 msgid "The following restrictions apply to I<new_root> and I<put_old>:"
8122 msgstr "I<new_root> および I<put_old> には以下の制限がある:"
8125 #: build/C/man2/pivot_root.2:74 build/C/man2/pivot_root.2:76
8126 #: build/C/man2/pivot_root.2:79 build/C/man2/pivot_root.2:83
8132 #: build/C/man2/pivot_root.2:76
8133 msgid "They must be directories."
8134 msgstr "ディレクトリでなければならない。"
8137 #: build/C/man2/pivot_root.2:79
8139 "I<new_root> and I<put_old> must not be on the same filesystem as the current "
8142 "I<new_root> と I<put_old> は現在の root と同じファイルシステムにあってはなら"
8146 #: build/C/man2/pivot_root.2:83
8148 "I<put_old> must be underneath I<new_root>, that is, adding a nonzero number "
8149 "of I</..> to the string pointed to by I<put_old> must yield the same "
8150 "directory as I<new_root>."
8152 "I<put_old> は I<new_root> 以下になければならない。すなわち I<put_old> を差す"
8153 "文字列に 1 個以上の I<../> を付けることによって I<new_root> と同じディレクト"
8157 #: build/C/man2/pivot_root.2:85
8158 msgid "No other filesystem may be mounted on I<put_old>."
8159 msgstr "他のファイルシステムが I<put_old> にマウントされていてはならない。"
8162 #: build/C/man2/pivot_root.2:89
8163 msgid "See also B<pivot_root>(8) for additional usage examples."
8164 msgstr "利用例については B<pivot_root>(8) を参照のこと。"
8167 #: build/C/man2/pivot_root.2:96
8169 "If the current root is not a mount point (e.g., after B<chroot>(2) or "
8170 "B<pivot_root>(), see also below), not the old root directory, but the mount "
8171 "point of that filesystem is mounted on I<put_old>."
8173 "現在の root がマウントポイントではない (B<chroot>(2) や B<pivot_root>() の"
8174 "後など。以下も参照) 場合、 古い root ディレクトリではなく、 そのファイルシス"
8175 "テムのマウントポイントが I<put_old> にマウントされる。"
8178 #: build/C/man2/pivot_root.2:101
8180 "I<new_root> does not have to be a mount point. In this case, I</proc/"
8181 "mounts> will show the mount point of the filesystem containing I<new_root> "
8184 "I<new_root> はマウントポイントでなくてもよい。 この場合 I</proc/mounts> は、 "
8185 "I<new_root> を root (I</>) とするファイルシステムのマウントポイントを表示す"
8189 #: build/C/man2/pivot_root.2:110
8191 "B<pivot_root>() may return (in I<errno>) any of the errors returned by "
8192 "B<stat>(2). Additionally, it may return:"
8194 "B<pivot_root>() は B<stat>(2) の返すあらゆるエラーを (I<errno> に) 返す可能"
8195 "性がある。さらに以下を返すことがある:"
8198 #: build/C/man2/pivot_root.2:114
8200 "I<new_root> or I<put_old> are on the current root filesystem, or a "
8201 "filesystem is already mounted on I<put_old>."
8203 "I<new_root> または I<put_old> が、現在の root ファイルシステム上にあるか、既"
8204 "に I<put_old> になんらかのファイルシステムがマウントされている。"
8207 #: build/C/man2/pivot_root.2:117
8208 msgid "I<put_old> is not underneath I<new_root>."
8209 msgstr "I<put_old> が I<new_root> の下層にない。"
8212 #: build/C/man2/pivot_root.2:117
8218 #: build/C/man2/pivot_root.2:120
8219 msgid "I<new_root> or I<put_old> is not a directory."
8220 msgstr "I<new_root> または I<put_old> がディレクトリでない。"
8223 #: build/C/man2/pivot_root.2:125
8224 msgid "The calling process does not have the B<CAP_SYS_ADMIN> capability."
8225 msgstr "呼び出し元のプロセスが B<CAP_SYS_ADMIN> ケーパビリティを持っていない。"
8228 #: build/C/man2/pivot_root.2:128
8229 msgid "B<pivot_root>() was introduced in Linux 2.3.41."
8230 msgstr "B<pivot_root>() は Linux 2.3.41 で導入された。"
8233 #: build/C/man2/pivot_root.2:131
8234 msgid "B<pivot_root>() is Linux-specific and hence is not portable."
8235 msgstr "B<pivot_root>() は Linux に固有のものなので、移植性はない。"
8238 #: build/C/man2/pivot_root.2:138
8240 "B<pivot_root>() should not have to change root and current working "
8241 "directory of all other processes in the system."
8243 "B<pivot_root>() はシステムの他のプロセス全ての root と カレントワーキング"
8244 "ディレクトリとを変更しなくてもよいはずである。"
8247 #: build/C/man2/pivot_root.2:143
8249 "Some of the more obscure uses of B<pivot_root>() may quickly lead to "
8252 "B<pivot_root>() の使い方がもうちょっと曖昧になると、 あっという間にわけのわ"
8256 #: build/C/man2/pivot_root.2:149
8257 msgid "B<chdir>(2), B<chroot>(2), B<stat>(2), B<initrd>(4), B<pivot_root>(8)"
8258 msgstr "B<chdir>(2), B<chroot>(2), B<stat>(2), B<initrd>(4), B<pivot_root>(8)"
8261 #: build/C/man2/process_vm_readv.2:29
8263 msgid "PROCESS_VM_READV"
8264 msgstr "PROCESS_VM_READV"
8267 #: build/C/man2/process_vm_readv.2:32
8269 "process_vm_readv, process_vm_writev - transfer data between process address "
8272 "process_vm_readv, process_vm_writev - プロセスのアドレス空間間でデータを転送"
8276 #: build/C/man2/process_vm_readv.2:35
8278 msgid "B<#include E<lt>sys/uio.hE<gt>>\n"
8279 msgstr "B<#include E<lt>sys/uio.hE<gt>>\n"
8282 #: build/C/man2/process_vm_readv.2:42
8285 "B<ssize_t process_vm_readv(pid_t >I<pid>B<,>\n"
8286 "B< const struct iovec *>I<local_iov>B<,>\n"
8287 "B< unsigned long >I<liovcnt>B<,>\n"
8288 "B< const struct iovec *>I<remote_iov>B<,>\n"
8289 "B< unsigned long >I<riovcnt>B<,>\n"
8290 "B< unsigned long >I<flags>B<);>\n"
8292 "B<ssize_t process_vm_readv(pid_t >I<pid>B<,>\n"
8293 "B< const struct iovec *>I<local_iov>B<,>\n"
8294 "B< unsigned long >I<liovcnt>B<,>\n"
8295 "B< const struct iovec *>I<remote_iov>B<,>\n"
8296 "B< unsigned long >I<riovcnt>B<,>\n"
8297 "B< unsigned long >I<flags>B<);>\n"
8300 #: build/C/man2/process_vm_readv.2:49
8303 "B<ssize_t process_vm_writev(pid_t >I<pid>B<,>\n"
8304 "B< const struct iovec *>I<local_iov>B<,>\n"
8305 "B< unsigned long >I<liovcnt>B<,>\n"
8306 "B< const struct iovec *>I<remote_iov>B<,>\n"
8307 "B< unsigned long >I<riovcnt>B<,>\n"
8308 "B< unsigned long >I<flags>B<);>\n"
8310 "B<ssize_t process_vm_writev(pid_t >I<pid>B<,>\n"
8311 "B< const struct iovec *>I<local_iov>B<,>\n"
8312 "B< unsigned long >I<liovcnt>B<,>\n"
8313 "B< const struct iovec *>I<remote_iov>B<,>\n"
8314 "B< unsigned long >I<riovcnt>B<,>\n"
8315 "B< unsigned long >I<flags>B<);>\n"
8318 #: build/C/man2/process_vm_readv.2:54
8320 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
8321 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7) 参照):"
8324 #: build/C/man2/process_vm_readv.2:58
8325 msgid "B<process_vm_readv>(), B<process_vm_writev>():"
8326 msgstr "B<process_vm_readv>(), B<process_vm_writev>():"
8329 #: build/C/man2/process_vm_readv.2:62
8330 msgid "B<_GNU_SOURCE>"
8331 msgstr "B<_GNU_SOURCE>"
8334 #: build/C/man2/process_vm_readv.2:73
8336 "These system calls transfer data between the address space of the calling "
8337 "process (\"the local process\") and the process identified by I<pid> (\"the "
8338 "remote process\"). The data moves directly between the address spaces of "
8339 "the two processes, without passing through kernel space."
8340 msgstr "これらのシステムコールは、 呼び出し元プロセス (「ローカルプロセス」) と I<pid> で指定されるプロセス (「リモートプロセス」) のアドレス空間間でデータを転送する。 データの移動は、 カーネル空間を経由することなく、 2 つのプロセスのアドレス空間間で直接行われる。"
8343 #: build/C/man2/process_vm_readv.2:98
8345 "The B<process_vm_readv>() system call transfers data from the remote "
8346 "process to the local process. The data to be transferred is identified by "
8347 "I<remote_iov> and I<riovcnt>: I<remote_iov> is a pointer to an array "
8348 "describing address ranges in the process I<pid>, and I<riovcnt> specifies "
8349 "the number of elements in I<remote_iov>. The data is transferred to the "
8350 "locations specified by I<local_iov> and I<liovcnt>: I<local_iov> is a "
8351 "pointer to an array describing address ranges in the calling process, and "
8352 "I<liovcnt> specifies the number of elements in I<local_iov>."
8353 msgstr "B<process_vm_readv>() システムコールは、 リモートプロセスからローカルプロセスへデータを転送する。 転送対象のデータは I<remote_iov> と I<riovcnt> で指定される。 I<remote_iov> はプロセス I<pid> におけるアドレス範囲を指定する配列へのポインターで、 I<riovcnt> は I<remote_iov> の要素数を指定する。 データは I<local_iov> と I<liovcnt> で指定された場所に転送される。 I<local_iov> は呼び出し元プロセスにおけるアドレス範囲を指定する配列で、 I<liovcnt> は I<local_iov> の要素数を指定する。"
8356 #: build/C/man2/process_vm_readv.2:112
8358 "The B<process_vm_writev>() system call is the converse of "
8359 "B<process_vm_readv>()\\(emit transfers data from the local process to the "
8360 "remote process. Other than the direction of the transfer, the arguments "
8361 "I<liovcnt>, I<local_iov>, I<riovcnt>, and I<remote_iov> have the same "
8362 "meaning as for B<process_vm_readv>()."
8363 msgstr "B<process_vm_writev>() システムコールは B<process_vm_readv>() の逆で、 ローカルプロセスからリモートプロセスにデータを転送する。 転送の方向が違う以外は、 引き数 I<liovcnt>, I<local_iov>, I<riovcnt>, I<remote_iov> は B<process_vm_readv>() と同じ意味を持つ。"
8366 #: build/C/man2/process_vm_readv.2:122
8368 "The I<local_iov> and I<remote_iov> arguments point to an array of I<iovec> "
8369 "structures, defined in I<E<lt>sys/uio.hE<gt>> as:"
8371 "引き数 I<local_iov> と I<remote_iov> は I<iovec> 構造体の配列へのポイン\n"
8372 "タである。 I<iovec> 構造体は I<E<lt>sys/uio.hE<gt>> で以下のように定義\n"
8376 #: build/C/man2/process_vm_readv.2:129
8380 " void *iov_base; /* Starting address */\n"
8381 " size_t iov_len; /* Number of bytes to transfer */\n"
8385 " void *iov_base; /* Starting address */\n"
8386 " size_t iov_len; /* Number of bytes to transfer */\n"
8390 #: build/C/man2/process_vm_readv.2:145
8392 "Buffers are processed in array order. This means that "
8393 "B<process_vm_readv>() completely fills I<local_iov[0]> before proceeding to "
8394 "I<local_iov[1]>, and so on. Likewise, I<remote_iov[0]> is completely read "
8395 "before proceeding to I<remote_iov[1]>, and so on."
8396 msgstr "バッファーは配列の順序で処理される。 つまり、 B<process_vm_readv>() は I<local_iov>[0] が一杯になるまでデータを詰めてから、 I<local_iov>[1] に進むことを意味する。 同様に、 I<remote_iov>[0] を全部読み出してから I<remote_iov>[1] に進み、 以降も同様である。"
8399 #: build/C/man2/process_vm_readv.2:156
8401 "Similarly, B<process_vm_writev>() writes out the entire contents of "
8402 "I<local_iov[0]> before proceeding to I<local_iov[1]>, and it completely "
8403 "fills I<remote_iov[0]> before proceeding to I<remote_iov[1]>."
8404 msgstr "同様に、 B<process_vm_writev>() は I<local_iov[0]> の内容を全部読み出してから I<local_iov[1]> に進み、 書き込み先でも I<remote_iov[0]> が一杯になってから I<remote_iov[1]> に進む。"
8407 #: build/C/man2/process_vm_readv.2:164
8409 "The lengths of I<remote_iov[i].iov_len> and I<local_iov[i].iov_len> do not "
8410 "have to be the same. Thus, it is possible to split a single local buffer "
8411 "into multiple remote buffers, or vice versa."
8412 msgstr "長さ I<remote_iov[i].iov_len> と I<local_iov[i].iov_len> は同じである必要はない。 したがって、 ローカル側で 1 つのバッファーのデータがリモート側で複数のバッファーに分割されることがあるし、 その逆も起こりえる。"
8415 #: build/C/man2/process_vm_readv.2:168
8416 msgid "The I<flags> argument is currently unused and must be set to 0."
8417 msgstr "I<flags> 引き数は現在使用されておらず、 0 を設定しなければならない。"
8419 #. In time, glibc might provide a wrapper that works around this limit,
8420 #. as is done for readv()/writev()
8422 #: build/C/man2/process_vm_readv.2:181
8424 "The values specified in the I<liovcnt> and I<riovcnt> arguments must be less "
8425 "than or equal to B<IOV_MAX> (defined in I<E<lt>limits.hE<gt>> or accessible "
8426 "via the call I<sysconf(_SC_IOV_MAX)>)."
8427 msgstr "I<liovcnt> と I<riovcnt> で指定される値は B<IOV_MAX> 以下でなければならない (B<IOV_MAX> は I<E<lt>limits.hE<gt>> で定義されており、 I<sysconf(_SC_IOV_MAX)> の呼び出しでも入手できる)。"
8430 #: build/C/man2/process_vm_readv.2:191
8432 "The count arguments and I<local_iov> are checked before doing any "
8433 "transfers. If the counts are too big, or I<local_iov> is invalid, or the "
8434 "addresses refer to regions that are inaccessible to the local process, none "
8435 "of the vectors will be processed and an error will be returned immediately."
8436 msgstr "要素数引き数と I<local_iov> のチェックは、 すべてのデータ転送に先立って行われる。 要素数が大きすぎる場合や I<local_iov> が無効な場合、 アドレスがローカルプロセスがアクセスできない領域を参照している場合は、 配列のどの要素も処理されず、 すぐにエラーが返される。"
8439 #: build/C/man2/process_vm_readv.2:211
8441 "Note, however, that these system calls do not check the memory regions in "
8442 "the remote process until just before doing the read/write. Consequently, a "
8443 "partial read/write (see RETURN VALUE) may result if one of the "
8444 "I<remote_iov> elements points to an invalid memory region in the remote "
8445 "process. No further reads/writes will be attempted beyond that point. Keep "
8446 "this in mind when attempting to read data of unknown length (such as C "
8447 "strings that are null-terminated) from a remote process, by avoiding "
8448 "spanning memory pages (typically 4KiB) in a single remote I<iovec> element. "
8449 "(Instead, split the remote read into two I<remote_iov> elements and have "
8450 "them merge back into a single write I<local_iov> entry. The first read "
8451 "entry goes up to the page boundary, while the second starts on the next page "
8454 "ただし、 これらのシステムコールは、 実際に読み出し/書き込みを行う直前までリモートプロセスのメモリー領域のチェックを行わない点に注意すること。 結果として、 I<remote_iov> の要素の一つがリモートプロセスで無効なメモリー領域を参照している場合、 部分的な読み出し/書き込み (「返り値」の節を参照) が行われることになる。 これ以降は読み出し/書き込みは行われない。 リモートプロセスから長さ不明のデータ (例えば NULL 終端された C 文字列) を読み出す際で、 リモート側の一つの I<iovec> 要素が複数のメモリーページ (通常は 4KiB) にまたがらないようにしている場合は、 この点に注意が必要である。\n"
8455 "(リモートからの読み出しを 2 つの I<remote_iov> 要素に分割し、 1 つの I<local_iov> 要素への書き込みにマージすればよい。 最初の読み出しでページ境界まで読み出し、 次の読み出しを次のページ境界から行う。)"
8458 #: build/C/man2/process_vm_readv.2:225
8460 "In order to read from or write to another process, either the caller must "
8461 "have the capability B<CAP_SYS_PTRACE>, or the real user ID, effective user "
8462 "ID, and saved set-user-ID of the remote process must match the real user ID "
8463 "of the caller I<and> the real group ID, effective group ID, and saved set-"
8464 "group-ID of the remote process must match the real group ID of the caller. "
8465 "(The permission required is exactly the same as that required to perform a "
8466 "B<ptrace>(2) B<PTRACE_ATTACH> on the remote process.)"
8467 msgstr "他のプロセスからの読み出しや他のプロセスへの書き込みを行うには、 呼び出し元がケーパビリティ B<CAP_SYS_PTRACE> を持っていなければならない、もしくは、 リモートプロセスの実ユーザー ID、 実効ユーザー ID、 保存 set-user-ID が呼び出し元の実ユーザー ID と一致し、 かつリモートプロセスの実グループ ID、 実効グループ ID、 保存 set-group-ID が呼び出し元の実グループ ID と一致していなければならない。 (ここで必要なアクセス許可は、 リモートプロセスに対して B<ptrace>(2) の B<PTRACE_ATTACH> を実行するのに必要な許可と全く同じである。)"
8470 #: build/C/man2/process_vm_readv.2:241
8472 "On success, B<process_vm_readv>() returns the number of bytes read and "
8473 "B<process_vm_writev>() returns the number of bytes written. This return "
8474 "value may be less than the total number of requested bytes, if a partial "
8475 "read/write occurred. (Partial transfers apply at the granularity of "
8476 "I<iovec> elements. These system calls won't perform a partial transfer that "
8477 "splits a single I<iovec> element.) The caller should check the return value "
8478 "to determine whether a partial read/write occurred."
8479 msgstr "成功すると、 B<process_vm_readv>() は読み出したバイト数を返し、 B<process_vm_writev>() は書き込んだバイト数を返す。 この返り値は、 読み出し/書き込みが部分的に行われた場合には、 要求された総バイト数よりも小さくなることがある (部分的な転送は I<iovec> 要素単位に行われ、 これらのシステムコールが一つの I<iovec> 要素の一部だけが転送されることはない)。 呼び出し元は返り値を検査して、 部分的な読み出し/書き込みが起こったかどうかを判定できる。"
8482 #: build/C/man2/process_vm_readv.2:245
8483 msgid "On error, -1 is returned and I<errno> is set appropriately."
8484 msgstr "エラーの場合は -1 が返され、 I<errno> が適切に設定される。"
8487 #: build/C/man2/process_vm_readv.2:257
8489 "The sum of the I<iov_len> values of either I<local_iov> or I<remote_iov> "
8490 "overflows a I<ssize_t> value."
8491 msgstr "I<local_iov> か I<remote_iov> のいずれかの I<iov_len> の合計値が I<ssize_t> で表現できる値を超えている。"
8494 #: build/C/man2/process_vm_readv.2:261
8495 msgid "I<flags> is not 0."
8496 msgstr "I<flags> が 0 でない。"
8499 #: build/C/man2/process_vm_readv.2:267
8500 msgid "I<liovcnt> or I<riovcnt> is too large."
8501 msgstr "I<liovcnt> か I<riovcnt> が大きすぎる。"
8504 #: build/C/man2/process_vm_readv.2:272
8506 "The memory described by I<local_iov> is outside the caller's accessible "
8508 msgstr "I<local_iov> で指定されたメモリーが呼び出し元がアクセス可能なアドレス空間の外にある。"
8511 #: build/C/man2/process_vm_readv.2:278
8513 "The memory described by I<remote_iov> is outside the accessible address "
8514 "space of the process I<pid>."
8515 msgstr "I<remote_iov> で指定されたメモリーがプロセス I<pid> がアクセス可能なアドレス空間の外にある。"
8518 #: build/C/man2/process_vm_readv.2:283
8520 "Could not allocate memory for internal copies of the I<iovec> structures."
8521 msgstr "I<iovec> 構造体の内部コピーのためのメモリーを割り当てできなかった。"
8524 #: build/C/man2/process_vm_readv.2:287
8526 "The caller does not have permission to access the address space of the "
8529 "呼び出し側がプロセス I<pid> のアドレス空間に対するアクセス許可を\n"
8533 #: build/C/man2/process_vm_readv.2:292
8534 msgid "No process with ID I<pid> exists."
8535 msgstr "ID が I<pid> のプロセスが存在しない。"
8538 #: build/C/man2/process_vm_readv.2:295
8540 "These system calls were added in Linux 3.2. Support is provided in glibc "
8541 "since version 2.15."
8543 "これらのシステムコールは Linux 3.2 で追加された。ライブラリによる\n"
8544 "サポートは glibc バージョン 2.15 以降で提供されている。"
8547 #: build/C/man2/process_vm_readv.2:297
8548 msgid "These system calls are nonstandard Linux extensions."
8549 msgstr "これらのシステムコールは非標準で Linux による拡張である。"
8552 #: build/C/man2/process_vm_readv.2:303
8554 "The data transfers performed by B<process_vm_readv>() and "
8555 "B<process_vm_writev>() are not guaranteed to be atomic in any way."
8556 msgstr "B<process_vm_readv>() と B<process_vm_writev>() により実行されるデータ転送をどのように行ったとしても、 これらがアトミックに行われる保証はない。"
8558 #. Original user is MPI, http://www.mcs.anl.gov/research/projects/mpi/
8559 #. See also some benchmarks at http://lwn.net/Articles/405284/
8560 #. and http://marc.info/?l=linux-mm&m=130105930902915&w=2
8562 #: build/C/man2/process_vm_readv.2:311
8564 "These system calls were designed to permit fast message passing by allowing "
8565 "messages to be exchanged with a single copy operation (rather than the "
8566 "double copy that would be required when using, for example, shared memory or "
8569 "これらのシステムコールは、 (共有メモリーやパイプなどを使った場合に必要となる 2 回のコピーではなく)\n"
8570 "1 回のコピー処理でメッセージの交換を許すことで、 高速なメッセージ送信をできるようにするために設計された。"
8573 #: build/C/man2/process_vm_readv.2:319
8575 "The following code sample demonstrates the use of B<process_vm_readv>(). It "
8576 "reads 20 bytes at the address 0x10000 from the process with PID 10 and "
8577 "writes the first 10 bytes into I<buf1> and the second 10 bytes into I<buf2>."
8578 msgstr "以下のサンプルコードは B<process_vm_readv>() の使用例を示すものである。 このコードは PID 10 のプロセスのアドレス 0x10000 から 20 バイトを読み取り、 最初の 10 バイトを I<buf1> に、 残りの 10 バイトを I<buf2> に書き込む。"
8581 #: build/C/man2/process_vm_readv.2:322
8583 msgid "#include E<lt>sys/uio.hE<gt>\n"
8584 msgstr "#include E<lt>sys/uio.hE<gt>\n"
8587 #: build/C/man2/process_vm_readv.2:332
8593 " struct iovec local[2];\n"
8594 " struct iovec remote[1];\n"
8598 " pid_t pid = 10; /* PID of remote process */\n"
8603 " struct iovec local[2];\n"
8604 " struct iovec remote[1];\n"
8608 " pid_t pid = 10; /* PID of remote process */\n"
8611 #: build/C/man2/process_vm_readv.2:339
8614 " local[0].iov_base = buf1;\n"
8615 " local[0].iov_len = 10;\n"
8616 " local[1].iov_base = buf2;\n"
8617 " local[1].iov_len = 10;\n"
8618 " remote[0].iov_base = (void *) 0x10000;\n"
8619 " remote[0].iov_len = 20;\n"
8621 " local[0].iov_base = buf1;\n"
8622 " local[0].iov_len = 10;\n"
8623 " local[1].iov_base = buf2;\n"
8624 " local[1].iov_len = 10;\n"
8625 " remote[0].iov_base = (void *) 0x10000;\n"
8626 " remote[0].iov_len = 20;\n"
8629 #: build/C/man2/process_vm_readv.2:346
8632 " nread = process_vm_readv(pid, local, 2, remote, 1, 0);\n"
8633 " if (nread != 20)\n"
8639 " nread = process_vm_readv(pid, local, 2, remote, 1, 0);\n"
8640 " if (nread != 20)\n"
8647 #: build/C/man2/process_vm_readv.2:350
8648 msgid "B<readv>(2), B<writev>(2)"
8649 msgstr "B<readv>(2), B<writev>(2)"
8652 #: build/C/man2/ptrace.2:46
8658 #: build/C/man2/ptrace.2:49
8659 msgid "ptrace - process trace"
8660 msgstr "ptrace - プロセスのトレース"
8663 #: build/C/man2/ptrace.2:52
8665 msgid "B<#include E<lt>sys/ptrace.hE<gt>>\n"
8666 msgstr "B<#include E<lt>sys/ptrace.hE<gt>>\n"
8669 #: build/C/man2/ptrace.2:55
8672 "B<long ptrace(enum __ptrace_request >I<request>B<, pid_t >I<pid>B<, >\n"
8673 "B< void *>I<addr>B<, void *>I<data>B<);>\n"
8675 "B<long ptrace(enum __ptrace_request >I<request>B<, pid_t >I<pid>B<, >\n"
8676 "B< void *>I<addr>B<, void *>I<data>B<);>\n"
8679 #: build/C/man2/ptrace.2:64
8681 "The B<ptrace>() system call provides a means by which one process (the "
8682 "\"tracer\") may observe and control the execution of another process (the "
8683 "\"tracee\"), and examine and change the tracee's memory and registers. It "
8684 "is primarily used to implement breakpoint debugging and system call tracing."
8685 msgstr "B<ptrace>() システムコールは、 あるプロセス (\"tracer\") が、 別のプロセス (\"tracee\") の実行の監視/制御を行ったり、 tracee のメモリーやレジスターの調査/変更を行ったりする手段を提供する。 B<ptrace>() は、 主にブレークポイントによるデバッグやシステムコールのトレースを実装するのに用いられる。"
8688 #: build/C/man2/ptrace.2:75
8690 "A tracee first needs to be attached to the tracer. Attachment and "
8691 "subsequent commands are per thread: in a multithreaded process, every thread "
8692 "can be individually attached to a (potentially different) tracer, or left "
8693 "not attached and thus not debugged. Therefore, \"tracee\" always means "
8694 "\"(one) thread\", never \"a (possibly multithreaded) process\". Ptrace "
8695 "commands are always sent to a specific tracee using a call of the form"
8699 #: build/C/man2/ptrace.2:77
8701 msgid " ptrace(PTRACE_foo, pid, ...)\n"
8702 msgstr " ptrace(PTRACE_foo, pid, ...)\n"
8705 #: build/C/man2/ptrace.2:81
8706 msgid "where I<pid> is the thread ID of the corresponding Linux thread."
8707 msgstr "ここで I<pid> は対応する Linux スレッドのスレッド ID である。"
8710 #: build/C/man2/ptrace.2:87
8712 "(Note that in this page, a \"multithreaded process\" means a thread group "
8713 "consisting of threads created using the B<clone>(2) B<CLONE_THREAD> flag.)"
8717 #: build/C/man2/ptrace.2:98
8719 "A process can initiate a trace by calling B<fork>(2) and having the "
8720 "resulting child do a B<PTRACE_TRACEME>, followed (typically) by an "
8721 "B<execve>(2). Alternatively, one process may commence tracing another "
8722 "process using B<PTRACE_ATTACH> or B<PTRACE_SEIZE>."
8723 msgstr "プロセスがトレースを開始するには、 まず親プロセスで B<fork>(2) を呼び出す。 生成された子プロセスで B<PTRACE_TRACEME> を行い、 続いて (典型的には) B<execve>(2) を行なう。 別の方法としては、 プロセスが別のプロセスに対して B<PTRACE_ATTACH> か B<PTRACE_SEIZE> を使用し、 トレースを開始する。"
8726 #: build/C/man2/ptrace.2:115
8728 "While being traced, the tracee will stop each time a signal is delivered, "
8729 "even if the signal is being ignored. (An exception is B<SIGKILL>, which has "
8730 "its usual effect.) The tracer will be notified at its next call to "
8731 "B<waitpid>(2) (or one of the related \"wait\" system calls); that call will "
8732 "return a I<status> value containing information that indicates the cause of "
8733 "the stop in the tracee. While the tracee is stopped, the tracer can use "
8734 "various ptrace requests to inspect and modify the tracee. The tracer then "
8735 "causes the tracee to continue, optionally ignoring the delivered signal (or "
8736 "even delivering a different signal instead)."
8737 msgstr "トレースの実行中、tracee はシグナルが配送されるたびに、 たとえそのシグナルが無視されている場合であっても停止する (B<SIGKILL> は例外で、通常どおりの効果を持つ)。 tracer には次の B<waitpid>(2) (や関連の \"wait\" システムコール) の呼び出しで通知され、 その呼び出しでは tracee で停止の原因を示す情報が入った I<status> 値が返される。 tracee が停止している間に、 tracer は様々な ptrace の要求を使って tracee を調査したり修正したりすることができる。 それから tracer は tracee の実行を再開させるが、 配送されたシグナルを無視することもできる (あるいは別のシグナルを配送することもできる) 。"
8740 #: build/C/man2/ptrace.2:125
8742 "If the B<PTRACE_O_TRACEEXEC> option is not in effect, all successful calls "
8743 "to B<execve>(2) by the traced process will cause it to be sent a B<SIGTRAP> "
8744 "signal, giving the parent a chance to gain control before the new program "
8749 #: build/C/man2/ptrace.2:129
8751 "When the tracer is finished tracing, it can cause the tracee to continue "
8752 "executing in a normal, untraced mode via B<PTRACE_DETACH>."
8753 msgstr "tracer がトレースを終了する際には、 B<PTRACE_DETACH> を用いて tracee を通常のトレースなしのモードにして、 実行を継続させることができる。"
8756 #: build/C/man2/ptrace.2:133
8757 msgid "The value of I<request> determines the action to be performed:"
8758 msgstr "I<request> の値がこのシステムコールの動作を決定する:"
8761 #: build/C/man2/ptrace.2:133
8763 msgid "B<PTRACE_TRACEME>"
8764 msgstr "B<PTRACE_TRACEME>"
8767 #: build/C/man2/ptrace.2:143
8769 "Indicate that this process is to be traced by its parent. A process "
8770 "probably shouldn't make this request if its parent isn't expecting to trace "
8771 "it. (I<pid>, I<addr>, and I<data> are ignored.)"
8773 "このプロセスが親プロセスによってトレースされることを表す。親プロセスが自プロ"
8774 "セスをトレースするつもりがない場合には、 おそらくこのプロセスは本要求を行うべ"
8775 "きではないだろう。 (I<pid>, I<addr>, I<data> は無視される。)"
8778 #: build/C/man2/ptrace.2:158
8780 "The B<PTRACE_TRACEME> request is used only by the tracee; the remaining "
8781 "requests are used only by the tracer. In the following requests, I<pid> "
8782 "specifies the thread ID of the tracee to be acted on. For requests other "
8783 "than B<PTRACE_ATTACH>, B<PTRACE_SEIZE>, B<PTRACE_INTERRUPT>, and "
8784 "B<PTRACE_KILL>, the tracee must be stopped."
8785 msgstr "B<PTRACE_TRACEME> 要求は tracee だけが使用するものである。 残りの要求は tracer だけが使用する。 以下の要求では、I<pid> は操作の対象となる tracee のスレッド ID を指定する。 B<PTRACE_ATTACH>, B<PTRACE_SEIZE>, B<PTRACE_INTERRUPT>, B<PTRACE_KILL> 以外の要求では、 tracee は停止していなければならない。"
8788 #: build/C/man2/ptrace.2:158
8790 msgid "B<PTRACE_PEEKTEXT>, B<PTRACE_PEEKDATA>"
8791 msgstr "B<PTRACE_PEEKTEXT>, B<PTRACE_PEEKDATA>"
8794 #: build/C/man2/ptrace.2:169
8796 "Read a word at the address I<addr> in the tracee's memory, returning the "
8797 "word as the result of the B<ptrace>() call. Linux does not have separate "
8798 "text and data address spaces, so these two requests are currently "
8799 "equivalent. (I<data> is ignored; but see NOTES.)"
8800 msgstr "tracee のメモリーの I<addr> のアドレスから 1 ワードを読み出す。 読み出したワードは B<ptrace>() の返り値として返される。 Linux ではテキスト (text) とデータ (data) で 同じアドレス空間を使用するため、これらの 2 つの要求は現在のところ 同じものである。 (I<data> は無視される。 ただし「注意」を参照。)"
8803 #: build/C/man2/ptrace.2:169
8805 msgid "B<PTRACE_PEEKUSER>"
8806 msgstr "B<PTRACE_PEEKUSER>"
8808 #. PTRACE_PEEKUSR in kernel source, but glibc uses PTRACE_PEEKUSER,
8809 #. and that is the name that seems common on other systems.
8811 #: build/C/man2/ptrace.2:187
8813 "Read a word at offset I<addr> in the tracee's USER area, which holds the "
8814 "registers and other information about the process (see I<E<lt>sys/user."
8815 "hE<gt>>). The word is returned as the result of the B<ptrace>() call. "
8816 "Typically, the offset must be word-aligned, though this might vary by "
8817 "architecture. See NOTES. (I<data> is ignored; but see NOTES.)"
8818 msgstr "tracee の USER 領域のオフセット I<addr> の位置から 1 ワードを読み込む。USER 領域にはそのプロセスの レジスター (registers) などの情報が保持されている (I<E<lt>sys/user.hE<gt>> を参照)。読み込んだワードは B<ptrace>() コールの結果として返される。 たいていはオフセットはワード境界になければならないが、 アーキテクチャーによってはその必要はない。 「注意」の節を参照。 (I<data> は無視される。 ただし「注意」を参照。)"
8821 #: build/C/man2/ptrace.2:187
8823 msgid "B<PTRACE_POKETEXT>, B<PTRACE_POKEDATA>"
8824 msgstr "B<PTRACE_POKETEXT>, B<PTRACE_POKEDATA>"
8827 #: build/C/man2/ptrace.2:199
8829 "Copy the word I<data> to the address I<addr> in the tracee's memory. As for "
8830 "B<PTRACE_PEEKTEXT> and B<PTRACE_PEEKDATA>, these two requests are currently "
8832 msgstr "ワード I<data> を tracee のメモリーの I<addr> のアドレスへコピーする。 B<PTRACE_PEEKTEXT> や B<PTRACE_PEEKDATA> と同様に、 現在のところ二つの要求は同じものである。"
8835 #: build/C/man2/ptrace.2:199
8837 msgid "B<PTRACE_POKEUSER>"
8838 msgstr "B<PTRACE_POKEUSER>"
8840 #. PTRACE_POKEUSR in kernel source, but glibc uses PTRACE_POKEUSER,
8841 #. and that is the name that seems common on other systems.
8842 #. FIXME In the preceding sentence, which modifications are disallowed,
8843 #. and when they are disallowed, how does user space discover that fact?
8845 #: build/C/man2/ptrace.2:215
8847 "Copy the word I<data> to offset I<addr> in the tracee's USER area. As for "
8848 "B<PTRACE_PEEKUSER>, the offset must typically be word-aligned. In order to "
8849 "maintain the integrity of the kernel, some modifications to the USER area "
8851 msgstr "ワード I<data> を tracee の USER 領域のオフセット I<addr> のアドレスにコピーする。 B<PTRACE_PEEKUSER> と同様に、通常、オフセットはワード境界になければならない。 カーネルの完全性 (integrity) を維持するため、 変更内容によっては USER 領域の変更は禁止されている。"
8854 #: build/C/man2/ptrace.2:215
8856 msgid "B<PTRACE_GETREGS>, B<PTRACE_GETFPREGS>"
8857 msgstr "B<PTRACE_GETREGS>, B<PTRACE_GETFPREGS>"
8860 #: build/C/man2/ptrace.2:238
8862 "Copy the tracee's general-purpose or floating-point registers, respectively, "
8863 "to the address I<data> in the tracer. See I<E<lt>sys/user.hE<gt>> for "
8864 "information on the format of this data. (I<addr> is ignored.) Note that "
8865 "SPARC systems have the meaning of I<data> and I<addr> reversed; that is, "
8866 "I<data> is ignored and the registers are copied to the address I<addr>. "
8867 "B<PTRACE_GETREGS> and B<PTRACE_GETFPREGS> are not present on all "
8869 msgstr "それぞれ、 tracee の汎用レジスター、 浮動小数点レジスターを tracer の I<data> のアドレスにコピーする。この data の書式に関しては I<E<lt>sys/user.hE<gt>> を参照すること。(I<addr> は無視される。) SPARC システムでは I<data> と I<addr> の意味が逆になっている点に注意。 つまり、 I<data> は無視され、 レジスターはアドレス I<addr> にコピーされる。 B<PTRACE_GETREGS> と B<PTRACE_GETFPREGS> はすべてのアーキテクチャーで存在するわけではない。"
8872 #: build/C/man2/ptrace.2:238
8874 msgid "B<PTRACE_GETREGSET> (since Linux 2.6.34)"
8875 msgstr " B<PTRACE_GETREGSET> (since Linux 2.6.34)"
8878 #: build/C/man2/ptrace.2:259
8880 "Read the tracee's registers. I<addr> specifies, in an architecture-"
8881 "dependent way, the type of registers to be read. B<NT_PRSTATUS> (with "
8882 "numerical value 1) usually results in reading of general-purpose "
8883 "registers. If the CPU has, for example, floating-point and/or vector "
8884 "registers, they can be retrieved by setting I<addr> to the corresponding "
8885 "B<NT_foo> constant. I<data> points to a B<struct iovec>, which describes "
8886 "the destination buffer's location and length. On return, the kernel "
8887 "modifies B<iov.len> to indicate the actual number of bytes returned."
8891 #: build/C/man2/ptrace.2:259
8893 msgid "B<PTRACE_SETREGS>, B<PTRACE_SETFPREGS>"
8894 msgstr "B<PTRACE_SETREGS>, B<PTRACE_SETFPREGS>"
8896 #. FIXME . In the preceding sentence, which modifications are disallowed,
8897 #. and when they are disallowed, how does user space discover that fact?
8899 #: build/C/man2/ptrace.2:284
8901 "Modify the tracee's general-purpose or floating-point registers, "
8902 "respectively, from the address I<data> in the tracer. As for "
8903 "B<PTRACE_POKEUSER>, some general-purpose register modifications may be "
8904 "disallowed. (I<addr> is ignored.) Note that SPARC systems have the meaning "
8905 "of I<data> and I<addr> reversed; that is, I<data> is ignored and the "
8906 "registers are copied from the address I<addr>. B<PTRACE_SETREGS> and "
8907 "B<PTRACE_SETFPREGS> are not present on all architectures."
8909 "それぞれ、 tracee の汎用レジスター、浮動小数点レジスターに tracer の I<date> のアドレスからコピーする。 B<PTRACE_POKEUSER> と同様に、汎用レジスターによっては 変更が禁止されている場合がある。 (I<addr> は無視される。)\n"
8911 "Note that SPARC systems have the meaning of I<data> and I<addr>\n"
8912 "reversed; that is, I<data> is ignored and the registers are copied\n"
8913 "from the address I<addr>. B<PTRACE_SETREGS> and B<PTRACE_SETFPREGS>\n"
8914 "are not present on all architectures."
8917 #: build/C/man2/ptrace.2:284
8919 msgid "B<PTRACE_SETREGSET> (since Linux 2.6.34)"
8920 msgstr " B<PTRACE_SETREGSET> (since Linux 2.6.34)"
8923 #: build/C/man2/ptrace.2:293
8925 "Modify the tracee's registers. The meaning of I<addr> and I<data> is "
8926 "analogous to B<PTRACE_GETREGSET>."
8930 #: build/C/man2/ptrace.2:293
8932 msgid "B<PTRACE_GETSIGINFO> (since Linux 2.3.99-pre6)"
8933 msgstr "B<PTRACE_GETSIGINFO> (Linux 2.3.99-pre6 以降)"
8936 #: build/C/man2/ptrace.2:305
8938 "Retrieve information about the signal that caused the stop. Copy a "
8939 "I<siginfo_t> structure (see B<sigaction>(2)) from the tracee to the address "
8940 "I<data> in the tracer. (I<addr> is ignored.)"
8941 msgstr "停止の原因となったシグナルに関する情報を取得する。 I<siginfo_t> 構造体 (B<sigaction>(2) 参照) を tracee から tracer の I<data> のアドレスにコピーする。 (I<addr> は無視される。)"
8944 #: build/C/man2/ptrace.2:305
8946 msgid "B<PTRACE_SETSIGINFO> (since Linux 2.3.99-pre6)"
8947 msgstr "B<PTRACE_SETSIGINFO> (Linux 2.3.99-pre6 以降)"
8950 #: build/C/man2/ptrace.2:321
8952 "Set signal information: copy a I<siginfo_t> structure from the address "
8953 "I<data> in the tracer to the tracee. This will affect only signals that "
8954 "would normally be delivered to the tracee and were caught by the tracer. It "
8955 "may be difficult to tell these normal signals from synthetic signals "
8956 "generated by B<ptrace>() itself. (I<addr> is ignored.)"
8957 msgstr "シグナル情報を設定する。 I<siginfo_t> 構造体を tracer のデータ I<data> のアドレスから tracee にコピーする。 この処理を行うことができるのは、 tracee に通常は配送されるはずで トレーサに捕捉されたシグナルについてだけである。 これらの通常のシグナルと B<ptrace>() 自身が発生するシグナルを見分けるのは難しいかもしれない。 (I<addr> は無視される。)"
8960 #: build/C/man2/ptrace.2:321
8962 msgid "B<PTRACE_PEEKSIGINFO> (since Linux 3.10)"
8963 msgstr "B<PTRACE_PEEKSIGINFO> (Linux 3.10 以降)"
8965 #. commit 84c751bd4aebbaae995fe32279d3dba48327bad4
8967 #: build/C/man2/ptrace.2:347
8969 "Retrieve I<siginfo_t> structures without removing signals from a queue. "
8970 "I<addr> points to a I<ptrace_peeksiginfo_args> structure that specifies the "
8971 "ordinal position from which copying of signals should start, and the number "
8972 "of signals to copy. I<siginfo_t> structures are copied into the buffer "
8973 "pointed to by I<data>. The return value contains the number of copied "
8974 "signals (zero indicates that there is no signal corresponding to the "
8975 "specified ordinal position). Within the returned I<siginfo> structures, the "
8976 "I<si_code> field includes information (B<__SI_CHLD>, B<__SI_FAULT>, etc.) "
8977 "that are not otherwise exposed to user space."
8981 #: build/C/man2/ptrace.2:356
8984 "struct ptrace_peeksiginfo_args {\n"
8985 " u64 off; /* Ordinal position in queue at which\n"
8986 " to start copying signals */\n"
8987 " u32 flags; /* PTRACE_PEEKSIGINFO_SHARED or 0 */\n"
8988 " s32 nr; /* Number of signals to copy */\n"
8993 #: build/C/man2/ptrace.2:363
8995 "Currently, there is only one flag, B<PTRACE_PEEKSIGINFO_SHARED>, for dumping "
8996 "signals from the process-wide signal queue. If this flag is not set, "
8997 "signals are read from the per-thread queue of the specified thread."
9001 #: build/C/man2/ptrace.2:365
9003 msgid "B<PTRACE_GETSIGMASK> (since Linux 3.11)"
9004 msgstr "B<PTRACE_GETSIGMASK> (Linux 3.11 以降)"
9006 #. commit 29000caecbe87b6b66f144f72111f0d02fbbf0c1
9008 #: build/C/man2/ptrace.2:380
9010 "Place a copy of the mask of blocked signals (see B<sigprocmask>(2)) in the "
9011 "buffer pointed to by I<data>, which should be a pointer to a buffer of type "
9012 "I<sigset_t>. The I<addr> argument contains the size of the buffer pointed "
9013 "to by I<data> (i.e., I<sizeof(sigset_t)>)."
9017 #: build/C/man2/ptrace.2:380
9019 msgid "B<PTRACE_SETSIGMASK> (since Linux 3.11)"
9020 msgstr "B<PTRACE_SETSIGMASK> (Linux 3.11 以降)"
9023 #: build/C/man2/ptrace.2:394
9025 "Change the mask of blocked signals (see B<sigprocmask>(2)) to the value "
9026 "specified in the buffer pointed to by I<data>, which should be a pointer to "
9027 "a buffer of type I<sigset_t>. The I<addr> argument contains the size of the "
9028 "buffer pointed to by I<data> (i.e., I<sizeof(sigset_t)>)."
9032 #: build/C/man2/ptrace.2:394
9034 msgid "B<PTRACE_SETOPTIONS> (since Linux 2.4.6; see BUGS for caveats)"
9035 msgstr "B<PTRACE_SETOPTIONS> (Linux 2.4.6 以降; バグの章にある警告も参照)"
9038 #: build/C/man2/ptrace.2:403
9040 "Set ptrace options from I<data>. (I<addr> is ignored.) I<data> is "
9041 "interpreted as a bit mask of options, which are specified by the following "
9044 "I<data> に基づいて ptrace のオプションを設定する (I<addr> は無視される)。 "
9045 "I<data> はオプションのビットマスクとして解釈され、 オプションには以下のフラグ"
9049 #: build/C/man2/ptrace.2:404
9051 msgid "B<PTRACE_O_EXITKILL> (since Linux 3.8)"
9052 msgstr " B<PTRACE_O_EXITKILL> (since Linux 3.8)"
9054 #. commit 992fb6e170639b0849bace8e49bf31bd37c4123
9056 #: build/C/man2/ptrace.2:412
9058 "If a tracer sets this flag, a B<SIGKILL> signal will be sent to every tracee "
9059 "if the tracer exits. This option is useful for ptrace jailers that want to "
9060 "ensure that tracees can never escape the tracer's control."
9064 #: build/C/man2/ptrace.2:412
9066 msgid "B<PTRACE_O_TRACECLONE> (since Linux 2.5.46)"
9067 msgstr "B<PTRACE_O_TRACECLONE> (Linux 2.5.46 以降)"
9070 #: build/C/man2/ptrace.2:429
9072 "Stop the tracee at the next B<clone>(2) and automatically start tracing the "
9073 "newly cloned process, which will start with a B<SIGSTOP>, or "
9074 "B<PTRACE_EVENT_STOP> if B<PTRACE_SEIZE> was used. A B<waitpid>(2) by the "
9075 "tracer will return a I<status> value such that"
9076 msgstr "次の B<clone>(2) 呼び出し時に tracee を停止し、 新しくクローンされたプロセスのトレースを自動的に開始し、 B<SIGSTOP> でプロセスの実行を開始する。 B<PTRACE_SEIZE> が使用された場合は B<PTRACE_EVENT_STOP> で開始する。 tracer による B<waitpid>(2) の呼び出しでは以下のような I<status> 値が返る。"
9079 #: build/C/man2/ptrace.2:432
9081 msgid " statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_CLONEE<lt>E<lt>8))\n"
9082 msgstr " statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_CLONEE<lt>E<lt>8))\n"
9085 #: build/C/man2/ptrace.2:436 build/C/man2/ptrace.2:522
9086 #: build/C/man2/ptrace.2:555
9087 msgid "The PID of the new process can be retrieved with B<PTRACE_GETEVENTMSG>."
9088 msgstr "新規のプロセスの PID は B<PTRACE_GETEVENTMSG> で取得できる。"
9091 #: build/C/man2/ptrace.2:457
9093 "This option may not catch B<clone>(2) calls in all cases. If the tracee "
9094 "calls B<clone>(2) with the B<CLONE_VFORK> flag, B<PTRACE_EVENT_VFORK> will "
9095 "be delivered instead if B<PTRACE_O_TRACEVFORK> is set; otherwise if the "
9096 "tracee calls B<clone>(2) with the exit signal set to B<SIGCHLD>, "
9097 "B<PTRACE_EVENT_FORK> will be delivered if B<PTRACE_O_TRACEFORK> is set."
9098 msgstr "このオプションで全ての B<clone>(2) コールを捕まえられるわけではない。 tracee が B<CLONE_VFORK> フラグ付きで B<clone>(2) を呼び出した場合、 B<PTRACE_O_TRACEVFORK> が設定されていれば代わりに B<PTRACE_EVENT_VFORK> が配送される。 また、 tracee が終了シグナルを B<SIGCHLD> に設定して B<clone>(2) を呼び出した場合は、 B<PTRACE_O_TRACEFORK> が設定されていれば B<PTRACE_EVENT_FORK> が配送される。"
9101 #: build/C/man2/ptrace.2:457
9103 msgid "B<PTRACE_O_TRACEEXEC> (since Linux 2.5.46)"
9104 msgstr "B<PTRACE_O_TRACEEXEC> (Linux 2.5.46 以降)"
9107 #: build/C/man2/ptrace.2:466
9109 "Stop the tracee at the next B<execve>(2). A B<waitpid>(2) by the tracer "
9110 "will return a I<status> value such that"
9114 #: build/C/man2/ptrace.2:469
9116 msgid " statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_EXECE<lt>E<lt>8))\n"
9117 msgstr " statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_EXECE<lt>E<lt>8))\n"
9120 #: build/C/man2/ptrace.2:475
9122 "If the execing thread is not a thread group leader, the thread ID is reset "
9123 "to thread group leader's ID before this stop. Since Linux 3.0, the former "
9124 "thread ID can be retrieved with B<PTRACE_GETEVENTMSG>."
9128 #: build/C/man2/ptrace.2:475
9130 msgid "B<PTRACE_O_TRACEEXIT> (since Linux 2.5.60)"
9131 msgstr "B<PTRACE_O_TRACEEXIT> (Linux 2.5.60 以降)"
9134 #: build/C/man2/ptrace.2:483
9136 "Stop the tracee at exit. A B<waitpid>(2) by the tracer will return a "
9137 "I<status> value such that"
9138 msgstr "exit 時に tracee を停止する。 tracer による B<waiting>(2) では以下のような I<status> 値が返る。"
9141 #: build/C/man2/ptrace.2:486
9143 msgid " statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_EXITE<lt>E<lt>8))\n"
9144 msgstr " statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_EXITE<lt>E<lt>8))\n"
9147 #: build/C/man2/ptrace.2:490
9148 msgid "The tracee's exit status can be retrieved with B<PTRACE_GETEVENTMSG>."
9149 msgstr "tracee の終了ステータスは B<PTRACE_GETEVENTMSG> で取得できる。"
9152 #: build/C/man2/ptrace.2:498
9154 "The tracee is stopped early during process exit, when registers are still "
9155 "available, allowing the tracer to see where the exit occurred, whereas the "
9156 "normal exit notification is done after the process is finished exiting. "
9157 "Even though context is available, the tracer cannot prevent the exit from "
9158 "happening at this point."
9159 msgstr "tracee の停止はレジスターがまだ参照可能であるプロセス終了処理の初期に行われ、 トレーサはどこで終了が発生したかを知ることができる。 通常の終了通知 (exit notification) はプロセスの終了処理が完了した後に 行われる。コンテキストを参照することはできるにも関わらず、 トレーサはこの時点から終了を止めることはできない。"
9162 #: build/C/man2/ptrace.2:498
9164 msgid "B<PTRACE_O_TRACEFORK> (since Linux 2.5.46)"
9165 msgstr "B<PTRACE_O_TRACEFORK> (Linux 2.5.46 以降)"
9168 #: build/C/man2/ptrace.2:515
9170 "Stop the tracee at the next B<fork>(2) and automatically start tracing the "
9171 "newly forked process, which will start with a B<SIGSTOP>, or "
9172 "B<PTRACE_EVENT_STOP> if B<PTRACE_SEIZE> was used. A B<waitpid>(2) by the "
9173 "tracer will return a I<status> value such that"
9174 msgstr "次の B<fork>(2) 呼び出し時に tracee を停止し、 新しく fork されたプロセスのトレースを自動的に開始し、 B<SIGSTOP> でそのプロセスの実行を開始する。 B<PTRACE_SEIZE> が使用された場合は B<PTRACE_EVENT_STOP> で実行を開始する。 tracer による B<waitpid>(2) の呼び出しでは以下のような I<status> 値が返る。"
9177 #: build/C/man2/ptrace.2:518
9179 msgid " statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_FORKE<lt>E<lt>8))\n"
9180 msgstr " statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_FORKE<lt>E<lt>8))\n"
9183 #: build/C/man2/ptrace.2:522
9185 msgid "B<PTRACE_O_TRACESYSGOOD> (since Linux 2.4.6)"
9186 msgstr "B<PTRACE_O_TRACESYSGOOD> (Linux 2.4.6 以降)"
9189 #: build/C/man2/ptrace.2:531
9191 "When delivering system call traps, set bit 7 in the signal number (i.e., "
9192 "deliver I<SIGTRAP|0x80>). This makes it easy for the tracer to distinguish "
9193 "normal traps from those caused by a system call. (B<PTRACE_O_TRACESYSGOOD> "
9194 "may not work on all architectures.)"
9195 msgstr "システムコールのトラップが配送されたときに、シグナル番号のビット 7 を設定する (すなわち、I<SIGTRAP | 0x80> を配送する)。 これにより、トレーサが通常のトラップとシステムコールによるトラップを区別しやすくなる。 (B<PTRACE_O_TRACESYSGOOD> はどのアーキテクチャーでも動作しない可能性がある。)"
9198 #: build/C/man2/ptrace.2:531
9200 msgid "B<PTRACE_O_TRACEVFORK> (since Linux 2.5.46)"
9201 msgstr "B<PTRACE_O_TRACEVFORK> (Linux 2.5.46 以降)"
9204 #: build/C/man2/ptrace.2:548
9206 "Stop the tracee at the next B<vfork>(2) and automatically start tracing the "
9207 "newly vforked process, which will start with a B<SIGSTOP>, or "
9208 "B<PTRACE_EVENT_STOP> if B<PTRACE_SEIZE> was used. A B<waitpid>(2) by the "
9209 "tracer will return a I<status> value such that"
9210 msgstr "次の B<vfork>(2) 呼び出し時に tracee を停止し、 新しく vfork されたプロセスのトレースを自動的に開始し、 B<SIGSTOP> でそのプロセスの実行を開始する。 B<PTRACE_SEIZE> が使用された場合は B<PTRACE_EVENT_STOP> で実行を開始する。 tracer による B<waitpid>(2) の呼び出しでは以下のような I<status> 値が返る。"
9213 #: build/C/man2/ptrace.2:551
9215 msgid " statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_VFORKE<lt>E<lt>8))\n"
9216 msgstr " statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_VFORKE<lt>E<lt>8))\n"
9219 #: build/C/man2/ptrace.2:555
9221 msgid "B<PTRACE_O_TRACEVFORKDONE> (since Linux 2.5.60)"
9222 msgstr "B<PTRACE_O_TRACEVFORKDONE> (Linux 2.5.60 以降)"
9225 #: build/C/man2/ptrace.2:564
9227 "Stop the tracee at the completion of the next B<vfork>(2). A B<waitpid>(2) "
9228 "by the tracer will return a I<status> value such that"
9232 #: build/C/man2/ptrace.2:567
9234 msgid " statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_VFORK_DONEE<lt>E<lt>8))\n"
9238 #: build/C/man2/ptrace.2:571
9240 "The PID of the new process can (since Linux 2.6.18) be retrieved with "
9241 "B<PTRACE_GETEVENTMSG>."
9245 #: build/C/man2/ptrace.2:571
9247 msgid "B<PTRACE_O_TRACESECCOMP> (since Linux 3.5)"
9248 msgstr "B<PTRACE_O_TRACESECCOMP> (Linux 3.5 以降)"
9251 #: build/C/man2/ptrace.2:582
9253 "Stop the tracee when a B<seccomp>(2) B<SECCOMP_RET_TRACE> rule is "
9254 "triggered. A B<waitpid>(2) by the tracer will return a I<status> value "
9256 msgstr "B<seccomp>(2) B<SECCOMP_RET_TRACE> ルールが起動された場合に tracee を停止する。 tracer による B<waitpid>(2) の呼び出しでは以下のような I<status> 値が返る。"
9259 #: build/C/man2/ptrace.2:585
9261 msgid " statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_SECCOMPE<lt>E<lt>8))\n"
9262 msgstr " statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_SECCOMPE<lt>E<lt>8))\n"
9265 #: build/C/man2/ptrace.2:595
9267 "While this triggers a B<PTRACE_EVENT> stop, it is similar to a syscall-enter-"
9268 "stop, in that the tracee has not yet entered the syscall that seccomp "
9269 "triggered on. The seccomp event message data (from the B<SECCOMP_RET_DATA> "
9270 "portion of the seccomp filter rule) can be retrieved with "
9271 "B<PTRACE_GETEVENTMSG>."
9275 #: build/C/man2/ptrace.2:596
9277 msgid "B<PTRACE_GETEVENTMSG> (since Linux 2.5.46)"
9278 msgstr "B<PTRACE_GETEVENTMSG> (Linux 2.5.46 以降)"
9281 #: build/C/man2/ptrace.2:623
9283 "Retrieve a message (as an I<unsigned long>) about the ptrace event that "
9284 "just happened, placing it at the address I<data> in the tracer. For "
9285 "B<PTRACE_EVENT_EXIT>, this is the tracee's exit status. For "
9286 "B<PTRACE_EVENT_FORK>, B<PTRACE_EVENT_VFORK>, B<PTRACE_EVENT_VFORK_DONE>, and "
9287 "B<PTRACE_EVENT_CLONE>, this is the PID of the new process. For "
9288 "B<PTRACE_EVENT_SECCOMP>, this is the B<seccomp>(2) filter's "
9289 "B<SECCOMP_RET_DATA> associated with the triggered rule. (I<addr> is "
9291 msgstr "発生したばかりの ptrace イベントに関するメッセージを (I<unsigned long> 型で) 取得する。 取得したメッセージは tracer の I<data> のアドレスに格納される。 格納される内容は、 B<PTRACE_EVENT_EXIT> の場合は tracee の終了ステータスである。 B<PTRACE_EVENT_FORK>, B<PTRACE_EVENT_VFORK>, B<PTRACE_EVENT_VFORK_DONE>, B<PTRACE_EVENT_CLONE> の場合は新しいプロセスの PID が格納される。 B<PTRACE_EVENT_SECCOMP> の場合は、起動されたルールに関連付けられた B<seccomp>(2) フィルターの B<SECCOMP_RET_DATA> が格納される。 (I<addr> は無視される。)"
9294 #: build/C/man2/ptrace.2:623
9296 msgid "B<PTRACE_CONT>"
9297 msgstr "B<PTRACE_CONT>"
9300 #: build/C/man2/ptrace.2:635
9302 "Restart the stopped tracee process. If I<data> is nonzero, it is "
9303 "interpreted as the number of a signal to be delivered to the tracee; "
9304 "otherwise, no signal is delivered. Thus, for example, the tracer can "
9305 "control whether a signal sent to the tracee is delivered or not. (I<addr> "
9307 msgstr "停止した tracee の実行を再開させる。 I<data> がゼロでない場合、 tracee に配送されるシグナル数と解釈される。 ゼロの場合はシグナルは配送されない。 これを使うと、例えば、 tracer は tracee に送られたシグナルを実際に配送するかどうかを 制御することができる。(I<addr> は無視される。)"
9310 #: build/C/man2/ptrace.2:635
9312 msgid "B<PTRACE_SYSCALL>, B<PTRACE_SINGLESTEP>"
9313 msgstr "B<PTRACE_SYSCALL>, B<PTRACE_SINGLESTEP>"
9316 #: build/C/man2/ptrace.2:659
9318 "Restart the stopped tracee as for B<PTRACE_CONT>, but arrange for the tracee "
9319 "to be stopped at the next entry to or exit from a system call, or after "
9320 "execution of a single instruction, respectively. (The tracee will also, as "
9321 "usual, be stopped upon receipt of a signal.) From the tracer's perspective, "
9322 "the tracee will appear to have been stopped by receipt of a B<SIGTRAP>. So, "
9323 "for B<PTRACE_SYSCALL>, for example, the idea is to inspect the arguments to "
9324 "the system call at the first stop, then do another B<PTRACE_SYSCALL> and "
9325 "inspect the return value of the system call at the second stop. The I<data> "
9326 "argument is treated as for B<PTRACE_CONT>. (I<addr> is ignored.)"
9327 msgstr "B<PTRACE_CONT> と同様に停止した tracee を再開する。ただし、 B<PTRACE_SYSCALL> の場合は tracee が 次にシステムコールに入るかシステムコールから抜けるかする時に、 B<PTRACE_SINGLESTEP> の場合は 1 命令 (instruction) 実行した後に停止させる (通常どおり、 tracee はシグナルを受け取った場合にも停止する)。 tracer から見ると、 tracee は B<SIGTRAP> を受信して停止したように見える。そのため、例えば B<PTRACE_SYSCALL> を使うと、1回目の停止で引き数を調べて B<PTRACE_SYSCALL> を実行し、 2回目の停止でシステムコールの返り値を調べる、 というようなことができる。 引き数 I<data> は B<PTRACE_CONT> の場合と同じ様に解釈される。 (I<addr> は無視される。)"
9330 #: build/C/man2/ptrace.2:659
9332 msgid "B<PTRACE_SYSEMU>, B<PTRACE_SYSEMU_SINGLESTEP> (since Linux 2.6.14)"
9333 msgstr "B<PTRACE_SYSEMU>, B<PTRACE_SYSEMU_SINGLESTEP> (Linux 2.6.14 以降)"
9337 #: build/C/man2/ptrace.2:680
9339 "For B<PTRACE_SYSEMU>, continue and stop on entry to the next system call, "
9340 "which will not be executed. For B<PTRACE_SYSEMU_SINGLESTEP>, do the same "
9341 "but also singlestep if not a system call. This call is used by programs "
9342 "like User Mode Linux that want to emulate all the tracee's system calls. "
9343 "The I<data> argument is treated as for B<PTRACE_CONT>. The I<addr> argument "
9344 "is ignored. These requests are currently supported only on x86."
9345 msgstr "B<PTRACE_SYSEMU> は、実行を再開し、次のシステムコールに入る時に停止させる。 システムコールは実行されない。 B<PTRACE_SYSEMU_SINGLESTEP> も同様だが、システムコールでない場合には 1 命令 (singlestep) だけ実行した時点でも停止させる。 このコールは User Mode Linux のように tracee のシステムコールを全て エミュレートしようとするプログラムで使用される。 引き数 I<data> は B<PTRACE_CONT> の場合と同じ様に解釈される。 I<addr> 引き数は無視される。 現在のところこれらの要求は x86 でのみサポートされている。"
9348 #: build/C/man2/ptrace.2:680
9350 msgid "B<PTRACE_LISTEN> (since Linux 3.4)"
9351 msgstr " B<PTRACE_LISTEN> (since Linux 3.4)"
9354 #: build/C/man2/ptrace.2:691
9356 "Restart the stopped tracee, but prevent it from executing. The resulting "
9357 "state of the tracee is similar to a process which has been stopped by a "
9358 "B<SIGSTOP> (or other stopping signal). See the \"group-stop\" subsection "
9359 "for additional information. B<PTRACE_LISTEN> works only on tracees attached "
9360 "by B<PTRACE_SEIZE>."
9364 #: build/C/man2/ptrace.2:691
9366 msgid "B<PTRACE_KILL>"
9367 msgstr "B<PTRACE_KILL>"
9370 #: build/C/man2/ptrace.2:700
9372 "Send the tracee a B<SIGKILL> to terminate it. (I<addr> and I<data> are "
9374 msgstr "tracee に B<SIGKILL> を送り終了させる。(I<addr> と I<data> は無視される。)"
9376 #. [Note from Denys Vlasenko:
9377 #. deprecation suggested by Oleg Nesterov. He prefers to deprecate it
9378 #. instead of describing (and needing to support) PTRACE_KILL's quirks.]
9380 #: build/C/man2/ptrace.2:719
9382 "I<This operation is deprecated; do not use it!> Instead, send a B<SIGKILL> "
9383 "directly using B<kill>(2) or B<tgkill>(2). The problem with B<PTRACE_KILL> "
9384 "is that it requires the tracee to be in signal-delivery-stop, otherwise it "
9385 "may not work (i.e., may complete successfully but won't kill the tracee). "
9386 "By contrast, sending a B<SIGKILL> directly has no such limitation."
9390 #: build/C/man2/ptrace.2:719
9392 msgid "B<PTRACE_INTERRUPT> (since Linux 3.4)"
9393 msgstr " B<PTRACE_INTERRUPT> (since Linux 3.4)"
9396 #: build/C/man2/ptrace.2:747
9398 "Stop a tracee. If the tracee is running or sleeping in kernel space and "
9399 "B<PTRACE_SYSCALL> is in effect, the system call is interrupted and syscall-"
9400 "exit-stop is reported. (The interrupted system call is restarted when the "
9401 "tracee is restarted.) If the tracee was already stopped by a signal and "
9402 "B<PTRACE_LISTEN> was sent to it, the tracee stops with B<PTRACE_EVENT_STOP> "
9403 "and I<WSTOPSIG(status)> returns the stop signal. If any other ptrace-stop "
9404 "is generated at the same time (for example, if a signal is sent to the "
9405 "tracee), this ptrace-stop happens. If none of the above applies (for "
9406 "example, if the tracee is running in user space), it stops with "
9407 "B<PTRACE_EVENT_STOP> with I<WSTOPSIG(status)> == B<SIGTRAP>. "
9408 "B<PTRACE_INTERRUPT> only works on tracees attached by B<PTRACE_SEIZE>."
9412 #: build/C/man2/ptrace.2:747
9414 msgid "B<PTRACE_ATTACH>"
9415 msgstr "B<PTRACE_ATTACH>"
9417 #. No longer true (removed by Denys Vlasenko, 2011, who remarks:
9418 #. "I think it isn't true in non-ancient 2.4 and in 2.6/3.x.
9419 #. Basically, it's not true for any Linux in practical use.
9420 #. ; the behavior of the tracee is as if it had done a
9421 #. .BR PTRACE_TRACEME .
9422 #. The calling process actually becomes the parent of the tracee
9423 #. process for most purposes (e.g., it will receive
9424 #. notification of tracee events and appears in
9426 #. output as the tracee's parent), but a
9428 #. by the tracee will still return the PID of the original parent.
9430 #: build/C/man2/ptrace.2:775
9432 "Attach to the process specified in I<pid>, making it a tracee of the calling "
9433 "process. The tracee is sent a B<SIGSTOP>, but will not necessarily have "
9434 "stopped by the completion of this call; use B<waitpid>(2) to wait for the "
9435 "tracee to stop. See the \"Attaching and detaching\" subsection for "
9436 "additional information. (I<addr> and I<data> are ignored.)"
9440 #: build/C/man2/ptrace.2:775
9442 msgid "B<PTRACE_SEIZE> (since Linux 3.4)"
9443 msgstr " B<PTRACE_SEIZE> (since Linux 3.4)"
9446 #: build/C/man2/ptrace.2:795
9448 "Attach to the process specified in I<pid>, making it a tracee of the calling "
9449 "process. Unlike B<PTRACE_ATTACH>, B<PTRACE_SEIZE> does not stop the "
9450 "process. Only a B<PTRACE_SEIZE>d process can accept B<PTRACE_INTERRUPT> and "
9451 "B<PTRACE_LISTEN> commands. I<addr> must be zero. I<data> contains a bit "
9452 "mask of ptrace options to activate immediately."
9456 #: build/C/man2/ptrace.2:795
9458 msgid "B<PTRACE_DETACH>"
9459 msgstr "B<PTRACE_DETACH>"
9462 #: build/C/man2/ptrace.2:804
9464 "Restart the stopped tracee as for B<PTRACE_CONT>, but first detach from it. "
9465 "Under Linux, a tracee can be detached in this way regardless of which method "
9466 "was used to initiate tracing. (I<addr> is ignored.)"
9467 msgstr "B<PTRACE_CONT> と同様に停止した tracee を再開するが、 まずそのプロセスからの分離 (detach) を行う。 Linux では、トレースされている tracee はどのような方法でトレースを開始されたとしても、この方法で分離 (detach) することができる。 (I<addr> は無視される。)"
9470 #: build/C/man2/ptrace.2:804
9472 msgid "Death under ptrace"
9476 #: build/C/man2/ptrace.2:813
9478 "When a (possibly multithreaded) process receives a killing signal (one whose "
9479 "disposition is set to B<SIG_DFL> and whose default action is to kill the "
9480 "process), all threads exit. Tracees report their death to their tracer(s). "
9481 "Notification of this event is delivered via B<waitpid>(2)."
9485 #: build/C/man2/ptrace.2:822
9487 "Note that the killing signal will first cause signal-delivery-stop (on one "
9488 "tracee only), and only after it is injected by the tracer (or after it was "
9489 "dispatched to a thread which isn't traced), will death from the signal "
9490 "happen on I<all> tracees within a multithreaded process. (The term \"signal-"
9491 "delivery-stop\" is explained below.)"
9495 #: build/C/man2/ptrace.2:834
9497 "B<SIGKILL> does not generate signal-delivery-stop and therefore the tracer "
9498 "can't suppress it. B<SIGKILL> kills even within system calls (syscall-exit-"
9499 "stop is not generated prior to death by B<SIGKILL>). The net effect is that "
9500 "B<SIGKILL> always kills the process (all its threads), even if some threads "
9501 "of the process are ptraced."
9505 #: build/C/man2/ptrace.2:839
9507 "When the tracee calls B<_exit>(2), it reports its death to its tracer. "
9508 "Other threads are not affected."
9512 #: build/C/man2/ptrace.2:843
9514 "When any thread executes B<exit_group>(2), every tracee in its thread group "
9515 "reports its death to its tracer."
9519 #: build/C/man2/ptrace.2:857
9521 "If the B<PTRACE_O_TRACEEXIT> option is on, B<PTRACE_EVENT_EXIT> will happen "
9522 "before actual death. This applies to exits via B<exit>(2), "
9523 "B<exit_group>(2), and signal deaths (except B<SIGKILL>), and when threads "
9524 "are torn down on B<execve>(2) in a multithreaded process."
9528 #: build/C/man2/ptrace.2:882
9530 "The tracer cannot assume that the ptrace-stopped tracee exists. There are "
9531 "many scenarios when the tracee may die while stopped (such as B<SIGKILL>). "
9532 "Therefore, the tracer must be prepared to handle an B<ESRCH> error on any "
9533 "ptrace operation. Unfortunately, the same error is returned if the tracee "
9534 "exists but is not ptrace-stopped (for commands which require a stopped "
9535 "tracee), or if it is not traced by the process which issued the ptrace "
9536 "call. The tracer needs to keep track of the stopped/running state of the "
9537 "tracee, and interpret B<ESRCH> as \"tracee died unexpectedly\" only if it "
9538 "knows that the tracee has been observed to enter ptrace-stop. Note that "
9539 "there is no guarantee that I<waitpid(WNOHANG)> will reliably report the "
9540 "tracee's death status if a ptrace operation returned B<ESRCH>. "
9541 "I<waitpid(WNOHANG)> may return 0 instead. In other words, the tracee may be "
9542 "\"not yet fully dead\", but already refusing ptrace requests."
9546 #: build/C/man2/ptrace.2:896
9548 "The tracer can't assume that the tracee I<always> ends its life by reporting "
9549 "I<WIFEXITED(status)> or I<WIFSIGNALED(status)>; there are cases where this "
9550 "does not occur. For example, if a thread other than thread group leader "
9551 "does an B<execve>(2), it disappears; its PID will never be seen again, and "
9552 "any subsequent ptrace stops will be reported under the thread group leader's "
9557 #: build/C/man2/ptrace.2:896
9559 msgid "Stopped states"
9563 #: build/C/man2/ptrace.2:918
9565 "A tracee can be in two states: running or stopped. For the purposes of "
9566 "ptrace, a tracee which is blocked in a system call (such as B<read>(2), "
9567 "B<pause>(2), etc.) is nevertheless considered to be running, even if the "
9568 "tracee is blocked for a long time. The state of the tracee after "
9569 "B<PTRACE_LISTEN> is somewhat of a gray area: it is not in any ptrace-stop "
9570 "(ptrace commands won't work on it, and it will deliver B<waitpid>(2) "
9571 "notifications), but it also may be considered \"stopped\" because it is not "
9572 "executing instructions (is not scheduled), and if it was in group-stop "
9573 "before B<PTRACE_LISTEN>, it will not respond to signals until B<SIGCONT> is "
9578 #: build/C/man2/ptrace.2:922
9580 "There are many kinds of states when the tracee is stopped, and in ptrace "
9581 "discussions they are often conflated. Therefore, it is important to use "
9586 #: build/C/man2/ptrace.2:933
9588 "In this manual page, any stopped state in which the tracee is ready to "
9589 "accept ptrace commands from the tracer is called I<ptrace-stop>. Ptrace-"
9590 "stops can be further subdivided into I<signal-delivery-stop>, I<group-stop>, "
9591 "I<syscall-stop>, and so on. These stopped states are described in detail "
9596 #: build/C/man2/ptrace.2:938
9598 "When the running tracee enters ptrace-stop, it notifies its tracer using "
9599 "B<waitpid>(2) (or one of the other \"wait\" system calls). Most of this "
9600 "manual page assumes that the tracer waits with:"
9604 #: build/C/man2/ptrace.2:940
9606 msgid " pid = waitpid(pid_or_minus_1, &status, __WALL);\n"
9610 #. Do we require __WALL usage, or will just using 0 be ok? (With 0,
9611 #. I am not 100% sure there aren't ugly corner cases.) Are the
9612 #. rules different if user wants to use waitid? Will waitid require
9615 #: build/C/man2/ptrace.2:952
9617 "Ptrace-stopped tracees are reported as returns with I<pid> greater than 0 "
9618 "and I<WIFSTOPPED(status)> true."
9622 #: build/C/man2/ptrace.2:960
9624 "The B<__WALL> flag does not include the B<WSTOPPED> and B<WEXITED> flags, "
9625 "but implies their functionality."
9629 #: build/C/man2/ptrace.2:967
9631 "Setting the B<WCONTINUED> flag when calling B<waitpid>(2) is not "
9632 "recommended: the \"continued\" state is per-process and consuming it can "
9633 "confuse the real parent of the tracee."
9637 #: build/C/man2/ptrace.2:975
9639 "Use of the B<WNOHANG> flag may cause B<waitpid>(2) to return 0 (\"no wait "
9640 "results available yet\") even if the tracer knows there should be a "
9641 "notification. Example:"
9645 #: build/C/man2/ptrace.2:984
9649 " ptrace(PTRACE_CONT, pid, 0L, 0L);\n"
9650 " if (errno == ESRCH) {\n"
9651 " /* tracee is dead */\n"
9652 " r = waitpid(tracee, &status, __WALL | WNOHANG);\n"
9653 " /* r can still be 0 here! */\n"
9658 #: build/C/man2/ptrace.2:1007
9660 "The following kinds of ptrace-stops exist: signal-delivery-stops, group-"
9661 "stops, B<PTRACE_EVENT> stops, syscall-stops. They all are reported by "
9662 "B<waitpid>(2) with I<WIFSTOPPED(status)> true. They may be differentiated "
9663 "by examining the value I<statusE<gt>E<gt>8>, and if there is ambiguity in "
9664 "that value, by querying B<PTRACE_GETSIGINFO>. (Note: the "
9665 "I<WSTOPSIG(status)> macro can't be used to perform this examination, because "
9666 "it returns the value I<(statusE<gt>E<gt>8)\\ &\\ 0xff>.)"
9670 #: build/C/man2/ptrace.2:1007
9672 msgid "Signal-delivery-stop"
9676 #: build/C/man2/ptrace.2:1027
9678 "When a (possibly multithreaded) process receives any signal except "
9679 "B<SIGKILL>, the kernel selects an arbitrary thread which handles the "
9680 "signal. (If the signal is generated with B<tgkill>(2), the target thread "
9681 "can be explicitly selected by the caller.) If the selected thread is "
9682 "traced, it enters signal-delivery-stop. At this point, the signal is not "
9683 "yet delivered to the process, and can be suppressed by the tracer. If the "
9684 "tracer doesn't suppress the signal, it passes the signal to the tracee in "
9685 "the next ptrace restart request. This second step of signal delivery is "
9686 "called I<signal injection> in this manual page. Note that if the signal is "
9687 "blocked, signal-delivery-stop doesn't happen until the signal is unblocked, "
9688 "with the usual exception that B<SIGSTOP> can't be blocked."
9692 #: build/C/man2/ptrace.2:1041
9694 "Signal-delivery-stop is observed by the tracer as B<waitpid>(2) returning "
9695 "with I<WIFSTOPPED(status)> true, with the signal returned by "
9696 "I<WSTOPSIG(status)>. If the signal is B<SIGTRAP>, this may be a different "
9697 "kind of ptrace-stop; see the \"Syscall-stops\" and \"execve\" sections below "
9698 "for details. If I<WSTOPSIG(status)> returns a stopping signal, this may be "
9699 "a group-stop; see below."
9703 #: build/C/man2/ptrace.2:1041
9705 msgid "Signal injection and suppression"
9709 #: build/C/man2/ptrace.2:1044
9711 "After signal-delivery-stop is observed by the tracer, the tracer should "
9712 "restart the tracee with the call"
9716 #: build/C/man2/ptrace.2:1046
9718 msgid " ptrace(PTRACE_restart, pid, 0, sig)\n"
9722 #: build/C/man2/ptrace.2:1059
9724 "where B<PTRACE_restart> is one of the restarting ptrace requests. If I<sig> "
9725 "is 0, then a signal is not delivered. Otherwise, the signal I<sig> is "
9726 "delivered. This operation is called I<signal injection> in this manual "
9727 "page, to distinguish it from signal-delivery-stop."
9731 #: build/C/man2/ptrace.2:1065
9733 "The I<sig> value may be different from the I<WSTOPSIG(status)> value: the "
9734 "tracer can cause a different signal to be injected."
9738 #: build/C/man2/ptrace.2:1081
9740 "Note that a suppressed signal still causes system calls to return "
9741 "prematurely. In this case, system calls will be restarted: the tracer will "
9742 "observe the tracee to reexecute the interrupted system call (or "
9743 "B<restart_syscall>(2) system call for a few system calls which use a "
9744 "different mechanism for restarting) if the tracer uses B<PTRACE_SYSCALL>. "
9745 "Even system calls (such as B<poll>(2)) which are not restartable after "
9746 "signal are restarted after signal is suppressed; however, kernel bugs exist "
9747 "which cause some system calls to fail with B<EINTR> even though no "
9748 "observable signal is injected to the tracee."
9752 #: build/C/man2/ptrace.2:1092
9754 "Restarting ptrace commands issued in ptrace-stops other than signal-delivery-"
9755 "stop are not guaranteed to inject a signal, even if I<sig> is nonzero. No "
9756 "error is reported; a nonzero I<sig> may simply be ignored. Ptrace users "
9757 "should not try to \"create a new signal\" this way: use B<tgkill>(2) "
9762 #: build/C/man2/ptrace.2:1099
9764 "The fact that signal injection requests may be ignored when restarting the "
9765 "tracee after ptrace stops that are not signal-delivery-stops is a cause of "
9766 "confusion among ptrace users. One typical scenario is that the tracer "
9767 "observes group-stop, mistakes it for signal-delivery-stop, restarts the "
9772 #: build/C/man2/ptrace.2:1101
9774 msgid " ptrace(PTRACE_restart, pid, 0, stopsig)\n"
9778 #: build/C/man2/ptrace.2:1107
9780 "with the intention of injecting I<stopsig>, but I<stopsig> gets ignored and "
9781 "the tracee continues to run."
9785 #: build/C/man2/ptrace.2:1127
9787 "The B<SIGCONT> signal has a side effect of waking up (all threads of) a "
9788 "group-stopped process. This side effect happens before signal-delivery-"
9789 "stop. The tracer can't suppress this side effect (it can only suppress "
9790 "signal injection, which only causes the B<SIGCONT> handler to not be "
9791 "executed in the tracee, if such a handler is installed). In fact, waking up "
9792 "from group-stop may be followed by signal-delivery-stop for signal(s) "
9793 "I<other than> B<SIGCONT>, if they were pending when B<SIGCONT> was "
9794 "delivered. In other words, B<SIGCONT> may be not the first signal observed "
9795 "by the tracee after it was sent."
9799 #: build/C/man2/ptrace.2:1131
9801 "Stopping signals cause (all threads of) a process to enter group-stop. This "
9802 "side effect happens after signal injection, and therefore can be suppressed "
9807 #. In the Linux 2.4 sources, in arch/i386/kernel/signal.c::do_signal(),
9809 #. /* The debugger continued. Ignore SIGSTOP. */
9810 #. if (signr == SIGSTOP)
9813 #: build/C/man2/ptrace.2:1141
9814 msgid "In Linux 2.4 and earlier, the B<SIGSTOP> signal can't be injected."
9818 #: build/C/man2/ptrace.2:1158
9820 "B<PTRACE_GETSIGINFO> can be used to retrieve a I<siginfo_t> structure which "
9821 "corresponds to the delivered signal. B<PTRACE_SETSIGINFO> may be used to "
9822 "modify it. If B<PTRACE_SETSIGINFO> has been used to alter I<siginfo_t>, the "
9823 "I<si_signo> field and the I<sig> parameter in the restarting command must "
9824 "match, otherwise the result is undefined."
9828 #: build/C/man2/ptrace.2:1158
9834 #: build/C/man2/ptrace.2:1170
9836 "When a (possibly multithreaded) process receives a stopping signal, all "
9837 "threads stop. If some threads are traced, they enter a group-stop. Note "
9838 "that the stopping signal will first cause signal-delivery-stop (on one "
9839 "tracee only), and only after it is injected by the tracer (or after it was "
9840 "dispatched to a thread which isn't traced), will group-stop be initiated on "
9841 "I<all> tracees within the multithreaded process. As usual, every tracee "
9842 "reports its group-stop separately to the corresponding tracer."
9846 #: build/C/man2/ptrace.2:1179
9848 "Group-stop is observed by the tracer as B<waitpid>(2) returning with "
9849 "I<WIFSTOPPED(status)> true, with the stopping signal available via "
9850 "I<WSTOPSIG(status)>. The same result is returned by some other classes of "
9851 "ptrace-stops, therefore the recommended practice is to perform the call"
9855 #: build/C/man2/ptrace.2:1181
9857 msgid " ptrace(PTRACE_GETSIGINFO, pid, 0, &siginfo)\n"
9861 #: build/C/man2/ptrace.2:1202
9863 "The call can be avoided if the signal is not B<SIGSTOP>, B<SIGTSTP>, "
9864 "B<SIGTTIN>, or B<SIGTTOU>; only these four signals are stopping signals. If "
9865 "the tracer sees something else, it can't be a group-stop. Otherwise, the "
9866 "tracer needs to call B<PTRACE_GETSIGINFO>. If B<PTRACE_GETSIGINFO> fails "
9867 "with B<EINVAL>, then it is definitely a group-stop. (Other failure codes "
9868 "are possible, such as B<ESRCH> (\"no such process\") if a B<SIGKILL> killed "
9873 #: build/C/man2/ptrace.2:1212
9875 "If tracee was attached using B<PTRACE_SEIZE>, group-stop is indicated by "
9876 "B<PTRACE_EVENT_STOP>: I<statusE<gt>E<gt>16 == PTRACE_EVENT_STOP>. This "
9877 "allows detection of group-stops without requiring an extra "
9878 "B<PTRACE_GETSIGINFO> call."
9882 #: build/C/man2/ptrace.2:1221
9884 "As of Linux 2.6.38, after the tracer sees the tracee ptrace-stop and until "
9885 "it restarts or kills it, the tracee will not run, and will not send "
9886 "notifications (except B<SIGKILL> death) to the tracer, even if the tracer "
9887 "enters into another B<waitpid>(2) call."
9891 #: build/C/man2/ptrace.2:1235
9893 "The kernel behavior described in the previous paragraph causes a problem "
9894 "with transparent handling of stopping signals. If the tracer restarts the "
9895 "tracee after group-stop, the stopping signal is effectively ignored\\(emthe "
9896 "tracee doesn't remain stopped, it runs. If the tracer doesn't restart the "
9897 "tracee before entering into the next B<waitpid>(2), future B<SIGCONT> "
9898 "signals will not be reported to the tracer; this would cause the B<SIGCONT> "
9899 "signals to have no effect on the tracee."
9903 #: build/C/man2/ptrace.2:1246
9905 "Since Linux 3.4, there is a method to overcome this problem: instead of "
9906 "B<PTRACE_CONT>, a B<PTRACE_LISTEN> command can be used to restart a tracee "
9907 "in a way where it does not execute, but waits for a new event which it can "
9908 "report via B<waitpid>(2) (such as when it is restarted by a B<SIGCONT>)."
9912 #: build/C/man2/ptrace.2:1246
9914 msgid "PTRACE_EVENT stops"
9918 #: build/C/man2/ptrace.2:1252
9920 "If the tracer sets B<PTRACE_O_TRACE_*> options, the tracee will enter ptrace-"
9921 "stops called B<PTRACE_EVENT> stops."
9925 #: build/C/man2/ptrace.2:1266
9927 "B<PTRACE_EVENT> stops are observed by the tracer as B<waitpid>(2) returning "
9928 "with I<WIFSTOPPED(status)>, and I<WSTOPSIG(status)> returns B<SIGTRAP>. An "
9929 "additional bit is set in the higher byte of the status word: the value "
9930 "I<statusE<gt>E<gt>8> will be"
9934 #: build/C/man2/ptrace.2:1268
9936 msgid " (SIGTRAP | PTRACE_EVENT_foo E<lt>E<lt> 8).\n"
9940 #: build/C/man2/ptrace.2:1270
9941 msgid "The following events exist:"
9945 #: build/C/man2/ptrace.2:1270
9947 msgid "B<PTRACE_EVENT_VFORK>"
9948 msgstr "B<PTRACE_EVENT_VFORK>"
9951 #: build/C/man2/ptrace.2:1283
9953 "Stop before return from B<vfork>(2) or B<clone>(2) with the B<CLONE_VFORK> "
9954 "flag. When the tracee is continued after this stop, it will wait for child "
9955 "to exit/exec before continuing its execution (in other words, the usual "
9956 "behavior on B<vfork>(2))."
9960 #: build/C/man2/ptrace.2:1283
9962 msgid "B<PTRACE_EVENT_FORK>"
9963 msgstr "B<PTRACE_EVENT_FORK>"
9966 #: build/C/man2/ptrace.2:1291
9968 "Stop before return from B<fork>(2) or B<clone>(2) with the exit signal set "
9973 #: build/C/man2/ptrace.2:1291
9975 msgid "B<PTRACE_EVENT_CLONE>"
9976 msgstr "B<PTRACE_EVENT_CLONE>"
9979 #: build/C/man2/ptrace.2:1295
9980 msgid "Stop before return from B<clone>(2)."
9984 #: build/C/man2/ptrace.2:1295
9986 msgid "B<PTRACE_EVENT_VFORK_DONE>"
9987 msgstr "B<PTRACE_EVENT_VFORK_DONE>"
9990 #: build/C/man2/ptrace.2:1305
9992 "Stop before return from B<vfork>(2) or B<clone>(2) with the B<CLONE_VFORK> "
9993 "flag, but after the child unblocked this tracee by exiting or execing."
9997 #: build/C/man2/ptrace.2:1311
9999 "For all four stops described above, the stop occurs in the parent (i.e., the "
10000 "tracee), not in the newly created thread. B<PTRACE_GETEVENTMSG> can be used "
10001 "to retrieve the new thread's ID."
10005 #: build/C/man2/ptrace.2:1311
10007 msgid "B<PTRACE_EVENT_EXEC>"
10008 msgstr "B<PTRACE_EVENT_EXEC>"
10010 #. type: Plain text
10011 #: build/C/man2/ptrace.2:1318
10013 "Stop before return from B<execve>(2). Since Linux 3.0, "
10014 "B<PTRACE_GETEVENTMSG> returns the former thread ID."
10018 #: build/C/man2/ptrace.2:1318
10020 msgid "B<PTRACE_EVENT_EXIT>"
10021 msgstr "B<PTRACE_EVENT_EXIT>"
10023 #. type: Plain text
10024 #: build/C/man2/ptrace.2:1334
10026 "Stop before exit (including death from B<exit_group>(2)), signal death, or "
10027 "exit caused by B<execve>(2) in a multithreaded process. "
10028 "B<PTRACE_GETEVENTMSG> returns the exit status. Registers can be examined "
10029 "(unlike when \"real\" exit happens). The tracee is still alive; it needs to "
10030 "be B<PTRACE_CONT>ed or B<PTRACE_DETACH>ed to finish exiting."
10034 #: build/C/man2/ptrace.2:1334
10036 msgid "B<PTRACE_EVENT_STOP>"
10037 msgstr "B<PTRACE_EVENT_STOP>"
10039 #. type: Plain text
10040 #: build/C/man2/ptrace.2:1346
10042 "Stop induced by B<PTRACE_INTERRUPT> command, or group-stop, or initial "
10043 "ptrace-stop when a new child is attached (only if attached using "
10044 "B<PTRACE_SEIZE>), or B<PTRACE_EVENT_STOP> if B<PTRACE_SEIZE> was used."
10048 #: build/C/man2/ptrace.2:1346
10050 msgid "B<PTRACE_EVENT_SECCOMP>"
10051 msgstr "B<PTRACE_EVENT_SECCOMP>"
10053 #. type: Plain text
10054 #: build/C/man2/ptrace.2:1357
10056 "Stop triggered by a B<seccomp>(2) rule on tracee syscall entry when "
10057 "B<PTRACE_O_TRACESECCOMP> has been set by the tracer. The seccomp event "
10058 "message data (from the B<SECCOMP_RET_DATA> portion of the seccomp filter "
10059 "rule) can be retrieved with B<PTRACE_GETEVENTMSG>."
10062 #. type: Plain text
10063 #: build/C/man2/ptrace.2:1369
10065 "B<PTRACE_GETSIGINFO> on B<PTRACE_EVENT> stops returns B<SIGTRAP> in "
10066 "I<si_signo>, with I<si_code> set to I<(eventE<lt>E<lt>8)\\ |\\ SIGTRAP>."
10070 #: build/C/man2/ptrace.2:1369
10072 msgid "Syscall-stops"
10075 #. type: Plain text
10076 #: build/C/man2/ptrace.2:1382
10078 "If the tracee was restarted by B<PTRACE_SYSCALL>, the tracee enters syscall-"
10079 "enter-stop just prior to entering any system call. If the tracer restarts "
10080 "the tracee with B<PTRACE_SYSCALL>, the tracee enters syscall-exit-stop when "
10081 "the system call is finished, or if it is interrupted by a signal. (That is, "
10082 "signal-delivery-stop never happens between syscall-enter-stop and syscall-"
10083 "exit-stop; it happens I<after> syscall-exit-stop.)"
10086 #. type: Plain text
10087 #: build/C/man2/ptrace.2:1396
10089 "Other possibilities are that the tracee may stop in a B<PTRACE_EVENT> stop, "
10090 "exit (if it entered B<_exit>(2) or B<exit_group>(2)), be killed by "
10091 "B<SIGKILL>, or die silently (if it is a thread group leader, the "
10092 "B<execve>(2) happened in another thread, and that thread is not traced by "
10093 "the same tracer; this situation is discussed later)."
10096 #. type: Plain text
10097 #: build/C/man2/ptrace.2:1411
10099 "Syscall-enter-stop and syscall-exit-stop are observed by the tracer as "
10100 "B<waitpid>(2) returning with I<WIFSTOPPED(status)> true, and "
10101 "I<WSTOPSIG(status)> giving B<SIGTRAP>. If the B<PTRACE_O_TRACESYSGOOD> "
10102 "option was set by the tracer, then I<WSTOPSIG(status)> will give the value "
10103 "I<(SIGTRAP\\ |\\ 0x80)>."
10106 #. type: Plain text
10107 #: build/C/man2/ptrace.2:1417
10109 "Syscall-stops can be distinguished from signal-delivery-stop with B<SIGTRAP> "
10110 "by querying B<PTRACE_GETSIGINFO> for the following cases:"
10114 #: build/C/man2/ptrace.2:1417
10116 msgid "I<si_code> E<lt>= 0"
10119 #. type: Plain text
10120 #: build/C/man2/ptrace.2:1429
10122 "B<SIGTRAP> was delivered as a result of a user-space action, for example, a "
10123 "system call (B<tgkill>(2), B<kill>(2), B<sigqueue>(3), etc.), expiration of "
10124 "a POSIX timer, change of state on a POSIX message queue, or completion of an "
10125 "asynchronous I/O request."
10129 #: build/C/man2/ptrace.2:1429
10131 msgid "I<si_code> == SI_KERNEL (0x80)"
10134 #. type: Plain text
10135 #: build/C/man2/ptrace.2:1433
10136 msgid "B<SIGTRAP> was sent by the kernel."
10140 #: build/C/man2/ptrace.2:1433
10142 msgid "I<si_code> == SIGTRAP or I<si_code> == (SIGTRAP|0x80)"
10145 #. type: Plain text
10146 #: build/C/man2/ptrace.2:1436
10147 msgid "This is a syscall-stop."
10150 #. type: Plain text
10151 #: build/C/man2/ptrace.2:1441
10153 "However, syscall-stops happen very often (twice per system call), and "
10154 "performing B<PTRACE_GETSIGINFO> for every syscall-stop may be somewhat "
10158 #. type: Plain text
10159 #: build/C/man2/ptrace.2:1464
10161 "Some architectures allow the cases to be distinguished by examining "
10162 "registers. For example, on x86, I<rax> == -B<ENOSYS> in syscall-enter-"
10163 "stop. Since B<SIGTRAP> (like any other signal) always happens I<after> "
10164 "syscall-exit-stop, and at this point I<rax> almost never contains -"
10165 "B<ENOSYS>, the B<SIGTRAP> looks like \"syscall-stop which is not syscall-"
10166 "enter-stop\"; in other words, it looks like a \"stray syscall-exit-stop\" "
10167 "and can be detected this way. But such detection is fragile and is best "
10171 #. type: Plain text
10172 #: build/C/man2/ptrace.2:1470
10174 "Using the B<PTRACE_O_TRACESYSGOOD> option is the recommended method to "
10175 "distinguish syscall-stops from other kinds of ptrace-stops, since it is "
10176 "reliable and does not incur a performance penalty."
10179 #. type: Plain text
10180 #: build/C/man2/ptrace.2:1481
10182 "Syscall-enter-stop and syscall-exit-stop are indistinguishable from each "
10183 "other by the tracer. The tracer needs to keep track of the sequence of "
10184 "ptrace-stops in order to not misinterpret syscall-enter-stop as syscall-exit-"
10185 "stop or vice versa. The rule is that syscall-enter-stop is always followed "
10186 "by syscall-exit-stop, B<PTRACE_EVENT> stop or the tracee's death; no other "
10187 "kinds of ptrace-stop can occur in between."
10190 #. type: Plain text
10191 #: build/C/man2/ptrace.2:1486
10193 "If after syscall-enter-stop, the tracer uses a restarting command other than "
10194 "B<PTRACE_SYSCALL>, syscall-exit-stop is not generated."
10197 #. type: Plain text
10198 #: build/C/man2/ptrace.2:1498
10200 "B<PTRACE_GETSIGINFO> on syscall-stops returns B<SIGTRAP> in I<si_signo>, "
10201 "with I<si_code> set to B<SIGTRAP> or I<(SIGTRAP|0x80)>."
10205 #: build/C/man2/ptrace.2:1498
10207 msgid "PTRACE_SINGLESTEP, PTRACE_SYSEMU, PTRACE_SYSEMU_SINGLESTEP stops"
10212 #. document stops occurring with PTRACE_SINGLESTEP, PTRACE_SYSEMU,
10213 #. PTRACE_SYSEMU_SINGLESTEP
10214 #. type: Plain text
10215 #: build/C/man2/ptrace.2:1504
10216 msgid "[Details of these kinds of stops are yet to be documented.]"
10220 #: build/C/man2/ptrace.2:1504
10222 msgid "Informational and restarting ptrace commands"
10225 #. type: Plain text
10226 #: build/C/man2/ptrace.2:1514
10228 "Most ptrace commands (all except B<PTRACE_ATTACH>, B<PTRACE_SEIZE>, "
10229 "B<PTRACE_TRACEME>, B<PTRACE_INTERRUPT>, and B<PTRACE_KILL>) require the "
10230 "tracee to be in a ptrace-stop, otherwise they fail with B<ESRCH>."
10233 #. type: Plain text
10234 #: build/C/man2/ptrace.2:1519
10236 "When the tracee is in ptrace-stop, the tracer can read and write data to the "
10237 "tracee using informational commands. These commands leave the tracee in "
10238 "ptrace-stopped state:"
10241 #. type: Plain text
10242 #: build/C/man2/ptrace.2:1531
10245 " ptrace(PTRACE_PEEKTEXT/PEEKDATA/PEEKUSER, pid, addr, 0);\n"
10246 " ptrace(PTRACE_POKETEXT/POKEDATA/POKEUSER, pid, addr, long_val);\n"
10247 " ptrace(PTRACE_GETREGS/GETFPREGS, pid, 0, &struct);\n"
10248 " ptrace(PTRACE_SETREGS/SETFPREGS, pid, 0, &struct);\n"
10249 " ptrace(PTRACE_GETREGSET, pid, NT_foo, &iov);\n"
10250 " ptrace(PTRACE_SETREGSET, pid, NT_foo, &iov);\n"
10251 " ptrace(PTRACE_GETSIGINFO, pid, 0, &siginfo);\n"
10252 " ptrace(PTRACE_SETSIGINFO, pid, 0, &siginfo);\n"
10253 " ptrace(PTRACE_GETEVENTMSG, pid, 0, &long_var);\n"
10254 " ptrace(PTRACE_SETOPTIONS, pid, 0, PTRACE_O_flags);\n"
10257 #. type: Plain text
10258 #: build/C/man2/ptrace.2:1543
10260 "Note that some errors are not reported. For example, setting signal "
10261 "information (I<siginfo>) may have no effect in some ptrace-stops, yet the "
10262 "call may succeed (return 0 and not set I<errno>); querying "
10263 "B<PTRACE_GETEVENTMSG> may succeed and return some random value if current "
10264 "ptrace-stop is not documented as returning a meaningful event message."
10267 #. type: Plain text
10268 #: build/C/man2/ptrace.2:1545
10272 #. type: Plain text
10273 #: build/C/man2/ptrace.2:1547
10275 msgid " ptrace(PTRACE_SETOPTIONS, pid, 0, PTRACE_O_flags);\n"
10278 #. type: Plain text
10279 #: build/C/man2/ptrace.2:1556
10281 "affects one tracee. The tracee's current flags are replaced. Flags are "
10282 "inherited by new tracees created and \"auto-attached\" via active "
10283 "B<PTRACE_O_TRACEFORK>, B<PTRACE_O_TRACEVFORK>, or B<PTRACE_O_TRACECLONE> "
10287 #. type: Plain text
10288 #: build/C/man2/ptrace.2:1559
10290 "Another group of commands makes the ptrace-stopped tracee run. They have "
10294 #. type: Plain text
10295 #: build/C/man2/ptrace.2:1561
10297 msgid " ptrace(cmd, pid, 0, sig);\n"
10300 #. type: Plain text
10301 #: build/C/man2/ptrace.2:1582
10303 "where I<cmd> is B<PTRACE_CONT>, B<PTRACE_LISTEN>, B<PTRACE_DETACH>, "
10304 "B<PTRACE_SYSCALL>, B<PTRACE_SINGLESTEP>, B<PTRACE_SYSEMU>, or "
10305 "B<PTRACE_SYSEMU_SINGLESTEP>. If the tracee is in signal-delivery-stop, "
10306 "I<sig> is the signal to be injected (if it is nonzero). Otherwise, I<sig> "
10307 "may be ignored. (When restarting a tracee from a ptrace-stop other than "
10308 "signal-delivery-stop, recommended practice is to always pass 0 in I<sig>.)"
10312 #: build/C/man2/ptrace.2:1582
10314 msgid "Attaching and detaching"
10317 #. type: Plain text
10318 #: build/C/man2/ptrace.2:1584
10319 msgid "A thread can be attached to the tracer using the call"
10322 #. type: Plain text
10323 #: build/C/man2/ptrace.2:1586
10325 msgid " ptrace(PTRACE_ATTACH, pid, 0, 0);\n"
10328 #. type: Plain text
10329 #: build/C/man2/ptrace.2:1588 build/C/man2/ptrace.2:2090
10333 #. type: Plain text
10334 #: build/C/man2/ptrace.2:1590
10336 msgid " ptrace(PTRACE_SEIZE, pid, 0, PTRACE_O_flags);\n"
10340 #. FIXME . Describe how to attach to a thread which is already group-stopped.
10341 #. type: Plain text
10342 #: build/C/man2/ptrace.2:1614
10344 "B<PTRACE_ATTACH> sends B<SIGSTOP> to this thread. If the tracer wants this "
10345 "B<SIGSTOP> to have no effect, it needs to suppress it. Note that if other "
10346 "signals are concurrently sent to this thread during attach, the tracer may "
10347 "see the tracee enter signal-delivery-stop with other signal(s) first! The "
10348 "usual practice is to reinject these signals until B<SIGSTOP> is seen, then "
10349 "suppress B<SIGSTOP> injection. The design bug here is that a ptrace attach "
10350 "and a concurrently delivered B<SIGSTOP> may race and the concurrent "
10351 "B<SIGSTOP> may be lost."
10354 #. type: Plain text
10355 #: build/C/man2/ptrace.2:1621
10357 "Since attaching sends B<SIGSTOP> and the tracer usually suppresses it, this "
10358 "may cause a stray B<EINTR> return from the currently executing system call "
10359 "in the tracee, as described in the \"Signal injection and suppression\" "
10363 #. type: Plain text
10364 #: build/C/man2/ptrace.2:1633
10366 "Since Linux 3.4, B<PTRACE_SEIZE> can be used instead of B<PTRACE_ATTACH>. "
10367 "B<PTRACE_SEIZE> does not stop the attached process. If you need to stop it "
10368 "after attach (or at any other time) without sending it any signals, use "
10369 "B<PTRACE_INTERRUPT> command."
10372 #. type: Plain text
10373 #: build/C/man2/ptrace.2:1635
10374 msgid "The request"
10377 #. type: Plain text
10378 #: build/C/man2/ptrace.2:1637
10380 msgid " ptrace(PTRACE_TRACEME, 0, 0, 0);\n"
10383 #. type: Plain text
10384 #: build/C/man2/ptrace.2:1643
10386 "turns the calling thread into a tracee. The thread continues to run "
10387 "(doesn't enter ptrace-stop). A common practice is to follow the "
10388 "B<PTRACE_TRACEME> with"
10391 #. type: Plain text
10392 #: build/C/man2/ptrace.2:1645
10394 msgid " raise(SIGSTOP);\n"
10397 #. type: Plain text
10398 #: build/C/man2/ptrace.2:1648
10400 "and allow the parent (which is our tracer now) to observe our signal-"
10404 #. type: Plain text
10405 #: build/C/man2/ptrace.2:1672
10407 "If the B<PTRACE_O_TRACEFORK>, B<PTRACE_O_TRACEVFORK>, or "
10408 "B<PTRACE_O_TRACECLONE> options are in effect, then children created by, "
10409 "respectively, B<vfork>(2) or B<clone>(2) with the B<CLONE_VFORK> flag, "
10410 "B<fork>(2) or B<clone>(2) with the exit signal set to B<SIGCHLD>, and "
10411 "other kinds of B<clone>(2), are automatically attached to the same tracer "
10412 "which traced their parent. B<SIGSTOP> is delivered to the children, causing "
10413 "them to enter signal-delivery-stop after they exit the system call which "
10417 #. type: Plain text
10418 #: build/C/man2/ptrace.2:1674
10419 msgid "Detaching of the tracee is performed by:"
10422 #. type: Plain text
10423 #: build/C/man2/ptrace.2:1676
10425 msgid " ptrace(PTRACE_DETACH, pid, 0, sig);\n"
10428 #. type: Plain text
10429 #: build/C/man2/ptrace.2:1684
10431 "B<PTRACE_DETACH> is a restarting operation; therefore it requires the tracee "
10432 "to be in ptrace-stop. If the tracee is in signal-delivery-stop, a signal "
10433 "can be injected. Otherwise, the I<sig> parameter may be silently ignored."
10436 #. FIXME . Describe how to detach from a group-stopped tracee so that it
10437 #. doesn't run, but continues to wait for SIGCONT.
10438 #. type: Plain text
10439 #: build/C/man2/ptrace.2:1708
10441 "If the tracee is running when the tracer wants to detach it, the usual "
10442 "solution is to send B<SIGSTOP> (using B<tgkill>(2), to make sure it goes to "
10443 "the correct thread), wait for the tracee to stop in signal-delivery-stop for "
10444 "B<SIGSTOP> and then detach it (suppressing B<SIGSTOP> injection). A design "
10445 "bug is that this can race with concurrent B<SIGSTOP>s. Another complication "
10446 "is that the tracee may enter other ptrace-stops and needs to be restarted "
10447 "and waited for again, until B<SIGSTOP> is seen. Yet another complication is "
10448 "to be sure that the tracee is not already ptrace-stopped, because no signal "
10449 "delivery happens while it is\\(emnot even B<SIGSTOP>."
10452 #. type: Plain text
10453 #: build/C/man2/ptrace.2:1716
10455 "If the tracer dies, all tracees are automatically detached and restarted, "
10456 "unless they were in group-stop. Handling of restart from group-stop is "
10457 "currently buggy, but the \"as planned\" behavior is to leave tracee stopped "
10458 "and waiting for B<SIGCONT>. If the tracee is restarted from signal-delivery-"
10459 "stop, the pending signal is injected."
10463 #: build/C/man2/ptrace.2:1716
10465 msgid "execve(2) under ptrace"
10469 #. clone(2) CLONE_THREAD says:
10470 #. If any of the threads in a thread group performs an execve(2),
10471 #. then all threads other than the thread group leader are terminated,
10472 #. and the new program is executed in the thread group leader.
10473 #. In kernel 3.1 sources, see fs/exec.c::de_thread()
10474 #. type: Plain text
10475 #: build/C/man2/ptrace.2:1735
10477 "When one thread in a multithreaded process calls B<execve>(2), the kernel "
10478 "destroys all other threads in the process, and resets the thread ID of the "
10479 "execing thread to the thread group ID (process ID). (Or, to put things "
10480 "another way, when a multithreaded process does an B<execve>(2), at "
10481 "completion of the call, it appears as though the B<execve>(2) occurred in "
10482 "the thread group leader, regardless of which thread did the B<execve>(2).) "
10483 "This resetting of the thread ID looks very confusing to tracers:"
10486 #. type: Plain text
10487 #: build/C/man2/ptrace.2:1745
10489 "All other threads stop in B<PTRACE_EVENT_EXIT> stop, if the "
10490 "B<PTRACE_O_TRACEEXIT> option was turned on. Then all other threads except "
10491 "the thread group leader report death as if they exited via B<_exit>(2) with "
10495 #. type: Plain text
10496 #: build/C/man2/ptrace.2:1753
10498 "The execing tracee changes its thread ID while it is in the B<execve>(2). "
10499 "(Remember, under ptrace, the \"pid\" returned from B<waitpid>(2), or fed "
10500 "into ptrace calls, is the tracee's thread ID.) That is, the tracee's thread "
10501 "ID is reset to be the same as its process ID, which is the same as the "
10502 "thread group leader's thread ID."
10505 #. type: Plain text
10506 #: build/C/man2/ptrace.2:1759
10508 "Then a B<PTRACE_EVENT_EXEC> stop happens, if the B<PTRACE_O_TRACEEXEC> "
10509 "option was turned on."
10512 #. type: Plain text
10513 #: build/C/man2/ptrace.2:1780
10515 "If the thread group leader has reported its B<PTRACE_EVENT_EXIT> stop by "
10516 "this time, it appears to the tracer that the dead thread leader \"reappears "
10517 "from nowhere\". (Note: the thread group leader does not report death via "
10518 "I<WIFEXITED(status)> until there is at least one other live thread. This "
10519 "eliminates the possibility that the tracer will see it dying and then "
10520 "reappearing.) If the thread group leader was still alive, for the tracer "
10521 "this may look as if thread group leader returns from a different system call "
10522 "than it entered, or even \"returned from a system call even though it was "
10523 "not in any system call\". If the thread group leader was not traced (or was "
10524 "traced by a different tracer), then during B<execve>(2) it will appear as "
10525 "if it has become a tracee of the tracer of the execing tracee."
10528 #. type: Plain text
10529 #: build/C/man2/ptrace.2:1783
10531 "All of the above effects are the artifacts of the thread ID change in the "
10535 #. type: Plain text
10536 #: build/C/man2/ptrace.2:1803
10538 "The B<PTRACE_O_TRACEEXEC> option is the recommended tool for dealing with "
10539 "this situation. First, it enables B<PTRACE_EVENT_EXEC> stop, which occurs "
10540 "before B<execve>(2) returns. In this stop, the tracer can use "
10541 "B<PTRACE_GETEVENTMSG> to retrieve the tracee's former thread ID. (This "
10542 "feature was introduced in Linux 3.0). Second, the B<PTRACE_O_TRACEEXEC> "
10543 "option disables legacy B<SIGTRAP> generation on B<execve>(2)."
10546 #. type: Plain text
10547 #: build/C/man2/ptrace.2:1809
10549 "When the tracer receives B<PTRACE_EVENT_EXEC> stop notification, it is "
10550 "guaranteed that except this tracee and the thread group leader, no other "
10551 "threads from the process are alive."
10554 #. type: Plain text
10555 #: build/C/man2/ptrace.2:1817
10557 "On receiving the B<PTRACE_EVENT_EXEC> stop notification, the tracer should "
10558 "clean up all its internal data structures describing the threads of this "
10559 "process, and retain only one data structure\\(emone which describes the "
10560 "single still running tracee, with"
10563 #. type: Plain text
10564 #: build/C/man2/ptrace.2:1819
10566 msgid " thread ID == thread group ID == process ID.\n"
10569 #. type: Plain text
10570 #: build/C/man2/ptrace.2:1823
10571 msgid "Example: two threads call B<execve>(2) at the same time:"
10574 #. type: Plain text
10575 #: build/C/man2/ptrace.2:1834
10578 "*** we get syscall-enter-stop in thread 1: **\n"
10579 "PID1 execve(\"/bin/foo\", \"foo\" E<lt>unfinished ...E<gt>\n"
10580 "*** we issue PTRACE_SYSCALL for thread 1 **\n"
10581 "*** we get syscall-enter-stop in thread 2: **\n"
10582 "PID2 execve(\"/bin/bar\", \"bar\" E<lt>unfinished ...E<gt>\n"
10583 "*** we issue PTRACE_SYSCALL for thread 2 **\n"
10584 "*** we get PTRACE_EVENT_EXEC for PID0, we issue PTRACE_SYSCALL **\n"
10585 "*** we get syscall-exit-stop for PID0: **\n"
10586 "PID0 E<lt>... execve resumedE<gt> ) = 0\n"
10589 #. type: Plain text
10590 #: build/C/man2/ptrace.2:1857
10592 "If the B<PTRACE_O_TRACEEXEC> option is I<not> in effect for the execing "
10593 "tracee, the kernel delivers an extra B<SIGTRAP> to the tracee after "
10594 "B<execve>(2) returns. This is an ordinary signal (similar to one which can "
10595 "be generated by I<kill -TRAP>), not a special kind of ptrace-stop. "
10596 "Employing B<PTRACE_GETSIGINFO> for this signal returns I<si_code> set to 0 "
10597 "(I<SI_USER>). This signal may be blocked by signal mask, and thus may be "
10598 "delivered (much) later."
10601 #. type: Plain text
10602 #: build/C/man2/ptrace.2:1876
10604 "Usually, the tracer (for example, B<strace>(1)) would not want to show this "
10605 "extra post-execve B<SIGTRAP> signal to the user, and would suppress its "
10606 "delivery to the tracee (if B<SIGTRAP> is set to B<SIG_DFL>, it is a killing "
10607 "signal). However, determining I<which> B<SIGTRAP> to suppress is not easy. "
10608 "Setting the B<PTRACE_O_TRACEEXEC> option and thus suppressing this extra "
10609 "B<SIGTRAP> is the recommended approach."
10613 #: build/C/man2/ptrace.2:1876
10615 msgid "Real parent"
10618 #. type: Plain text
10619 #: build/C/man2/ptrace.2:1883
10621 "The ptrace API (ab)uses the standard UNIX parent/child signaling over "
10622 "B<waitpid>(2). This used to cause the real parent of the process to stop "
10623 "receiving several kinds of B<waitpid>(2) notifications when the child "
10624 "process is traced by some other process."
10627 #. type: Plain text
10628 #: build/C/man2/ptrace.2:1886
10630 "Many of these bugs have been fixed, but as of Linux 2.6.38 several still "
10631 "exist; see BUGS below."
10634 #. type: Plain text
10635 #: build/C/man2/ptrace.2:1888
10636 msgid "As of Linux 2.6.38, the following is believed to work correctly:"
10639 #. type: Plain text
10640 #: build/C/man2/ptrace.2:1896
10642 "exit/death by signal is reported first to the tracer, then, when the tracer "
10643 "consumes the B<waitpid>(2) result, to the real parent (to the real parent "
10644 "only when the whole multithreaded process exits). If the tracer and the "
10645 "real parent are the same process, the report is sent only once."
10648 #. type: Plain text
10649 #: build/C/man2/ptrace.2:1901
10651 "On success, the B<PTRACE_PEEK*> requests return the requested data (but see "
10652 "NOTES), while other requests return zero."
10653 msgstr "成功すると B<PTRACE_PEEK*> の場合は要求したデータを返し (「注意」を参照)、 それ以外の場合は 0 を返す。"
10655 #. type: Plain text
10656 #: build/C/man2/ptrace.2:1911
10658 "On error, all requests return -1, and I<errno> is set appropriately. Since "
10659 "the value returned by a successful B<PTRACE_PEEK*> request may be -1, the "
10660 "caller must clear I<errno> before the call, and then check it afterward to "
10661 "determine whether or not an error occurred."
10662 msgstr "エラーの場合は -1 を返し、 I<errno> が適切に設定される。 B<PTRACE_PEEK*> が成功して返す値も-1 になることがあるため、 呼び出し元は呼び出しを行う前に I<errno> をクリアして、 あとで I<errno> を調べ、エラーか発生したのかどうかを判断しなければならない。"
10664 #. type: Plain text
10665 #: build/C/man2/ptrace.2:1915
10667 "(i386 only) There was an error with allocating or freeing a debug register."
10668 msgstr "(i386 のみ) デバッグレジスターの確保または解放でエラーが発生した。"
10670 #. type: Plain text
10671 #: build/C/man2/ptrace.2:1926
10673 "There was an attempt to read from or write to an invalid area in the "
10674 "tracer's or the tracee's memory, probably because the area wasn't mapped or "
10675 "accessible. Unfortunately, under Linux, different variations of this fault "
10676 "will return B<EIO> or B<EFAULT> more or less arbitrarily."
10677 msgstr "tracer または tracee のメモリーの不正な領域に読み書きしようとした。 おそらくその領域がマッピングされていないか、 その領域へのアクセスが許されていないかである。 不運なことに、Linux ではこのようなエラーの場合、多かれ少なかれ 恣意的に B<EIO> を返したり B<EFAULT> を返したりすることがある。"
10679 #. type: Plain text
10680 #: build/C/man2/ptrace.2:1929
10681 msgid "An attempt was made to set an invalid option."
10682 msgstr "不正なオプションを設定しようとした。"
10684 #. type: Plain text
10685 #: build/C/man2/ptrace.2:1936
10687 "I<request> is invalid, or an attempt was made to read from or write to an "
10688 "invalid area in the tracer's or the tracee's memory, or there was a word-"
10689 "alignment violation, or an invalid signal was specified during a restart "
10691 msgstr "I<request> が不正である。 または、tracer または tracee のメモリーの 不正な領域に読み書きしようとした。 または、ワード境界違反があった。 または、実行再開の要求で不正なシグナルを指定した。"
10693 #. type: Plain text
10694 #: build/C/man2/ptrace.2:1949
10696 "The specified process cannot be traced. This could be because the tracer "
10697 "has insufficient privileges (the required capability is B<CAP_SYS_PTRACE>); "
10698 "unprivileged processes cannot trace processes that they cannot send signals "
10699 "to or those running set-user-ID/set-group-ID programs, for obvious reasons. "
10700 "Alternatively, the process may already be being traced, or (on kernels "
10701 "before 2.6.26) be B<init>(1) (PID 1)."
10702 msgstr "指定したプロセスをトレースすることができない。これは tracer が 必要な権限 (必要なケーパビリティは B<CAP_SYS_PTRACE>) を持っていないことが原因の場合がある。 分かりやすい理由を挙げるなら、 非特権プロセスはシグナルを送ることができないプロセスをトレースできないし、 set-user-ID/set-group-ID プログラムを実行しているプロセスはトレースできない。 または、プロセスはすでにトレース中である、 または (カーネル 2.6.26 より前では) B<init>(1) プロセス (PID が 1) である。"
10704 #. type: Plain text
10705 #: build/C/man2/ptrace.2:1954
10707 "The specified process does not exist, or is not currently being traced by "
10708 "the caller, or is not stopped (for requests that require a stopped tracee)."
10709 msgstr "指定したプロセスが存在しない。 または、指定したプロセスは呼び出したプロセスがトレース中のプロセスではない。 または、指定したプロセスが停止していない (tracee が停止していることが必要な要求の場合)。"
10711 #. type: Plain text
10712 #: build/C/man2/ptrace.2:1956
10713 msgid "SVr4, 4.3BSD."
10714 msgstr "SVr4, 4.3BSD."
10716 #. type: Plain text
10717 #: build/C/man2/ptrace.2:1971
10719 "Although arguments to B<ptrace>() are interpreted according to the "
10720 "prototype given, glibc currently declares B<ptrace>() as a variadic "
10721 "function with only the I<request> argument fixed. It is recommended to "
10722 "always supply four arguments, even if the requested operation does not use "
10723 "them, setting unused/ignored arguments to I<0L> or I<(void\\ *)\\ 0>."
10724 msgstr "B<ptrace>() の引き数は上のようなプロトタイプに基づいて解釈されるが、 glibc では、現在のところ B<ptrace>() は I<request> 引き数だけが固定の可変長引き数関数として宣言されている。 要求する操作が引き数を使用しない場合であっても、 未使用や無視される引き数には I<0L> や I<(void\\ *)\\ 0> を設定して、 4 つの引き数を常に省略せずに指定することを推奨する。"
10726 #. See commit 00cd5c37afd5f431ac186dd131705048c0a11fdb
10727 #. type: Plain text
10728 #: build/C/man2/ptrace.2:1976
10730 "In Linux kernels before 2.6.26, B<init>(1), the process with PID 1, may not "
10733 "バージョン 2.6.26 より前の Linux カーネルでは、 B<init>(1) すなわち PID が 1 "
10734 "のプロセスはトレースすることができない。"
10736 #. See http://lkml.org/lkml/2008/5/8/375
10737 #. type: Plain text
10738 #: build/C/man2/ptrace.2:1983
10740 "The layout of the contents of memory and the USER area are quite operating-"
10741 "system- and architecture-specific. The offset supplied, and the data "
10742 "returned, might not entirely match with the definition of I<struct user>."
10744 "メモリーや USER 領域の内容や配置はオペレーティングシステムごと、アーキテク"
10745 "チャーごとに 非常に依存する。 オフセットが指定された場合、返されるデータは "
10746 "I<struct user> の定義と完全に一致しないこともありえる。"
10748 #. type: Plain text
10749 #: build/C/man2/ptrace.2:1986
10751 "The size of a \"word\" is determined by the operating-system variant (e.g., "
10752 "for 32-bit Linux it is 32 bits)."
10754 "「ワード (word) 」の大きさはオペレーティングシステムによって決まる。 (例え"
10755 "ば、32 ビットの Linux では 32 ビットである、など。)"
10757 #. type: Plain text
10758 #: build/C/man2/ptrace.2:1994
10760 "This page documents the way the B<ptrace>() call works currently in Linux. "
10761 "Its behavior differs significantly on other flavors of UNIX. In any case, "
10762 "use of B<ptrace>() is highly specific to the operating system and "
10765 "このマニュアルは現在の Linux における B<ptrace>() コールの動作について記述し"
10766 "ている。他の UNIX では その動作は著しく異なる。 いかなる場合も B<ptrace>() "
10767 "を使うとオペレーションシステムやアーキテクチャーに非常に依存したものになる。"
10770 #: build/C/man2/ptrace.2:1994
10772 msgid "C library/kernel ABI differences"
10773 msgstr "C ライブラリとカーネル ABI の違い"
10775 #. type: Plain text
10776 #: build/C/man2/ptrace.2:2006
10778 "At the system call level, the B<PTRACE_PEEKTEXT>, B<PTRACE_PEEKDATA>, and "
10779 "B<PTRACE_PEEKUSER> requests have a different API: they store the result at "
10780 "the address specified by the I<data> parameter, and the return value is the "
10781 "error flag. The glibc wrapper function provides the API given in "
10782 "DESCRIPTION above, with the result being returned via the function return "
10786 #. type: Plain text
10787 #: build/C/man2/ptrace.2:2017
10789 "On hosts with 2.6 kernel headers, B<PTRACE_SETOPTIONS> is declared with a "
10790 "different value than the one for 2.4. This leads to applications compiled "
10791 "with 2.6 kernel headers failing when run on 2.4 kernels. This can be worked "
10792 "around by redefining B<PTRACE_SETOPTIONS> to B<PTRACE_OLDSETOPTIONS>, if "
10795 "カーネル 2.6 のヘッダーがインストールされたホストでは、 B<PTRACE_SETOPTIONS> "
10796 "はカーネル 2.4 のヘッダーとは異なる値で宣言される。 このため、カーネル 2.6 の"
10797 "ヘッダーでコンパイルされたアプリケーションは カーネル 2.4 では正しく動作しな"
10798 "い。 この問題は、 B<PTRACE_SETOPTIONS> が定義されていた際は、 "
10799 "B<PTRACE_SETOPTIONS> を B<PTRACE_OLDSETOPTIONS> に定義し直すことで対処でき"
10802 #. type: Plain text
10803 #: build/C/man2/ptrace.2:2020
10805 "Group-stop notifications are sent to the tracer, but not to real parent. "
10806 "Last confirmed on 2.6.38.6."
10809 #. Note from Denys Vlasenko:
10810 #. Here "exits" means any kind of death - _exit, exit_group,
10811 #. signal death. Signal death and exit_group cases are trivial,
10812 #. though: since signal death and exit_group kill all other threads
10813 #. too, "until all other threads exit" thing happens rather soon
10814 #. in these cases. Therefore, only _exit presents observably
10815 #. puzzling behavior to ptrace users: thread leader _exit's,
10816 #. but WIFEXITED isn't reported! We are trying to explain here
10818 #. FIXME . need to test/verify this scenario
10819 #. type: Plain text
10820 #: build/C/man2/ptrace.2:2051
10822 "If a thread group leader is traced and exits by calling B<_exit>(2), a "
10823 "B<PTRACE_EVENT_EXIT> stop will happen for it (if requested), but the "
10824 "subsequent B<WIFEXITED> notification will not be delivered until all other "
10825 "threads exit. As explained above, if one of other threads calls "
10826 "B<execve>(2), the death of the thread group leader will I<never> be "
10827 "reported. If the execed thread is not traced by this tracer, the tracer "
10828 "will never know that B<execve>(2) happened. One possible workaround is to "
10829 "B<PTRACE_DETACH> the thread group leader instead of restarting it in this "
10830 "case. Last confirmed on 2.6.38.6."
10833 #. type: Plain text
10834 #: build/C/man2/ptrace.2:2061
10836 "A B<SIGKILL> signal may still cause a B<PTRACE_EVENT_EXIT> stop before "
10837 "actual signal death. This may be changed in the future; B<SIGKILL> is meant "
10838 "to always immediately kill tasks even under ptrace. Last confirmed on "
10842 #. type: Plain text
10843 #: build/C/man2/ptrace.2:2079
10845 "Some system calls return with B<EINTR> if a signal was sent to a tracee, but "
10846 "delivery was suppressed by the tracer. (This is very typical operation: it "
10847 "is usually done by debuggers on every attach, in order to not introduce a "
10848 "bogus B<SIGSTOP>). As of Linux 3.2.9, the following system calls are "
10849 "affected (this list is likely incomplete): B<epoll_wait>(2), and B<read>(2) "
10850 "from an B<inotify>(7) file descriptor. The usual symptom of this bug is "
10851 "that when you attach to a quiescent process with the command"
10854 #. type: Plain text
10855 #: build/C/man2/ptrace.2:2081
10857 msgid " strace -p E<lt>process-IDE<gt>\n"
10860 #. type: Plain text
10861 #: build/C/man2/ptrace.2:2084
10862 msgid "then, instead of the usual and expected one-line output such as"
10865 #. type: Plain text
10866 #: build/C/man2/ptrace.2:2087
10868 msgid " restart_syscall(E<lt>... resuming interrupted call ...E<gt>_\n"
10871 #. type: Plain text
10872 #: build/C/man2/ptrace.2:2093
10874 msgid " select(6, [5], NULL, [5], NULL_\n"
10877 #. type: Plain text
10878 #: build/C/man2/ptrace.2:2097
10880 "('_' denotes the cursor position), you observe more than one line. For "
10884 #. type: Plain text
10885 #: build/C/man2/ptrace.2:2101
10888 " clock_gettime(CLOCK_MONOTONIC, {15370, 690928118}) = 0\n"
10889 " epoll_wait(4,_\n"
10892 #. type: Plain text
10893 #: build/C/man2/ptrace.2:2122
10895 "What is not visible here is that the process was blocked in "
10896 "B<epoll_wait>(2) before B<strace>(1) has attached to it. Attaching caused "
10897 "B<epoll_wait>(2) to return to user space with the error B<EINTR>. In this "
10898 "particular case, the program reacted to B<EINTR> by checking the current "
10899 "time, and then executing B<epoll_wait>(2) again. (Programs which do not "
10900 "expect such \"stray\" B<EINTR> errors may behave in an unintended way upon "
10901 "an B<strace>(1) attach.)"
10904 #. type: Plain text
10905 #: build/C/man2/ptrace.2:2137
10907 "B<gdb>(1), B<strace>(1), B<clone>(2), B<execve>(2), B<fork>(2), "
10908 "B<gettid>(2), B<seccomp>(2), B<sigaction>(2), B<tgkill>(2), B<vfork>(2), "
10909 "B<waitpid>(2), B<exec>(3), B<capabilities>(7), B<signal>(7)"
10911 "B<gdb>(1), B<strace>(1), B<clone>(2), B<execve>(2), B<fork>(2), "
10912 "B<gettid>(2), B<seccomp>(2), B<sigaction>(2), B<tgkill>(2), B<vfork>(2), "
10913 "B<waitpid>(2), B<exec>(3), B<capabilities>(7), B<signal>(7)"
10916 #: build/C/man2/quotactl.2:27
10922 #: build/C/man2/quotactl.2:27
10925 msgstr "2010-06-16"
10927 #. type: Plain text
10928 #: build/C/man2/quotactl.2:30
10929 msgid "quotactl - manipulate disk quotas"
10930 msgstr "quotactl - ディスク quota を操作する"
10932 #. type: Plain text
10933 #: build/C/man2/quotactl.2:34
10936 "B<#include E<lt>sys/quota.hE<gt>>\n"
10937 "B<#include E<lt>xfs/xqm.hE<gt>>\n"
10939 "B<#include E<lt>sys/quota.hE<gt>>\n"
10940 "B<#include E<lt>xfs/xqm.hE<gt>>\n"
10942 #. type: Plain text
10943 #: build/C/man2/quotactl.2:37
10945 msgid "B<int quotactl(int >I<cmd>B<, const char *>I<special>B<, int >I<id>B<, caddr_t >I<addr>B<);>\n"
10946 msgstr "B<int quotactl(int >I<cmd>B<, const char *>I<special>B<, int >I<id>B<, caddr_t >I<addr>B<);>\n"
10948 #. type: Plain text
10949 #: build/C/man2/quotactl.2:49
10951 "The quota system can be used to set per-user and per-group limits on the "
10952 "amount of disk space used on a filesystem. For each user and/or group, a "
10953 "soft limit and a hard limit can be set for each filesystem. The hard limit "
10954 "can't be exceeded. The soft limit can be exceeded, but warnings will "
10955 "ensue. Moreover, the user can't exceed the soft limit for more than one "
10956 "week (by default) at a time; after this time, the soft limit counts as a "
10960 #. type: Plain text
10961 #: build/C/man2/quotactl.2:74
10963 "The B<quotactl>() call manipulates disk quotas. The I<cmd> argument "
10964 "indicates a command to be applied to the user or group ID specified in "
10965 "I<id>. To initialize the I<cmd> argument, use the I<QCMD(subcmd, type)> "
10966 "macro. The I<type> value is either B<USRQUOTA>, for user quotas, or "
10967 "B<GRPQUOTA>, for group quotas. The I<subcmd> value is described below."
10970 #. type: Plain text
10971 #: build/C/man2/quotactl.2:79
10973 "The I<special> argument is a pointer to a null-terminated string containing "
10974 "the pathname of the (mounted) block special device for the filesystem being "
10978 #. type: Plain text
10979 #: build/C/man2/quotactl.2:87
10981 "The I<addr> argument is the address of an optional, command-specific, data "
10982 "structure that is copied in or out of the system. The interpretation of "
10983 "I<addr> is given with each command below."
10986 #. type: Plain text
10987 #: build/C/man2/quotactl.2:91
10988 msgid "The I<subcmd> value is one of the following:"
10989 msgstr "I<subcmd> の値は以下のいずれかである"
10992 #: build/C/man2/quotactl.2:91
10994 msgid "B<Q_QUOTAON>"
10995 msgstr "B<Q_QUOTAON>"
10997 #. type: Plain text
10998 #: build/C/man2/quotactl.2:98
11000 "Turn on quotas for a filesystem. The I<id> argument is the identification "
11001 "number of the quota format to be used. Currently, there are three supported "
11006 #: build/C/man2/quotactl.2:99
11008 msgid "B<QFMT_VFS_OLD>"
11011 #. type: Plain text
11012 #: build/C/man2/quotactl.2:102
11013 msgid "The original quota format."
11017 #: build/C/man2/quotactl.2:102
11019 msgid "B<QFMT_VFS_V0>"
11022 #. type: Plain text
11023 #: build/C/man2/quotactl.2:106
11025 "The standard VFS v0 quota format, which can handle 32-bit UIDs and GIDs and "
11026 "quota limits up to 2^42 bytes and 2^32 inodes."
11030 #: build/C/man2/quotactl.2:106
11032 msgid "B<QFMT_VFS_V1>"
11035 #. type: Plain text
11036 #: build/C/man2/quotactl.2:110
11038 "A quota format that can handle 32-bit UIDs and GIDs and quota limits of 2^64 "
11039 "bytes and 2^64 inodes."
11042 #. type: Plain text
11043 #: build/C/man2/quotactl.2:121
11045 "The I<addr> argument points to the pathname of a file containing the quotas "
11046 "for the filesystem. The quota file must exist; it is normally created with "
11047 "the B<quotacheck>(8) program. This operation requires privilege "
11048 "(B<CAP_SYS_ADMIN>)."
11052 #: build/C/man2/quotactl.2:121
11054 msgid "B<Q_QUOTAOFF>"
11055 msgstr "B<Q_QUOTAOFF>"
11057 #. type: Plain text
11058 #: build/C/man2/quotactl.2:131
11060 "Turn off quotas for a filesystem. The I<addr> and I<id> arguments are "
11061 "ignored. This operation requires privilege (B<CAP_SYS_ADMIN>)."
11065 #: build/C/man2/quotactl.2:131
11067 msgid "B<Q_GETQUOTA>"
11068 msgstr "B<Q_GETQUOTA>"
11070 #. type: Plain text
11071 #: build/C/man2/quotactl.2:142
11073 "Get disk quota limits and current usage for user or group I<id>. The "
11074 "I<addr> argument is a pointer to a I<dqblk> structure defined in I<E<lt>sys/"
11075 "quota.hE<gt>> as follows:"
11078 #. type: Plain text
11079 #: build/C/man2/quotactl.2:147 build/C/man2/quotactl.2:234
11082 "/* uint64_t is an unsigned 64-bit integer;\n"
11083 " uint32_t is an unsigned 32-bit integer */\n"
11086 #. type: Plain text
11087 #: build/C/man2/quotactl.2:167
11090 "struct dqblk { /* Definition since Linux 2.4.22 */\n"
11091 " uint64_t dqb_bhardlimit; /* absolute limit on disk\n"
11092 " quota blocks alloc */\n"
11093 " uint64_t dqb_bsoftlimit; /* preferred limit on\n"
11094 " disk quota blocks */\n"
11095 " uint64_t dqb_curspace; /* current quota block\n"
11097 " uint64_t dqb_ihardlimit; /* maximum number of\n"
11098 " allocated inodes */\n"
11099 " uint64_t dqb_isoftlimit; /* preferred inode limit */\n"
11100 " uint64_t dqb_curinodes; /* current number of\n"
11101 " allocated inodes */\n"
11102 " uint64_t dqb_btime; /* time limit for excessive\n"
11104 " uint64_t dqb_itime; /* time limit for excessive\n"
11106 " uint32_t dqb_valid; /* bit mask of QIF_*\n"
11111 #. type: Plain text
11112 #: build/C/man2/quotactl.2:170
11115 "/* Flags in dqb_valid that indicate which fields in\n"
11116 " dqblk structure are valid. */\n"
11119 #. type: Plain text
11120 #: build/C/man2/quotactl.2:181
11123 "#define QIF_BLIMITS 1\n"
11124 "#define QIF_SPACE 2\n"
11125 "#define QIF_ILIMITS 4\n"
11126 "#define QIF_INODES 8\n"
11127 "#define QIF_BTIME 16\n"
11128 "#define QIF_ITIME 32\n"
11129 "#define QIF_LIMITS (QIF_BLIMITS | QIF_ILIMITS)\n"
11130 "#define QIF_USAGE (QIF_SPACE | QIF_INODES)\n"
11131 "#define QIF_TIMES (QIF_BTIME | QIF_ITIME)\n"
11132 "#define QIF_ALL (QIF_LIMITS | QIF_USAGE | QIF_TIMES)\n"
11135 #. type: Plain text
11136 #: build/C/man2/quotactl.2:198
11138 "The I<dqb_valid> field is a bit mask that is set to indicate the entries in "
11139 "the I<dqblk> structure that are valid. Currently, the kernel fills in all "
11140 "entries of the I<dqblk> structure and marks them as valid in the "
11141 "I<dqb_valid> field. Unprivileged users may retrieve only their own quotas; "
11142 "a privileged user (B<CAP_SYS_ADMIN>) can retrieve the quotas of any user."
11146 #: build/C/man2/quotactl.2:198
11148 msgid "B<Q_SETQUOTA>"
11149 msgstr "B<Q_SETQUOTA>"
11151 #. type: Plain text
11152 #: build/C/man2/quotactl.2:218
11154 "Set quota information for user or group I<id>, using the information "
11155 "supplied in the I<dqblk> structure pointed to by I<addr>. The I<dqb_valid> "
11156 "field of the I<dqblk> structure indicates which entries in the structure "
11157 "have been set by the caller. This operation supersedes the B<Q_SETQLIM> and "
11158 "B<Q_SETUSE> operations in the previous quota interfaces. This operation "
11159 "requires privilege (B<CAP_SYS_ADMIN>)."
11163 #: build/C/man2/quotactl.2:218
11165 msgid "B<Q_GETINFO>"
11166 msgstr "B<Q_GETINFO>"
11168 #. type: Plain text
11169 #: build/C/man2/quotactl.2:229
11171 "Get information (like grace times) about quotafile. The I<addr> argument "
11172 "should be a pointer to a I<dqinfo> structure. This structure is defined in "
11173 "I<E<lt>sys/quota.hE<gt>> as follows:"
11176 #. type: Plain text
11177 #: build/C/man2/quotactl.2:238
11180 "struct dqinfo { /* Defined since kernel 2.4.22 */\n"
11181 " uint64_t dqi_bgrace; /* Time before block soft limit\n"
11182 " becomes hard limit */\n"
11184 "struct dqinfo { /* Defined since kernel 2.4.22 */\n"
11185 " uint64_t dqi_bgrace; /* Time before block soft limit\n"
11186 " becomes hard limit */\n"
11188 #. type: Plain text
11189 #: build/C/man2/quotactl.2:245
11192 " uint64_t dqi_igrace; /* Time before inode soft limit\n"
11193 " becomes hard limit */\n"
11194 " uint32_t dqi_flags; /* Flags for quotafile\n"
11196 " uint32_t dqi_valid;\n"
11199 " uint64_t dqi_igrace; /* Time before inode soft limit\n"
11200 " becomes hard limit */\n"
11201 " uint32_t dqi_flags; /* Flags for quotafile\n"
11203 " uint32_t dqi_valid;\n"
11206 #. type: Plain text
11207 #: build/C/man2/quotactl.2:247
11209 msgid "/* Bits for dqi_flags */\n"
11210 msgstr "/* Bits for dqi_flags */\n"
11212 #. type: Plain text
11213 #: build/C/man2/quotactl.2:249
11215 msgid "/* Quota format QFMT_VFS_OLD */\n"
11216 msgstr "/* Quota format QFMT_VFS_OLD */\n"
11218 #. type: Plain text
11219 #: build/C/man2/quotactl.2:251
11221 msgid "#define V1_DQF_RSQUASH\t1 /* Root squash enabled */\n"
11222 msgstr "#define V1_DQF_RSQUASH\t1 /* Root squash enabled */\n"
11224 #. type: Plain text
11225 #: build/C/man2/quotactl.2:253
11227 msgid "/* Other quota formats have no dqi_flags bits defined */\n"
11228 msgstr "/* Other quota formats have no dqi_flags bits defined */\n"
11230 #. type: Plain text
11231 #: build/C/man2/quotactl.2:256
11234 "/* Flags in dqi_valid that indicate which fields in\n"
11235 " dqinfo structure are valid. */\n"
11237 "/* Flags in dqi_valid that indicate which fields in\n"
11238 " dqinfo structure are valid. */\n"
11240 #. type: Plain text
11241 #: build/C/man2/quotactl.2:261
11244 "# define IIF_BGRACE\t1\n"
11245 "# define IIF_IGRACE\t2\n"
11246 "# define IIF_FLAGS\t4\n"
11247 "# define IIF_ALL (IIF_BGRACE | IIF_IGRACE | IIF_FLAGS)\n"
11249 "# define IIF_BGRACE\t1\n"
11250 "# define IIF_IGRACE\t2\n"
11251 "# define IIF_FLAGS\t4\n"
11252 "# define IIF_ALL (IIF_BGRACE | IIF_IGRACE | IIF_FLAGS)\n"
11254 #. type: Plain text
11255 #: build/C/man2/quotactl.2:277
11257 "The I<dqi_valid> field in the I<dqinfo> structure indicates the entries in "
11258 "the structure that are valid. Currently, the kernel fills in all entries of "
11259 "the I<dqinfo> structure and marks them all as valid in the I<dqi_valid> "
11260 "field. The I<id> argument is ignored."
11264 #: build/C/man2/quotactl.2:277
11266 msgid "B<Q_SETINFO>"
11267 msgstr "B<Q_SETINFO>"
11269 #. type: Plain text
11270 #: build/C/man2/quotactl.2:301
11272 "Set information about quotafile. The I<addr> argument should be a pointer "
11273 "to a I<dqinfo> structure. The I<dqi_valid> field of the I<dqinfo> structure "
11274 "indicates the entries in the structure that have been set by the caller. "
11275 "This operation supersedes the B<Q_SETGRACE> and B<Q_SETFLAGS> operations in "
11276 "the previous quota interfaces. The I<id> argument is ignored. This "
11277 "operation requires privilege (B<CAP_SYS_ADMIN>)."
11281 #: build/C/man2/quotactl.2:301
11283 msgid "B<Q_GETFMT>"
11284 msgstr "B<Q_GETFMT>"
11286 #. type: Plain text
11287 #: build/C/man2/quotactl.2:308
11289 "Get quota format used on the specified filesystem. The I<addr> argument "
11290 "should be a pointer to a 4-byte buffer where the format number will be "
11295 #: build/C/man2/quotactl.2:308
11300 #. type: Plain text
11301 #: build/C/man2/quotactl.2:319
11303 "Update the on-disk copy of quota usages for a filesystem. If I<special> is "
11304 "NULL, then all filesystems with active quotas are sync'ed. The I<addr> and "
11305 "I<id> arguments are ignored."
11309 #: build/C/man2/quotactl.2:319
11311 msgid "B<Q_GETSTATS>"
11312 msgstr "B<Q_GETSTATS>"
11314 #. Q_GETSTATS was removed in kernel 2.4.22.
11315 #. type: Plain text
11316 #: build/C/man2/quotactl.2:339
11318 "Get statistics and other generic information about the quota subsystem. The "
11319 "I<addr> argument should be a pointer to a I<dqstats> structure in which data "
11320 "should be stored. This structure is defined in I<E<lt>sys/quota.hE<gt>>. "
11321 "The I<special> and I<id> arguments are ignored. This operation is obsolete "
11322 "and not supported by recent kernels. Files in I</proc/sys/fs/quota/> carry "
11323 "the information instead."
11326 #. type: Plain text
11327 #: build/C/man2/quotactl.2:342
11329 "For XFS filesystems making use of the XFS Quota Manager (XQM), the above "
11330 "commands are bypassed and the following commands are used:"
11334 #: build/C/man2/quotactl.2:342
11336 msgid "B<Q_XQUOTAON>"
11337 msgstr "B<Q_XQUOTAON>"
11339 #. type: Plain text
11340 #: build/C/man2/quotactl.2:363
11342 "Turn on quotas for an XFS filesystem. XFS provides the ability to turn on/"
11343 "off quota limit enforcement with quota accounting. Therefore, XFS expects "
11344 "I<addr> to be a pointer to an I<unsigned int> that contains either the flags "
11345 "B<XFS_QUOTA_UDQ_ACCT> and/or B<XFS_QUOTA_UDQ_ENFD> (for user quota), or "
11346 "B<XFS_QUOTA_GDQ_ACCT> and/or B<XFS_QUOTA_GDQ_ENFD> (for group quota), as "
11347 "defined in I<E<lt>xfs/xqm.hE<gt>>. This operation requires privilege "
11348 "(B<CAP_SYS_ADMIN>)."
11352 #: build/C/man2/quotactl.2:363
11354 msgid "B<Q_XQUOTAOFF>"
11355 msgstr "B<Q_XQUOTAOFF>"
11357 #. type: Plain text
11358 #: build/C/man2/quotactl.2:374
11360 "Turn off quotas for an XFS filesystem. As with B<Q_QUOTAON>, XFS "
11361 "filesystems expect a pointer to an I<unsigned int> that specifies whether "
11362 "quota accounting and/or limit enforcement need to be turned off. This "
11363 "operation requires privilege (B<CAP_SYS_ADMIN>)."
11367 #: build/C/man2/quotactl.2:374
11369 msgid "B<Q_XGETQUOTA>"
11370 msgstr "B<Q_XGETQUOTA>"
11372 #. type: Plain text
11373 #: build/C/man2/quotactl.2:388
11375 "Get disk quota limits and current usage for user I<id>. The I<addr> "
11376 "argument is a pointer to an I<fs_disk_quota> structure (defined in "
11377 "I<E<lt>xfs/xqm.hE<gt>>). Unprivileged users may retrieve only their own "
11378 "quotas; a privileged user (B<CAP_SYS_ADMIN>) may retrieve the quotas of any "
11383 #: build/C/man2/quotactl.2:388
11385 msgid "B<Q_XSETQLIM>"
11386 msgstr "B<Q_XSETQLIM>"
11388 #. type: Plain text
11389 #: build/C/man2/quotactl.2:400
11391 "Set disk quota limits for user I<id>. The I<addr> argument is a pointer to "
11392 "an I<fs_disk_quota> structure (defined in I<E<lt>xfs/xqm.hE<gt>>). This "
11393 "operation requires privilege (B<CAP_SYS_ADMIN>)."
11397 #: build/C/man2/quotactl.2:400
11399 msgid "B<Q_XGETQSTAT>"
11400 msgstr "B<Q_XGETQSTAT>"
11402 #. type: Plain text
11403 #: build/C/man2/quotactl.2:408
11405 "Returns an I<fs_quota_stat> structure containing XFS filesystem-specific "
11406 "quota information. This is useful for finding out how much space is used to "
11407 "store quota information, and also to get quotaon/off status of a given local "
11412 #: build/C/man2/quotactl.2:408
11414 msgid "B<Q_XQUOTARM>"
11415 msgstr "B<Q_XQUOTARM>"
11417 #. type: Plain text
11418 #: build/C/man2/quotactl.2:412
11420 "Free the disk space taken by disk quotas. Quotas must have already been "
11424 #. type: Plain text
11425 #: build/C/man2/quotactl.2:419
11427 "There is no command equivalent to B<Q_SYNC> for XFS since B<sync>(1) writes "
11428 "quota information to disk (in addition to the other filesystem metadata that "
11432 #. type: Plain text
11433 #: build/C/man2/quotactl.2:427
11435 "On success, B<quotactl>() returns 0; on error -1 is returned, and I<errno> "
11436 "is set to indicate the error."
11438 "成功すると、 B<quotactl>() は 0 を返す。\n"
11439 "エラーの場合、-1 を返し、 I<errno> をエラーを示す値に設定する。"
11441 #. type: Plain text
11442 #: build/C/man2/quotactl.2:434
11443 msgid "I<addr> or I<special> is invalid."
11446 #. type: Plain text
11447 #: build/C/man2/quotactl.2:440
11448 msgid "I<cmd> or I<type> is invalid."
11451 #. type: Plain text
11452 #: build/C/man2/quotactl.2:447
11453 msgid "The file specified by I<special> or I<addr> does not exist."
11456 #. type: Plain text
11457 #: build/C/man2/quotactl.2:452
11458 msgid "The kernel has not been compiled with the B<CONFIG_QUOTA> option."
11462 #: build/C/man2/quotactl.2:452
11465 msgstr "B<ENOTBLK>"
11467 #. type: Plain text
11468 #: build/C/man2/quotactl.2:456
11469 msgid "I<special> is not a block device."
11470 msgstr "I<special> がブロックデバイスではない。"
11472 #. type: Plain text
11473 #: build/C/man2/quotactl.2:461
11475 "The caller lacked the required privilege (B<CAP_SYS_ADMIN>) for the "
11476 "specified operation."
11479 #. type: Plain text
11480 #: build/C/man2/quotactl.2:465
11482 "No disk quota is found for the indicated user. Quotas have not been turned "
11483 "on for this filesystem."
11486 #. type: Plain text
11487 #: build/C/man2/quotactl.2:474
11488 msgid "If I<cmd> is B<Q_SETQUOTA>, B<quotactl>() may also set I<errno> to:"
11491 #. type: Plain text
11492 #: build/C/man2/quotactl.2:477
11493 msgid "Specified limits are out of range allowed by quota format."
11496 #. type: Plain text
11497 #: build/C/man2/quotactl.2:486
11498 msgid "If I<cmd> is B<Q_QUOTAON>, B<quotactl>() may also set I<errno> to:"
11501 #. type: Plain text
11502 #: build/C/man2/quotactl.2:495
11504 "The quota file pointed to by I<addr> exists, but is not a regular file; or, "
11505 "the quota file pointed to by I<addr> exists, but is not on the filesystem "
11506 "pointed to by I<special>."
11509 #. type: Plain text
11510 #: build/C/man2/quotactl.2:501
11512 "B<Q_QUOTAON> attempted, but another B<Q_QUOTAON> had already been performed."
11515 #. type: Plain text
11516 #: build/C/man2/quotactl.2:504
11517 msgid "The quota file is corrupted."
11518 msgstr "quota ファイルが壊れている。"
11520 #. type: Plain text
11521 #: build/C/man2/quotactl.2:507
11522 msgid "Specified quota format was not found."
11525 #. type: Plain text
11526 #: build/C/man2/quotactl.2:512
11527 msgid "B<quota>(1), B<getrlimit>(2), B<quotacheck>(8), B<quotaon>(8)"
11528 msgstr "B<quota>(1), B<getrlimit>(2), B<quotacheck>(8), B<quotaon>(8)"
11531 #: build/C/man2/sendfile.2:19
11537 #: build/C/man2/sendfile.2:19
11540 msgstr "2011-09-14"
11542 #. type: Plain text
11543 #: build/C/man2/sendfile.2:22
11544 msgid "sendfile - transfer data between file descriptors"
11545 msgstr "sendfile - ファイルディスクリプター間でデータを転送する"
11547 #. type: Plain text
11548 #: build/C/man2/sendfile.2:24
11549 msgid "B<#include E<lt>sys/sendfile.hE<gt>>"
11550 msgstr "B<#include E<lt>sys/sendfile.hE<gt>>"
11552 #. The below is too ugly. Comments about glibc versions belong
11553 #. in the notes, not in the header.
11554 #. .B #include <features.h>
11556 #. .B #if (__GLIBC__==2 && __GLIBC_MINOR__>=1) || __GLIBC__>2
11558 #. .B #include <sys/sendfile.h>
11562 #. .B #include <sys/types.h>
11564 #. .B /* No system prototype before glibc 2.1. */
11566 #. .BI "ssize_t sendfile(int" " out_fd" ", int" " in_fd" ", off_t *" #. offset ", size_t" " count" )
11569 #. type: Plain text
11570 #: build/C/man2/sendfile.2:47
11572 "B<ssize_t sendfile(int>I< out_fd>B<, int>I< in_fd>B<, off_t *>I<offset>B<, "
11573 "size_t>I< count>B<);>"
11575 "B<ssize_t sendfile(int>I< out_fd>B<, int>I< in_fd>B<, off_t *>I<offset>B<, "
11576 "size_t>I< count>B<);>"
11578 #. type: Plain text
11579 #: build/C/man2/sendfile.2:57
11581 "B<sendfile>() copies data between one file descriptor and another. Because "
11582 "this copying is done within the kernel, B<sendfile>() is more efficient "
11583 "than the combination of B<read>(2) and B<write>(2), which would require "
11584 "transferring data to and from user space."
11586 "B<sendfile>() は、あるファイルディスクリプターから別の ファイルディスクリプ"
11587 "ターへのデータのコピーを行う。 このコピーはカーネル内で行われるので、 "
11588 "B<sendfile>() は、 B<read>(2) と B<write>(2) を組み合わせるよりも効率がよ"
11589 "い。 B<read>(2) や B<write>(2) ではユーザー空間との間でデータの転送が必要と"
11592 #. type: Plain text
11593 #: build/C/man2/sendfile.2:62
11595 "I<in_fd> should be a file descriptor opened for reading and I<out_fd> should "
11596 "be a descriptor opened for writing."
11598 "I<in_fd> は読み込みのためにオープンされたファイルディスクリプター、 "
11599 "I<out_fd> は書き込みのためにオープンされたディスクリプターでなければならな"
11602 #. type: Plain text
11603 #: build/C/man2/sendfile.2:83
11605 "If I<offset> is not NULL, then it points to a variable holding the file "
11606 "offset from which B<sendfile>() will start reading data from I<in_fd>. "
11607 "When B<sendfile>() returns, this variable will be set to the offset of the "
11608 "byte following the last byte that was read. If I<offset> is not NULL, then "
11609 "B<sendfile>() does not modify the current file offset of I<in_fd>; "
11610 "otherwise the current file offset is adjusted to reflect the number of bytes "
11611 "read from I<in_fd>."
11613 "I<offset> が NULL でない場合、 I<offset> は B<sendfile>() が I<in_fd> のどこ"
11614 "からデータを読み始めるかを示すファイルオフセットを保持する変数への ポインター"
11615 "である。 B<sendfile>() は復帰する時、この変数に最後に読み込んだバイトの 次の"
11616 "バイトのオフセットを書き込む。 I<offset> が NULL でない場合、 B<sendfile>() "
11617 "は I<in_fd> のファイルオフセットの現在値を変更しない。 NULL の場合は、ファイ"
11618 "ルオフセットの現在値を I<in_fd> から読み込んだバイト数を反映した位置に調整す"
11621 #. type: Plain text
11622 #: build/C/man2/sendfile.2:90
11624 "If I<offset> is NULL, then data will be read from I<in_fd> starting at the "
11625 "current file offset, and the file offset will be updated by the call."
11627 "I<offset> が NULL の場合、データは I<in_fd> の現在のファイルオフセットから読"
11628 "み出され、 ファイルオフセットはこの呼び出しで更新される。"
11630 #. type: Plain text
11631 #: build/C/man2/sendfile.2:93
11632 msgid "I<count> is the number of bytes to copy between the file descriptors."
11633 msgstr "I<count> は、ファイルディスクリプター間でコピーするバイト数である。"
11635 #. type: Plain text
11636 #: build/C/man2/sendfile.2:100
11638 "The I<in_fd> argument must correspond to a file which supports B<mmap>(2)-"
11639 "like operations (i.e., it cannot be a socket)."
11641 "I<in_fd> 引き数は B<mmap>(2) 風の操作ができるファイルを指していなければなら"
11643 "い (ソケットを指定することはできない)。"
11645 #. type: Plain text
11646 #: build/C/man2/sendfile.2:108
11648 "In Linux kernels before 2.6.33, I<out_fd> must refer to a socket. Since "
11649 "Linux 2.6.33 it can be any file. If it is a regular file, then "
11650 "B<sendfile>() changes the file offset appropriately."
11652 "2.6.33 より前の Linux カーネルでは I<out_fd> はソケットを参照していなければ"
11654 "らない。Linux 2.6.33 以降では、任意のファイルを参照することができる。\n"
11655 "通常のファイルの場合には B<sendfile>() はファイルオフセットを適切に変更する。"
11657 #. type: Plain text
11658 #: build/C/man2/sendfile.2:115
11660 "If the transfer was successful, the number of bytes written to I<out_fd> is "
11661 "returned. On error, -1 is returned, and I<errno> is set appropriately."
11663 "転送に成功した場合、 I<out_fd> に書き込まれたバイト数を返す。エラーの場"
11664 "合、-1 を返し、 I<errno> に適切な値を設定する。"
11666 #. type: Plain text
11667 #: build/C/man2/sendfile.2:121
11669 "Nonblocking I/O has been selected using B<O_NONBLOCK> and the write would "
11672 "B<O_NONBLOCK> を用いて非ブロック I/O が選択されたが、書き込みがブロックされ"
11675 #. type: Plain text
11676 #: build/C/man2/sendfile.2:125
11678 "The input file was not opened for reading or the output file was not opened "
11681 "入力ファイルが読み込みのためにオープンされていないか、 出力ファイルが書き込み"
11684 #. type: Plain text
11685 #: build/C/man2/sendfile.2:128
11686 msgid "Bad address."
11687 msgstr "アドレスがおかしい。"
11689 #. type: Plain text
11690 #: build/C/man2/sendfile.2:134
11692 "Descriptor is not valid or locked, or an B<mmap>(2)-like operation is not "
11693 "available for I<in_fd>."
11695 "ディスクリプターが有効でないか、ロックされている。もしくは B<mmap>(2) 風の操"
11696 "作が I<in_fd> では利用できない。"
11698 #. type: Plain text
11699 #: build/C/man2/sendfile.2:138
11700 msgid "Unspecified error while reading from I<in_fd>."
11701 msgstr "I<in_fd> から読み込んでいるうちに予期しないエラーが起こった。"
11703 #. type: Plain text
11704 #: build/C/man2/sendfile.2:142
11705 msgid "Insufficient memory to read from I<in_fd>."
11706 msgstr "I<in_fd> から読み込むための十分なメモリーがない。"
11708 #. type: Plain text
11709 #: build/C/man2/sendfile.2:148
11711 "B<sendfile>() is a new feature in Linux 2.2. The include file I<E<lt>sys/"
11712 "sendfile.hE<gt>> is present since glibc 2.1."
11714 "B<sendfile> は Linux 2.2 の新しい機能である。 インクルードファイル "
11715 "I<E<lt>sys/sendfile.hE<gt>> は glibc 2.1 から存在している。"
11717 #. type: Plain text
11718 #: build/C/man2/sendfile.2:150
11719 msgid "Not specified in POSIX.1-2001, or other standards."
11720 msgstr "POSIX.1-2001 や他の標準では規定されていない。"
11722 #. type: Plain text
11723 #: build/C/man2/sendfile.2:155
11725 "Other UNIX systems implement B<sendfile>() with different semantics and "
11726 "prototypes. It should not be used in portable programs."
11728 "他の UNIX システムでは、異なった方式やプロトタイプで B<sendfile>() を実装し"
11729 "ている。移植性を考慮したプログラムでは使用すべきではない。"
11731 #. type: Plain text
11732 #: build/C/man2/sendfile.2:165
11734 "If you plan to use B<sendfile>() for sending files to a TCP socket, but "
11735 "need to send some header data in front of the file contents, you will find "
11736 "it useful to employ the B<TCP_CORK> option, described in B<tcp>(7), to "
11737 "minimize the number of packets and to tune performance."
11739 "B<sendfile>() を使って TCP ソケットにファイルを送ろうとしていて、 ファイルの"
11740 "内容の前にヘッダーデータを付け加える必要がある場合は、 パケット数を最小にして"
11741 "性能を上げるために B<tcp>(7) に記述されている B<TCP_CORK> オプションを使うと"
11744 #. type: Plain text
11745 #: build/C/man2/sendfile.2:171
11747 "In Linux 2.4 and earlier, I<out_fd> could also refer to a regular file, and "
11748 "B<sendfile>() changed the current offset of that file."
11750 "Linux 2.4 とそれ以前のバージョンでも、 I<out_fd> は通常のファイルを参照で"
11752 "B<sendfile>() はそのファイルのオフセットの現在値を変更していた。"
11754 #. type: Plain text
11755 #: build/C/man2/sendfile.2:183
11757 "The original Linux B<sendfile>() system call was not designed to handle "
11758 "large file offsets. Consequently, Linux 2.4 added B<sendfile64>(), with a "
11759 "wider type for the I<offset> argument. The glibc B<sendfile>() wrapper "
11760 "function transparently deals with the kernel differences."
11762 "元々の Linux B<sendfile>() システムコールは大きなファイルオフセットを\n"
11763 "扱えるように設計されていなかった。その結果、Linux 2.4 で、\n"
11764 "ビット幅の大きな I<offset> 引き数を持った B<sendfile64>() が追加された。\n"
11765 "glibc の B<sendfile>() のラッパー関数はカーネルによるこの違いを吸収している。"
11767 #. type: Plain text
11768 #: build/C/man2/sendfile.2:192
11770 "Applications may wish to fall back to B<read>(2)/B<write>(2) in the case "
11771 "where B<sendfile>() fails with B<EINVAL> or B<ENOSYS>."
11773 "B<sendfile>() が B<EINVAL> や B<ENOSYS> で失敗するような場合は、 アプリケー"
11774 "ションは B<read>(2)/B<write>(2) に戻すことを考えてもよいかもしれない。"
11776 #. type: Plain text
11777 #: build/C/man2/sendfile.2:197
11779 "The Linux-specific B<splice>(2) call supports transferring data between "
11780 "arbitrary files (e.g., a pair of sockets)."
11782 "Linux 固有の B<splice>(2) システムコールは、任意のファイル間 (例えば、\n"
11783 "ソケット同士) でのデータ転送をサポートしている。"
11785 #. type: Plain text
11786 #: build/C/man2/sendfile.2:202
11787 msgid "B<mmap>(2), B<open>(2), B<socket>(2), B<splice>(2)"
11788 msgstr "B<mmap>(2), B<open>(2), B<socket>(2), B<splice>(2)"
11791 #: build/C/man2/set_tid_address.2:25
11793 msgid "SET_TID_ADDRESS"
11794 msgstr "SET_TID_ADDRESS"
11797 #: build/C/man2/set_tid_address.2:25
11800 msgstr "2014-07-08"
11802 #. type: Plain text
11803 #: build/C/man2/set_tid_address.2:28
11804 msgid "set_tid_address - set pointer to thread ID"
11805 msgstr "set_tid_address - スレッド ID へのポインターを設定する"
11807 #. type: Plain text
11808 #: build/C/man2/set_tid_address.2:31
11810 msgid "B<#include E<lt>linux/unistd.hE<gt>>\n"
11811 msgstr "B<#include E<lt>linux/unistd.hE<gt>>\n"
11813 #. type: Plain text
11814 #: build/C/man2/set_tid_address.2:33
11816 msgid "B<long set_tid_address(int *>I<tidptr>B<);>\n"
11817 msgstr "B<long set_tid_address(int *>I<tidptr>B<);>\n"
11819 #. type: Plain text
11820 #: build/C/man2/set_tid_address.2:40
11822 "For each thread, the kernel maintains two attributes (addresses) called "
11823 "I<set_child_tid> and I<clear_child_tid>. These two attributes contain the "
11824 "value NULL by default."
11826 "各スレッドについて、カーネルは I<set_child_tid> と I<clear_child_tid> という "
11827 "2 つの属性を保持する。この 2 つの属性はデフォルトでは NULL である。"
11830 #: build/C/man2/set_tid_address.2:40
11832 msgid "I<set_child_tid>"
11833 msgstr "I<set_child_tid>"
11835 #. type: Plain text
11836 #: build/C/man2/set_tid_address.2:51
11838 "If a thread is started using B<clone>(2) with the B<CLONE_CHILD_SETTID> "
11839 "flag, I<set_child_tid> is set to the value passed in the I<ctid> argument of "
11840 "that system call."
11842 "スレッドが B<CLONE_CHILD_SETTID> フラグを指定した B<clone>(2) によって開始さ"
11843 "れた場合、 I<set_child_tid> は B<clone>(2) のシステムコールの I<ctid> 引き数"
11846 #. type: Plain text
11847 #: build/C/man2/set_tid_address.2:56
11849 "When I<set_child_tid> is set, the very first thing the new thread does is to "
11850 "write its thread ID at this address."
11852 "I<set_child_tid> が設定された場合、一番最初に新しいスレッドが行うことは、 こ"
11853 "のアドレスに自身のスレッド ID を書き込むことである。"
11856 #: build/C/man2/set_tid_address.2:56
11858 msgid "I<clear_child_tid>"
11859 msgstr "I<clear_child_tid>"
11861 #. type: Plain text
11862 #: build/C/man2/set_tid_address.2:67
11864 "If a thread is started using B<clone>(2) with the B<CLONE_CHILD_CLEARTID> "
11865 "flag, I<clear_child_tid> is set to the value passed in the I<ctid> argument "
11866 "of that system call."
11868 "スレッドが B<CLONE_CHILD_CLEARTID> フラグを指定した B<clone>(2) によって開始"
11869 "された場合、 I<clear_child_tid> は B<clone>(2) のシステムコールの I<ctid> 引"
11872 #. type: Plain text
11873 #: build/C/man2/set_tid_address.2:74
11875 "The system call B<set_tid_address>() sets the I<clear_child_tid> value for "
11876 "the calling thread to I<tidptr>."
11878 "システムコール B<set_tid_address>() は呼び出し元スレッドの "
11879 "I<clear_child_tid> の値を I<tidptr> に設定する。"
11881 #. type: Plain text
11882 #: build/C/man2/set_tid_address.2:82
11884 "When a thread whose I<clear_child_tid> is not NULL terminates, then, if the "
11885 "thread is sharing memory with other threads, then 0 is written at the "
11886 "address specified in I<clear_child_tid> and the kernel performs the "
11887 "following operation:"
11889 "I<clear_child_tid> が NULL でないスレッドが終了すると、そのスレッドが他のス"
11890 "レッドとメモリーを共有していれば、 I<clear_child_tid> で指定されたアドレスに "
11891 "0 が書き込まれ、カーネルは以下の処理を実行する。"
11893 #. type: Plain text
11894 #: build/C/man2/set_tid_address.2:84
11896 msgid " futex(clear_child_tid, FUTEX_WAKE, 1, NULL, NULL, 0);\n"
11897 msgstr " futex(clear_child_tid, FUTEX_WAKE, 1, NULL, NULL, 0);\n"
11899 #. type: Plain text
11900 #: build/C/man2/set_tid_address.2:88
11902 "The effect of this operation is to wake a single thread that is performing a "
11903 "futex wait on the memory location. Errors from the futex wake operation are "
11906 "この処理の結果、このメモリーアドレスに対する futex wait を実行しているスレッ"
11907 "ドを一つ起こす (wake)。 futex wake 操作でのエラーは無視される。"
11909 #. type: Plain text
11910 #: build/C/man2/set_tid_address.2:91
11911 msgid "B<set_tid_address>() always returns the caller's thread ID."
11912 msgstr "B<set_tid_address>() は常に呼び出し元のスレッド ID を返す。"
11914 #. type: Plain text
11915 #: build/C/man2/set_tid_address.2:94
11916 msgid "B<set_tid_address>() always succeeds."
11917 msgstr "B<set_tid_address>() は常に成功する。"
11919 #. type: Plain text
11920 #: build/C/man2/set_tid_address.2:97
11922 "This call is present since Linux 2.5.48. Details as given here are valid "
11923 "since Linux 2.5.49."
11925 "この呼び出しは Linux 2.5.48 以降で存在する。 ここで書かれた詳細は Linux "
11928 #. type: Plain text
11929 #: build/C/man2/set_tid_address.2:103
11930 msgid "B<clone>(2), B<futex>(2), B<gettid>(2)"
11931 msgstr "B<clone>(2), B<futex>(2), B<gettid>(2)"
11934 #: build/C/man2/splice.2:26
11940 #: build/C/man2/splice.2:26 build/C/man2/tee.2:26
11943 msgstr "2014-12-31"
11945 #. type: Plain text
11946 #: build/C/man2/splice.2:29
11947 msgid "splice - splice data to/from a pipe"
11948 msgstr "splice - パイプとの間でデータを継ぎ合わせる"
11950 #. type: Plain text
11951 #: build/C/man2/splice.2:33 build/C/man2/tee.2:33
11954 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
11955 "B<#include E<lt>fcntl.hE<gt>>\n"
11957 "B<#define _GNU_SOURCE> /* feature_test_macros(7) 参照 */\n"
11958 "B<#include E<lt>fcntl.hE<gt>>\n"
11960 #. Return type was long before glibc 2.7
11961 #. type: Plain text
11962 #: build/C/man2/splice.2:38
11965 "B<ssize_t splice(int >I<fd_in>B<, loff_t *>I<off_in>B<, int >I<fd_out>B<,>\n"
11966 "B< loff_t *>I<off_out>B<, size_t >I<len>B<, unsigned int >I<flags>B<);>\n"
11968 "B<ssize_t splice(int >I<fd_in>B<, loff_t *>I<off_in>B<, int >I<fd_out>B<,>\n"
11969 "B< loff_t *>I<off_out>B<, size_t >I<len>B<, unsigned int >I<flags>B<);>\n"
11971 #. type: Plain text
11972 #: build/C/man2/splice.2:50
11974 "B<splice>() moves data between two file descriptors without copying between "
11975 "kernel address space and user address space. It transfers up to I<len> "
11976 "bytes of data from the file descriptor I<fd_in> to the file descriptor "
11977 "I<fd_out>, where one of the descriptors must refer to a pipe."
11979 "B<splice>() は、カーネルアドレス空間とユーザーアドレス空間との間のコピーを伴"
11980 "わずに、 2 つのファイルディスクリプター間でデータの移動を行う。 ファイルディ"
11981 "スクリプター I<fd_in> からファイルディスクリプター I<fd_out> へ最大 I<len> バ"
11982 "イトを転送する。 2 つのファイルディスクリプターのうち一つは パイプを参照して"
11985 #. type: Plain text
11986 #: build/C/man2/splice.2:55
11987 msgid "The following semantics apply for I<fd_in> and I<off_in>:"
11988 msgstr "I<fd_in> と I<off_in> には以下のルールが適用される。"
11990 #. type: Plain text
11991 #: build/C/man2/splice.2:61
11992 msgid "If I<fd_in> refers to a pipe, then I<off_in> must be NULL."
11994 "I<fd_in> がパイプを参照している場合、 I<off_in> は NULL でなければならない。"
11996 #. type: Plain text
11997 #: build/C/man2/splice.2:70
11999 "If I<fd_in> does not refer to a pipe and I<off_in> is NULL, then bytes are "
12000 "read from I<fd_in> starting from the current file offset, and the current "
12001 "file offset is adjusted appropriately."
12003 "I<fd_in> がパイプを参照しておらず、かつ I<off_in> が NULL の場合、 バイトは "
12004 "I<fd_in> の現在のファイルオフセットから読み出され、 現在のファイルオフセット"
12007 #. type: Plain text
12008 #: build/C/man2/splice.2:83
12010 "If I<fd_in> does not refer to a pipe and I<off_in> is not NULL, then "
12011 "I<off_in> must point to a buffer which specifies the starting offset from "
12012 "which bytes will be read from I<fd_in>; in this case, the current file "
12013 "offset of I<fd_in> is not changed."
12015 "I<fd_in> がパイプを参照しておらず、 I<off_in> が NULL でない場合、 I<off_in> "
12016 "は I<fd_in> からのデータ読み出しを開始する先頭オフセットを格納したバッファー "
12017 "へのポインターでなければならない。この場合、 I<fd_in> の現在のファイルオフ"
12020 #. type: Plain text
12021 #: build/C/man2/splice.2:88
12022 msgid "Analogous statements apply for I<fd_out> and I<off_out>."
12023 msgstr "I<fd_out> と I<off_out> に関しても同様である。"
12025 #. type: Plain text
12026 #: build/C/man2/splice.2:93 build/C/man2/vmsplice.2:78
12028 "The I<flags> argument is a bit mask that is composed by ORing together zero "
12029 "or more of the following values:"
12031 "I<flags> 引き数には、以下の値の 0 個以上をビット毎の論理和の形で指定する。"
12034 #: build/C/man2/splice.2:93 build/C/man2/tee.2:62 build/C/man2/vmsplice.2:78
12036 msgid "B<SPLICE_F_MOVE>"
12037 msgstr "B<SPLICE_F_MOVE>"
12039 #. type: Plain text
12040 #: build/C/man2/splice.2:106
12042 "Attempt to move pages instead of copying. This is only a hint to the "
12043 "kernel: pages may still be copied if the kernel cannot move the pages from "
12044 "the pipe, or if the pipe buffers don't refer to full pages. The initial "
12045 "implementation of this flag was buggy: therefore starting in Linux 2.6.21 it "
12046 "is a no-op (but is still permitted in a B<splice>() call); in the future, a "
12047 "correct implementation may be restored."
12049 "ページのコピーでなく移動を試みる。 これはカーネルに対するヒントでしかない。 "
12050 "つまり、カーネルがパイプからページを移動できない場合や、 パイプバッファーが"
12051 "ページ全部を参照していない場合は、 ページのコピーが行われることもある。 この"
12052 "フラグの最初の実装にはバグがあった。そのため、 Linux 2.6.21 以降ではこのフラ"
12053 "グの操作はできないようになっている (ただし、 B<splice>() コールでこのフラグ"
12054 "を指定することは今も認められている)。 将来、正しい実装が行われることだろう。"
12057 #: build/C/man2/splice.2:106 build/C/man2/tee.2:68 build/C/man2/vmsplice.2:84
12059 msgid "B<SPLICE_F_NONBLOCK>"
12060 msgstr "B<SPLICE_F_NONBLOCK>"
12062 #. type: Plain text
12063 #: build/C/man2/splice.2:115
12065 "Do not block on I/O. This makes the splice pipe operations nonblocking, but "
12066 "B<splice>() may nevertheless block because the file descriptors that are "
12067 "spliced to/from may block (unless they have the B<O_NONBLOCK> flag set)."
12069 "入出力時に停止 (block) しない。 このフラグを指定すると、 splice によるパイプ"
12070 "操作を非停止モード (nonblocking) で 行おうとするが、その場合でも "
12071 "B<splice>() は停止することもある。なぜなら、データのやり取りを行う ファイル"
12072 "ディスクリプターは (B<O_NONBLOCK> フラグをセットされていない場合) 停止する可"
12076 #: build/C/man2/splice.2:115 build/C/man2/tee.2:73 build/C/man2/vmsplice.2:91
12078 msgid "B<SPLICE_F_MORE>"
12079 msgstr "B<SPLICE_F_MORE>"
12081 #. type: Plain text
12082 #: build/C/man2/splice.2:129
12084 "More data will be coming in a subsequent splice. This is a helpful hint "
12085 "when the I<fd_out> refers to a socket (see also the description of "
12086 "B<MSG_MORE> in B<send>(2), and the description of B<TCP_CORK> in B<tcp>(7))"
12088 "この後の splice でさらに転送されるデータがあることを示す。 このフラグは "
12089 "I<fd_out> がソケットを参照している場合に有用なヒントとなる (B<send>(2) の "
12090 "B<MSG_MORE> や B<tcp>(7) の B<TCP_CORK> の説明も参照)。"
12093 #: build/C/man2/splice.2:129 build/C/man2/tee.2:79 build/C/man2/vmsplice.2:97
12095 msgid "B<SPLICE_F_GIFT>"
12096 msgstr "B<SPLICE_F_GIFT>"
12098 #. type: Plain text
12099 #: build/C/man2/splice.2:135
12100 msgid "Unused for B<splice>(); see B<vmsplice>(2)."
12101 msgstr "B<splice>() では使用しない。 B<vmsplice>(2) 参照。"
12103 #. type: Plain text
12104 #: build/C/man2/splice.2:144
12106 "Upon successful completion, B<splice>() returns the number of bytes spliced "
12107 "to or from the pipe. A return value of 0 means that there was no data to "
12108 "transfer, and it would not make sense to block, because there are no writers "
12109 "connected to the write end of the pipe referred to by I<fd_in>."
12111 "成功して完了すると、 B<splice>() はパイプから出し入れしたバイト数を返す。 返"
12112 "り値 0 はデータの転送が行わなかったことを示す。 この場合、処理を停止 (block) "
12113 "しても無意味である。 なぜなら、 I<fd_in> が参照するパイプの書き込み側に接続さ"
12116 #. type: Plain text
12117 #: build/C/man2/splice.2:150
12119 "On error, B<splice>() returns -1 and I<errno> is set to indicate the error."
12121 "エラーの場合、 B<splice>() は -1 を返し、 I<errno> にエラーを示す値を設定す"
12124 #. type: Plain text
12125 #: build/C/man2/splice.2:157 build/C/man2/tee.2:107
12126 #: build/C/man2/vmsplice.2:133
12128 "B<SPLICE_F_NONBLOCK> was specified in I<flags>, and the operation would "
12131 "B<SPLICE_F_NONBLOCK> が I<flags> に指定されていて、かつ操作が停止するような状"
12134 #. type: Plain text
12135 #: build/C/man2/splice.2:161
12137 "One or both file descriptors are not valid, or do not have proper read-write "
12140 "ファイルディスクリプターの一方または両方が有効ではない、 もしくは適切な read-"
12143 #. The append-mode error is given since 2.6.27; in earlier kernels,
12144 #. splice() in append mode was broken
12145 #. type: Plain text
12146 #: build/C/man2/splice.2:169
12148 "Target filesystem doesn't support splicing; target file is opened in append "
12149 "mode; neither of the descriptors refers to a pipe; or offset given for "
12150 "nonseekable device."
12152 "対象のファイルシステムが splice に対応していない、 または対象のファイルが追記"
12153 "モードでオープンされている、 またはディスクリプターのどちらもパイプを参照して"
12154 "いない、 または seek できないデバイスに対してオフセットが指定された。"
12156 #. type: Plain text
12157 #: build/C/man2/splice.2:172 build/C/man2/tee.2:120
12158 #: build/C/man2/vmsplice.2:148
12159 msgid "Out of memory."
12163 #: build/C/man2/splice.2:172
12168 #. type: Plain text
12169 #: build/C/man2/splice.2:179
12171 "Either I<off_in> or I<off_out> was not NULL, but the corresponding file "
12172 "descriptor refers to a pipe."
12174 "I<off_in> か I<off_out> のいずれかが NULL ではないが、対応するファイルディス"
12175 "クリプターが パイプを参照している。"
12177 #. type: Plain text
12178 #: build/C/man2/splice.2:184
12180 "The B<splice>() system call first appeared in Linux 2.6.17; library support "
12181 "was added to glibc in version 2.5."
12183 "B<splice>() システムコールは Linux 2.6.17 で初めて登場した。\n"
12184 "ライブラリによるサポートは glibc バージョン 2.5 で追加された。"
12186 #. type: Plain text
12187 #: build/C/man2/splice.2:196
12189 "The three system calls B<splice>(), B<vmsplice>(2), and B<tee>(2), provide "
12190 "user-space programs with full control over an arbitrary kernel buffer, "
12191 "implemented within the kernel using the same type of buffer that is used for "
12192 "a pipe. In overview, these system calls perform the following tasks:"
12194 "3 つのシステムコール (B<splice>(), B<vmsplice>(2), B<tee>(2)) を使うと、ユー"
12195 "ザー空間プログラムは任意のカーネルバッファーに対する 完全な制御ができる。カー"
12196 "ネルバッファーは、パイプに使用されているのと 同種のバッファーを使ってカーネル"
12197 "内に実装されている。 大まかにいうと、これらのシステムコールは以下の仕事を行"
12201 #: build/C/man2/splice.2:196
12203 msgid "B<splice>()"
12204 msgstr "B<splice>()"
12206 #. type: Plain text
12207 #: build/C/man2/splice.2:200
12209 "moves data from the buffer to an arbitrary file descriptor, or vice versa, "
12210 "or from one buffer to another."
12212 "バッファーから任意のファイルディスクリプターや、その逆方向、 もしくはあるバッ"
12213 "ファーから別のバッファーへの、データ移動を行う。"
12216 #: build/C/man2/splice.2:200
12221 #. type: Plain text
12222 #: build/C/man2/splice.2:203
12223 msgid "\"copies\" the data from one buffer to another."
12224 msgstr "あるバッファーから別のバッファーへのデータ「コピー」を行う。"
12227 #: build/C/man2/splice.2:203
12229 msgid "B<vmsplice>(2)"
12230 msgstr "B<vmsplice>(2)"
12232 #. type: Plain text
12233 #: build/C/man2/splice.2:206
12234 msgid "\"copies\" data from user space into the buffer."
12235 msgstr "ユーザー空間からバッファーへのデータ「コピー」を行う。"
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:237
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."
12266 "ここではコピーの話をしているが、実際のコピーは一般的に回避される。 カーネル"
12267 "は、パイプバッファーをカーネルメモリーのページへのポインター集合として 実装"
12268 "し、ページへの参照回数を管理することで、これを実現している。 カーネルは、対象"
12269 "となるページを参照する (出力バッファー用の) ポインターを 新規に作成することで"
12270 "バッファー内のページの「コピー」を作成し、 そのページの参照回数を増やす。つま"
12271 "り、ポインターだけがコピーされ、 バッファーのページはコピーされない。"
12273 #. type: Plain text
12274 #: build/C/man2/splice.2:240
12275 msgid "See B<tee>(2)."
12276 msgstr "B<tee>(2) 参照。"
12278 #. type: Plain text
12279 #: build/C/man2/splice.2:244
12280 msgid "B<sendfile>(2), B<tee>(2), B<vmsplice>(2)"
12281 msgstr "B<sendfile>(2), B<tee>(2), B<vmsplice>(2)"
12284 #: build/C/man2/tee.2:26
12289 #. type: Plain text
12290 #: build/C/man2/tee.2:29
12291 msgid "tee - duplicating pipe content"
12292 msgstr "tee - パイプの中身を複製する"
12294 #. type: Plain text
12295 #: build/C/man2/tee.2:36
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"
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
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)."
12312 "B<tee>() は、ファイルディスクリプター I<fd_in> が参照するパイプからファイル"
12313 "ディスクリプター I<fd_out> が参照するパイプへ最大 I<len> バイトのデータを複製"
12314 "する。 この操作では、複製されるデータは I<fd_in> からは消費されない。したがっ"
12315 "て、これらのデータをこの後の B<splice>(2) でコピーすることができる。"
12317 #. type: Plain text
12318 #: build/C/man2/tee.2:62
12320 "I<flags> is a series of modifier flags, which share the name space with "
12321 "B<splice>(2) and B<vmsplice>(2):"
12323 "I<flags> は一連の修飾フラグであり、 B<splice>(2) や B<vmsplice>(2) と共通の"
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) 参照。"
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) 参照。"
12338 #. type: Plain text
12339 #: build/C/man2/tee.2:79
12341 "Currently has no effect for B<tee>(), but may be implemented in the future; "
12342 "see B<splice>(2)."
12344 "現在のところ B<tee>() では何の効果もないが、将来的には実装される可能性があ"
12345 "る。 B<splice>(2) 参照。"
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) 参照。"
12352 #. type: Plain text
12353 #: build/C/man2/tee.2:94
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 "
12361 "成功して完了すると、 B<tee>() は入出力間で複製されたバイト数を返す。 返り値 "
12362 "0 はデータの転送が行われなかったことを示す。 この場合、処理を停止 (block) し"
12363 "ても無意味である。 なぜなら、 I<fd_in> が参照するパイプの書き込み側に接続され"
12366 #. type: Plain text
12367 #: build/C/man2/tee.2:100
12369 "On error, B<tee>() returns -1 and I<errno> is set to indicate the error."
12371 "エラーの場合、 B<tee>() は -1 を返し、 I<errno> にエラーを示す値を設定する。"
12373 #. type: Plain text
12374 #: build/C/man2/tee.2:117
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."
12379 "I<fd_in> と I<fd_out> のどちらかがパイプを参照していない。もしくは I<fd_in> "
12380 "と I<fd_out> が同じパイプを参照している。"
12382 #. type: Plain text
12383 #: build/C/man2/tee.2:125
12385 "The B<tee>() system call first appeared in Linux 2.6.17; library support "
12386 "was added to glibc in version 2.5."
12388 "B<tee>() システムコールは Linux 2.6.17 で初めて登場した。\n"
12389 "ライブラリによるサポートは glibc バージョン 2.5 で追加された。"
12391 #. type: Plain text
12392 #: build/C/man2/tee.2:136
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."
12398 "概念としては、 B<tee>() は二つのパイプ間でデータのコピーを行う。 しかし、実"
12399 "際には実データのコピーは行われない。 内部では、 B<tee>() は入力側に対する参"
12400 "照だけを作成することで出力側にデータを 追加する。"
12402 #. type: Plain text
12403 #: build/C/man2/tee.2:143
12405 "The example below implements a basic B<tee>(1) program using the B<tee>() "
12406 "system call. Here is an example of its use:"
12408 "以下の例は、 B<tee>() システムコールを使って、 基本的な B<tee>(1) プログラ"
12409 "ムを実装したものである。 以下は利用例である。"
12411 #. type: Plain text
12412 #: build/C/man2/tee.2:150
12415 "$ B<date |./a.out out.log | cat>\n"
12416 "Tue Oct 28 10:06:00 CET 2014\n"
12417 "$ B<cat out.log>\n"
12418 "Tue Oct 28 10:06:00 CET 2014\n"
12420 "$ B<date |./a.out out.log | cat>\n"
12421 "Tue Oct 28 10:06:00 CET 2014\n"
12422 "$ B<cat out.log>\n"
12423 "Tue Oct 28 10:06:00 CET 2014\n"
12426 #: build/C/man2/tee.2:152
12428 msgid "Program source"
12431 #. type: Plain text
12432 #: build/C/man2/tee.2:162
12435 "#define _GNU_SOURCE\n"
12436 "#include E<lt>fcntl.hE<gt>\n"
12437 "#include E<lt>stdio.hE<gt>\n"
12438 "#include E<lt>stdlib.hE<gt>\n"
12439 "#include E<lt>unistd.hE<gt>\n"
12440 "#include E<lt>errno.hE<gt>\n"
12441 "#include E<lt>limits.hE<gt>\n"
12443 "#define _GNU_SOURCE\n"
12444 "#include E<lt>fcntl.hE<gt>\n"
12445 "#include E<lt>stdio.hE<gt>\n"
12446 "#include E<lt>stdlib.hE<gt>\n"
12447 "#include E<lt>unistd.hE<gt>\n"
12448 "#include E<lt>errno.hE<gt>\n"
12449 "#include E<lt>limits.hE<gt>\n"
12451 #. type: Plain text
12452 #: build/C/man2/tee.2:168
12456 "main(int argc, char *argv[])\n"
12459 " int len, slen;\n"
12462 "main(int argc, char *argv[])\n"
12465 " int len, slen;\n"
12467 #. type: Plain text
12468 #: build/C/man2/tee.2:173
12471 " if (argc != 2) {\n"
12472 " fprintf(stderr, \"Usage: %s E<lt>fileE<gt>\\en\", argv[0]);\n"
12473 " exit(EXIT_FAILURE);\n"
12476 " if (argc != 2) {\n"
12477 " fprintf(stderr, \"Usage: %s E<lt>fileE<gt>\\en\", argv[0]);\n"
12478 " exit(EXIT_FAILURE);\n"
12481 #. type: Plain text
12482 #: build/C/man2/tee.2:179
12485 " fd = open(argv[1], O_WRONLY | O_CREAT | O_TRUNC, 0644);\n"
12486 " if (fd == -1) {\n"
12487 " perror(\"open\");\n"
12488 " exit(EXIT_FAILURE);\n"
12491 " fd = open(argv[1], O_WRONLY | O_CREAT | O_TRUNC, 0644);\n"
12492 " if (fd == -1) {\n"
12493 " perror(\"open\");\n"
12494 " exit(EXIT_FAILURE);\n"
12497 #. type: Plain text
12498 #: build/C/man2/tee.2:186
12503 " * tee stdin to stdout.\n"
12505 " len = tee(STDIN_FILENO, STDOUT_FILENO,\n"
12506 " INT_MAX, SPLICE_F_NONBLOCK);\n"
12510 " * tee stdin to stdout.\n"
12512 " len = tee(STDIN_FILENO, STDOUT_FILENO,\n"
12513 " INT_MAX, SPLICE_F_NONBLOCK);\n"
12515 #. type: Plain text
12516 #: build/C/man2/tee.2:195
12519 " if (len E<lt> 0) {\n"
12520 " if (errno == EAGAIN)\n"
12522 " perror(\"tee\");\n"
12523 " exit(EXIT_FAILURE);\n"
12528 " if (len E<lt> 0) {\n"
12529 " if (errno == EAGAIN)\n"
12531 " perror(\"tee\");\n"
12532 " exit(EXIT_FAILURE);\n"
12537 #. type: Plain text
12538 #: build/C/man2/tee.2:209
12542 " * Consume stdin by splicing it to a file.\n"
12544 " while (len E<gt> 0) {\n"
12545 " slen = splice(STDIN_FILENO, NULL, fd, NULL,\n"
12546 " len, SPLICE_F_MOVE);\n"
12547 " if (slen E<lt> 0) {\n"
12548 " perror(\"splice\");\n"
12556 " * Consume stdin by splicing it to a file.\n"
12558 " while (len E<gt> 0) {\n"
12559 " slen = splice(STDIN_FILENO, NULL, fd, NULL,\n"
12560 " len, SPLICE_F_MOVE);\n"
12561 " if (slen E<lt> 0) {\n"
12562 " perror(\"splice\");\n"
12569 #. type: Plain text
12570 #: build/C/man2/tee.2:213
12574 " exit(EXIT_SUCCESS);\n"
12578 " exit(EXIT_SUCCESS);\n"
12581 #. type: Plain text
12582 #: build/C/man2/tee.2:217
12583 msgid "B<splice>(2), B<vmsplice>(2)"
12584 msgstr "B<splice>(2), B<vmsplice>(2)"
12587 #: build/C/man2/vm86.2:26
12593 #: build/C/man2/vm86.2:26
12596 msgstr "2009-02-20"
12598 #. type: Plain text
12599 #: build/C/man2/vm86.2:29
12600 msgid "vm86old, vm86 - enter virtual 8086 mode"
12601 msgstr "vm86old, vm86 - 仮想 8086 モードへ移行する"
12603 #. type: Plain text
12604 #: build/C/man2/vm86.2:31
12605 msgid "B<#include E<lt>sys/vm86.hE<gt>>"
12606 msgstr "B<#include E<lt>sys/vm86.hE<gt>>"
12608 #. type: Plain text
12609 #: build/C/man2/vm86.2:33
12610 msgid "B<int vm86old(struct vm86_struct *>I<info>B<);>"
12611 msgstr "B<int vm86old(struct vm86_struct *>I<info>B<);>"
12613 #. type: Plain text
12614 #: build/C/man2/vm86.2:35
12615 msgid "B<int vm86(unsigned long >I<fn>B<, struct vm86plus_struct *>I<v86>B<);>"
12617 "B<int vm86(unsigned long >I<fn>B<, struct vm86plus_struct *>I<v86>B<);>"
12619 #. type: Plain text
12620 #: build/C/man2/vm86.2:48
12622 "The system call B<vm86>() was introduced in Linux 0.97p2. In Linux 2.1.15 "
12623 "and 2.0.28, it was renamed to B<vm86old>(), and a new B<vm86>() was "
12624 "introduced. The definition of I<struct vm86_struct> was changed in 1.1.8 "
12627 "B<vm86>() システムコールは Linux 0.97p2 で導入された。 これは Linux 2.1.15 "
12628 "と 2.0.28 で B<vm86old>() に名前が変更され、 新しい B<vm86>() が導入され"
12629 "た。 I<struct vm86_struct> の定義は 1.1.8 と 1.1.9 で変更された。"
12631 #. type: Plain text
12632 #: build/C/man2/vm86.2:52
12634 "These calls cause the process to enter VM86 mode (virtual-8086 in Intel "
12635 "literature), and are used by B<dosemu>."
12637 "これらのコールによってプロセスは VM86 モード (Intel の文書では仮想 8086 モー"
12638 "ド) へと移行する。 これらのコールは B<dosemu> で使用される。"
12640 #. type: Plain text
12641 #: build/C/man2/vm86.2:54
12642 msgid "VM86 mode is an emulation of real mode within a protected mode task."
12644 "VM86 モードはプロテクトモードタスクにおける リアルモードのエミュレーションで"
12647 #. type: Plain text
12648 #: build/C/man2/vm86.2:64
12650 "This return value is specific to i386 and indicates a problem with getting "
12653 "この返り値は i386 固有のものであり、 ユーザー空間のデータを取得する際に問題が"
12656 #. type: Plain text
12657 #: build/C/man2/vm86.2:68
12659 "This return value indicates the call is not implemented on the present "
12662 "この返り値は、このコールが現在のアーキテクチャーで実装されていないことを示"
12665 #. type: Plain text
12666 #: build/C/man2/vm86.2:73
12668 "Saved kernel stack exists. (This is a kernel sanity check; the saved stack "
12669 "should exist only within vm86 mode itself.)"
12671 "保存されたカーネルスタックが既に存在している。(これはカーネルが通常の 状態で"
12672 "あるかをチェックしている。保存されたスタックは vm86 モードで しか存在しな"
12675 #. type: Plain text
12676 #: build/C/man2/vm86.2:76
12678 "This call is specific to Linux on 32-bit Intel processors, and should not be "
12679 "used in programs intended to be portable."
12681 "この関数は 32 ビット Intel プロセッサ上の Linux 特有の関数であり、 移植を意図"
12682 "したプログラムでは使用すべきでない。"
12685 #: build/C/man2/vmsplice.2:26
12691 #: build/C/man2/vmsplice.2:26
12694 msgstr "2014-10-02"
12696 #. type: Plain text
12697 #: build/C/man2/vmsplice.2:29
12698 msgid "vmsplice - splice user pages into a pipe"
12699 msgstr "vmsplice - ユーザーページをパイプに継ぎ合わせる"
12701 #. type: Plain text
12702 #: build/C/man2/vmsplice.2:34
12705 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
12706 "B<#include E<lt>fcntl.hE<gt>>\n"
12707 "B<#include E<lt>sys/uio.hE<gt>>\n"
12709 "B<#define _GNU_SOURCE> /* feature_test_macros(7) 参照 */\n"
12710 "B<#include E<lt>fcntl.hE<gt>>\n"
12711 "B<#include E<lt>sys/uio.hE<gt>>\n"
12713 #. type: Plain text
12714 #: build/C/man2/vmsplice.2:37
12717 "B<ssize_t vmsplice(int >I<fd>B<, const struct iovec *>I<iov>B<,>\n"
12718 "B< unsigned long >I<nr_segs>B<, unsigned int >I<flags>B<);>\n"
12720 "B<ssize_t vmsplice(int >I<fd>B<, const struct iovec *>I<iov>B<,>\n"
12721 "B< unsigned long >I<nr_segs>B<, unsigned int >I<flags>B<);>\n"
12723 #. Linus: vmsplice() system call to basically do a "write to
12724 #. the buffer", but using the reference counting and VM traversal
12725 #. to actually fill the buffer. This means that the user needs to
12726 #. be careful not to reuse the user-space buffer it spliced into
12727 #. the kernel-space one (contrast this to "write()", which copies
12728 #. the actual data, and you can thus reuse the buffer immediately
12729 #. after a successful write), but that is often easy to do.
12730 #. type: Plain text
12731 #: build/C/man2/vmsplice.2:57
12733 "The B<vmsplice>() system call maps I<nr_segs> ranges of user memory "
12734 "described by I<iov> into a pipe. The file descriptor I<fd> must refer to a "
12737 "B<vmsplice>() システムコールは、 I<iov> で指定されたユーザーメモリーの "
12738 "I<nr_segs> の範囲をパイプにマッピングする。 I<fd> はパイプを参照していなけれ"
12741 #. type: Plain text
12742 #: build/C/man2/vmsplice.2:64
12744 "The pointer I<iov> points to an array of I<iovec> structures as defined in "
12745 "I<E<lt>sys/uio.hE<gt>>:"
12747 "ポインター I<iov> は I<iovec> 構造体の配列を指す。 I<iovec> 構造体は "
12748 "I<E<lt>sys/uio.hE<gt>> で以下のように定義されている:"
12750 #. type: Plain text
12751 #: build/C/man2/vmsplice.2:71
12755 " void *iov_base; /* Starting address */\n"
12756 " size_t iov_len; /* Number of bytes */\n"
12760 " void *iov_base; /* 開始アドレス */\n"
12761 " size_t iov_len; /* バイト数 */\n"
12764 #. type: Plain text
12765 #: build/C/man2/vmsplice.2:84
12766 msgid "Unused for B<vmsplice>(); see B<splice>(2)."
12767 msgstr "B<vmsplice>() では未使用。 B<splice>(2) 参照。"
12769 #. type: Plain text
12770 #: build/C/man2/vmsplice.2:97
12772 "Currently has no effect for B<vmsplice>(), but may be implemented in the "
12773 "future; see B<splice>(2)."
12775 "現在のところ B<vmsplice>() では何の効果もないが、将来的には実装される可能性"
12776 "がある。 B<splice>(2) 参照。"
12778 #. FIXME . Explain the following line in a little more detail:
12780 #. It looks like the page-alignment requirement went away with
12781 #. commit bd1a68b59c8e3bce45fb76632c64e1e063c3962d
12782 #. .... if we expect to later SPLICE_F_MOVE to the cache.
12783 #. type: Plain text
12784 #: build/C/man2/vmsplice.2:117
12786 "The user pages are a gift to the kernel. The application may not modify "
12787 "this memory ever, or page cache and on-disk data may differ. Gifting pages "
12788 "to the kernel means that a subsequent B<splice>(2) B<SPLICE_F_MOVE> can "
12789 "successfully move the pages; if this flag is not specified, then a "
12790 "subsequent B<splice>(2) B<SPLICE_F_MOVE> must copy the pages. Data must "
12791 "also be properly page aligned, both in memory and length."
12793 "ユーザーページがカーネルへ渡すもの (gift) であることを示す。 アプリケーション"
12794 "はこのメモリーを絶対に変更してはならない。 さもなければ、ページキャッシュと"
12795 "ディスク上のデータは 一致しなくなるだろう。 ページをカーネルに渡すと、この次"
12796 "の B<splice>(2) B<SPLICE_F_MOVE> でそのページの移動を行うことができる。 この"
12797 "フラグが指定されなかった場合、この次の B<splice>(2) B<SPLICE_F_MOVE> でその"
12798 "ページのコピーを行わなければならない。 データはメモリー上でページ境界にあって"
12799 "いなければならず、 長さもページ境界の倍数でなければならない。"
12801 #. type: Plain text
12802 #: build/C/man2/vmsplice.2:126
12804 "Upon successful completion, B<vmsplice>() returns the number of bytes "
12805 "transferred to the pipe. On error, B<vmsplice>() returns -1 and I<errno> "
12806 "is set to indicate the error."
12808 "成功して完了すると、 B<vmsplice>() はパイプに転送したバイト数を返す。 エラー"
12809 "の場合、 B<vmplice>() は -1 を返し、 I<errno> をエラーを示す値に設定する。"
12811 #. type: Plain text
12812 #: build/C/man2/vmsplice.2:137
12813 msgid "I<fd> either not valid, or doesn't refer to a pipe."
12814 msgstr "I<fd> が有効でない、もしくはパイプを参照していない。"
12816 #. type: Plain text
12817 #: build/C/man2/vmsplice.2:145
12819 "I<nr_segs> is greater than B<IOV_MAX>; or memory not aligned if "
12820 "B<SPLICE_F_GIFT> set."
12822 "I<nr_segs> が B<IOV_MAX> よりも大きい。または B<SPLICE_F_GIFT> が設定されたが"
12823 "メモリーがページ境界にあっていない。"
12825 #. type: Plain text
12826 #: build/C/man2/vmsplice.2:153
12828 "The B<vmsplice>() system call first appeared in Linux 2.6.17; library "
12829 "support was added to glibc in version 2.5."
12831 "B<vmsplice>() システムコールは Linux 2.6.17 で初めて登場した。\n"
12832 "ライブラリによるサポートは glibc バージョン 2.5 で追加された。"
12834 #. type: Plain text
12835 #: build/C/man2/vmsplice.2:164
12837 "B<vmsplice>() follows the other vectorized read/write type functions when "
12838 "it comes to limitations on number of segments being passed in. This limit "
12839 "is B<IOV_MAX> as defined in I<E<lt>limits.hE<gt>>. At the time of this "
12840 "writing, that limit is 1024."
12842 "指定されたセグメント数が上限に達した場合、 B<vmsplice>() は他のベクトル形式"
12843 "の read/write を行う関数と同じ動作をする。 上限は B<IOV_MAX> であり、 "
12844 "I<E<lt>limits.hE<gt>> で定義されている。 このドキュメントを書いた時点での値"
12847 #. type: Plain text
12848 #: build/C/man2/vmsplice.2:167
12849 msgid "B<splice>(2), B<tee>(2)"
12850 msgstr "B<splice>(2), B<tee>(2)"