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-02-04 23:30+0900\n"
10 "PO-Revision-Date: 2015-02-05 00:19+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:27 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:27
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:28 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:30 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:47 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:242 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:2607
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:247 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:2613 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:2659
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:279
269 #: build/C/man2/kexec_load.2:283 build/C/man2/kexec_load.2:292
270 #: build/C/man2/kexec_load.2:298 build/C/man2/kexec_load.2:301
271 #: build/C/man2/kexec_load.2:306 build/C/man2/lookup_dcookie.2:54
272 #: build/C/man2/modify_ldt.2:113 build/C/man2/pciconfig_read.2:78
273 #: build/C/man2/perf_event_open.2:2664 build/C/man2/personality.2:70
274 #: build/C/man2/pivot_root.2:114 build/C/man2/process_vm_readv.2:246
275 #: build/C/man2/process_vm_readv.2:257 build/C/man2/process_vm_readv.2:261
276 #: build/C/man2/ptrace.2:1926 build/C/man2/quotactl.2:434
277 #: build/C/man2/quotactl.2:501 build/C/man2/sendfile.2:128
278 #: build/C/man2/splice.2:161 build/C/man2/tee.2:107
279 #: build/C/man2/vmsplice.2:137
285 #: build/C/man2/arch_prctl.2:97
286 msgid "I<code> is not a valid subcommand."
287 msgstr "I<code> が有効なサブコマンドでない。"
290 #: build/C/man2/arch_prctl.2:97 build/C/man2/get_robust_list.2:99
291 #: build/C/man2/kexec_load.2:323 build/C/man2/lookup_dcookie.2:65
292 #: build/C/man2/pciconfig_read.2:105 build/C/man2/perf_event_open.2:2732
293 #: build/C/man2/pivot_root.2:120 build/C/man2/process_vm_readv.2:283
294 #: build/C/man2/ptrace.2:1936 build/C/man2/quotactl.2:456
295 #: build/C/man2/vm86.2:68
301 #. Man page written by Andi Kleen.
303 #: build/C/man2/arch_prctl.2:103
304 msgid "I<addr> is outside the process address space."
305 msgstr "I<addr> がプロセスのアドレス空間の外にある。"
308 #: build/C/man2/arch_prctl.2:103 build/C/man2/futex.2:303
309 #: build/C/man2/getunwind.2:96 build/C/man2/kexec_load.2:335
310 #: build/C/man2/lookup_dcookie.2:78 build/C/man2/modify_ldt.2:130
311 #: build/C/man2/nfsservctl.2:58 build/C/man2/outb.2:87
312 #: build/C/man2/pciconfig_read.2:112 build/C/man2/perf_event_open.2:2756
313 #: build/C/man2/perfmonctl.2:199 build/C/man2/personality.2:73
314 #: build/C/man2/pivot_root.2:128 build/C/man2/process_vm_readv.2:295
315 #: build/C/man2/ptrace.2:1954 build/C/man2/sendfile.2:148
316 #: build/C/man2/set_tid_address.2:97 build/C/man2/splice.2:184
317 #: build/C/man2/tee.2:125 build/C/man2/vm86.2:73 build/C/man2/vmsplice.2:153
319 msgid "CONFORMING TO"
323 #: build/C/man2/arch_prctl.2:107
325 "B<arch_prctl>() is a Linux/x86-64 extension and should not be used in "
326 "programs intended to be portable."
328 "B<arch_prctl>() は Linux/x86-64 拡張であり、移植性を意図したプログラムでは使"
332 #: build/C/man2/arch_prctl.2:107 build/C/man2/futex.2:305
333 #: build/C/man2/get_robust_list.2:118 build/C/man2/getunwind.2:99
334 #: build/C/man2/kexec_load.2:337 build/C/man2/lookup_dcookie.2:81
335 #: build/C/man2/modify_ldt.2:133 build/C/man2/perf_event_open.2:2761
336 #: build/C/man2/perfmonctl.2:202 build/C/man2/pivot_root.2:131
337 #: build/C/man2/process_vm_readv.2:297 build/C/man2/ptrace.2:1956
338 #: build/C/man2/sendfile.2:155 build/C/man2/splice.2:186
339 #: build/C/man2/tee.2:127 build/C/man2/vmsplice.2:155
345 #: build/C/man2/arch_prctl.2:110
347 "B<arch_prctl>() is supported only on Linux/x86-64 for 64-bit programs "
350 "B<arch_prctl>() は現在のところ Linux/x86-64 上の 64 ビットプログラムでのみサ"
354 #: build/C/man2/arch_prctl.2:112
355 msgid "The 64-bit base changes when a new 32-bit segment selector is loaded."
357 "新しい 32 ビットセグメントセレクタがロードされた場合、 64 ビットベースは変更"
361 #: build/C/man2/arch_prctl.2:115
362 msgid "B<ARCH_SET_GS> is disabled in some kernels."
363 msgstr "B<ARCH_SET_GS> が無効にされているカーネルもある。"
366 #: build/C/man2/arch_prctl.2:130
368 "Context switches for 64-bit segment bases are rather expensive. It may be a "
369 "faster alternative to set a 32-bit base using a segment selector by setting "
370 "up an LDT with B<modify_ldt>(2) or using the B<set_thread_area>(2) system "
371 "call in kernel 2.5 or later. B<arch_prctl>() is needed only when you want "
372 "to set bases that are larger than 4GB. Memory in the first 2GB of address "
373 "space can be allocated by using B<mmap>(2) with the B<MAP_32BIT> flag."
375 "64 ビットセグメントベースのコンテキストスイッチは、やや高価である。 LDT を "
376 "B<modify_ldt>(2) で設定してセグメントセレクタを使うか、 (カーネル 2.5 以降"
377 "の) B<set_thread_area>(2) システムコールを使うことにより、 32 ビットベース"
378 "を設定するという高速な代替手段もある。 4GB より大きなベースを設定したい場合に"
379 "のみ、 B<arch_prctl>() が必要である。 アドレス空間の最初の 2GB にあるメモ"
380 "リーは、 B<mmap>(2) に B<MAP_32BIT> フラグを指定して割り当てることができる。"
383 #: build/C/man2/arch_prctl.2:135
385 "As of version 2.7, glibc provides no prototype for B<arch_prctl>(). You "
386 "have to declare it yourself for now. This may be fixed in future glibc "
389 "バージョン 2.7 時点では、glibc には B<arch_prctl>() のプロトタイプがない。 "
390 "今のところユーザーは自分自身で宣言する必要がある。 これは将来の glibc のバー"
394 #: build/C/man2/arch_prctl.2:138
395 msgid "I<FS> may be already used by the threading library."
396 msgstr "I<FS> はスレッドライブラリで既に使われているかもしれない。"
399 #: build/C/man2/arch_prctl.2:138 build/C/man2/futex.2:319
400 #: build/C/man2/get_robust_list.2:127 build/C/man2/getunwind.2:111
401 #: build/C/man2/kexec_load.2:341 build/C/man2/modify_ldt.2:136
402 #: build/C/man2/outb.2:96 build/C/man2/pciconfig_read.2:114
403 #: build/C/man2/perf_event_open.2:2903 build/C/man2/perfmonctl.2:205
404 #: build/C/man2/personality.2:77 build/C/man2/pivot_root.2:143
405 #: build/C/man2/process_vm_readv.2:347 build/C/man2/ptrace.2:2122
406 #: build/C/man2/quotactl.2:507 build/C/man2/sendfile.2:197
407 #: build/C/man2/set_tid_address.2:99 build/C/man2/splice.2:240
408 #: build/C/man2/tee.2:214 build/C/man2/vmsplice.2:164
414 #: build/C/man2/arch_prctl.2:143
415 msgid "B<mmap>(2), B<modify_ldt>(2), B<prctl>(2), B<set_thread_area>(2)"
416 msgstr "B<mmap>(2), B<modify_ldt>(2), B<prctl>(2), B<set_thread_area>(2)"
419 #: build/C/man2/arch_prctl.2:145
420 msgid "AMD X86-64 Programmer's manual"
421 msgstr "AMD X86-64 Programmer's manual"
424 #: build/C/man2/arch_prctl.2:145 build/C/man2/futex.2:333
425 #: build/C/man2/get_robust_list.2:136 build/C/man2/getunwind.2:113
426 #: build/C/man2/kexec_load.2:350 build/C/man2/lookup_dcookie.2:88
427 #: build/C/man2/modify_ldt.2:138 build/C/man2/nfsservctl.2:60
428 #: build/C/man2/outb.2:99 build/C/man2/pciconfig_read.2:116
429 #: build/C/man2/perf_event_open.2:2909 build/C/man2/perfmonctl.2:209
430 #: build/C/man2/personality.2:79 build/C/man2/pivot_root.2:149
431 #: build/C/man2/process_vm_readv.2:350 build/C/man2/ptrace.2:2137
432 #: build/C/man2/quotactl.2:512 build/C/man2/sendfile.2:203
433 #: build/C/man2/set_tid_address.2:103 build/C/man2/splice.2:244
434 #: build/C/man2/tee.2:217 build/C/man2/vm86.2:76 build/C/man2/vmsplice.2:167
440 #: build/C/man2/arch_prctl.2:153 build/C/man2/futex.2:341
441 #: build/C/man2/get_robust_list.2:144 build/C/man2/getunwind.2:121
442 #: build/C/man2/kexec_load.2:358 build/C/man2/lookup_dcookie.2:96
443 #: build/C/man2/modify_ldt.2:146 build/C/man2/nfsservctl.2:68
444 #: build/C/man2/outb.2:107 build/C/man2/pciconfig_read.2:124
445 #: build/C/man2/perf_event_open.2:2917 build/C/man2/perfmonctl.2:217
446 #: build/C/man2/personality.2:87 build/C/man2/pivot_root.2:157
447 #: build/C/man2/process_vm_readv.2:358 build/C/man2/ptrace.2:2145
448 #: build/C/man2/quotactl.2:520 build/C/man2/sendfile.2:211
449 #: build/C/man2/set_tid_address.2:111 build/C/man2/splice.2:252
450 #: build/C/man2/tee.2:225 build/C/man2/vm86.2:84 build/C/man2/vmsplice.2:175
452 "This page is part of release 3.79 of the Linux I<man-pages> project. A "
453 "description of the project, information about reporting bugs, and the latest "
454 "version of this page, can be found at \\%http://www.kernel.org/doc/man-"
457 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.79 の一部\n"
458 "である。プロジェクトの説明とバグ報告に関する情報は\n"
459 "http://www.kernel.org/doc/man-pages/ に書かれている。"
462 #: build/C/man2/futex.2:53
468 #: build/C/man2/futex.2:53
474 #: build/C/man2/futex.2:56
475 msgid "futex - fast user-space locking"
476 msgstr "futex - 高速ユーザー空間ロック"
479 #: build/C/man2/futex.2:61
482 "B<#include E<lt>linux/futex.hE<gt>>\n"
483 "B<#include E<lt>sys/time.hE<gt>>\n"
485 "B<#include E<lt>linux/futex.hE<gt>>\n"
486 "B<#include E<lt>sys/time.hE<gt>>\n"
489 #: build/C/man2/futex.2:64
491 msgid "B<int futex(int *>I<uaddr>B<, int >I<op>B<, int >I<val>B<, const struct timespec *>I<timeout>B<,>\n"
492 msgstr "B<int futex(int *>I<uaddr>B<, int >I<op>B<, int >I<val>B<, const struct timespec *>I<timeout>B<,>\n"
494 #. int *? void *? u32 *?
496 #: build/C/man2/futex.2:67
498 msgid "B< int *>I<uaddr2>B<, int >I<val3>B<);>\n"
499 msgstr "B< int *>I<uaddr2>B<, int >I<val3>B<);>\n"
502 #: build/C/man2/futex.2:70 build/C/man2/getunwind.2:40
503 #: build/C/man2/modify_ldt.2:36 build/C/man2/perf_event_open.2:42
504 #: build/C/man2/perfmonctl.2:39 build/C/man2/pivot_root.2:18
505 msgid "I<Note>: There is no glibc wrapper for this system call; see NOTES."
507 "I<注>: このシステムコールには glibc のラッパー関数は存在しない。「注意」の節"
511 #: build/C/man2/futex.2:86
513 "The B<futex>() system call provides a method for a program to wait for a "
514 "value at a given address to change, and a method to wake up anyone waiting "
515 "on a particular address (while the addresses for the same memory in separate "
516 "processes may not be equal, the kernel maps them internally so the same "
517 "memory mapped in different locations will correspond for B<futex>() "
518 "calls). This system call is typically used to implement the contended case "
519 "of a lock in shared memory, as described in B<futex>(7)."
521 "B<futex>() システムコールは、 指定したアドレスの値が変更されるのをプログラム"
522 "が待つ手段や 特定のアドレスに対して待機中のプロセスを wake (起床) させる手段"
523 "を提供する (プロセスが異なれば同じメモリーに対するアドレスも同じではないかも"
524 "しれないが、 カーネルは異なる位置にマップされた同じメモリーを B<futex>() で"
525 "使えるよう内部でマップする)。 通常は、このシステムコールは B<futex>(7) に書"
526 "かれているように、 共有メモリー中のロックが競合する場合の処理を実装するのに用"
530 #: build/C/man2/futex.2:93
532 "When a B<futex>(7) operation did not finish uncontended in user space, a "
533 "call needs to be made to the kernel to arbitrate. Arbitration can either "
534 "mean putting the calling process to sleep or, conversely, waking a waiting "
537 "B<futex>(7) の操作がユーザー空間で競合なく完了しなかった場合、 カーネルに仲"
538 "裁させるためにシステムコールを呼ぶ必要がある。 仲裁というのは、呼び出しプロセ"
539 "スを sleep (起床待ち) させたり、反対に 待ちプロセスを wake させたりすることを"
543 #: build/C/man2/futex.2:100
545 "Callers of this function are expected to adhere to the semantics as set out "
546 "in B<futex>(7). As these semantics involve writing nonportable assembly "
547 "instructions, this in turn probably means that most users will in fact be "
548 "library authors and not general application developers."
550 "この関数を呼び出すプロセスは B<futex>(7) に記述されているセマンティクスに忠"
551 "実であることが要求される。 このセマンティクスには移植不可能なアセンブリ命令を"
552 "書くことが含まれる。 このことは言い換えると futex のユーザーのほとんどは実際"
553 "はライブラリの作者であり、 一般アプリケーションの開発者ではないということであ"
557 #: build/C/man2/futex.2:108
559 "The I<uaddr> argument needs to point to an aligned integer which stores the "
560 "counter. The operation to execute is passed via the I<op> argument, along "
561 "with a value I<val>."
563 "I<uaddr> 引き数は、カウンターを格納する、 アラインメントの揃った int 型変数を"
564 "指している必要がある。 実行する操作は I<op> 引き数を介して、値 I<val> ととも"
568 #: build/C/man2/futex.2:110
569 msgid "Five operations are currently defined:"
570 msgstr "現在のところ 5 つの操作が定義されている:"
573 #: build/C/man2/futex.2:110 build/C/man2/futex.2:223
575 msgid "B<FUTEX_WAIT>"
576 msgstr "B<FUTEX_WAIT>"
579 #: build/C/man2/futex.2:133
581 "This operation atomically verifies that the futex address I<uaddr> still "
582 "contains the value I<val>, and sleeps awaiting B<FUTEX_WAKE> on this futex "
583 "address. If the I<timeout> argument is non-NULL, its contents specify the "
584 "duration of the wait. (This interval will be rounded up to the system clock "
585 "granularity, and kernel scheduling delays mean that the blocking interval "
586 "may overrun by a small amount.) If I<timeout> is NULL, the call blocks "
587 "indefinitely. The arguments I<uaddr2> and I<val3> are ignored."
589 "この操作は futex アドレス I<uaddr> に指定された値 I<val> がまだ格納されている"
590 "かどうかを不可分操作で検証し、 sleep 状態で この futex アドレスに対して "
591 "B<FUTEX_WAKE> が実行されるのを待つ。 I<timeout> 引き数が NULL でない場合、そ"
592 "の内容は待ち時間の最大値を表す (この停止時間はシステムクロックの粒度に切り上"
593 "げられ、 カーネルのスケジューリング遅延により少しだけ長くなる可能性がある)。 "
594 "NULL の場合、 呼び出しは無限に停止する。 引き数 I<uaddr2> と I<val3> は無視さ"
598 #: build/C/man2/futex.2:141
600 "For B<futex>(7), this call is executed if decrementing the count gave a "
601 "negative value (indicating contention), and will sleep until another process "
602 "releases the futex and executes the B<FUTEX_WAKE> operation."
604 "B<futex>(7) に照らし合わせると、この呼び出しは カウントのデクリメントで負の"
605 "値 (競合を表す) になった場合に実行され、 別のプロセスがその futex を解放し "
606 "B<FUTEX_WAKE> の操作を実行するまで sleep する。"
609 #: build/C/man2/futex.2:141 build/C/man2/futex.2:229
611 msgid "B<FUTEX_WAKE>"
612 msgstr "B<FUTEX_WAKE>"
615 #: build/C/man2/futex.2:152
617 "This operation wakes at most I<val> processes waiting on this futex address "
618 "(i.e., inside B<FUTEX_WAIT>). The arguments I<timeout>, I<uaddr2> and "
619 "I<val3> are ignored."
621 "この操作では指定した futex アドレスに対して待ち状態の (すなわち "
622 "B<FUTEX_WAIT> 中の) 最大 I<val> 個のプロセスを wake させる。 引き数 "
623 "I<timeout>, I<uaddr2>, I<val3> は無視される。"
626 #: build/C/man2/futex.2:158
628 "For B<futex>(7), this is executed if incrementing the count showed that "
629 "there were waiters, once the futex value has been set to 1 (indicating that "
632 "B<futex>(4) に照らし合わせると、 この操作は カウントのインクリメントで待ちプ"
633 "ロセスがあると判明し、 futex 値が 1 に設定された (利用可能であることを表す) "
637 #: build/C/man2/futex.2:158
639 msgid "B<FUTEX_FD> (present up to and including Linux 2.6.25)"
640 msgstr "B<FUTEX_FD> (Linux 2.6.25 以前)"
642 #. , suitable for .BR poll (2).
644 #: build/C/man2/futex.2:174
646 "To support asynchronous wakeups, this operation associates a file descriptor "
647 "with a futex. If another process executes a B<FUTEX_WAKE>, the process will "
648 "receive the signal number that was passed in I<val>. The calling process "
649 "must close the returned file descriptor after use. The arguments "
650 "I<timeout>, I<uaddr2> and I<val3> are ignored."
652 "非同期の wake に対応するため、この操作はファイルディスクリプターを futex に "
653 "関連づける。 別のプロセスが B<FUTEX_WAKE> を実行すると、プロセスは I<val> で"
654 "渡されたシグナル番号のシグナルを受信する。 呼び出しプロセスは使用後、返された"
655 "ファイルディスクリプターを クローズしなければならない。 引き数 I<timeout>, "
656 "I<uaddr2>, I<val3> は無視される。"
659 #: build/C/man2/futex.2:179
661 "To prevent race conditions, the caller should test if the futex has been "
662 "upped after B<FUTEX_FD> returns."
664 "競合状態を防止するため、呼び出しプロセスは B<FUTEX_FD> が返ったあと futex が "
665 "up されたかどうかを確認しなければならない。"
668 #: build/C/man2/futex.2:183
670 "Because it was inherently racy, B<FUTEX_FD> has been removed from Linux "
673 "B<FUTEX_FD> はもともと競合が起きやすかったため、 Linux 2.6.26 以降で削除され"
677 #: build/C/man2/futex.2:183
679 msgid "B<FUTEX_REQUEUE> (since Linux 2.5.70)"
680 msgstr "B<FUTEX_REQUEUE> (Linux 2.5.70 以降)"
683 #: build/C/man2/futex.2:198
685 "This operation was introduced in order to avoid a \"thundering herd\" effect "
686 "when B<FUTEX_WAKE> is used and all processes woken up need to acquire "
687 "another futex. This call wakes up I<val> processes, and requeues all other "
688 "waiters on the futex at address I<uaddr2>. The arguments I<timeout> and "
689 "I<val3> are ignored."
691 "この操作は、 B<FUTEX_WAKE> が使われていて、かつ wake されている全てのプロセス"
692 "が 他の futex を取得する必要がある場合に、 「獣の群れの暴走 (thundering "
693 "herd)」効果を避けるために導入された。 この呼び出しは I<val> 個のプロセスを "
694 "wake し、アドレス I<uaddr2> で futex を待っている他の全てのプロセスを再度"
695 "キューにいれる。 引き数 I<timeout> と I<val3> は無視される。"
698 #: build/C/man2/futex.2:198
700 msgid "B<FUTEX_CMP_REQUEUE> (since Linux 2.6.7)"
701 msgstr "B<FUTEX_CMP_REQUEUE> (Linux 2.6.7 以降)"
704 #: build/C/man2/futex.2:216
706 "There was a race in the intended use of B<FUTEX_REQUEUE>, so "
707 "B<FUTEX_CMP_REQUEUE> was introduced. This is similar to B<FUTEX_REQUEUE>, "
708 "but first checks whether the location I<uaddr> still contains the value "
709 "I<val3>. If not, the operation fails with the error B<EAGAIN>. The "
710 "argument I<timeout> is ignored."
712 "故意に B<FUTEX_REQUEUE> を使う場合に競合が起こるため、 B<FUTEX_CMP_REQUEUE> "
713 "が導入された。これは B<FUTEX_REQUEUE> と似ているが、場所 I<uaddr> に値 "
714 "I<val3> がまだ保持されているかを最初にチェックする。 保持されていない場合、操"
715 "作はエラー B<EAGAIN> で失敗する。引き数 I<timeout> は無視される。"
718 #: build/C/man2/futex.2:223
720 "In the event of an error, all operations return -1, and set I<errno> to "
721 "indicate the error. The return value on success depends on the operation, "
722 "as described in the following list:"
724 "エラーの場合、全ての操作で -1 が返り、 I<errno> がエラーの内容を示す値に設定"
725 "される。成功時の返り値は操作によって異なり、以下のリストに書かれている通りで"
729 #: build/C/man2/futex.2:229
731 "Returns 0 if the process was woken by a B<FUTEX_WAKE> call. See ERRORS for "
732 "the various possible error returns."
734 "そのプロセスが B<FUTEX_WAKE> により wake された場合 0 を返す。発生する可能性"
735 "があるエラーについては「エラー」の節を参照。"
738 #: build/C/man2/futex.2:232 build/C/man2/futex.2:238 build/C/man2/futex.2:241
739 msgid "Returns the number of processes woken up."
740 msgstr "wake したプロセスの数を返す。"
743 #: build/C/man2/futex.2:232
749 #: build/C/man2/futex.2:235
750 msgid "Returns the new file descriptor associated with the futex."
751 msgstr "futex に関連づけられた新たなファイルディスクリプターを返す。"
754 #: build/C/man2/futex.2:235
756 msgid "B<FUTEX_REQUEUE>"
757 msgstr "B<FUTEX_REQUEUE>"
760 #: build/C/man2/futex.2:238
762 msgid "B<FUTEX_CMP_REQUEUE>"
763 msgstr "B<FUTEX_CMP_REQUEUE>"
766 #: build/C/man2/futex.2:242 build/C/man2/perf_event_open.2:2635
767 #: build/C/man2/quotactl.2:486
773 #: build/C/man2/futex.2:245
774 msgid "No read access to futex memory."
775 msgstr "futex メモリーに読み込みアクセス権がなかった。"
778 #: build/C/man2/futex.2:245 build/C/man2/sendfile.2:116
779 #: build/C/man2/splice.2:151 build/C/man2/tee.2:101
780 #: build/C/man2/vmsplice.2:127
786 #: build/C/man2/futex.2:256
788 "B<FUTEX_CMP_REQUEUE> detected that the value pointed to by I<uaddr> is not "
789 "equal to the expected value I<val3>. (This probably indicates a race; use "
790 "the safe B<FUTEX_WAKE> now.)"
792 "B<FUTEX_CMP_REQUEUE> で、I<uaddr> が指す値が期待値 I<val3> と異なる状況が検出"
793 "された。 (これは競合を示しているかもしれない。この場合は安全な B<FUTEX_WAKE> "
797 #: build/C/man2/futex.2:261
798 msgid "Error retrieving I<timeout> information from user space."
799 msgstr "ユーザー空間から I<timeout> の情報を取得する際にエラーが発生した。"
802 #: build/C/man2/futex.2:261
808 #: build/C/man2/futex.2:268
810 "A B<FUTEX_WAIT> operation was interrupted by a signal (see B<signal>(7)) or "
813 "B<FUTEX_WAIT> 操作がシグナル (B<signal>(7) 参照) もしくは偽の wakeup により中"
817 #: build/C/man2/futex.2:271
818 msgid "Invalid argument."
822 #: build/C/man2/futex.2:271
828 #: build/C/man2/futex.2:274
829 msgid "The system limit on the total number of open files has been reached."
830 msgstr "オープンされているファイルの総数がシステムの制限に達した。"
833 #: build/C/man2/futex.2:274 build/C/man2/modify_ldt.2:126
834 #: build/C/man2/pciconfig_read.2:93 build/C/man2/perf_event_open.2:2718
835 #: build/C/man2/quotactl.2:447 build/C/man2/vm86.2:64
841 #: build/C/man2/futex.2:278
842 msgid "Invalid operation specified in I<op>."
843 msgstr "I<op> に無効な操作が指定された。"
846 #: build/C/man2/futex.2:278
849 msgstr "B<ETIMEDOUT>"
852 #: build/C/man2/futex.2:283
853 msgid "Timeout during the B<FUTEX_WAIT> operation."
854 msgstr "B<FUTEX_WAIT> 操作でタイムアウトが発生した。"
857 #: build/C/man2/futex.2:283
859 msgid "B<EWOULDBLOCK>"
860 msgstr "B<EWOULDBLOCK>"
863 #: build/C/man2/futex.2:293
865 "I<op> was B<FUTEX_WAIT> and the value pointed to by I<uaddr> was not equal "
866 "to the expected value I<val> at the time of the call."
868 "I<op> が B<FUTEX_WAIT> で、その呼び出しにおいて I<uaddr> が指す値が期待値 "
872 #: build/C/man2/futex.2:293 build/C/man2/get_robust_list.2:116
873 #: build/C/man2/getunwind.2:94 build/C/man2/kexec_load.2:328
874 #: build/C/man2/lookup_dcookie.2:73 build/C/man2/perfmonctl.2:196
875 #: build/C/man2/pivot_root.2:125 build/C/man2/process_vm_readv.2:292
876 #: build/C/man2/sendfile.2:142 build/C/man2/set_tid_address.2:94
877 #: build/C/man2/splice.2:179 build/C/man2/tee.2:120
878 #: build/C/man2/vmsplice.2:148
884 #: build/C/man2/futex.2:303
886 "Initial futex support was merged in Linux 2.5.7 but with different semantics "
887 "from what was described above. A 4-argument system call with the semantics "
888 "described in this page was introduced in Linux 2.5.40. In Linux 2.5.70, one "
889 "argument was added. In Linux 2.6.7, a sixth argument was added\\(emmessy, "
890 "especially on the s390 architecture."
892 "最初の futex 対応は Linux 2.5.7 で組み込まれたが、 上記のセマンティクスとは異"
893 "なる。 4 つの引き数のここに書かれているセマンティクスを持つ システムコール"
894 "は、Linux 2.5.40 で導入された。 Linux 2.5.70 では 1 つの引き数が追加された。 "
895 "Linux 2.6.7 では 6 番目の引き数が追加された。 これは汚く、s390 アーキテク"
899 #: build/C/man2/futex.2:305 build/C/man2/set_tid_address.2:99
900 #: build/C/man2/splice.2:186 build/C/man2/tee.2:127
901 #: build/C/man2/vmsplice.2:155
902 msgid "This system call is Linux-specific."
903 msgstr "このシステムコールは Linux 固有である。"
907 #. Futexes were designed and worked on by
908 #. Hubertus Franke (IBM Thomas J. Watson Research Center),
909 #. Matthew Kirkwood, Ingo Molnar (Red Hat)
910 #. and Rusty Russell (IBM Linux Technology Center).
911 #. This page written by bert hubert.
913 #: build/C/man2/futex.2:319
915 "To reiterate, bare futexes are not intended as an easy-to-use abstraction "
916 "for end-users. (There is no wrapper function for this system call in "
917 "glibc.) Implementors are expected to be assembly literate and to have read "
918 "the sources of the futex user-space library referenced below."
920 "繰り返すが、裸の futex はエンドユーザーが容易に使うことのできる概念として 意"
921 "図されたものではない (glibc にはこのシステムコールに対するラッパー関数はな"
922 "い)。 実装者は、アセンブリ言語に慣れており、以下に挙げる futex ユーザー空間ラ"
923 "イブラリの ソースを読み終えていることが要求される。"
926 #: build/C/man2/futex.2:322
927 msgid "B<restart_syscall>(2), B<futex>(7)"
928 msgstr "B<restart_syscall>(2), B<futex>(7)"
931 #: build/C/man2/futex.2:325
933 "I<Fuss, Futexes and Furwocks: Fast Userlevel Locking in Linux> (proceedings "
934 "of the Ottawa Linux Symposium 2002), online at"
936 "I<Fuss, Futexes and Furwocks: Fast Userlevel Locking in Linux> (proceedings "
937 "of the Ottawa Linux Symposium 2002), online at"
940 #: build/C/man2/futex.2:328
942 "E<.UR http://kernel.org\\:/doc\\:/ols\\:/2002\\:/ols2002-pages-479-495.pdf> "
945 "E<.UR http://kernel.org\\:/doc\\:/ols\\:/2002\\:/ols2002-pages-479-495.pdf> "
949 #: build/C/man2/futex.2:330
950 msgid "Futex example library, futex-*.tar.bz2 at"
951 msgstr "futex の使用例ライブラリ, futex-*.tar.bz2"
954 #: build/C/man2/futex.2:333
956 "E<.UR ftp://ftp.kernel.org\\:/pub\\:/linux\\:/kernel\\:/people\\:/rusty/> E<."
959 "E<.UR ftp://ftp.kernel.org\\:/pub\\:/linux\\:/kernel\\:/people\\:/rusty/> E<."
963 #: build/C/man2/get_robust_list.2:29
965 msgid "GET_ROBUST_LIST"
966 msgstr "GET_ROBUST_LIST"
969 #: build/C/man2/get_robust_list.2:29 build/C/man2/ptrace.2:46
975 #: build/C/man2/get_robust_list.2:29
977 msgid "Linux System Calls"
978 msgstr "Linux System Calls"
981 #: build/C/man2/get_robust_list.2:32
982 msgid "get_robust_list, set_robust_list - get/set list of robust futexes"
986 #: build/C/man2/get_robust_list.2:37
989 "B<#include E<lt>linux/futex.hE<gt>>\n"
990 "B<#include E<lt>sys/types.hE<gt>>\n"
991 "B<#include E<lt>syscall.hE<gt>>\n"
993 "B<#include E<lt>linux/futex.hE<gt>>\n"
994 "B<#include E<lt>sys/types.hE<gt>>\n"
995 "B<#include E<lt>syscall.hE<gt>>\n"
998 #: build/C/man2/get_robust_list.2:41
1001 "B<long get_robust_list(int >I<pid>B<, struct robust_list_head **>I<head_ptr>B<,>\n"
1002 "B< size_t *>I<len_ptr>B<);>\n"
1003 "B<long set_robust_list(struct robust_list_head *>I<head>B<, size_t >I<len>B<);>\n"
1007 #: build/C/man2/get_robust_list.2:45 build/C/man2/kexec_load.2:47
1008 msgid "I<Note>: There are no glibc wrappers for these system calls; see NOTES."
1010 "I<注意>: これらのシステムコールには glibc ラッパー関数は存在しない。 「注意」"
1014 #: build/C/man2/get_robust_list.2:50
1016 "The robust futex implementation needs to maintain per-thread lists of robust "
1017 "futexes which are unlocked when the thread exits. These lists are managed "
1018 "in user space; the kernel is notified about only the location of the head of "
1023 #: build/C/man2/get_robust_list.2:66
1025 "The B<get_robust_list>() system call returns the head of the robust futex "
1026 "list of the thread whose thread ID is specified in I<pid>. If I<pid> is 0, "
1027 "the head of the list for the calling thread is returned. The list head is "
1028 "stored in the location pointed to by I<head_ptr>. The size of the object "
1029 "pointed to by I<**head_ptr> is stored in I<len_ptr>."
1033 #: build/C/man2/get_robust_list.2:78
1035 "The B<set_robust_list>() system call requests the kernel to record the head "
1036 "of the list of robust futexes owned by the calling thread. The I<head> "
1037 "argument is the list head to record. The I<len> argument should be "
1042 #: build/C/man2/get_robust_list.2:85
1044 "The B<set_robust_list>() and B<get_robust_list>() system calls return zero "
1045 "when the operation is successful, an error code otherwise."
1049 #: build/C/man2/get_robust_list.2:89
1051 "The B<set_robust_list>() system call can fail with the following error:"
1055 #: build/C/man2/get_robust_list.2:95
1057 "I<len> does not match the size of structure B<struct robust_list_head> "
1058 "expected by kernel."
1062 #: build/C/man2/get_robust_list.2:99
1064 "The B<get_robust_list>() system call can fail with the following errors:"
1068 #: build/C/man2/get_robust_list.2:107
1070 "The calling process does not have permission to see the robust futex list of "
1071 "the thread with the thread ID I<pid>, and does not have the "
1072 "B<CAP_SYS_PTRACE> capability."
1076 #: build/C/man2/get_robust_list.2:107 build/C/man2/perf_event_open.2:2746
1077 #: build/C/man2/process_vm_readv.2:287 build/C/man2/ptrace.2:1949
1078 #: build/C/man2/quotactl.2:461 build/C/man2/quotactl.2:504
1084 #: build/C/man2/get_robust_list.2:112
1085 msgid "No thread with the thread ID I<pid> could be found."
1089 #: build/C/man2/get_robust_list.2:116
1091 "The head of the robust futex list can't be stored at the location I<head>."
1095 #: build/C/man2/get_robust_list.2:118
1096 msgid "These system calls were added in Linux 2.6.17."
1097 msgstr "これらのシステムコールは Linux 2.6.17 で追加された。"
1100 #: build/C/man2/get_robust_list.2:123
1102 "These system calls are not needed by normal applications. No support for "
1103 "them is provided in glibc. In the unlikely event that you want to call them "
1104 "directly, use B<syscall>(2)."
1106 "通常のアプリケーションでは、これらのシステムコールは必要ではない。 glibc によ"
1107 "るサポートは提供されていない。おそらくないと思うが、このシステムコールを直接"
1108 "呼び出したい場合は B<syscall>(2) を使うこと。"
1111 #: build/C/man2/get_robust_list.2:127
1113 "A thread can have only one robust futex list; therefore applications that "
1114 "wish to use this functionality should use the robust mutexes provided by "
1118 #. .BR pthread_mutexattr_setrobust_np (3)
1120 #: build/C/man2/get_robust_list.2:130
1122 msgstr "B<futex>(2)"
1124 #. http://lwn.net/Articles/172149/
1126 #: build/C/man2/get_robust_list.2:136
1128 "I<Documentation/robust-futexes.txt> and I<Documentation/robust-futex-ABI."
1129 "txt> in the Linux kernel source tree"
1133 #: build/C/man2/getunwind.2:27
1139 #: build/C/man2/getunwind.2:27
1145 #: build/C/man2/getunwind.2:30
1146 msgid "getunwind - copy the unwind data to caller's buffer"
1150 #: build/C/man2/getunwind.2:34
1153 "B<#include E<lt>syscall.hE<gt>>\n"
1154 "B<#include E<lt>linux/unwind.hE<gt>>\n"
1156 "B<#include E<lt>syscall.hE<gt>>\n"
1157 "B<#include E<lt>linux/unwind.hE<gt>>\n"
1160 #: build/C/man2/getunwind.2:36
1162 msgid "B<long getunwind(void >I<*buf>B<, size_t >I<buf_size>B<);>\n"
1166 #: build/C/man2/getunwind.2:42
1167 msgid "I<Note: this function is obsolete.>"
1171 #: build/C/man2/getunwind.2:52
1173 "The IA-64-specific B<getunwind>() system call copies the kernel's call "
1174 "frame unwind data into the buffer pointed to by I<buf> and returns the size "
1175 "of the unwind data; this data describes the gate page (kernel code that is "
1176 "mapped into user space)."
1180 #: build/C/man2/getunwind.2:64
1182 "The size of the buffer I<buf> is specified in I<buf_size>. The data is "
1183 "copied only if I<buf_size> is greater than or equal to the size of the "
1184 "unwind data and I<buf> is not NULL; otherwise, no data is copied, and the "
1185 "call succeeds, returning the size that would be needed to store the unwind "
1190 #: build/C/man2/getunwind.2:68
1192 "The first part of the unwind data contains an unwind table. The rest "
1193 "contains the associated unwind information, in no particular order. The "
1194 "unwind table contains entries of the following form:"
1198 #: build/C/man2/getunwind.2:73
1201 " u64 start; (64-bit address of start of function)\n"
1202 " u64 end; (64-bit address of end of function)\n"
1203 " u64 info; (BUF-relative offset to unwind info)\n"
1207 #: build/C/man2/getunwind.2:81
1209 "An entry whose I<start> value is zero indicates the end of the table. For "
1210 "more information about the format, see the I<IA-64 Software Conventions and "
1211 "Runtime Architecture> manual."
1215 #: build/C/man2/getunwind.2:88
1217 "On success, B<getunwind>() returns the size of the unwind data. On error, "
1218 "-1 is returned and I<errno> is set to indicate the error."
1220 "成功すると、 B<getunwind> は unwind されたデータのサイズを返す。 エラーの場"
1221 "合、 -1 が返り、 I<errno> にエラーを示す値が設定される。"
1224 #: build/C/man2/getunwind.2:94
1226 "B<getunwind>() fails with the error B<EFAULT> if the unwind info can't be "
1227 "stored in the space specified by I<buf>."
1231 #: build/C/man2/getunwind.2:96
1232 msgid "This system call is available since Linux 2.4."
1236 #: build/C/man2/getunwind.2:99
1238 "This system call is Linux-specific, and is available only on the IA-64 "
1243 #: build/C/man2/getunwind.2:107
1245 "This system call has been deprecated. The modern way to obtain the kernel's "
1246 "unwind data is via the gate DSO. The address of the ELF header for this DSO "
1247 "is passed to user level via B<AT_SYSINFO_EHDR> (see B<getauxval>(3))."
1251 #: build/C/man2/getunwind.2:111
1253 "Glibc does not provide a wrapper for this system call; in the unlikely event "
1254 "that you want to call it, use B<syscall>(2)."
1256 "glibc はこのシステムコールに対するラッパー関数を提供していない。おそらくない"
1257 "と思うが、このシステムコールを呼び出したい場合は B<syscall>(2) を使うこと。"
1260 #: build/C/man2/getunwind.2:113
1261 msgid "B<getauxval>(3)"
1262 msgstr "B<getauxval>(3)"
1265 #: build/C/man2/kexec_load.2:27
1271 #: build/C/man2/kexec_load.2:27 build/C/man2/personality.2:32
1277 #: build/C/man2/kexec_load.2:30
1278 msgid "kexec_load, kexec_file_load - load a new kernel for later execution"
1279 msgstr "kexec_load, kexec_file_load - 新しいカーネルを後で実行するためにロードする"
1282 #: build/C/man2/kexec_load.2:33
1284 msgid "B<#include E<lt>linux/kexec.hE<gt>>\n"
1285 msgstr "B<#include E<lt>linux/kexec.hE<gt>>\n"
1288 #: build/C/man2/kexec_load.2:37
1291 "B<long kexec_load(unsigned long >I<entry>B<, unsigned long >I<nr_segments>B<,>\n"
1292 "B< struct kexec_segment *>I<segments>B<, unsigned long >I<flags>B<);>\n"
1294 "B<long kexec_load(unsigned long >I<entry>B<, unsigned long >I<nr_segments>B<,>\n"
1295 "B< struct kexec_segment *>I<segments>B<, unsigned long >I<flags>B<);>\n"
1298 #: build/C/man2/kexec_load.2:39
1300 msgid "B<long kexec_file_load(int >I<kernel_fd>B<, int >I<initrd_fd>B<,>\n"
1301 msgstr "B<long kexec_file_load(int >I<kernel_fd>B<, int >I<initrd_fd>B<,>\n"
1304 #: build/C/man2/kexec_load.2:43
1307 "B< unsigned long >I<cmdline_len>B<, const char *>I<cmdline>B<,>\n"
1308 "B< unsigned long >I<flags>B<);>\n"
1310 "B< unsigned long >I<cmdline_len>B<, const char *>I<cmdline>B<,>\n"
1311 "B< unsigned long >I<flags>B<);>\n"
1314 #: build/C/man2/kexec_load.2:52
1316 "The B<kexec_load>() system call loads a new kernel that can be executed "
1317 "later by B<reboot>(2)."
1319 "B<kexec_load>() システムコールは、新しいカーネルをロードし、\n"
1320 "その後の B<reboot>(2) で実行できるようにする。"
1323 #: build/C/man2/kexec_load.2:58
1325 "The I<flags> argument is a bit mask that controls the operation of the "
1326 "call. The following values can be specified in I<flags>:"
1328 "I<flags> 引き数は、システムコールの呼び出しの動作を制御するマスクビットであ"
1329 "る。 I<flags> には以下の値を指定できる。"
1332 #: build/C/man2/kexec_load.2:58
1334 msgid "B<KEXEC_ON_CRASH> (since Linux 2.6.13)"
1335 msgstr "B<KEXEC_ON_CRASH> (Linux 2.6.13 以降)"
1338 #: build/C/man2/kexec_load.2:74
1340 "Execute the new kernel automatically on a system crash. This \"crash kernel"
1341 "\" is loaded into an area of reserved memory that is determined at boot time "
1342 "using the I<craskkernel> kernel command-line parameter. The location of "
1343 "this reserved memory is exported to user space via the I</proc/iomem> file, "
1344 "in an entry labeled \"Crash kernel\". A user-space application can parse "
1345 "this file and prepare a list of segments (see below) that specify this "
1346 "reserved memory as destination. If this flag is specified, the kernel "
1347 "checks that the target segments specified in I<segments> fall within the "
1352 #: build/C/man2/kexec_load.2:74
1354 msgid "B<KEXEC_PRESERVE_CONTEXT> (since Linux 2.6.27)"
1355 msgstr "B<KEXEC_PRESERVE_CONTEXT> (Linux 2.6.27 以降)"
1358 #: build/C/man2/kexec_load.2:84
1360 "Preserve the system hardware and software states before executing the new "
1361 "kernel. This could be used for system suspend. This flag is available only "
1362 "if the kernel was configured with B<CONFIG_KEXEC_JUMP>, and is effective "
1363 "only if I<nr_segments> is greater than 0."
1366 "システムのハードウェアとソフトウェアの状態を保存する。\n"
1367 "システムの中断時 (suspend) などで使用できる。\n"
1368 "このフラグは、カーネルの設定で B<CONFIG_KEXEC_JUMP> が有効の場合のみ\n"
1369 "利用可能であり、 I<nr_segments> が 0 より大きい場合のみ効果がある。"
1372 #: build/C/man2/kexec_load.2:105
1374 "The high-order bits (corresponding to the mask 0xffff0000) of I<flags> "
1375 "contain the architecture of the to-be-executed kernel. Specify (OR) the "
1376 "constant B<KEXEC_ARCH_DEFAULT> to use the current architecture, or one of "
1377 "the following architecture constants B<KEXEC_ARCH_386>, B<KEXEC_ARCH_68K>, "
1378 "B<KEXEC_ARCH_X86_64>, B<KEXEC_ARCH_PPC>, B<KEXEC_ARCH_PPC64>, "
1379 "B<KEXEC_ARCH_IA_64>, B<KEXEC_ARCH_ARM>, B<KEXEC_ARCH_S390>, "
1380 "B<KEXEC_ARCH_SH>, B<KEXEC_ARCH_MIPS>, and B<KEXEC_ARCH_MIPS_LE>. The "
1381 "architecture must be executable on the CPU of the system."
1383 "I<flags> の上位ビット (マスク 0xffff0000 に対応) には、\n"
1384 "実行されるカーネルのアーキテクチャーが入る。\n"
1385 "現在のアーキテクチャーを使うことを意味する定数 B<KEXEC_ARCH_DEFAULT> か、\n"
1386 "アーキテクチャー定数 B<KEXEC_ARCH_386>, B<KEXEC_ARCH_68K>, "
1387 "B<KEXEC_ARCH_X86_64>,\n"
1388 "B<KEXEC_ARCH_PPC>, B<KEXEC_ARCH_PPC64>, B<KEXEC_ARCH_IA_64>,\n"
1389 "B<KEXEC_ARCH_ARM>, B<KEXEC_ARCH_S390>, B<KEXEC_ARCH_SH>,\n"
1390 "B<KEXEC_ARCH_MIPS>, B<KEXEC_ARCH_MIPS_LE> の\n"
1391 "いずれか一つを (OR で) 指定する。指定するアーキテクチャーは、\n"
1392 "システムの CPU で実行可能なものでなければならない。"
1395 #: build/C/man2/kexec_load.2:120
1397 "The I<entry> argument is the physical entry address in the kernel image. "
1398 "The I<nr_segments> argument is the number of segments pointed to by the "
1399 "I<segments> pointer; the kernel imposes an (arbitrary) limit of 16 on the "
1400 "number of segments. The I<segments> argument is an array of "
1401 "I<kexec_segment> structures which define the kernel layout:"
1403 "I<entry> 引き数は、カーネルイメージの物理エントリーアドレスである。 "
1404 "I<nr_segments> 引き数は、 I<segments> ポインターが指すセグメントの数である。 "
1405 "なお、セグメント数には、カーネルにより 16 という (強制的な) 上限が課される。 "
1406 "I<segments> 引き数は I<kexec_segment> 構造体の配列で、 この構造体によりカーネ"
1410 #: build/C/man2/kexec_load.2:129
1413 "struct kexec_segment {\n"
1414 " void *buf; /* Buffer in user space */\n"
1415 " size_t bufsz; /* Buffer length in user space */\n"
1416 " void *mem; /* Physical address of kernel */\n"
1417 " size_t memsz; /* Physical address length */\n"
1420 "struct kexec_segment {\n"
1421 " void *buf; /* Buffer in user space */\n"
1422 " size_t bufsz; /* Buffer length in user space */\n"
1423 " void *mem; /* Physical address of kernel */\n"
1424 " size_t memsz; /* Physical address length */\n"
1428 #: build/C/man2/kexec_load.2:146
1430 "The kernel image defined by I<segments> is copied from the calling process "
1431 "into the kernel either in regular memory or in reserved memory (if "
1432 "B<KEXEC_ON_CRASH> is set). The kernel first performs various sanity checks "
1433 "on the information passed in I<segments>. If these checks pass, the kernel "
1434 "copies the segment data to kernel memory. Each segment specified in "
1435 "I<segments> is copied as follows:"
1439 #: build/C/man2/kexec_load.2:146 build/C/man2/kexec_load.2:157
1440 #: build/C/man2/kexec_load.2:164 build/C/man2/perf_event_open.2:1238
1441 #: build/C/man2/perf_event_open.2:1256 build/C/man2/ptrace.2:1735
1442 #: build/C/man2/ptrace.2:1745 build/C/man2/ptrace.2:1753
1443 #: build/C/man2/ptrace.2:1759 build/C/man2/ptrace.2:1888
1444 #: build/C/man2/splice.2:55 build/C/man2/splice.2:61 build/C/man2/splice.2:70
1450 #: build/C/man2/kexec_load.2:157
1452 "I<buf> and I<bufsz> identify a memory region in the caller's virtual address "
1453 "space that is the source of the copy. The value in I<bufsz> may not exceed "
1454 "the value in the I<memsz> field."
1458 #: build/C/man2/kexec_load.2:164
1460 "I<mem> and I<memsz> specify a physical address range that is the target of "
1461 "the copy. The values specified in both fields must be multiples of the "
1466 #: build/C/man2/kexec_load.2:172
1468 "I<bufsz> bytes are copied from the source buffer to the target kernel "
1469 "buffer. If I<bufsz> is less than I<memsz>, then the excess bytes in the "
1470 "kernel buffer are zeroed out."
1474 #: build/C/man2/kexec_load.2:181
1476 "In case of a normal kexec (i.e., the B<KEXEC_ON_CRASH> flag is not set), the "
1477 "segment data is loaded in any available memory and is moved to the final "
1478 "destination at kexec reboot time (e.g., when the B<kexec>(8) command is "
1479 "executed with the I<-e> option)."
1483 #: build/C/man2/kexec_load.2:187
1485 "In case of kexec on panic (i.e., the B<KEXEC_ON_CRASH> flag is set), the "
1486 "segment data is loaded to reserved memory at the time of the call, and, "
1487 "after a crash, the kexec mechanism simply passes control to that kernel."
1491 #: build/C/man2/kexec_load.2:192
1493 "The B<kexec_load>() system call is available only if the kernel was "
1494 "configured with B<CONFIG_KEXEC>."
1496 "B<kexec_load>() システムコールは、カーネルの設定で B<CONFIG_KEXEC> が有効になって\n"
1500 #: build/C/man2/kexec_load.2:192
1502 msgid "kexec_file_load()"
1506 #: build/C/man2/kexec_load.2:211
1508 "The B<kexec_file_load>() system call is similar to B<kexec_load>(), but it "
1509 "takes a different set of arguments. It reads the kernel to be loaded from "
1510 "the file referred to by the descriptor I<kernel_fd>, and the initrd (initial "
1511 "RAM disk) to be loaded from file referred to by the descriptor "
1512 "I<initrd_fd>. The I<cmdline> argument is a pointer to a buffer containing "
1513 "the command line for the new kernel. The I<cmdline_len> argument specifies "
1514 "size of the buffer. The last byte in the buffer must be a null byte (\\(aq"
1519 #: build/C/man2/kexec_load.2:217
1521 "The I<flags> argument is a bit mask which modifies the behavior of the "
1522 "call. The following values can be specified in I<flags>:"
1523 msgstr "I<flags> 引き数は、システムコールの呼び出しの動作を変更するマスクビットである。 I<flags> には以下の値を指定できる。"
1526 #: build/C/man2/kexec_load.2:217
1528 msgid "B<KEXEC_FILE_UNLOAD>"
1529 msgstr "B<KEXEC_FILE_UNLOAD>"
1532 #: build/C/man2/kexec_load.2:220
1533 msgid "Unload the currently loaded kernel."
1537 #: build/C/man2/kexec_load.2:220
1539 msgid "B<KEXEC_FILE_ON_CRASH>"
1543 #: build/C/man2/kexec_load.2:226
1545 "Load the new kernel in the memory region reserved for the crash kernel (as "
1546 "for B<KEXEC_ON_CRASH).> This kernel is booted if the currently running "
1551 #: build/C/man2/kexec_load.2:226
1553 msgid "B<KEXEC_FILE_NO_INITRAMFS>"
1557 #: build/C/man2/kexec_load.2:233
1559 "Loading initrd/initramfs is optional. Specify this flag if no initramfs is "
1560 "being loaded. If this flag is set, the value passed in I<initrd_fd> is "
1564 #. See also http://lwn.net/Articles/603116/
1566 #: build/C/man2/kexec_load.2:242
1568 "The B<kexec_file_load>() system call was added to provide support for "
1569 "systems where \"kexec\" loading should be restricted to only kernels that "
1570 "are signed. This system call is available only if the kernel was configured "
1571 "with B<CONFIG_KEXEC_FILE>."
1575 #: build/C/man2/kexec_load.2:247
1577 "On success, these system calls returns 0. On error, -1 is returned and "
1578 "I<errno> is set to indicate the error."
1580 "成功すると、 これらのシステムコールは 0 を返す。\n"
1581 "エラーの場合、 -1 が返り、 I<errno> にエラーを示す値が設定される。"
1584 #: build/C/man2/kexec_load.2:248 build/C/man2/kexec_load.2:260
1586 msgid "B<EADDRNOTAVAIL>"
1587 msgstr "B<EADDRNOTAVAIL>"
1589 #. See kernel/kexec.::sanity_check_segment_list in the 3.19 kernel source
1591 #: build/C/man2/kexec_load.2:260
1593 "The B<KEXEC_ON_CRASH> flags was specified, but the region specified by the "
1594 "I<mem> and I<memsz> fields of one of the I<segments> entries lies outside "
1595 "the range of memory reserved for the crash kernel."
1599 #: build/C/man2/kexec_load.2:269
1601 "The value in a I<mem> or I<memsz> field in one of the I<segments> entries is "
1602 "not a multiple of the system page size."
1606 #: build/C/man2/kexec_load.2:269 build/C/man2/perf_event_open.2:2649
1607 #: build/C/man2/sendfile.2:121 build/C/man2/splice.2:157
1608 #: build/C/man2/vmsplice.2:133
1614 #: build/C/man2/kexec_load.2:275
1615 msgid "I<kernel_fd> or I<initrd_fd> is not a valid file descriptor."
1619 #: build/C/man2/kexec_load.2:275 build/C/man2/pivot_root.2:110
1620 #: build/C/man2/ptrace.2:1912 build/C/man2/quotactl.2:495
1626 #: build/C/man2/kexec_load.2:279
1628 "Another crash kernel is already being loaded or a crash kernel is already in "
1631 "別のクラッシュカーネルがすでにロードされているか、\n"
1632 "クラッシュカーネルがすでに使用されている。"
1635 #: build/C/man2/kexec_load.2:283
1636 msgid "I<flags> is invalid."
1637 msgstr "I<flags> が無効である。"
1640 #: build/C/man2/kexec_load.2:292
1642 "The value of a I<bufsz> field in one of the I<segments> entries exceeds the "
1643 "value in the corresponding I<memsz> field."
1647 #: build/C/man2/kexec_load.2:298
1648 msgid "I<nr_segments> exceeds B<KEXEC_SEGMENT_MAX> (16)."
1652 #: build/C/man2/kexec_load.2:301
1653 msgid "Two or more of the kernel target buffers overlap."
1657 #: build/C/man2/kexec_load.2:306
1658 msgid "The value in I<cmdline[cmdline_len-1]> is not \\(aq\\e0\\(aq."
1662 #: build/C/man2/kexec_load.2:313
1664 "The file referred to by I<kernel_fd> or I<initrd_fd> is empty (length zero)."
1668 #: build/C/man2/kexec_load.2:313 build/C/man2/lookup_dcookie.2:61
1669 #: build/C/man2/process_vm_readv.2:278 build/C/man2/sendfile.2:138
1670 #: build/C/man2/splice.2:169 build/C/man2/tee.2:117
1671 #: build/C/man2/vmsplice.2:145
1677 #: build/C/man2/kexec_load.2:316
1678 msgid "Could not allocate memory."
1679 msgstr "メモリーを割り当てできなかった。"
1682 #: build/C/man2/kexec_load.2:316
1688 #: build/C/man2/kexec_load.2:323
1690 "I<kernel_fd> does not refer to an open file, or the kernel can't load this "
1691 "file. Currently, the file must be a bzImage and contain an x86 kernel that "
1692 "is loadable above 4GiB in memory (see the kernel source file I<Documentation/"
1697 #: build/C/man2/kexec_load.2:328
1698 msgid "The caller does not have the B<CAP_SYS_BOOT> capability."
1699 msgstr "呼び出し側が B<CAP_SYS_BOOT> ケーパビリティを持っていない。"
1702 #: build/C/man2/kexec_load.2:335
1704 "The B<kexec_load>() system call first appeared in Linux 2.6.13. The "
1705 "B<kexec_file_load>() system call first appeared in Linux 3.17."
1706 msgstr "B<kexec_load>() システムコールは Linux 2.6.13 で初めて登場した。 B<kexec_file_load>() システムコールは Linux 3.17 で初めて登場した。"
1709 #: build/C/man2/kexec_load.2:337
1710 msgid "These system calls are Linux-specific."
1711 msgstr "これらのシステムコールは Linux 固有である。"
1714 #: build/C/man2/kexec_load.2:341
1716 "Currently, there is no glibc support for these system calls. Call them "
1717 "using B<syscall>(2)."
1718 msgstr "現在のところ、 これらのシステムコールは glibc ではサポートされていない。 B<syscall>(2) を使って呼び出すこと。"
1721 #: build/C/man2/kexec_load.2:345
1722 msgid "B<reboot>(2), B<syscall>(2), B<kexec>(8)"
1723 msgstr "B<reboot>(2), B<syscall>(2), B<kexec>(8)"
1726 #: build/C/man2/kexec_load.2:350
1728 "The kernel source files I<Documentation/kdump/kdump.txt> and I<Documentation/"
1729 "kernel-parameters.txt>."
1733 #: build/C/man2/lookup_dcookie.2:27
1735 msgid "LOOKUP_DCOOKIE"
1736 msgstr "LOOKUP_DCOOKIE"
1739 #: build/C/man2/lookup_dcookie.2:27
1745 #: build/C/man2/lookup_dcookie.2:30
1746 msgid "lookup_dcookie - return a directory entry's path"
1747 msgstr "lookup_dcookie - ディレクトリエントリーのパス名を返す"
1750 #: build/C/man2/lookup_dcookie.2:32
1752 "B<int lookup_dcookie(u64 >I<cookie>B<, char *>I<buffer>B<, size_t >I<len>B<);"
1755 "B<int lookup_dcookie(u64 >I<cookie>B<, char *>I<buffer>B<, size_t >I<len>B<);"
1759 #: build/C/man2/lookup_dcookie.2:38
1761 "Look up the full path of the directory entry specified by the value "
1762 "I<cookie>. The cookie is an opaque identifier uniquely identifying a "
1763 "particular directory entry. The buffer given is filled in with the full "
1764 "path of the directory entry."
1766 "I<cookie> 値で指定されたディレクトリエントリーのフルパス名を検索する。 "
1767 "cookie は、個々のディレクトリエントリーを区別する内部識別子 (opaque "
1768 "identifier) である。引き数で指定されたバッファーに、ディレクトリエントリーの "
1772 #: build/C/man2/lookup_dcookie.2:43
1774 "For B<lookup_dcookie>() to return successfully, the kernel must still hold "
1775 "a cookie reference to the directory entry."
1777 "B<lookup_dcookie>() が正常に値を返すためには、カーネルがディレクトリエント"
1778 "リーへの cookie 参照を 保持していなければならない。"
1781 #: build/C/man2/lookup_dcookie.2:50
1783 "On success, B<lookup_dcookie>() returns the length of the path string "
1784 "copied into the buffer. On error, -1 is returned, and I<errno> is set "
1787 "成功した場合、 B<lookup_dcookie>() はバッファーにコピーしたパス文字列の長さ"
1788 "を返す。 エラーの場合は -1 を返し、 I<errno> に適切な値を設定する。"
1791 #: build/C/man2/lookup_dcookie.2:54
1792 msgid "The buffer was not valid."
1793 msgstr "バッファーが有効でなかった。"
1796 #: build/C/man2/lookup_dcookie.2:58
1798 "The kernel has no registered cookie/directory entry mappings at the time of "
1799 "lookup, or the cookie does not refer to a valid directory entry."
1801 "検索が行われた時、cookie とディレクトリエントリーのマッピングがカーネルに 登"
1802 "録されていなかったか、または cookie が有効なディレクトリエントリーを 参照して"
1806 #: build/C/man2/lookup_dcookie.2:58
1808 msgid "B<ENAMETOOLONG>"
1809 msgstr "B<ENAMETOOLONG>"
1812 #: build/C/man2/lookup_dcookie.2:61
1813 msgid "The name could not fit in the buffer."
1814 msgstr "名前がバッファーに入り切らなかった。"
1817 #: build/C/man2/lookup_dcookie.2:65
1819 "The kernel could not allocate memory for the temporary buffer holding the "
1822 "カーネルが、パス名を保持する一時バッファー用のメモリーを割り当てることが でき"
1826 #: build/C/man2/lookup_dcookie.2:70
1828 "The process does not have the capability B<CAP_SYS_ADMIN> required to look "
1831 "プロセスが cookie 値を検索するのに必要なケーパビリティ B<CAP_SYS_ADMIN> を"
1835 #: build/C/man2/lookup_dcookie.2:70 build/C/man2/quotactl.2:474
1841 #: build/C/man2/lookup_dcookie.2:73
1843 "The buffer was not large enough to hold the path of the directory entry."
1845 "バッファーが、ディレクトリエントリーのパス名を収容するのに 十分な大きさではな"
1849 #: build/C/man2/lookup_dcookie.2:78
1851 "Available since Linux 2.5.43. The B<ENAMETOOLONG> error return was added in "
1854 "Linux 2.5.43 以降で利用できる。 エラー B<ENAMETOOLONG> を返す仕様は 2.5.70 で"
1858 #: build/C/man2/lookup_dcookie.2:81
1859 msgid "B<lookup_dcookie>() is Linux-specific."
1860 msgstr "B<lookup_dcookie>() は Linux 独自の関数である。"
1863 #: build/C/man2/lookup_dcookie.2:85
1865 "B<lookup_dcookie>() is a special-purpose system call, currently used only "
1866 "by the oprofile profiler. It relies on a kernel driver to register cookies "
1867 "for directory entries."
1869 "B<lookup_dcookie>() は特殊な用途に使われるシステムコールで、現在のところ "
1870 "oprofile profiler で 使われているだけである。"
1873 #: build/C/man2/lookup_dcookie.2:88
1875 "The path returned may be suffixed by the string \" (deleted)\" if the "
1876 "directory entry has been removed."
1878 "指定されたディレクトリエントリーが削除されていた場合、返されるパス名の最後に "
1879 "\" (deleted)\" という文字列が付加されることがある。"
1882 #: build/C/man2/modify_ldt.2:24
1888 #: build/C/man2/modify_ldt.2:24 build/C/man2/pivot_root.2:10
1894 #: build/C/man2/modify_ldt.2:27
1895 msgid "modify_ldt - get or set ldt"
1896 msgstr "modify_ldt - ldt を設定または取得する"
1899 #: build/C/man2/modify_ldt.2:30
1901 msgid "B<#include E<lt>sys/types.hE<gt>>\n"
1902 msgstr "B<#include E<lt>sys/types.hE<gt>>\n"
1905 #: build/C/man2/modify_ldt.2:32
1907 msgid "B<int modify_ldt(int >I<func>B<, void *>I<ptr>B<, unsigned long >I<bytecount>B<);>\n"
1908 msgstr "B<int modify_ldt(int >I<func>B<, void *>I<ptr>B<, unsigned long >I<bytecount>B<);>\n"
1911 #: build/C/man2/modify_ldt.2:41
1913 "B<modify_ldt>() reads or writes the local descriptor table (ldt) for a "
1914 "process. The ldt is a per-process memory management table used by the i386 "
1915 "processor. For more information on this table, see an Intel 386 processor "
1918 "B<modify_ldt>() はプロセスのローカルディスクリプターテーブル (local "
1919 "descriptor table; ldt) を読み書きする。 ldt は i386 プロセッサで使用されるプ"
1920 "ロセスごとのメモリー管理テーブルである。 このテーブルに関してのより詳しい情報"
1921 "は Intel 386 processor handbook を 参照すること。"
1924 #: build/C/man2/modify_ldt.2:51
1926 "When I<func> is 0, B<modify_ldt>() reads the ldt into the memory pointed to "
1927 "by I<ptr>. The number of bytes read is the smaller of I<bytecount> and the "
1928 "actual size of the ldt."
1930 "I<func> が 0 ならば、 B<modify_ldt>() は ldt を I<ptr> が指しているメモリー"
1931 "に読み込む。 読み込むバイト数は実際の ldt のサイズか I<bytecount> より小さい"
1934 #. FIXME Should this page say something about func == 2 and func == 0x11?
1935 #. In Linux 2.4, func == 2 returned "the default ldt"
1936 #. In Linux 2.6, func == 2 is a nop, returning a zeroed out structure.
1937 #. Linux 2.4 and 2.6 implement an operation for func == 0x11
1939 #: build/C/man2/modify_ldt.2:69
1941 "When I<func> is 1, B<modify_ldt>() modifies one ldt entry. I<ptr> points "
1942 "to a I<user_desc> structure and I<bytecount> must equal the size of this "
1945 "I<func> が 1 ならば、 B<modify_ldt>() は ldt エントリーの一つを変更する。 "
1946 "I<ptr> は I<user_desc> 構造体を指し、 I<bytecount> はこの構造体の大きさに等し"
1950 #: build/C/man2/modify_ldt.2:73
1951 msgid "The I<user_desc> structure is defined in I<E<lt>asm/ldt.hE<gt>> as:"
1953 "I<user_desc> 構造体は I<E<lt>asm/ldt.hE<gt>> で以下のように定義されている:"
1956 #: build/C/man2/modify_ldt.2:87
1959 "struct user_desc {\n"
1960 " unsigned int entry_number;\n"
1961 " unsigned long base_addr;\n"
1962 " unsigned int limit;\n"
1963 " unsigned int seg_32bit:1;\n"
1964 " unsigned int contents:2;\n"
1965 " unsigned int read_exec_only:1;\n"
1966 " unsigned int limit_in_pages:1;\n"
1967 " unsigned int seg_not_present:1;\n"
1968 " unsigned int useable:1;\n"
1971 "struct user_desc {\n"
1972 " unsigned int entry_number;\n"
1973 " unsigned long base_addr;\n"
1974 " unsigned int limit;\n"
1975 " unsigned int seg_32bit:1;\n"
1976 " unsigned int contents:2;\n"
1977 " unsigned int read_exec_only:1;\n"
1978 " unsigned int limit_in_pages:1;\n"
1979 " unsigned int seg_not_present:1;\n"
1980 " unsigned int useable:1;\n"
1984 #. The ldt is specific for the calling process. Any attempts to change
1985 #. the ldt to include the address space of another process or the kernel
1986 #. will result in a segmentation violation when trying to access the memory
1987 #. outside of the process address space. The memory protection is enforced
1988 #. at the paging layer.
1990 #: build/C/man2/modify_ldt.2:98
1991 msgid "In Linux 2.4 and earlier, this structure was named I<modify_ldt_ldt_s>."
1993 "Linux 2.4 以前では、この構造体は I<modify_ldt_ldt_s> という名前であった。"
1996 #: build/C/man2/modify_ldt.2:108
1998 "On success, B<modify_ldt>() returns either the actual number of bytes read "
1999 "(for reading) or 0 (for writing). On failure, B<modify_ldt>() returns -1 "
2000 "and sets I<errno> to indicate the error."
2002 "成功した場合は、 B<modify_ldt>() は (読み込みの場合は) 実際に読み込んだバイ"
2003 "ト数、 または (書き込みの場合は) 0 を返す。 失敗した場合は B<modify_ldt>() "
2004 "は -1 を返し、 I<errno> をエラーを示す値に設定する。"
2007 #: build/C/man2/modify_ldt.2:113
2008 msgid "I<ptr> points outside the address space."
2009 msgstr "I<ptr> がアドレス空間の外を指している。"
2012 #: build/C/man2/modify_ldt.2:126
2014 "I<ptr> is 0, or I<func> is 1 and I<bytecount> is not equal to the size of "
2015 "the structure I<modify_ldt_ldt_s>, or I<func> is 1 and the new ldt entry has "
2018 "I<ptr> が 0 である、 または I<func> が 1 で I<bytecount> が "
2019 "I<modify_ldt_ldt_s> 構造体のサイズと等しくないか、 I<func> が 1 で新しい ldt "
2023 #: build/C/man2/modify_ldt.2:130
2024 msgid "I<func> is neither 0 nor 1."
2025 msgstr "I<func> が 0 でも 1 でもない。"
2028 #: build/C/man2/modify_ldt.2:133
2030 "This call is Linux-specific and should not be used in programs intended to "
2033 "このコールは Linux 特有であり、移植を意図したプログラムでは 使用してはいけな"
2037 #: build/C/man2/modify_ldt.2:136 build/C/man2/perfmonctl.2:205
2038 #: build/C/man2/pivot_root.2:134
2040 "Glibc does not provide a wrapper for this system call; call it using "
2043 "glibc はこのシステムコールに対するラッパー関数を提供していない。 "
2044 "B<syscall>(2) を使って呼び出すこと。"
2047 #: build/C/man2/modify_ldt.2:138
2052 #: build/C/man2/nfsservctl.2:8
2058 #: build/C/man2/nfsservctl.2:8
2064 #: build/C/man2/nfsservctl.2:11
2065 msgid "nfsservctl - syscall interface to kernel nfs daemon"
2066 msgstr "nfsservctl - カーネル nfs デーモンのためのインターフェース"
2069 #: build/C/man2/nfsservctl.2:14
2071 msgid "B<#include E<lt>linux/nfsd/syscall.hE<gt>>\n"
2072 msgstr "B<#include E<lt>linux/nfsd/syscall.hE<gt>>\n"
2075 #: build/C/man2/nfsservctl.2:17
2078 "B<long nfsservctl(int >I<cmd>B<, struct nfsctl_arg *>I<argp>B<,>\n"
2079 "B< union nfsctl_res *>I<resp>B<);>\n"
2081 "B<long nfsservctl(int >I<cmd>B<, struct nfsctl_arg *>I<argp>B<,>\n"
2082 "B< union nfsctl_res *>I<resp>B<);>\n"
2085 #: build/C/man2/nfsservctl.2:21
2086 msgid "I<Note>: Since Linux 3.1, this system call no longer exists."
2087 msgstr "I<注意>: Linux 3.1 以降では、このシステムコールはもはや存在しない。"
2090 #: build/C/man2/nfsservctl.2:35
2094 " * These are the commands understood by nfsctl().\n"
2096 "#define NFSCTL_SVC 0 /* This is a server process. */\n"
2097 "#define NFSCTL_ADDCLIENT 1 /* Add an NFS client. */\n"
2098 "#define NFSCTL_DELCLIENT 2 /* Remove an NFS client. */\n"
2099 "#define NFSCTL_EXPORT 3 /* Export a filesystem. */\n"
2100 "#define NFSCTL_UNEXPORT 4 /* Unexport a filesystem. */\n"
2101 "#define NFSCTL_UGIDUPDATE 5 /* Update a client's UID/GID map\n"
2102 " (only in Linux 2.4.x and earlier). */\n"
2103 "#define NFSCTL_GETFH 6 /* Get a file handle (used by mountd)\n"
2104 " (only in Linux 2.4.x and earlier). */\n"
2107 " * nfsctl() によって理解されるコマンド\n"
2109 "#define NFSCTL_SVC 0 /* サーバープロセス */\n"
2110 "#define NFSCTL_ADDCLIENT 1 /* NFS クライアントを追加 */\n"
2111 "#define NFSCTL_DELCLIENT 2 /* NFS クライアンドを削除 */\n"
2112 "#define NFSCTL_EXPORT 3 /* ファイルシステムのエクスポート */\n"
2113 "#define NFSCTL_UNEXPORT 4 /* ファイルシステムのアンエクスポート */\n"
2114 "#define NFSCTL_UGIDUPDATE 5 /* UID/GID マップの更新\n"
2115 " (Linux 2.4.x とそれ以前のみ) */\n"
2116 "#define NFSCTL_GETFH 6 /* (mountd で使用される) fh の取得\n"
2117 " (Linux 2.4.x とそれ以前のみ) */\n"
2120 #: build/C/man2/nfsservctl.2:47
2123 "struct nfsctl_arg {\n"
2124 " int ca_version; /* safeguard */\n"
2126 " struct nfsctl_svc u_svc;\n"
2127 " struct nfsctl_client u_client;\n"
2128 " struct nfsctl_export u_export;\n"
2129 " struct nfsctl_uidmap u_umap;\n"
2130 " struct nfsctl_fhparm u_getfh;\n"
2131 " unsigned int u_debug;\n"
2135 "struct nfsctl_arg {\n"
2136 " int ca_version; /* safeguard */\n"
2138 " struct nfsctl_svc u_svc;\n"
2139 " struct nfsctl_client u_client;\n"
2140 " struct nfsctl_export u_export;\n"
2141 " struct nfsctl_uidmap u_umap;\n"
2142 " struct nfsctl_fhparm u_getfh;\n"
2143 " unsigned int u_debug;\n"
2148 #: build/C/man2/nfsservctl.2:52
2151 "union nfsctl_res {\n"
2152 " struct knfs_fh cr_getfh;\n"
2153 " unsigned int cr_debug;\n"
2156 "union nfsctl_res {\n"
2157 " struct knfs_fh cr_getfh;\n"
2158 " unsigned int cr_debug;\n"
2162 #: build/C/man2/nfsservctl.2:58 build/C/man2/pivot_root.2:105
2163 #: build/C/man2/vm86.2:59
2165 "On success, zero is returned. On error, -1 is returned, and I<errno> is set "
2168 "成功した場合は 0 が返される。エラーの場合は -1 が返され、 I<errno> が適切に設"
2172 #: build/C/man2/nfsservctl.2:60
2173 msgid "This call is Linux-specific."
2174 msgstr "このコールは Linux 特有である。"
2177 #: build/C/man2/outb.2:26
2183 #: build/C/man2/outb.2:26
2189 #: build/C/man2/outb.2:31
2191 "outb, outw, outl, outsb, outsw, outsl, inb, inw, inl, insb, insw, insl, "
2192 "outb_p, outw_p, outl_p, inb_p, inw_p, inl_p - port I/O"
2194 "outb, outw, outl, outsb, outsw, outsl, inb, inw, inl, insb, insw, insl, "
2195 "outb_p, outw_p, outl_p, inb_p, inw_p, inl_p - ポート入出力"
2198 #: build/C/man2/outb.2:34
2200 msgid "B<#include E<lt>sys/io.hE<gt>>\n"
2201 msgstr "B<#include E<lt>sys/io.hE<gt>>\n"
2204 #: build/C/man2/outb.2:41
2207 "B<unsigned char inb(unsigned short int >I<port>B<);>\n"
2208 "B<unsigned char inb_p(unsigned short int >I<port>B<);>\n"
2209 "B<unsigned short int inw(unsigned short int >I<port>B<);>\n"
2210 "B<unsigned short int inw_p(unsigned short int >I<port>B<);>\n"
2211 "B<unsigned int inl(unsigned short int >I<port>B<);>\n"
2212 "B<unsigned int inl_p(unsigned short int >I<port>B<);>\n"
2214 "B<unsigned char inb(unsigned short int >I<port>B<);>\n"
2215 "B<unsigned char inb_p(unsigned short int >I<port>B<);>\n"
2216 "B<unsigned short int inw(unsigned short int >I<port>B<);>\n"
2217 "B<unsigned short int inw_p(unsigned short int >I<port>B<);>\n"
2218 "B<unsigned int inl(unsigned short int >I<port>B<);>\n"
2219 "B<unsigned int inl_p(unsigned short int >I<port>B<);>\n"
2222 #: build/C/man2/outb.2:48
2225 "B<void outb(unsigned char >I<value>B<, unsigned short int >I<port>B<);>\n"
2226 "B<void outb_p(unsigned char >I<value>B<, unsigned short int >I<port>B<);>\n"
2227 "B<void outw(unsigned short int >I<value>B<, unsigned short int >I<port>B<);>\n"
2228 "B<void outw_p(unsigned short int >I<value>B<, unsigned short int >I<port>B<);>\n"
2229 "B<void outl(unsigned int >I<value>B<, unsigned short int >I<port>B<);>\n"
2230 "B<void outl_p(unsigned int >I<value>B<, unsigned short int >I<port>B<);>\n"
2232 "B<void outb(unsigned char >I<value>B<, unsigned short int >I<port>B<);>\n"
2233 "B<void outb_p(unsigned char >I<value>B<, unsigned short int >I<port>B<);>\n"
2234 "B<void outw(unsigned short int >I<value>B<, unsigned short int >I<port>B<);>\n"
2235 "B<void outw_p(unsigned short int >I<value>B<, unsigned short int >I<port>B<);>\n"
2236 "B<void outl(unsigned int >I<value>B<, unsigned short int >I<port>B<);>\n"
2237 "B<void outl_p(unsigned int >I<value>B<, unsigned short int >I<port>B<);>\n"
2240 #: build/C/man2/outb.2:61
2243 "B<void insb(unsigned short int >I<port>B<, void *>I<addr>B<,>\n"
2244 "B< unsigned long int >I<count>B<);>\n"
2245 "B<void insw(unsigned short int >I<port>B<, void *>I<addr>B<,>\n"
2246 "B< unsigned long int >I<count>B<);>\n"
2247 "B<void insl(unsigned short int >I<port>B<, void *>I<addr>B<,>\n"
2248 "B< unsigned long int >I<count>B<);>\n"
2249 "B<void outsb(unsigned short int >I<port>B<, const void *>I<addr>B<,>\n"
2250 "B< unsigned long int >I<count>B<);>\n"
2251 "B<void outsw(unsigned short int >I<port>B<, const void *>I<addr>B<,>\n"
2252 "B< unsigned long int >I<count>B<);>\n"
2253 "B<void outsl(unsigned short int >I<port>B<, const void *>I<addr>B<,>\n"
2254 "B< unsigned long int >I<count>B<);>\n"
2256 "B<void insb(unsigned short int >I<port>B<, void *>I<addr>B<,>\n"
2257 "B< unsigned long int >I<count>B<);>\n"
2258 "B<void insw(unsigned short int >I<port>B<, void *>I<addr>B<,>\n"
2259 "B< unsigned long int >I<count>B<);>\n"
2260 "B<void insl(unsigned short int >I<port>B<, void *>I<addr>B<,>\n"
2261 "B< unsigned long int >I<count>B<);>\n"
2262 "B<void outsb(unsigned short int >I<port>B<, const void *>I<addr>B<,>\n"
2263 "B< unsigned long int >I<count>B<);>\n"
2264 "B<void outsw(unsigned short int >I<port>B<, const void *>I<addr>B<,>\n"
2265 "B< unsigned long int >I<count>B<);>\n"
2266 "B<void outsl(unsigned short int >I<port>B<, const void *>I<addr>B<,>\n"
2267 "B< unsigned long int >I<count>B<);>\n"
2270 #: build/C/man2/outb.2:67
2272 "This family of functions is used to do low-level port input and output. The "
2273 "out* functions do port output, the in* functions do port input; the b-suffix "
2274 "functions are byte-width and the w-suffix functions word-width; the _p-"
2275 "suffix functions pause until the I/O completes."
2277 "この一連の関数はポートに対する低レベルの入出力に使用する。 out* 関数はポート"
2278 "出力、in* 関数はポート入力を行う。 語尾に b がついている関数はバイト単位、w "
2279 "がついている関数はワード単位である。 _p がついている関数は I/O が終了するまで"
2282 #. , given the following information
2283 #. in addition to that given in
2286 #: build/C/man2/outb.2:73
2288 "They are primarily designed for internal kernel use, but can be used from "
2291 "これらの関数はもともとカーネル内部での使用を想定して設計されているが、 ユー"
2295 #: build/C/man2/outb.2:78
2297 "You must compile with B<-O> or B<-O2> or similar. The functions are defined "
2298 "as inline macros, and will not be substituted in without optimization "
2299 "enabled, causing unresolved references at link time."
2301 "B<-O> や B<-O2> などを指定してコンパイルしなければならない。 これらの関数はイ"
2302 "ンラインマクロとして定義されており、 最適化を行わないと関数の展開が行われ"
2303 "ず、 リンクの時に「解決できない参照(unresolved reference)」が発生する。"
2306 #: build/C/man2/outb.2:87
2308 "You use B<ioperm>(2) or alternatively B<iopl>(2) to tell the kernel to "
2309 "allow the user space application to access the I/O ports in question. "
2310 "Failure to do this will cause the application to receive a segmentation "
2313 "ユーザー空間のアプリケーションが I/O ポートにアクセスすることを カーネルに教"
2314 "えるために B<ioperm>(2) もしくは B<iopl>(2) を使用すること。これを忘れると"
2315 "アプリケーションはセグメンテーション違反 (segmentation fault) を受けとること"
2319 #: build/C/man2/outb.2:96
2321 "B<outb>() and friends are hardware-specific. The I<value> argument is "
2322 "passed first and the I<port> argument is passed second, which is the "
2323 "opposite order from most DOS implementations."
2325 "B<outb>() とその仲間はハードウェア特有である。 I<value> 引数が最初に渡さ"
2326 "れ、 I<port> 引数が二番目に渡される。 この順序はほとんどの DOS での実装とは逆"
2330 #: build/C/man2/outb.2:99
2331 msgid "B<ioperm>(2), B<iopl>(2)"
2332 msgstr "B<ioperm>(2), B<iopl>(2)"
2335 #: build/C/man2/pciconfig_read.2:8
2337 msgid "PCICONFIG_READ"
2338 msgstr "PCICONFIG_READ"
2341 #: build/C/man2/pciconfig_read.2:8
2347 #: build/C/man2/pciconfig_read.2:11
2349 "pciconfig_read, pciconfig_write, pciconfig_iobase - pci device information "
2352 "pciconfig_read, pciconfig_write, pciconfig_iobase - pci デバイス情報を扱う"
2355 #: build/C/man2/pciconfig_read.2:14
2357 msgid "B<#include E<lt>pci.hE<gt>>\n"
2358 msgstr "B<#include E<lt>pci.hE<gt>>\n"
2361 #: build/C/man2/pciconfig_read.2:21
2364 "B<int pciconfig_read(unsigned long >I<bus>B<, unsigned long >I<dfn>B<,>\n"
2365 "B< unsigned long >I<off>B<, unsigned long >I<len>B<, void *>I<buf>B<);>\n"
2366 "B<int pciconfig_write(unsigned long >I<bus>B<, unsigned long >I<dfn>B<,>\n"
2367 "B< unsigned long >I<off>B<, unsigned long >I<len>B<, void *>I<buf>B<);>\n"
2368 "B<int pciconfig_iobase(long >I<which>B<, unsigned long >I<bus>B<,>\n"
2369 "B< unsigned long >I<devfn>B<);>\n"
2371 "B<int pciconfig_read(unsigned long >I<bus>B<, unsigned long >I<dfn>B<,>\n"
2372 "B< unsigned long >I<off>B<, unsigned long >I<len>B<, void *>I<buf>B<);>\n"
2373 "B<int pciconfig_write(unsigned long >I<bus>B<, unsigned long >I<dfn>B<,>\n"
2374 "B< unsigned long >I<off>B<, unsigned long >I<len>B<, void *>I<buf>B<);>\n"
2375 "B<int pciconfig_iobase(long >I<which>B<, unsigned long >I<bus>B<,>\n"
2376 "B< unsigned long >I<devfn>B<);>\n"
2379 #: build/C/man2/pciconfig_read.2:27
2381 "Most of the interaction with PCI devices is already handled by the kernel "
2382 "PCI layer, and thus these calls should not normally need to be accessed from "
2385 "PCI デバイスとのやり取り (interaction) は カーネル PCI レイヤですでに処理され"
2386 "ているので、 通常はこららの関数をユーザー空間からアクセスする必要はない。"
2389 #: build/C/man2/pciconfig_read.2:27 build/C/man2/pciconfig_read.2:51
2391 msgid "B<pciconfig_read>()"
2392 msgstr "B<pciconfig_read>()"
2395 #: build/C/man2/pciconfig_read.2:36
2396 msgid "Reads to I<buf> from device I<dev> at offset I<off> value."
2397 msgstr "デバイス I<dev> のオフセット I<off> の値を I<buf> に読み込む。"
2400 #: build/C/man2/pciconfig_read.2:36 build/C/man2/pciconfig_read.2:57
2402 msgid "B<pciconfig_write>()"
2403 msgstr "B<pciconfig_write>()"
2406 #: build/C/man2/pciconfig_read.2:45
2407 msgid "Writes from I<buf> to device I<dev> at offset I<off> value."
2408 msgstr "デバイス I<dev> のオフセット I<off> に I<buf> の値を書き込む。"
2411 #: build/C/man2/pciconfig_read.2:45 build/C/man2/pciconfig_read.2:63
2413 msgid "B<pciconfig_iobase>()"
2414 msgstr "B<pciconfig_iobase>()"
2417 #: build/C/man2/pciconfig_read.2:50
2419 "You pass it a bus/devfn pair and get a physical address for either the "
2420 "memory offset (for things like prep, this is 0xc0000000), the IO base for "
2421 "PIO cycles, or the ISA holes if any."
2423 "bus/devfn ペアをこの関数に渡し、 メモリーオフセット (prep のようなものでは、"
2424 "この値は 0xc0000000 である) と PIO サイクルの IO ベースの物理アドレスを取得す"
2425 "る。 また、もしあるならば ISA hole の物理アドレスを取得する。"
2428 #: build/C/man2/pciconfig_read.2:57 build/C/man2/pciconfig_read.2:63
2430 "On success zero is returned. On error, -1 is returned and I<errno> is set "
2433 "成功した場合、0 が返される。 エラーの場合、-1 が返され、 I<errno> が適切に設"
2437 #: build/C/man2/pciconfig_read.2:77
2439 "Returns information on locations of various I/O regions in physical memory "
2440 "according to the I<which> value. Values for I<which> are: "
2441 "B<IOBASE_BRIDGE_NUMBER>, B<IOBASE_MEMORY>, B<IOBASE_IO>, B<IOBASE_ISA_IO>, "
2442 "B<IOBASE_ISA_MEM>."
2444 "I<which> の値に基づいて、物理メモリー内の様々な I/O 領域の位置情報が返され"
2445 "る。 I<which> の値は、 B<IOBASE_BRIDGE_NUMBER>, B<IOBASE_MEMORY>, "
2446 "B<IOBASE_IO>, B<IOBASE_ISA_IO>, B<IOBASE_ISA_MEM> である。"
2449 #: build/C/man2/pciconfig_read.2:84
2450 msgid "I<len> value is invalid. This does not apply to B<pciconfig_iobase>()."
2452 "I<len> の値が無効である。 このエラーは B<pciconfig_iobase>() には適用されな"
2456 #: build/C/man2/pciconfig_read.2:84 build/C/man2/ptrace.2:1929
2457 #: build/C/man2/sendfile.2:134
2463 #: build/C/man2/pciconfig_read.2:87
2468 #: build/C/man2/pciconfig_read.2:87 build/C/man2/perf_event_open.2:2696
2474 #: build/C/man2/pciconfig_read.2:93
2476 "For B<pciconfig_iobase>(), \"hose\" value is NULL. For the other calls, "
2477 "could not find a slot."
2479 "B<pciconfig_iobase>() の場合、でホース (hose) の値が NULL である。 他の呼び"
2480 "出しの場合、スロット (slot) が見つからない。"
2483 #: build/C/man2/pciconfig_read.2:98
2484 msgid "The system has not implemented these calls (B<CONFIG_PCI> not defined)."
2486 "このシステムはこれらの呼び出しを実装していない。 (B<CONFIG_PCI> が定義されて"
2490 #: build/C/man2/pciconfig_read.2:98 build/C/man2/perf_event_open.2:2725
2492 msgid "B<EOPNOTSUPP>"
2493 msgstr "B<EOPNOTSUPP>"
2496 #: build/C/man2/pciconfig_read.2:105
2498 "This return value is valid only for B<pciconfig_iobase>(). It is returned "
2499 "if the value for I<which> is invalid."
2501 "この返り値は B<pciconfig_iobase>() でのみ有効である。 このエラーは I<which> "
2505 #: build/C/man2/pciconfig_read.2:112
2507 "User does not have the B<CAP_SYS_ADMIN> capability. This does not apply to "
2508 "B<pciconfig_iobase>()."
2510 "ユーザーが B<CAP_SYS_ADMIN> 権限を持っていない。 このエラーは "
2511 "B<pciconfig_iobase>() には適用されない。"
2514 #: build/C/man2/pciconfig_read.2:114
2515 msgid "These calls are Linux-specific, available since Linux 2.0.26/2.1.11."
2517 "これらの呼び出しは Linux 特有のものであり、 Linux 2.0.26/2.1.11 から使用可能"
2521 #: build/C/man2/pciconfig_read.2:116
2522 msgid "B<capabilities>(7)"
2523 msgstr "B<capabilities>(7)"
2526 #: build/C/man2/perf_event_open.2:27
2528 msgid "PERF_EVENT_OPEN"
2529 msgstr "PERF_EVENT_OPEN"
2532 #: build/C/man2/perf_event_open.2:27
2538 #: build/C/man2/perf_event_open.2:30
2539 msgid "perf_event_open - set up performance monitoring"
2543 #: build/C/man2/perf_event_open.2:34
2546 "B<#include E<lt>linux/perf_event.hE<gt>>\n"
2547 "B<#include E<lt>linux/hw_breakpoint.hE<gt>>\n"
2549 "B<#include E<lt>linux/perf_event.hE<gt>>\n"
2550 "B<#include E<lt>linux/hw_breakpoint.hE<gt>>\n"
2553 #: build/C/man2/perf_event_open.2:38
2556 "B<int perf_event_open(struct perf_event_attr *>I<attr>B<,>\n"
2557 "B< pid_t >I<pid>B<, int >I<cpu>B<, int >I<group_fd>B<,>\n"
2558 "B< unsigned long >I<flags>B<);>\n"
2560 "B<int perf_event_open(struct perf_event_attr *>I<attr>B<,>\n"
2561 "B< pid_t >I<pid>B<, int >I<cpu>B<, int >I<group_fd>B<,>\n"
2562 "B< unsigned long >I<flags>B<);>\n"
2565 #: build/C/man2/perf_event_open.2:47
2567 "Given a list of parameters, B<perf_event_open>() returns a file descriptor, "
2568 "for use in subsequent system calls (B<read>(2), B<mmap>(2), B<prctl>(2), "
2569 "B<fcntl>(2), etc.)."
2573 #: build/C/man2/perf_event_open.2:55
2575 "A call to B<perf_event_open>() creates a file descriptor that allows "
2576 "measuring performance information. Each file descriptor corresponds to one "
2577 "event that is measured; these can be grouped together to measure multiple "
2578 "events simultaneously."
2582 #: build/C/man2/perf_event_open.2:62
2584 "Events can be enabled and disabled in two ways: via B<ioctl>(2) and via "
2585 "B<prctl>(2). When an event is disabled it does not count or generate "
2586 "overflows but does continue to exist and maintain its count value."
2590 #: build/C/man2/perf_event_open.2:76
2592 "Events come in two flavors: counting and sampled. A I<counting> event is "
2593 "one that is used for counting the aggregate number of events that occur. In "
2594 "general, counting event results are gathered with a B<read>(2) call. A "
2595 "I<sampling> event periodically writes measurements to a buffer that can then "
2596 "be accessed via B<mmap>(2)."
2600 #: build/C/man2/perf_event_open.2:76
2606 #: build/C/man2/perf_event_open.2:83
2608 "The I<pid> and I<cpu> arguments allow specifying which process and CPU to "
2613 #: build/C/man2/perf_event_open.2:83
2615 msgid "B<pid == 0> and B<cpu == -1>"
2616 msgstr "B<pid == 0> and B<cpu == -1>"
2619 #: build/C/man2/perf_event_open.2:86
2620 msgid "This measures the calling process/thread on any CPU."
2624 #: build/C/man2/perf_event_open.2:86
2626 msgid "B<pid == 0> and B<cpu E<gt>= 0>"
2627 msgstr "B<pid == 0> and B<cpu E<gt>= 0>"
2630 #: build/C/man2/perf_event_open.2:90
2632 "This measures the calling process/thread only when running on the specified "
2637 #: build/C/man2/perf_event_open.2:90
2639 msgid "B<pid E<gt> 0> and B<cpu == -1>"
2640 msgstr "B<pid E<gt> 0> and B<cpu == -1>"
2643 #: build/C/man2/perf_event_open.2:93
2644 msgid "This measures the specified process/thread on any CPU."
2648 #: build/C/man2/perf_event_open.2:93
2650 msgid "B<pid E<gt> 0> and B<cpu E<gt>= 0>"
2651 msgstr "B<pid E<gt> 0> and B<cpu E<gt>= 0>"
2654 #: build/C/man2/perf_event_open.2:97
2656 "This measures the specified process/thread only when running on the "
2661 #: build/C/man2/perf_event_open.2:97
2663 msgid "B<pid == -1> and B<cpu E<gt>= 0>"
2664 msgstr "B<pid == -1> and B<cpu E<gt>= 0>"
2667 #: build/C/man2/perf_event_open.2:105
2669 "This measures all processes/threads on the specified CPU. This requires "
2670 "B<CAP_SYS_ADMIN> capability or a I</proc/sys/kernel/perf_event_paranoid> "
2671 "value of less than 1."
2675 #: build/C/man2/perf_event_open.2:105
2677 msgid "B<pid == -1> and B<cpu == -1>"
2678 msgstr "B<pid == -1> and B<cpu == -1>"
2681 #: build/C/man2/perf_event_open.2:108
2682 msgid "This setting is invalid and will return an error."
2686 #: build/C/man2/perf_event_open.2:130
2688 "The I<group_fd> argument allows event groups to be created. An event group "
2689 "has one event which is the group leader. The leader is created first, with "
2690 "I<group_fd> = -1. The rest of the group members are created with subsequent "
2691 "B<perf_event_open>() calls with I<group_fd> being set to the file "
2692 "descriptor of the group leader. (A single event on its own is created with "
2693 "I<group_fd> = -1 and is considered to be a group with only 1 member.) An "
2694 "event group is scheduled onto the CPU as a unit: it will be put onto the CPU "
2695 "only if all of the events in the group can be put onto the CPU. This means "
2696 "that the values of the member events can be meaningfully compared\\(emadded, "
2697 "divided (to get ratios), and so on\\(emwith each other, since they have "
2698 "counted events for the same set of executed instructions."
2702 #: build/C/man2/perf_event_open.2:134
2704 "The I<flags> argument is formed by ORing together zero or more of the "
2707 "I<flags> 引き数には、以下の値の 0 個以上をビット毎の論理和の形で指定する。"
2710 #: build/C/man2/perf_event_open.2:134
2712 msgid "B<PERF_FLAG_FD_CLOEXEC> (since Linux 3.14)"
2713 msgstr "B<PERF_FLAG_FD_CLOEXEC> (Linux 3.14 以降)"
2715 #. commit a21b0b354d4ac39be691f51c53562e2c24443d9e
2717 #: build/C/man2/perf_event_open.2:151
2719 "This flag enables the close-on-exec flag for the created event file "
2720 "descriptor, so that the file descriptor is automatically closed on "
2721 "B<execve>(2). Setting the close-on-exec flags at creation time, rather than "
2722 "later with B<fcntl>(2), avoids potential race conditions where the calling "
2723 "thread invokes B<perf_event_open>() and B<fcntl>(2) at the same time as "
2724 "another thread calls B<fork>(2) then B<execve>(2)."
2728 #: build/C/man2/perf_event_open.2:151
2730 msgid "B<PERF_FLAG_FD_NO_GROUP>"
2731 msgstr "B<PERF_FLAG_FD_NO_GROUP>"
2734 #: build/C/man2/perf_event_open.2:159
2736 "This flag tells the event to ignore the I<group_fd> parameter except for the "
2737 "purpose of setting up output redirection using the B<PERF_FLAG_FD_OUTPUT> "
2742 #: build/C/man2/perf_event_open.2:159
2744 msgid "B<PERF_FLAG_FD_OUTPUT> (broken since Linux 2.6.35)"
2745 msgstr "B<PERF_FLAG_FD_OUTPUT> (Linux 2.6.35 以降では正しく動作しない)"
2747 #. commit ac9721f3f54b27a16c7e1afb2481e7ee95a70318
2749 #: build/C/man2/perf_event_open.2:165
2751 "This flag re-routes the event's sampled output to instead be included in the "
2752 "mmap buffer of the event specified by I<group_fd>."
2756 #: build/C/man2/perf_event_open.2:165
2758 msgid "B<PERF_FLAG_PID_CGROUP> (since Linux 2.6.39)"
2759 msgstr "B<PERF_FLAG_PID_CGROUP> (Linux 2.6.39 以降)"
2761 #. commit e5d1367f17ba6a6fed5fd8b74e4d5720923e0c25
2763 #: build/C/man2/perf_event_open.2:189
2765 "This flag activates per-container system-wide monitoring. A container is an "
2766 "abstraction that isolates a set of resources for finer-grained control "
2767 "(CPUs, memory, etc.). In this mode, the event is measured only if the "
2768 "thread running on the monitored CPU belongs to the designated container "
2769 "(cgroup). The cgroup is identified by passing a file descriptor opened on "
2770 "its directory in the cgroupfs filesystem. For instance, if the cgroup to "
2771 "monitor is called I<test>, then a file descriptor opened on I</dev/cgroup/"
2772 "test> (assuming cgroupfs is mounted on I</dev/cgroup>) must be passed as "
2773 "the I<pid> parameter. cgroup monitoring is available only for system-wide "
2774 "events and may therefore require extra permissions."
2778 #: build/C/man2/perf_event_open.2:194
2780 "The I<perf_event_attr> structure provides detailed configuration information "
2781 "for the event being created."
2785 #: build/C/man2/perf_event_open.2:201
2788 "struct perf_event_attr {\n"
2789 " __u32 type; /* Type of event */\n"
2790 " __u32 size; /* Size of attribute structure */\n"
2791 " __u64 config; /* Type-specific configuration */\n"
2793 "struct perf_event_attr {\n"
2794 " __u32 type; /* Type of event */\n"
2795 " __u32 size; /* Size of attribute structure */\n"
2796 " __u64 config; /* Type-specific configuration */\n"
2799 #: build/C/man2/perf_event_open.2:206
2803 " __u64 sample_period; /* Period of sampling */\n"
2804 " __u64 sample_freq; /* Frequency of sampling */\n"
2808 " __u64 sample_period; /* Period of sampling */\n"
2809 " __u64 sample_freq; /* Frequency of sampling */\n"
2813 #: build/C/man2/perf_event_open.2:209
2816 " __u64 sample_type; /* Specifies values included in sample */\n"
2817 " __u64 read_format; /* Specifies values returned in read */\n"
2819 " __u64 sample_type; /* Specifies values included in sample */\n"
2820 " __u64 read_format; /* Specifies values returned in read */\n"
2823 #: build/C/man2/perf_event_open.2:237
2826 " __u64 disabled : 1, /* off by default */\n"
2827 " inherit : 1, /* children inherit it */\n"
2828 " pinned : 1, /* must always be on PMU */\n"
2829 " exclusive : 1, /* only group on PMU */\n"
2830 " exclude_user : 1, /* don't count user */\n"
2831 " exclude_kernel : 1, /* don't count kernel */\n"
2832 " exclude_hv : 1, /* don't count hypervisor */\n"
2833 " exclude_idle : 1, /* don't count when idle */\n"
2834 " mmap : 1, /* include mmap data */\n"
2835 " comm : 1, /* include comm data */\n"
2836 " freq : 1, /* use freq, not period */\n"
2837 " inherit_stat : 1, /* per task counts */\n"
2838 " enable_on_exec : 1, /* next exec enables */\n"
2839 " task : 1, /* trace fork/exit */\n"
2840 " watermark : 1, /* wakeup_watermark */\n"
2841 " precise_ip : 2, /* skid constraint */\n"
2842 " mmap_data : 1, /* non-exec mmap data */\n"
2843 " sample_id_all : 1, /* sample_type all events */\n"
2844 " exclude_host : 1, /* don't count in host */\n"
2845 " exclude_guest : 1, /* don't count in guest */\n"
2846 " exclude_callchain_kernel : 1,\n"
2847 " /* exclude kernel callchains */\n"
2848 " exclude_callchain_user : 1,\n"
2849 " /* exclude user callchains */\n"
2850 " mmap2 : 1, /* include mmap with inode data */\n"
2851 " comm_exec : 1, /* flag comm events that are due to exec */\n"
2852 " __reserved_1 : 39;\n"
2854 " __u64 disabled : 1, /* off by default */\n"
2855 " inherit : 1, /* children inherit it */\n"
2856 " pinned : 1, /* must always be on PMU */\n"
2857 " exclusive : 1, /* only group on PMU */\n"
2858 " exclude_user : 1, /* don't count user */\n"
2859 " exclude_kernel : 1, /* don't count kernel */\n"
2860 " exclude_hv : 1, /* don't count hypervisor */\n"
2861 " exclude_idle : 1, /* don't count when idle */\n"
2862 " mmap : 1, /* include mmap data */\n"
2863 " comm : 1, /* include comm data */\n"
2864 " freq : 1, /* use freq, not period */\n"
2865 " inherit_stat : 1, /* per task counts */\n"
2866 " enable_on_exec : 1, /* next exec enables */\n"
2867 " task : 1, /* trace fork/exit */\n"
2868 " watermark : 1, /* wakeup_watermark */\n"
2869 " precise_ip : 2, /* skid constraint */\n"
2870 " mmap_data : 1, /* non-exec mmap data */\n"
2871 " sample_id_all : 1, /* sample_type all events */\n"
2872 " exclude_host : 1, /* don't count in host */\n"
2873 " exclude_guest : 1, /* don't count in guest */\n"
2874 " exclude_callchain_kernel : 1,\n"
2875 " /* exclude kernel callchains */\n"
2876 " exclude_callchain_user : 1,\n"
2877 " /* exclude user callchains */\n"
2878 " mmap2 : 1, /* include mmap with inode data */\n"
2879 " comm_exec : 1, /* flag comm events that are due to exec */\n"
2880 " __reserved_1 : 39;\n"
2883 #: build/C/man2/perf_event_open.2:242
2887 " __u32 wakeup_events; /* wakeup every n events */\n"
2888 " __u32 wakeup_watermark; /* bytes before wakeup */\n"
2892 " __u32 wakeup_events; /* wakeup every n events */\n"
2893 " __u32 wakeup_watermark; /* bytes before wakeup */\n"
2897 #: build/C/man2/perf_event_open.2:244
2899 msgid " __u32 bp_type; /* breakpoint type */\n"
2900 msgstr " __u32 bp_type; /* breakpoint type */\n"
2903 #: build/C/man2/perf_event_open.2:249
2907 " __u64 bp_addr; /* breakpoint address */\n"
2908 " __u64 config1; /* extension of config */\n"
2912 " __u64 bp_addr; /* breakpoint address */\n"
2913 " __u64 config1; /* extension of config */\n"
2917 #: build/C/man2/perf_event_open.2:259
2921 " __u64 bp_len; /* breakpoint length */\n"
2922 " __u64 config2; /* extension of config1 */\n"
2924 " __u64 branch_sample_type; /* enum perf_branch_sample_type */\n"
2925 " __u64 sample_regs_user; /* user regs to dump on samples */\n"
2926 " __u32 sample_stack_user; /* size of stack to dump on\n"
2928 " __u32 __reserved_2; /* Align to u64 */\n"
2931 " __u64 bp_len; /* breakpoint length */\n"
2932 " __u64 config2; /* extension of config1 */\n"
2934 " __u64 branch_sample_type; /* enum perf_branch_sample_type */\n"
2935 " __u64 sample_regs_user; /* user regs to dump on samples */\n"
2936 " __u32 sample_stack_user; /* size of stack to dump on\n"
2938 " __u32 __reserved_2; /* Align to u64 */\n"
2941 #: build/C/man2/perf_event_open.2:261
2947 #: build/C/man2/perf_event_open.2:267
2949 "The fields of the I<perf_event_attr> structure are described in more detail "
2954 #: build/C/man2/perf_event_open.2:267 build/C/man2/perf_event_open.2:1669
2960 #: build/C/man2/perf_event_open.2:271
2962 "This field specifies the overall event type. It has one of the following "
2967 #: build/C/man2/perf_event_open.2:272
2969 msgid "B<PERF_TYPE_HARDWARE>"
2970 msgstr "B<PERF_TYPE_HARDWARE>"
2973 #: build/C/man2/perf_event_open.2:279
2975 "This indicates one of the \"generalized\" hardware events provided by the "
2976 "kernel. See the I<config> field definition for more details."
2980 #: build/C/man2/perf_event_open.2:279
2982 msgid "B<PERF_TYPE_SOFTWARE>"
2983 msgstr "B<PERF_TYPE_SOFTWARE>"
2986 #: build/C/man2/perf_event_open.2:283
2988 "This indicates one of the software-defined events provided by the kernel "
2989 "(even if no hardware support is available)."
2993 #: build/C/man2/perf_event_open.2:283
2995 msgid "B<PERF_TYPE_TRACEPOINT>"
2996 msgstr "B<PERF_TYPE_TRACEPOINT>"
2999 #: build/C/man2/perf_event_open.2:287
3001 "This indicates a tracepoint provided by the kernel tracepoint infrastructure."
3005 #: build/C/man2/perf_event_open.2:287
3007 msgid "B<PERF_TYPE_HW_CACHE>"
3008 msgstr "B<PERF_TYPE_HW_CACHE>"
3011 #: build/C/man2/perf_event_open.2:293
3013 "This indicates a hardware cache event. This has a special encoding, "
3014 "described in the I<config> field definition."
3018 #: build/C/man2/perf_event_open.2:293
3020 msgid "B<PERF_TYPE_RAW>"
3021 msgstr "B<PERF_TYPE_RAW>"
3024 #: build/C/man2/perf_event_open.2:297
3026 "This indicates a \"raw\" implementation-specific event in the I<config> "
3031 #: build/C/man2/perf_event_open.2:297
3033 msgid "B<PERF_TYPE_BREAKPOINT> (since Linux 2.6.33)"
3034 msgstr "B<PERF_TYPE_BREAKPOINT> (Linux 2.6.33 以降)"
3036 #. commit 24f1e32c60c45c89a997c73395b69c8af6f0a84e
3038 #: build/C/man2/perf_event_open.2:303
3040 "This indicates a hardware breakpoint as provided by the CPU. Breakpoints "
3041 "can be read/write accesses to an address as well as execution of an "
3042 "instruction address."
3046 #: build/C/man2/perf_event_open.2:303
3051 #. commit 2e80a82a49c4c7eca4e35734380f28298ba5db19
3053 #: build/C/man2/perf_event_open.2:323
3055 "Since Linux 2.6.38, B<perf_event_open>() can support multiple PMUs. To "
3056 "enable this, a value exported by the kernel can be used in the I<type> field "
3057 "to indicate which PMU to use. The value to use can be found in the sysfs "
3058 "filesystem: there is a subdirectory per PMU instance under I</sys/bus/"
3059 "event_source/devices>. In each subdirectory there is a I<type> file whose "
3060 "content is an integer that can be used in the I<type> field. For instance, "
3061 "I</sys/bus/event_source/devices/cpu/type> contains the value for the core "
3062 "CPU PMU, which is usually 4."
3066 #: build/C/man2/perf_event_open.2:324 build/C/man2/perf_event_open.2:1601
3072 #: build/C/man2/perf_event_open.2:333
3074 "The size of the I<perf_event_attr> structure for forward/backward "
3075 "compatibility. Set this using I<sizeof(struct perf_event_attr)> to allow "
3076 "the kernel to see the struct size at the time of compilation."
3079 #. commit cb5d76999029ae7a517cb07dfa732c1b5a934fc2
3080 #. this was added much later when PERF_ATTR_SIZE_VER2 happened
3081 #. but the actual attr_size had increased in 2.6.33
3082 #. commit cb5d76999029ae7a517cb07dfa732c1b5a934fc2
3083 #. commit 1659d129ed014b715b0b2120e6fd929bdd33ed03
3085 #: build/C/man2/perf_event_open.2:353
3087 "The related define B<PERF_ATTR_SIZE_VER0> is set to 64; this was the size of "
3088 "the first published struct. B<PERF_ATTR_SIZE_VER1> is 72, corresponding to "
3089 "the addition of breakpoints in Linux 2.6.33. B<PERF_ATTR_SIZE_VER2> is 80 "
3090 "corresponding to the addition of branch sampling in Linux 3.4. "
3091 "B<PERF_ATTR_SIZE_VER3> is 96 corresponding to the addition of "
3092 "I<sample_regs_user> and I<sample_stack_user> in Linux 3.7."
3096 #: build/C/man2/perf_event_open.2:353
3102 #: build/C/man2/perf_event_open.2:364
3104 "This specifies which event you want, in conjunction with the I<type> field. "
3105 "The I<config1> and I<config2> fields are also taken into account in cases "
3106 "where 64 bits is not enough to fully specify the event. The encoding of "
3107 "these fields are event dependent."
3111 #: build/C/man2/perf_event_open.2:375
3113 "There are various ways to set the I<config> field that are dependent on the "
3114 "value of the previously described I<type> field. What follows are various "
3115 "possible settings for I<config> separated out by I<type>."
3119 #: build/C/man2/perf_event_open.2:385
3121 "If I<type> is B<PERF_TYPE_HARDWARE>, we are measuring one of the generalized "
3122 "hardware CPU events. Not all of these are available on all platforms. Set "
3123 "I<config> to one of the following:"
3127 #: build/C/man2/perf_event_open.2:386
3129 msgid "B<PERF_COUNT_HW_CPU_CYCLES>"
3130 msgstr "B<PERF_COUNT_HW_CPU_CYCLES>"
3133 #: build/C/man2/perf_event_open.2:390
3134 msgid "Total cycles. Be wary of what happens during CPU frequency scaling."
3138 #: build/C/man2/perf_event_open.2:390
3140 msgid "B<PERF_COUNT_HW_INSTRUCTIONS>"
3141 msgstr "B<PERF_COUNT_HW_INSTRUCTIONS>"
3144 #: build/C/man2/perf_event_open.2:395
3146 "Retired instructions. Be careful, these can be affected by various issues, "
3147 "most notably hardware interrupt counts."
3151 #: build/C/man2/perf_event_open.2:395
3153 msgid "B<PERF_COUNT_HW_CACHE_REFERENCES>"
3154 msgstr "B<PERF_COUNT_HW_CACHE_REFERENCES>"
3157 #: build/C/man2/perf_event_open.2:402
3159 "Cache accesses. Usually this indicates Last Level Cache accesses but this "
3160 "may vary depending on your CPU. This may include prefetches and coherency "
3161 "messages; again this depends on the design of your CPU."
3165 #: build/C/man2/perf_event_open.2:402
3167 msgid "B<PERF_COUNT_HW_CACHE_MISSES>"
3168 msgstr "B<PERF_COUNT_HW_CACHE_MISSES>"
3171 #: build/C/man2/perf_event_open.2:409
3173 "Cache misses. Usually this indicates Last Level Cache misses; this is "
3174 "intended to be used in conjunction with the "
3175 "B<PERF_COUNT_HW_CACHE_REFERENCES> event to calculate cache miss rates."
3179 #: build/C/man2/perf_event_open.2:409
3181 msgid "B<PERF_COUNT_HW_BRANCH_INSTRUCTIONS>"
3182 msgstr "B<PERF_COUNT_HW_BRANCH_INSTRUCTIONS>"
3184 #. commit f287d332ce835f77a4f5077d2c0ef1e3f9ea42d2
3186 #: build/C/man2/perf_event_open.2:415
3188 "Retired branch instructions. Prior to Linux 2.6.35, this used the wrong "
3189 "event on AMD processors."
3193 #: build/C/man2/perf_event_open.2:415
3195 msgid "B<PERF_COUNT_HW_BRANCH_MISSES>"
3196 msgstr "B<PERF_COUNT_HW_BRANCH_MISSES>"
3199 #: build/C/man2/perf_event_open.2:418
3200 msgid "Mispredicted branch instructions."
3204 #: build/C/man2/perf_event_open.2:418
3206 msgid "B<PERF_COUNT_HW_BUS_CYCLES>"
3207 msgstr "B<PERF_COUNT_HW_BUS_CYCLES>"
3210 #: build/C/man2/perf_event_open.2:421
3211 msgid "Bus cycles, which can be different from total cycles."
3215 #: build/C/man2/perf_event_open.2:421
3217 msgid "B<PERF_COUNT_HW_STALLED_CYCLES_FRONTEND> (since Linux 3.0)"
3218 msgstr "B<PERF_COUNT_HW_STALLED_CYCLES_FRONTEND> (Linux 3.0 以降)"
3220 #. commit 8f62242246351b5a4bc0c1f00c0c7003edea128a
3222 #: build/C/man2/perf_event_open.2:425
3223 msgid "Stalled cycles during issue."
3227 #: build/C/man2/perf_event_open.2:425
3229 msgid "B<PERF_COUNT_HW_STALLED_CYCLES_BACKEND> (since Linux 3.0)"
3230 msgstr "B<PERF_COUNT_HW_STALLED_CYCLES_BACKEND> (Linux 3.0 以降)"
3232 #. commit 8f62242246351b5a4bc0c1f00c0c7003edea128a
3234 #: build/C/man2/perf_event_open.2:429
3235 msgid "Stalled cycles during retirement."
3239 #: build/C/man2/perf_event_open.2:429
3241 msgid "B<PERF_COUNT_HW_REF_CPU_CYCLES> (since Linux 3.3)"
3242 msgstr "B<PERF_COUNT_HW_REF_CPU_CYCLES> (Linux 3.3 以降)"
3244 #. commit c37e17497e01fc0f5d2d6feb5723b210b3ab8890
3246 #: build/C/man2/perf_event_open.2:433
3247 msgid "Total cycles; not affected by CPU frequency scaling."
3251 #: build/C/man2/perf_event_open.2:443
3253 "If I<type> is B<PERF_TYPE_SOFTWARE>, we are measuring software events "
3254 "provided by the kernel. Set I<config> to one of the following:"
3258 #: build/C/man2/perf_event_open.2:444
3260 msgid "B<PERF_COUNT_SW_CPU_CLOCK>"
3261 msgstr "B<PERF_COUNT_SW_CPU_CLOCK>"
3264 #: build/C/man2/perf_event_open.2:447
3265 msgid "This reports the CPU clock, a high-resolution per-CPU timer."
3269 #: build/C/man2/perf_event_open.2:447
3271 msgid "B<PERF_COUNT_SW_TASK_CLOCK>"
3272 msgstr "B<PERF_COUNT_SW_TASK_CLOCK>"
3275 #: build/C/man2/perf_event_open.2:450
3276 msgid "This reports a clock count specific to the task that is running."
3280 #: build/C/man2/perf_event_open.2:450
3282 msgid "B<PERF_COUNT_SW_PAGE_FAULTS>"
3283 msgstr "B<PERF_COUNT_SW_PAGE_FAULTS>"
3286 #: build/C/man2/perf_event_open.2:453
3287 msgid "This reports the number of page faults."
3291 #: build/C/man2/perf_event_open.2:453
3293 msgid "B<PERF_COUNT_SW_CONTEXT_SWITCHES>"
3294 msgstr "B<PERF_COUNT_SW_CONTEXT_SWITCHES>"
3296 #. commit e49a5bd38159dfb1928fd25b173bc9de4bbadb21
3298 #: build/C/man2/perf_event_open.2:459
3300 "This counts context switches. Until Linux 2.6.34, these were all reported "
3301 "as user-space events, after that they are reported as happening in the "
3306 #: build/C/man2/perf_event_open.2:459
3308 msgid "B<PERF_COUNT_SW_CPU_MIGRATIONS>"
3309 msgstr "B<PERF_COUNT_SW_CPU_MIGRATIONS>"
3312 #: build/C/man2/perf_event_open.2:463
3313 msgid "This reports the number of times the process has migrated to a new CPU."
3317 #: build/C/man2/perf_event_open.2:463
3319 msgid "B<PERF_COUNT_SW_PAGE_FAULTS_MIN>"
3320 msgstr "B<PERF_COUNT_SW_PAGE_FAULTS_MIN>"
3323 #: build/C/man2/perf_event_open.2:467
3325 "This counts the number of minor page faults. These did not require disk I/O "
3330 #: build/C/man2/perf_event_open.2:467
3332 msgid "B<PERF_COUNT_SW_PAGE_FAULTS_MAJ>"
3333 msgstr "B<PERF_COUNT_SW_PAGE_FAULTS_MAJ>"
3336 #: build/C/man2/perf_event_open.2:471
3338 "This counts the number of major page faults. These required disk I/O to "
3343 #: build/C/man2/perf_event_open.2:471
3345 msgid "B<PERF_COUNT_SW_ALIGNMENT_FAULTS> (since Linux 2.6.33)"
3346 msgstr "B<PERF_COUNT_SW_ALIGNMENT_FAULTS> (Linux 2.6.33 以降)"
3348 #. commit f7d7986060b2890fc26db6ab5203efbd33aa2497
3350 #: build/C/man2/perf_event_open.2:478
3352 "This counts the number of alignment faults. These happen when unaligned "
3353 "memory accesses happen; the kernel can handle these but it reduces "
3354 "performance. This happens only on some architectures (never on x86)."
3358 #: build/C/man2/perf_event_open.2:478
3360 msgid "B<PERF_COUNT_SW_EMULATION_FAULTS> (since Linux 2.6.33)"
3361 msgstr "B<PERF_COUNT_SW_EMULATION_FAULTS> (Linux 2.6.33 以降)"
3363 #. commit f7d7986060b2890fc26db6ab5203efbd33aa2497
3365 #: build/C/man2/perf_event_open.2:485
3367 "This counts the number of emulation faults. The kernel sometimes traps on "
3368 "unimplemented instructions and emulates them for user space. This can "
3369 "negatively impact performance."
3373 #: build/C/man2/perf_event_open.2:485
3375 msgid "B<PERF_COUNT_SW_DUMMY> (since Linux 3.12)"
3376 msgstr "B<PERF_COUNT_SW_DUMMY> (Linux 3.12 以降)"
3378 #. commit fa0097ee690693006ab1aea6c01ad3c851b65c77
3380 #: build/C/man2/perf_event_open.2:493
3382 "This is a placeholder event that counts nothing. Informational sample "
3383 "record types such as mmap or comm must be associated with an active event. "
3384 "This dummy event allows gathering such records without requiring a counting "
3389 #: build/C/man2/perf_event_open.2:506
3391 "If I<type> is B<PERF_TYPE_TRACEPOINT>, then we are measuring kernel "
3392 "tracepoints. The value to use in I<config> can be obtained from under "
3393 "debugfs I<tracing/events/*/*/id> if ftrace is enabled in the kernel."
3397 #: build/C/man2/perf_event_open.2:517
3399 "If I<type> is B<PERF_TYPE_HW_CACHE>, then we are measuring a hardware CPU "
3400 "cache event. To calculate the appropriate I<config> value use the following "
3405 #: build/C/man2/perf_event_open.2:522
3408 " (perf_hw_cache_id) | (perf_hw_cache_op_id E<lt>E<lt> 8) |\n"
3409 " (perf_hw_cache_op_result_id E<lt>E<lt> 16)\n"
3411 " (perf_hw_cache_id) | (perf_hw_cache_op_id E<lt>E<lt> 8) |\n"
3412 " (perf_hw_cache_op_result_id E<lt>E<lt> 16)\n"
3415 #: build/C/man2/perf_event_open.2:527
3416 msgid "where I<perf_hw_cache_id> is one of:"
3420 #: build/C/man2/perf_event_open.2:528
3422 msgid "B<PERF_COUNT_HW_CACHE_L1D>"
3423 msgstr "B<PERF_COUNT_HW_CACHE_L1D>"
3426 #: build/C/man2/perf_event_open.2:531
3427 msgid "for measuring Level 1 Data Cache"
3431 #: build/C/man2/perf_event_open.2:531
3433 msgid "B<PERF_COUNT_HW_CACHE_L1I>"
3434 msgstr "B<PERF_COUNT_HW_CACHE_L1I>"
3437 #: build/C/man2/perf_event_open.2:534
3438 msgid "for measuring Level 1 Instruction Cache"
3442 #: build/C/man2/perf_event_open.2:534
3444 msgid "B<PERF_COUNT_HW_CACHE_LL>"
3445 msgstr "B<PERF_COUNT_HW_CACHE_LL>"
3448 #: build/C/man2/perf_event_open.2:537
3449 msgid "for measuring Last-Level Cache"
3453 #: build/C/man2/perf_event_open.2:537
3455 msgid "B<PERF_COUNT_HW_CACHE_DTLB>"
3456 msgstr "B<PERF_COUNT_HW_CACHE_DTLB>"
3459 #: build/C/man2/perf_event_open.2:540
3460 msgid "for measuring the Data TLB"
3464 #: build/C/man2/perf_event_open.2:540
3466 msgid "B<PERF_COUNT_HW_CACHE_ITLB>"
3467 msgstr "B<PERF_COUNT_HW_CACHE_ITLB>"
3470 #: build/C/man2/perf_event_open.2:543
3471 msgid "for measuring the Instruction TLB"
3475 #: build/C/man2/perf_event_open.2:543
3477 msgid "B<PERF_COUNT_HW_CACHE_BPU>"
3478 msgstr "B<PERF_COUNT_HW_CACHE_BPU>"
3481 #: build/C/man2/perf_event_open.2:546
3482 msgid "for measuring the branch prediction unit"
3486 #: build/C/man2/perf_event_open.2:546
3488 msgid "B<PERF_COUNT_HW_CACHE_NODE> (since Linux 3.1)"
3489 msgstr "B<PERF_COUNT_HW_CACHE_NODE> (Linux 3.1 以降)"
3491 #. commit 89d6c0b5bdbb1927775584dcf532d98b3efe1477
3493 #: build/C/man2/perf_event_open.2:550
3494 msgid "for measuring local memory accesses"
3498 #: build/C/man2/perf_event_open.2:555
3499 msgid "and I<perf_hw_cache_op_id> is one of"
3503 #: build/C/man2/perf_event_open.2:556
3505 msgid "B<PERF_COUNT_HW_CACHE_OP_READ>"
3506 msgstr "B<PERF_COUNT_HW_CACHE_OP_READ>"
3509 #: build/C/man2/perf_event_open.2:559
3510 msgid "for read accesses"
3514 #: build/C/man2/perf_event_open.2:559
3516 msgid "B<PERF_COUNT_HW_CACHE_OP_WRITE>"
3517 msgstr "B<PERF_COUNT_HW_CACHE_OP_WRITE>"
3520 #: build/C/man2/perf_event_open.2:562
3521 msgid "for write accesses"
3525 #: build/C/man2/perf_event_open.2:562
3527 msgid "B<PERF_COUNT_HW_CACHE_OP_PREFETCH>"
3528 msgstr "B<PERF_COUNT_HW_CACHE_OP_PREFETCH>"
3531 #: build/C/man2/perf_event_open.2:565
3532 msgid "for prefetch accesses"
3536 #: build/C/man2/perf_event_open.2:570
3537 msgid "and I<perf_hw_cache_op_result_id> is one of"
3541 #: build/C/man2/perf_event_open.2:571
3543 msgid "B<PERF_COUNT_HW_CACHE_RESULT_ACCESS>"
3544 msgstr "B<PERF_COUNT_HW_CACHE_RESULT_ACCESS>"
3547 #: build/C/man2/perf_event_open.2:574
3548 msgid "to measure accesses"
3552 #: build/C/man2/perf_event_open.2:574
3554 msgid "B<PERF_COUNT_HW_CACHE_RESULT_MISS>"
3555 msgstr "B<PERF_COUNT_HW_CACHE_RESULT_MISS>"
3558 #: build/C/man2/perf_event_open.2:577
3559 msgid "to measure misses"
3563 #: build/C/man2/perf_event_open.2:595
3565 "If I<type> is B<PERF_TYPE_RAW>, then a custom \"raw\" I<config> value is "
3566 "needed. Most CPUs support events that are not covered by the \"generalized"
3567 "\" events. These are implementation defined; see your CPU manual (for "
3568 "example the Intel Volume 3B documentation or the AMD BIOS and Kernel "
3569 "Developer Guide). The libpfm4 library can be used to translate from the "
3570 "name in the architectural manuals to the raw hex value B<perf_event_open>() "
3571 "expects in this field."
3575 #: build/C/man2/perf_event_open.2:604
3577 "If I<type> is B<PERF_TYPE_BREAKPOINT>, then leave I<config> set to zero. "
3578 "Its parameters are set in other places."
3582 #: build/C/man2/perf_event_open.2:605
3584 msgid "I<sample_period>, I<sample_freq>"
3585 msgstr "I<sample_period>, I<sample_freq>"
3588 #: build/C/man2/perf_event_open.2:617
3590 "A \"sampling\" event is one that generates an overflow notification every N "
3591 "events, where N is given by I<sample_period>. A sampling event has "
3592 "I<sample_period> E<gt> 0. When an overflow occurs, requested data is "
3593 "recorded in the mmap buffer. The I<sample_type> field controls what data is "
3594 "recorded on each overflow."
3598 #: build/C/man2/perf_event_open.2:627
3600 "I<sample_freq> can be used if you wish to use frequency rather than period. "
3601 "In this case, you set the I<freq> flag. The kernel will adjust the sampling "
3602 "period to try and achieve the desired rate. The rate of adjustment is a "
3607 #: build/C/man2/perf_event_open.2:627
3609 msgid "I<sample_type>"
3610 msgstr "I<sample_type>"
3613 #: build/C/man2/perf_event_open.2:639
3615 "The various bits in this field specify which values to include in the "
3616 "sample. They will be recorded in a ring-buffer, which is available to user "
3617 "space using B<mmap>(2). The order in which the values are saved in the "
3618 "sample are documented in the MMAP Layout subsection below; it is not the "
3619 "I<enum perf_event_sample_format> order."
3623 #: build/C/man2/perf_event_open.2:640
3625 msgid "B<PERF_SAMPLE_IP>"
3626 msgstr "B<PERF_SAMPLE_IP>"
3629 #: build/C/man2/perf_event_open.2:643
3630 msgid "Records instruction pointer."
3634 #: build/C/man2/perf_event_open.2:643
3636 msgid "B<PERF_SAMPLE_TID>"
3637 msgstr "B<PERF_SAMPLE_TID>"
3640 #: build/C/man2/perf_event_open.2:646
3641 msgid "Records the process and thread IDs."
3645 #: build/C/man2/perf_event_open.2:646
3647 msgid "B<PERF_SAMPLE_TIME>"
3648 msgstr "B<PERF_SAMPLE_TIME>"
3651 #: build/C/man2/perf_event_open.2:649
3652 msgid "Records a timestamp."
3656 #: build/C/man2/perf_event_open.2:649
3658 msgid "B<PERF_SAMPLE_ADDR>"
3659 msgstr "B<PERF_SAMPLE_ADDR>"
3662 #: build/C/man2/perf_event_open.2:652
3663 msgid "Records an address, if applicable."
3667 #: build/C/man2/perf_event_open.2:652
3669 msgid "B<PERF_SAMPLE_READ>"
3670 msgstr "B<PERF_SAMPLE_READ>"
3673 #: build/C/man2/perf_event_open.2:655
3675 "Record counter values for all events in a group, not just the group leader."
3679 #: build/C/man2/perf_event_open.2:655
3681 msgid "B<PERF_SAMPLE_CALLCHAIN>"
3682 msgstr "B<PERF_SAMPLE_CALLCHAIN>"
3685 #: build/C/man2/perf_event_open.2:658
3686 msgid "Records the callchain (stack backtrace)."
3690 #: build/C/man2/perf_event_open.2:658
3692 msgid "B<PERF_SAMPLE_ID>"
3693 msgstr "B<PERF_SAMPLE_ID>"
3696 #: build/C/man2/perf_event_open.2:661
3697 msgid "Records a unique ID for the opened event's group leader."
3701 #: build/C/man2/perf_event_open.2:661
3703 msgid "B<PERF_SAMPLE_CPU>"
3704 msgstr "B<PERF_SAMPLE_CPU>"
3707 #: build/C/man2/perf_event_open.2:664
3708 msgid "Records CPU number."
3712 #: build/C/man2/perf_event_open.2:664
3714 msgid "B<PERF_SAMPLE_PERIOD>"
3715 msgstr "B<PERF_SAMPLE_PERIOD>"
3718 #: build/C/man2/perf_event_open.2:667
3719 msgid "Records the current sampling period."
3723 #: build/C/man2/perf_event_open.2:667
3725 msgid "B<PERF_SAMPLE_STREAM_ID>"
3726 msgstr "B<PERF_SAMPLE_STREAM_ID>"
3729 #: build/C/man2/perf_event_open.2:675
3731 "Records a unique ID for the opened event. Unlike B<PERF_SAMPLE_ID> the "
3732 "actual ID is returned, not the group leader. This ID is the same as the one "
3733 "returned by B<PERF_FORMAT_ID>."
3737 #: build/C/man2/perf_event_open.2:675
3739 msgid "B<PERF_SAMPLE_RAW>"
3740 msgstr "B<PERF_SAMPLE_RAW>"
3743 #: build/C/man2/perf_event_open.2:679
3745 "Records additional data, if applicable. Usually returned by tracepoint "
3750 #: build/C/man2/perf_event_open.2:679
3752 msgid "B<PERF_SAMPLE_BRANCH_STACK> (since Linux 3.4)"
3753 msgstr "B<PERF_SAMPLE_BRANCH_STACK> (Linux 3.4 以降)"
3755 #. commit bce38cd53e5ddba9cb6d708c4ef3d04a4016ec7e
3757 #: build/C/man2/perf_event_open.2:685
3759 "This provides a record of recent branches, as provided by CPU branch "
3760 "sampling hardware (such as Intel Last Branch Record). Not all hardware "
3761 "supports this feature."
3765 #: build/C/man2/perf_event_open.2:689
3767 "See the I<branch_sample_type> field for how to filter which branches are "
3772 #: build/C/man2/perf_event_open.2:689
3774 msgid "B<PERF_SAMPLE_REGS_USER> (since Linux 3.7)"
3775 msgstr "B<PERF_SAMPLE_REGS_USER> (Linux 3.7 以降)"
3777 #. commit 4018994f3d8785275ef0e7391b75c3462c029e56
3779 #: build/C/man2/perf_event_open.2:694
3781 "Records the current user-level CPU register state (the values in the process "
3782 "before the kernel was called)."
3786 #: build/C/man2/perf_event_open.2:694
3788 msgid "B<PERF_SAMPLE_STACK_USER> (since Linux 3.7)"
3789 msgstr "B<PERF_SAMPLE_STACK_USER> (Linux 3.7 以降)"
3791 #. commit c5ebcedb566ef17bda7b02686e0d658a7bb42ee7
3793 #: build/C/man2/perf_event_open.2:698
3794 msgid "Records the user level stack, allowing stack unwinding."
3798 #: build/C/man2/perf_event_open.2:698
3800 msgid "B<PERF_SAMPLE_WEIGHT> (since Linux 3.10)"
3801 msgstr "B<PERF_SAMPLE_WEIGHT> (Linux 3.10 以降)"
3803 #. commit c3feedf2aaf9ac8bad6f19f5d21e4ee0b4b87e9c
3805 #: build/C/man2/perf_event_open.2:705
3807 "Records a hardware provided weight value that expresses how costly the "
3808 "sampled event was. This allows the hardware to highlight expensive events "
3813 #: build/C/man2/perf_event_open.2:705
3815 msgid "B<PERF_SAMPLE_DATA_SRC> (since Linux 3.10)"
3816 msgstr "B<PERF_SAMPLE_DATA_SRC> (Linux 3.10 以降)"
3818 #. commit d6be9ad6c960f43800a6f118932bc8a5a4eadcd1
3820 #: build/C/man2/perf_event_open.2:712
3822 "Records the data source: where in the memory hierarchy the data associated "
3823 "with the sampled instruction came from. This is available only if the "
3824 "underlying hardware supports this feature."
3828 #: build/C/man2/perf_event_open.2:712
3830 msgid "B<PERF_SAMPLE_IDENTIFIER> (since Linux 3.12)"
3831 msgstr "B<PERF_SAMPLE_IDENTIFIER> (Linux 3.12 以降)"
3833 #. commit ff3d527cebc1fa3707c617bfe9e74f53fcfb0955
3835 #: build/C/man2/perf_event_open.2:720
3837 "Places the B<SAMPLE_ID> value in a fixed position in the record, either at "
3838 "the beginning (for sample events) or at the end (if a non-sample event)."
3842 #: build/C/man2/perf_event_open.2:732
3844 "This was necessary because a sample stream may have records from various "
3845 "different event sources with different I<sample_type> settings. Parsing the "
3846 "event stream properly was not possible because the format of the record was "
3847 "needed to find B<SAMPLE_ID>, but the format could not be found without "
3848 "knowing what event the sample belonged to (causing a circular dependency)."
3852 #: build/C/man2/perf_event_open.2:742
3854 "The B<PERF_SAMPLE_IDENTIFIER> setting makes the event stream always parsable "
3855 "by putting B<SAMPLE_ID> in a fixed location, even though it means having "
3856 "duplicate B<SAMPLE_ID> values in records."
3860 #: build/C/man2/perf_event_open.2:742
3862 msgid "B<PERF_SAMPLE_TRANSACTION> (since Linux 3.13)"
3863 msgstr "B<PERF_SAMPLE_TRANSACTION> (Linux 3.13 以降)"
3865 #. commit fdfbbd07e91f8fe387140776f3fd94605f0c89e5
3867 #: build/C/man2/perf_event_open.2:747
3869 "Records reasons for transactional memory abort events (for example, from "
3870 "Intel TSX transactional memory support)."
3874 #: build/C/man2/perf_event_open.2:755
3876 "The I<precise_ip> setting must be greater than 0 and a transactional memory "
3877 "abort event must be measured or no values will be recorded. Also note that "
3878 "some perf_event measurements, such as sampled cycle counting, may cause "
3879 "extraneous aborts (by causing an interrupt during a transaction)."
3883 #: build/C/man2/perf_event_open.2:756
3885 msgid "I<read_format>"
3886 msgstr "I<read_format>"
3889 #: build/C/man2/perf_event_open.2:763
3891 "This field specifies the format of the data returned by B<read>(2) on a "
3892 "B<perf_event_open>() file descriptor."
3896 #: build/C/man2/perf_event_open.2:764
3898 msgid "B<PERF_FORMAT_TOTAL_TIME_ENABLED>"
3899 msgstr "B<PERF_FORMAT_TOTAL_TIME_ENABLED>"
3902 #: build/C/man2/perf_event_open.2:771
3904 "Adds the 64-bit I<time_enabled> field. This can be used to calculate "
3905 "estimated totals if the PMU is overcommitted and multiplexing is happening."
3909 #: build/C/man2/perf_event_open.2:771
3911 msgid "B<PERF_FORMAT_TOTAL_TIME_RUNNING>"
3912 msgstr "B<PERF_FORMAT_TOTAL_TIME_RUNNING>"
3915 #: build/C/man2/perf_event_open.2:778
3917 "Adds the 64-bit I<time_running> field. This can be used to calculate "
3918 "estimated totals if the PMU is overcommitted and multiplexing is happening."
3922 #: build/C/man2/perf_event_open.2:778
3924 msgid "B<PERF_FORMAT_ID>"
3925 msgstr "B<PERF_FORMAT_ID>"
3928 #: build/C/man2/perf_event_open.2:781
3929 msgid "Adds a 64-bit unique value that corresponds to the event group."
3933 #: build/C/man2/perf_event_open.2:781
3935 msgid "B<PERF_FORMAT_GROUP>"
3936 msgstr "B<PERF_FORMAT_GROUP>"
3939 #: build/C/man2/perf_event_open.2:784
3940 msgid "Allows all counter values in an event group to be read with one read."
3944 #: build/C/man2/perf_event_open.2:785
3947 msgstr "I<disabled>"
3950 #: build/C/man2/perf_event_open.2:795
3952 "The I<disabled> bit specifies whether the counter starts out disabled or "
3953 "enabled. If disabled, the event can later be enabled by B<ioctl>(2), "
3954 "B<prctl>(2), or I<enable_on_exec>."
3958 #: build/C/man2/perf_event_open.2:806
3960 "When creating an event group, typically the group leader is initialized with "
3961 "I<disabled> set to 1 and any child events are initialized with I<disabled> "
3962 "set to 0. Despite I<disabled> being 0, the child events will not start "
3963 "until the group leader is enabled."
3967 #: build/C/man2/perf_event_open.2:806
3973 #: build/C/man2/perf_event_open.2:815
3975 "The I<inherit> bit specifies that this counter should count events of child "
3976 "tasks as well as the task specified. This applies only to new children, not "
3977 "to any existing children at the time the counter is created (nor to any new "
3978 "children of existing children)."
3982 #: build/C/man2/perf_event_open.2:820
3984 "Inherit does not work for some combinations of I<read_format>s, such as "
3985 "B<PERF_FORMAT_GROUP>."
3989 #: build/C/man2/perf_event_open.2:820
3995 #: build/C/man2/perf_event_open.2:833
3997 "The I<pinned> bit specifies that the counter should always be on the CPU if "
3998 "at all possible. It applies only to hardware counters and only to group "
3999 "leaders. If a pinned counter cannot be put onto the CPU (e.g., because "
4000 "there are not enough hardware counters or because of a conflict with some "
4001 "other event), then the counter goes into an 'error' state, where reads "
4002 "return end-of-file (i.e., B<read>(2) returns 0) until the counter is "
4003 "subsequently enabled or disabled."
4007 #: build/C/man2/perf_event_open.2:833
4009 msgid "I<exclusive>"
4010 msgstr "I<exclusive>"
4013 #: build/C/man2/perf_event_open.2:842
4015 "The I<exclusive> bit specifies that when this counter's group is on the CPU, "
4016 "it should be the only group using the CPU's counters. In the future this "
4017 "may allow monitoring programs to support PMU features that need to run alone "
4018 "so that they do not disrupt other hardware counters."
4022 #: build/C/man2/perf_event_open.2:849
4024 "Note that many unexpected situations may prevent events with the "
4025 "I<exclusive> bit set from ever running. This includes any users running a "
4026 "system-wide measurement as well as any kernel use of the performance "
4027 "counters (including the commonly enabled NMI Watchdog Timer interface)."
4031 #: build/C/man2/perf_event_open.2:849
4033 msgid "I<exclude_user>"
4034 msgstr "I<exclude_user>"
4037 #: build/C/man2/perf_event_open.2:852
4039 "If this bit is set, the count excludes events that happen in user space."
4043 #: build/C/man2/perf_event_open.2:852
4045 msgid "I<exclude_kernel>"
4046 msgstr "I<exclude_kernel>"
4049 #: build/C/man2/perf_event_open.2:855
4051 "If this bit is set, the count excludes events that happen in kernel-space."
4055 #: build/C/man2/perf_event_open.2:855
4057 msgid "I<exclude_hv>"
4058 msgstr "I<exclude_hv>"
4061 #: build/C/man2/perf_event_open.2:863
4063 "If this bit is set, the count excludes events that happen in the "
4064 "hypervisor. This is mainly for PMUs that have built-in support for handling "
4065 "this (such as POWER). Extra support is needed for handling hypervisor "
4066 "measurements on most machines."
4070 #: build/C/man2/perf_event_open.2:863
4072 msgid "I<exclude_idle>"
4073 msgstr "I<exclude_idle>"
4076 #: build/C/man2/perf_event_open.2:866
4077 msgid "If set, don't count when the CPU is idle."
4081 #: build/C/man2/perf_event_open.2:866
4087 #: build/C/man2/perf_event_open.2:880
4089 "The I<mmap> bit enables generation of B<PERF_RECORD_MMAP> samples for every "
4090 "B<mmap>(2) call that has B<PROT_EXEC> set. This allows tools to notice new "
4091 "executable code being mapped into a program (dynamic shared libraries for "
4092 "example) so that addresses can be mapped back to the original code."
4096 #: build/C/man2/perf_event_open.2:880 build/C/man2/perf_event_open.2:1761
4101 #. commit 82b897782d10fcc4930c9d4a15b175348fdd2871
4103 #: build/C/man2/perf_event_open.2:899
4105 "The I<comm> bit enables tracking of process command name as modified by the "
4106 "B<exec>(2) and B<prctl>(PR_SET_NAME) system calls as well as writing to I</"
4107 "proc/self/comm>. If the I<comm_exec> flag is also successfully set "
4108 "(possible since Linux 3.16), then the misc flag "
4109 "B<PERF_RECORD_MISC_COMM_EXEC> can be used to differentiate the B<exec>(2) "
4110 "case from the others."
4114 #: build/C/man2/perf_event_open.2:899
4120 #: build/C/man2/perf_event_open.2:906
4122 "If this bit is set, then I<sample_frequency> not I<sample_period> is used "
4123 "when setting up the sampling interval."
4127 #: build/C/man2/perf_event_open.2:906
4129 msgid "I<inherit_stat>"
4130 msgstr "I<inherit_stat>"
4133 #: build/C/man2/perf_event_open.2:913
4135 "This bit enables saving of event counts on context switch for inherited "
4136 "tasks. This is meaningful only if the I<inherit> field is set."
4140 #: build/C/man2/perf_event_open.2:913
4142 msgid "I<enable_on_exec>"
4143 msgstr "I<enable_on_exec>"
4146 #: build/C/man2/perf_event_open.2:918
4148 "If this bit is set, a counter is automatically enabled after a call to "
4153 #: build/C/man2/perf_event_open.2:918
4159 #: build/C/man2/perf_event_open.2:922
4161 "If this bit is set, then fork/exit notifications are included in the ring "
4166 #: build/C/man2/perf_event_open.2:922
4168 msgid "I<watermark>"
4169 msgstr "I<watermark>"
4172 #: build/C/man2/perf_event_open.2:930
4174 "If set, have an overflow notification happen when we cross the "
4175 "I<wakeup_watermark> boundary. Otherwise, overflow notifications happen "
4176 "after I<wakeup_events> samples."
4180 #: build/C/man2/perf_event_open.2:930
4182 msgid "I<precise_ip> (since Linux 2.6.35)"
4183 msgstr "I<precise_ip> (Linux 2.6.35 以降)"
4185 #. commit ab608344bcbde4f55ec4cd911b686b0ce3eae076
4187 #: build/C/man2/perf_event_open.2:941
4189 "This controls the amount of skid. Skid is how many instructions execute "
4190 "between an event of interest happening and the kernel being able to stop and "
4191 "record the event. Smaller skid is better and allows more accurate reporting "
4192 "of which events correspond to which instructions, but hardware is often "
4193 "limited with how small this can be."
4197 #: build/C/man2/perf_event_open.2:943
4198 msgid "The values of this are the following:"
4202 #: build/C/man2/perf_event_open.2:944
4208 #: build/C/man2/perf_event_open.2:948
4209 msgid "B<SAMPLE_IP> can have arbitrary skid."
4213 #: build/C/man2/perf_event_open.2:948
4219 #: build/C/man2/perf_event_open.2:952
4220 msgid "B<SAMPLE_IP> must have constant skid."
4224 #: build/C/man2/perf_event_open.2:952
4230 #: build/C/man2/perf_event_open.2:956
4231 msgid "B<SAMPLE_IP> requested to have 0 skid."
4235 #: build/C/man2/perf_event_open.2:956
4241 #: build/C/man2/perf_event_open.2:962
4242 msgid "B<SAMPLE_IP> must have 0 skid. See also B<PERF_RECORD_MISC_EXACT_IP>."
4246 #: build/C/man2/perf_event_open.2:963
4248 msgid "I<mmap_data> (since Linux 2.6.36)"
4249 msgstr "I<mmap_data> (Linux 2.6.36 以降)"
4251 #. commit 3af9e859281bda7eb7c20b51879cf43aa788ac2e
4253 #: build/C/man2/perf_event_open.2:976
4255 "The counterpart of the I<mmap> field. This enables generation of "
4256 "B<PERF_RECORD_MMAP> samples for B<mmap>(2) calls that do not have "
4257 "B<PROT_EXEC> set (for example data and SysV shared memory)."
4261 #: build/C/man2/perf_event_open.2:976
4263 msgid "I<sample_id_all> (since Linux 2.6.38)"
4264 msgstr "I<sample_id_all> (Linux 2.6.38 以降)"
4266 #. commit c980d1091810df13f21aabbce545fd98f545bbf7
4268 #: build/C/man2/perf_event_open.2:985
4270 "If set, then TID, TIME, ID, STREAM_ID, and CPU can additionally be included "
4271 "in non-B<PERF_RECORD_SAMPLE>s if the corresponding I<sample_type> is "
4276 #: build/C/man2/perf_event_open.2:993
4278 "If B<PERF_SAMPLE_IDENTIFIER> is specified, then an additional ID value is "
4279 "included as the last value to ease parsing the record stream. This may lead "
4280 "to the I<id> value appearing twice."
4284 #: build/C/man2/perf_event_open.2:995
4285 msgid "The layout is described by this pseudo-structure:"
4289 #: build/C/man2/perf_event_open.2:1005
4292 "struct sample_id {\n"
4293 " { u32 pid, tid; } /* if PERF_SAMPLE_TID set */\n"
4294 " { u64 time; } /* if PERF_SAMPLE_TIME set */\n"
4295 " { u64 id; } /* if PERF_SAMPLE_ID set */\n"
4296 " { u64 stream_id;} /* if PERF_SAMPLE_STREAM_ID set */\n"
4297 " { u32 cpu, res; } /* if PERF_SAMPLE_CPU set */\n"
4298 " { u64 id; } /* if PERF_SAMPLE_IDENTIFIER set */\n"
4301 "struct sample_id {\n"
4302 " { u32 pid, tid; } /* if PERF_SAMPLE_TID set */\n"
4303 " { u64 time; } /* if PERF_SAMPLE_TIME set */\n"
4304 " { u64 id; } /* if PERF_SAMPLE_ID set */\n"
4305 " { u64 stream_id;} /* if PERF_SAMPLE_STREAM_ID set */\n"
4306 " { u32 cpu, res; } /* if PERF_SAMPLE_CPU set */\n"
4307 " { u64 id; } /* if PERF_SAMPLE_IDENTIFIER set */\n"
4311 #: build/C/man2/perf_event_open.2:1006
4313 msgid "I<exclude_host> (since Linux 3.2)"
4314 msgstr "I<exclude_host> (Linux 3.2 以降)"
4316 #. commit a240f76165e6255384d4bdb8139895fac7988799
4318 #: build/C/man2/perf_event_open.2:1010
4319 msgid "Do not measure time spent in VM host."
4323 #: build/C/man2/perf_event_open.2:1010
4325 msgid "I<exclude_guest> (since Linux 3.2)"
4326 msgstr "I<exclude_guest> (Linux 3.2 以降)"
4328 #. commit a240f76165e6255384d4bdb8139895fac7988799
4330 #: build/C/man2/perf_event_open.2:1014
4331 msgid "Do not measure time spent in VM guest."
4335 #: build/C/man2/perf_event_open.2:1014
4337 msgid "I<exclude_callchain_kernel> (since Linux 3.7)"
4338 msgstr "I<exclude_callchain_kernel> (Linux 3.7 以降)"
4340 #. commit d077526485d5c9b12fe85d0b2b3b7041e6bc5f91
4342 #: build/C/man2/perf_event_open.2:1018
4343 msgid "Do not include kernel callchains."
4347 #: build/C/man2/perf_event_open.2:1018
4349 msgid "I<exclude_callchain_user> (since Linux 3.7)"
4350 msgstr "I<exclude_callchain_user> (Linux 3.7 以降)"
4352 #. commit d077526485d5c9b12fe85d0b2b3b7041e6bc5f91
4354 #: build/C/man2/perf_event_open.2:1022
4355 msgid "Do not include user callchains."
4359 #: build/C/man2/perf_event_open.2:1022
4361 msgid "I<mmap2> (since Linux 3.16)"
4362 msgstr "I<mmap2> (Linux 3.16 以降)"
4364 #. commit 13d7a2410fa637f450a29ecb515ac318ee40c741
4365 #. This is tricky; was committed during 3.12 development
4366 #. but right before release was disabled.
4367 #. So while you could select mmap2 starting with 3.12
4368 #. it did not work until 3.16
4369 #. commit a5a5ba72843dd05f991184d6cb9a4471acce1005
4371 #: build/C/man2/perf_event_open.2:1035
4373 "Generate an extended executable mmap record that contains enough additional "
4374 "information to uniquely identify shared mappings. The I<mmap> flag must "
4375 "also be set for this to work."
4379 #: build/C/man2/perf_event_open.2:1035
4381 msgid "I<comm_exec> (since Linux 3.16)"
4382 msgstr "I<comm_exec> (Linux 3.16 以降)"
4384 #. commit 82b897782d10fcc4930c9d4a15b175348fdd2871
4386 #: build/C/man2/perf_event_open.2:1051
4388 "This is purely a feature-detection flag, it does not change kernel "
4389 "behavior. If this flag can successfully be set, then, when I<comm> is "
4390 "enabled, the B<PERF_RECORD_MISC_COMM_EXEC> flag will be set in the I<misc> "
4391 "field of a comm record header if the rename event being reported was caused "
4392 "by a call to B<exec>(2). This allows tools to distinguish between the "
4393 "various types of process renaming."
4397 #: build/C/man2/perf_event_open.2:1051
4399 msgid "I<wakeup_events>, I<wakeup_watermark>"
4400 msgstr "I<wakeup_events>, I<wakeup_watermark>"
4403 #: build/C/man2/perf_event_open.2:1061
4405 "This union sets how many samples (I<wakeup_events>) or bytes "
4406 "(I<wakeup_watermark>) happen before an overflow notification happens. "
4407 "Which one is used is selected by the I<watermark> bit flag."
4411 #: build/C/man2/perf_event_open.2:1071
4413 "I<wakeup_events> counts only B<PERF_RECORD_SAMPLE> record types. To receive "
4414 "overflow notification for all B<PERF_RECORD> types choose watermark and set "
4415 "I<wakeup_watermark> to 1."
4418 #. commit f506b3dc0ec454a16d40cab9ee5d75435b39dc50
4420 #: build/C/man2/perf_event_open.2:1077
4422 "Prior to Linux 3.0 setting I<wakeup_events> to 0 resulted in no overflow "
4423 "notifications; more recent kernels treat 0 the same as 1."
4427 #: build/C/man2/perf_event_open.2:1077
4429 msgid "I<bp_type> (since Linux 2.6.33)"
4430 msgstr "I<bp_type> (Linux 2.6.33 以降)"
4432 #. commit 24f1e32c60c45c89a997c73395b69c8af6f0a84e
4434 #: build/C/man2/perf_event_open.2:1082
4435 msgid "This chooses the breakpoint type. It is one of:"
4439 #: build/C/man2/perf_event_open.2:1083
4441 msgid "B<HW_BREAKPOINT_EMPTY>"
4442 msgstr "B<HW_BREAKPOINT_EMPTY>"
4445 #: build/C/man2/perf_event_open.2:1086
4446 msgid "No breakpoint."
4450 #: build/C/man2/perf_event_open.2:1086
4452 msgid "B<HW_BREAKPOINT_R>"
4453 msgstr "B<HW_BREAKPOINT_R>"
4456 #: build/C/man2/perf_event_open.2:1089
4457 msgid "Count when we read the memory location."
4461 #: build/C/man2/perf_event_open.2:1089
4463 msgid "B<HW_BREAKPOINT_W>"
4464 msgstr "B<HW_BREAKPOINT_W>"
4467 #: build/C/man2/perf_event_open.2:1092
4468 msgid "Count when we write the memory location."
4472 #: build/C/man2/perf_event_open.2:1092
4474 msgid "B<HW_BREAKPOINT_RW>"
4475 msgstr "B<HW_BREAKPOINT_RW>"
4478 #: build/C/man2/perf_event_open.2:1095
4479 msgid "Count when we read or write the memory location."
4483 #: build/C/man2/perf_event_open.2:1095
4485 msgid "B<HW_BREAKPOINT_X>"
4486 msgstr "B<HW_BREAKPOINT_X>"
4489 #: build/C/man2/perf_event_open.2:1098
4490 msgid "Count when we execute code at the memory location."
4494 #: build/C/man2/perf_event_open.2:1107
4496 "The values can be combined via a bitwise or, but the combination of "
4497 "B<HW_BREAKPOINT_R> or B<HW_BREAKPOINT_W> with B<HW_BREAKPOINT_X> is not "
4502 #: build/C/man2/perf_event_open.2:1108
4504 msgid "I<bp_addr> (since Linux 2.6.33)"
4505 msgstr "I<bp_addr> (Linux 2.6.33 以降)"
4507 #. commit 24f1e32c60c45c89a997c73395b69c8af6f0a84e
4509 #: build/C/man2/perf_event_open.2:1116
4511 "I<bp_addr> address of the breakpoint. For execution breakpoints this is the "
4512 "memory address of the instruction of interest; for read and write "
4513 "breakpoints it is the memory address of the memory location of interest."
4517 #: build/C/man2/perf_event_open.2:1116
4519 msgid "I<config1> (since Linux 2.6.39)"
4520 msgstr "I<config1> (Linux 2.6.39 以降)"
4522 #. commit a7e3ed1e470116c9d12c2f778431a481a6be8ab6
4524 #: build/C/man2/perf_event_open.2:1124
4526 "I<config1> is used for setting events that need an extra register or "
4527 "otherwise do not fit in the regular config field. Raw OFFCORE_EVENTS on "
4528 "Nehalem/Westmere/SandyBridge use this field on 3.3 and later kernels."
4532 #: build/C/man2/perf_event_open.2:1124
4534 msgid "I<bp_len> (since Linux 2.6.33)"
4535 msgstr "I<bp_len> (Linux 2.6.33 以降)"
4537 #. commit 24f1e32c60c45c89a997c73395b69c8af6f0a84e
4539 #: build/C/man2/perf_event_open.2:1139
4541 "I<bp_len> is the length of the breakpoint being measured if I<type> is "
4542 "B<PERF_TYPE_BREAKPOINT>. Options are B<HW_BREAKPOINT_LEN_1>, "
4543 "B<HW_BREAKPOINT_LEN_2>, B<HW_BREAKPOINT_LEN_4>, B<HW_BREAKPOINT_LEN_8>. For "
4544 "an execution breakpoint, set this to I<sizeof(long)>."
4548 #: build/C/man2/perf_event_open.2:1139
4550 msgid "I<config2> (since Linux 2.6.39)"
4551 msgstr "I<config2> (Linux 2.6.39 以降)"
4553 #. commit a7e3ed1e470116c9d12c2f778431a481a6be8ab6
4555 #: build/C/man2/perf_event_open.2:1147
4556 msgid "I<config2> is a further extension of the I<config1> field."
4560 #: build/C/man2/perf_event_open.2:1147
4562 msgid "I<branch_sample_type> (since Linux 3.4)"
4563 msgstr "I<branch_sample_type> (Linux 3.4 以降)"
4565 #. commit bce38cd53e5ddba9cb6d708c4ef3d04a4016ec7e
4567 #: build/C/man2/perf_event_open.2:1154
4569 "If B<PERF_SAMPLE_BRANCH_STACK> is enabled, then this specifies what branches "
4570 "to include in the branch record."
4574 #: build/C/man2/perf_event_open.2:1160
4576 "The first part of the value is the privilege level, which is a combination "
4577 "of one of the following values. If the user does not set privilege level "
4578 "explicitly, the kernel will use the event's privilege level. Event and "
4579 "branch privilege levels do not have to match."
4583 #: build/C/man2/perf_event_open.2:1161
4585 msgid "B<PERF_SAMPLE_BRANCH_USER>"
4589 #: build/C/man2/perf_event_open.2:1164
4590 msgid "Branch target is in user space."
4594 #: build/C/man2/perf_event_open.2:1164
4596 msgid "B<PERF_SAMPLE_BRANCH_KERNEL>"
4600 #: build/C/man2/perf_event_open.2:1167
4601 msgid "Branch target is in kernel space."
4605 #: build/C/man2/perf_event_open.2:1167
4607 msgid "B<PERF_SAMPLE_BRANCH_HV>"
4611 #: build/C/man2/perf_event_open.2:1170
4612 msgid "Branch target is in hypervisor."
4616 #: build/C/man2/perf_event_open.2:1170
4618 msgid "B<PERF_SAMPLE_BRANCH_PLM_ALL>"
4622 #: build/C/man2/perf_event_open.2:1173
4623 msgid "A convenience value that is the three preceding values ORed together."
4627 #: build/C/man2/perf_event_open.2:1177
4629 "In addition to the privilege value, at least one or more of the following "
4634 #: build/C/man2/perf_event_open.2:1178
4636 msgid "B<PERF_SAMPLE_BRANCH_ANY>"
4640 #: build/C/man2/perf_event_open.2:1181
4641 msgid "Any branch type."
4645 #: build/C/man2/perf_event_open.2:1181
4647 msgid "B<PERF_SAMPLE_BRANCH_ANY_CALL>"
4651 #: build/C/man2/perf_event_open.2:1184
4652 msgid "Any call branch."
4656 #: build/C/man2/perf_event_open.2:1184
4658 msgid "B<PERF_SAMPLE_BRANCH_ANY_RETURN>"
4662 #: build/C/man2/perf_event_open.2:1187
4663 msgid "Any return branch."
4667 #: build/C/man2/perf_event_open.2:1187
4669 msgid "B<PERF_SAMPLE_BRANCH_IND_CALL>"
4673 #: build/C/man2/perf_event_open.2:1190
4674 msgid "Indirect calls."
4678 #: build/C/man2/perf_event_open.2:1190
4680 msgid "B<PERF_SAMPLE_BRANCH_COND> (since Linux 3.16)"
4681 msgstr "B<PERF_SAMPLE_BRANCH_COND> (Linux 3.16 以降)"
4683 #. commit bac52139f0b7ab31330e98fd87fc5a2664951050
4685 #: build/C/man2/perf_event_open.2:1194
4686 msgid "Conditional branches."
4690 #: build/C/man2/perf_event_open.2:1194
4692 msgid "B<PERF_SAMPLE_BRANCH_ABORT_TX> (since Linux 3.11)"
4693 msgstr "B<PERF_SAMPLE_BRANCH_ABORT_TX> (Linux 3.11 以降)"
4695 #. commit 135c5612c460f89657c4698fe2ea753f6f667963
4697 #: build/C/man2/perf_event_open.2:1198
4698 msgid "Transactional memory aborts."
4702 #: build/C/man2/perf_event_open.2:1198
4704 msgid "B<PERF_SAMPLE_BRANCH_IN_TX> (since Linux 3.11)"
4705 msgstr "B<PERF_SAMPLE_BRANCH_IN_TX> (Linux 3.11 以降)"
4707 #. commit 135c5612c460f89657c4698fe2ea753f6f667963
4709 #: build/C/man2/perf_event_open.2:1202
4710 msgid "Branch in transactional memory transaction."
4714 #: build/C/man2/perf_event_open.2:1202
4716 msgid "B<PERF_SAMPLE_BRANCH_NO_TX> (since Linux 3.11)"
4717 msgstr "B<PERF_SAMPLE_BRANCH_NO_TX> (Linux 3.11 以降)"
4719 #. commit 135c5612c460f89657c4698fe2ea753f6f667963
4721 #: build/C/man2/perf_event_open.2:1206
4722 msgid "Branch not in transactional memory transaction."
4726 #: build/C/man2/perf_event_open.2:1208
4728 msgid "I<sample_regs_user> (since Linux 3.7)"
4729 msgstr "I<sample_regs_user> (Linux 3.7 以降)"
4731 #. commit 4018994f3d8785275ef0e7391b75c3462c029e56
4733 #: build/C/man2/perf_event_open.2:1215
4735 "This bit mask defines the set of user CPU registers to dump on samples. The "
4736 "layout of the register mask is architecture-specific and described in the "
4737 "kernel header I<arch/ARCH/include/uapi/asm/perf_regs.h>."
4741 #: build/C/man2/perf_event_open.2:1215
4743 msgid "I<sample_stack_user> (since Linux 3.7)"
4744 msgstr "I<sample_stack_user> (Linux 3.7 以降)"
4746 #. commit c5ebcedb566ef17bda7b02686e0d658a7bb42ee7
4748 #: build/C/man2/perf_event_open.2:1221
4750 "This defines the size of the user stack to dump if B<PERF_SAMPLE_STACK_USER> "
4755 #: build/C/man2/perf_event_open.2:1221
4757 msgid "Reading results"
4761 #: build/C/man2/perf_event_open.2:1231
4763 "Once a B<perf_event_open>() file descriptor has been opened, the values of "
4764 "the events can be read from the file descriptor. The values that are there "
4765 "are specified by the I<read_format> field in the I<attr> structure at open "
4770 #: build/C/man2/perf_event_open.2:1236
4772 "If you attempt to read into a buffer that is not big enough to hold the data "
4773 "B<ENOSPC> is returned"
4777 #: build/C/man2/perf_event_open.2:1238
4778 msgid "Here is the layout of the data returned by a read:"
4782 #: build/C/man2/perf_event_open.2:1242
4784 "If B<PERF_FORMAT_GROUP> was specified to allow reading all events in a group "
4789 #: build/C/man2/perf_event_open.2:1254
4792 "struct read_format {\n"
4793 " u64 nr; /* The number of events */\n"
4794 " u64 time_enabled; /* if PERF_FORMAT_TOTAL_TIME_ENABLED */\n"
4795 " u64 time_running; /* if PERF_FORMAT_TOTAL_TIME_RUNNING */\n"
4797 " u64 value; /* The value of the event */\n"
4798 " u64 id; /* if PERF_FORMAT_ID */\n"
4804 #: build/C/man2/perf_event_open.2:1262
4805 msgid "If B<PERF_FORMAT_GROUP> was I<not> specified:"
4809 #: build/C/man2/perf_event_open.2:1271
4812 "struct read_format {\n"
4813 " u64 value; /* The value of the event */\n"
4814 " u64 time_enabled; /* if PERF_FORMAT_TOTAL_TIME_ENABLED */\n"
4815 " u64 time_running; /* if PERF_FORMAT_TOTAL_TIME_RUNNING */\n"
4816 " u64 id; /* if PERF_FORMAT_ID */\n"
4821 #: build/C/man2/perf_event_open.2:1275
4822 msgid "The values read are as follows:"
4826 #: build/C/man2/perf_event_open.2:1275
4832 #: build/C/man2/perf_event_open.2:1281
4834 "The number of events in this file descriptor. Only available if "
4835 "B<PERF_FORMAT_GROUP> was specified."
4839 #: build/C/man2/perf_event_open.2:1281
4841 msgid "I<time_enabled>, I<time_running>"
4845 #: build/C/man2/perf_event_open.2:1293
4847 "Total time the event was enabled and running. Normally these are the same. "
4848 "If more events are started, then available counter slots on the PMU, then "
4849 "multiplexing happens and events run only part of the time. In that case, "
4850 "the I<time_enabled> and I<time running> values can be used to scale an "
4851 "estimated value for the count."
4855 #: build/C/man2/perf_event_open.2:1293
4861 #: build/C/man2/perf_event_open.2:1296
4862 msgid "An unsigned 64-bit value containing the counter result."
4866 #: build/C/man2/perf_event_open.2:1296 build/C/man2/perf_event_open.2:1732
4867 #: build/C/man2/perf_event_open.2:1898
4873 #: build/C/man2/perf_event_open.2:1302
4875 "A globally unique value for this particular event, only present if "
4876 "B<PERF_FORMAT_ID> was specified in I<read_format>."
4880 #: build/C/man2/perf_event_open.2:1302
4886 #: build/C/man2/perf_event_open.2:1312
4888 "When using B<perf_event_open>() in sampled mode, asynchronous events (like "
4889 "counter overflow or B<PROT_EXEC> mmap tracking) are logged into a ring-"
4890 "buffer. This ring-buffer is created and accessed through B<mmap>(2)."
4894 #: build/C/man2/perf_event_open.2:1318
4896 "The mmap size should be 1+2^n pages, where the first page is a metadata page "
4897 "(I<struct perf_event_mmap_page>) that contains various bits of information "
4898 "such as where the ring-buffer head is."
4902 #: build/C/man2/perf_event_open.2:1321
4904 "Before kernel 2.6.39, there is a bug that means you must allocate a mmap "
4905 "ring buffer when sampling even if you do not plan to access it."
4909 #: build/C/man2/perf_event_open.2:1323
4910 msgid "The structure of the first metadata mmap page is as follows:"
4914 #: build/C/man2/perf_event_open.2:1352
4917 "struct perf_event_mmap_page {\n"
4918 " __u32 version; /* version number of this structure */\n"
4919 " __u32 compat_version; /* lowest version this is compat with */\n"
4920 " __u32 lock; /* seqlock for synchronization */\n"
4921 " __u32 index; /* hardware counter identifier */\n"
4922 " __s64 offset; /* add to hardware counter value */\n"
4923 " __u64 time_enabled; /* time event active */\n"
4924 " __u64 time_running; /* time event on CPU */\n"
4926 " __u64 capabilities;\n"
4928 " __u64 cap_usr_time / cap_usr_rdpmc / cap_bit0 : 1,\n"
4929 " cap_bit0_is_deprecated : 1,\n"
4930 " cap_user_rdpmc : 1,\n"
4931 " cap_user_time : 1,\n"
4932 " cap_user_time_zero : 1,\n"
4935 " __u16 pmc_width;\n"
4936 " __u16 time_shift;\n"
4937 " __u32 time_mult;\n"
4938 " __u64 time_offset;\n"
4939 " __u64 __reserved[120]; /* Pad to 1k */\n"
4940 " __u64 data_head; /* head in the data section */\n"
4941 " __u64 data_tail; /* user-space written tail */\n"
4946 #: build/C/man2/perf_event_open.2:1358
4948 "The following list describes the fields in the I<perf_event_mmap_page> "
4949 "structure in more detail:"
4953 #: build/C/man2/perf_event_open.2:1358
4959 #: build/C/man2/perf_event_open.2:1361
4960 msgid "Version number of this structure."
4964 #: build/C/man2/perf_event_open.2:1361
4966 msgid "I<compat_version>"
4970 #: build/C/man2/perf_event_open.2:1364
4971 msgid "The lowest version this is compatible with."
4975 #: build/C/man2/perf_event_open.2:1364
4981 #: build/C/man2/perf_event_open.2:1367
4982 msgid "A seqlock for synchronization."
4986 #: build/C/man2/perf_event_open.2:1367
4992 #: build/C/man2/perf_event_open.2:1370
4993 msgid "A unique hardware counter identifier."
4997 #: build/C/man2/perf_event_open.2:1370
5003 #: build/C/man2/perf_event_open.2:1375
5005 "When using rdpmc for reads this offset value must be added to the one "
5006 "returned by rdpmc to get the current total event count."
5010 #: build/C/man2/perf_event_open.2:1375
5012 msgid "I<time_enabled>"
5016 #: build/C/man2/perf_event_open.2:1378
5017 msgid "Time the event was active."
5021 #: build/C/man2/perf_event_open.2:1378
5023 msgid "I<time_running>"
5027 #: build/C/man2/perf_event_open.2:1381
5028 msgid "Time the event was running."
5032 #: build/C/man2/perf_event_open.2:1381
5034 msgid "I<cap_usr_time> / I<cap_usr_rdpmc> / I<cap_bit0> (since Linux 3.4)"
5037 #. commit c7206205d00ab375839bd6c7ddb247d600693c09
5039 #: build/C/man2/perf_event_open.2:1395
5041 "There was a bug in the definition of I<cap_usr_time> and I<cap_usr_rdpmc> "
5042 "from Linux 3.4 until Linux 3.11. Both bits were defined to point to the "
5043 "same location, so it was impossible to know if I<cap_usr_time> or "
5044 "I<cap_usr_rdpmc> were actually set."
5047 #. commit fa7315871046b9a4c48627905691dbde57e51033
5049 #: build/C/man2/perf_event_open.2:1404
5051 "Starting with Linux 3.12, these are renamed to I<cap_bit0> and you should "
5052 "use the I<cap_user_time> and I<cap_user_rdpmc> fields instead."
5056 #: build/C/man2/perf_event_open.2:1405
5058 msgid "I<cap_bit0_is_deprecated> (since Linux 3.12)"
5059 msgstr "I<cap_bit0_is_deprecated> (Linux 3.12 以降)"
5061 #. commit fa7315871046b9a4c48627905691dbde57e51033
5063 #: build/C/man2/perf_event_open.2:1414
5065 "If set, this bit indicates that the kernel supports the properly separated "
5066 "I<cap_user_time> and I<cap_user_rdpmc> bits."
5070 #: build/C/man2/perf_event_open.2:1421
5072 "If not-set, it indicates an older kernel where I<cap_usr_time> and "
5073 "I<cap_usr_rdpmc> map to the same bit and thus both features should be used "
5078 #: build/C/man2/perf_event_open.2:1422
5080 msgid "I<cap_user_rdpmc> (since Linux 3.12)"
5081 msgstr "I<cap_user_rdpmc> (Linux 3.12 以降)"
5083 #. commit fa7315871046b9a4c48627905691dbde57e51033
5085 #: build/C/man2/perf_event_open.2:1428
5087 "If the hardware supports user-space read of performance counters without "
5088 "syscall (this is the \"rdpmc\" instruction on x86), then the following code "
5089 "can be used to do a read:"
5093 #: build/C/man2/perf_event_open.2:1434
5096 "u32 seq, time_mult, time_shift, idx, width;\n"
5097 "u64 count, enabled, running;\n"
5098 "u64 cyc, time_offset;\n"
5100 "u32 seq, time_mult, time_shift, idx, width;\n"
5101 "u64 count, enabled, running;\n"
5102 "u64 cyc, time_offset;\n"
5105 #: build/C/man2/perf_event_open.2:1440
5109 " seq = pc-E<gt>lock;\n"
5111 " enabled = pc-E<gt>time_enabled;\n"
5112 " running = pc-E<gt>time_running;\n"
5115 " seq = pc-E<gt>lock;\n"
5117 " enabled = pc-E<gt>time_enabled;\n"
5118 " running = pc-E<gt>time_running;\n"
5121 #: build/C/man2/perf_event_open.2:1447
5124 " if (pc-E<gt>cap_usr_time && enabled != running) {\n"
5126 " time_offset = pc-E<gt>time_offset;\n"
5127 " time_mult = pc-E<gt>time_mult;\n"
5128 " time_shift = pc-E<gt>time_shift;\n"
5131 " if (pc-E<gt>cap_usr_time && enabled != running) {\n"
5133 " time_offset = pc-E<gt>time_offset;\n"
5134 " time_mult = pc-E<gt>time_mult;\n"
5135 " time_shift = pc-E<gt>time_shift;\n"
5139 #: build/C/man2/perf_event_open.2:1450
5142 " idx = pc-E<gt>index;\n"
5143 " count = pc-E<gt>offset;\n"
5145 " idx = pc-E<gt>index;\n"
5146 " count = pc-E<gt>offset;\n"
5149 #: build/C/man2/perf_event_open.2:1455
5152 " if (pc-E<gt>cap_usr_rdpmc && idx) {\n"
5153 " width = pc-E<gt>pmc_width;\n"
5154 " count += rdpmc(idx - 1);\n"
5157 " if (pc-E<gt>cap_usr_rdpmc && idx) {\n"
5158 " width = pc-E<gt>pmc_width;\n"
5159 " count += rdpmc(idx - 1);\n"
5163 #: build/C/man2/perf_event_open.2:1458
5167 "} while (pc-E<gt>lock != seq);\n"
5170 "} while (pc-E<gt>lock != seq);\n"
5173 #: build/C/man2/perf_event_open.2:1460
5175 msgid "I<cap_user_time> (since Linux 3.12)"
5176 msgstr "I<cap_user_time> (Linux 3.12 以降)"
5178 #. commit fa7315871046b9a4c48627905691dbde57e51033
5180 #: build/C/man2/perf_event_open.2:1465
5182 "This bit indicates the hardware has a constant, nonstop timestamp counter "
5187 #: build/C/man2/perf_event_open.2:1465
5189 msgid "I<cap_user_time_zero> (since Linux 3.12)"
5190 msgstr "I<cap_user_time_zero> (Linux 3.12 以降)"
5192 #. commit fa7315871046b9a4c48627905691dbde57e51033
5194 #: build/C/man2/perf_event_open.2:1472
5196 "Indicates the presence of I<time_zero> which allows mapping timestamp values "
5197 "to the hardware clock."
5201 #: build/C/man2/perf_event_open.2:1472
5203 msgid "I<pmc_width>"
5204 msgstr "I<pmc_width>"
5207 #: build/C/man2/perf_event_open.2:1479
5209 "If I<cap_usr_rdpmc>, this field provides the bit-width of the value read "
5210 "using the rdpmc or equivalent instruction. This can be used to sign extend "
5215 #: build/C/man2/perf_event_open.2:1485
5218 "pmc E<lt>E<lt>= 64 - pmc_width;\n"
5219 "pmc E<gt>E<gt>= 64 - pmc_width; // signed shift right\n"
5222 "pmc E<lt>E<lt>= 64 - pmc_width;\n"
5223 "pmc E<gt>E<gt>= 64 - pmc_width; // signed shift right\n"
5227 #: build/C/man2/perf_event_open.2:1487
5229 msgid "I<time_shift>, I<time_mult>, I<time_offset>"
5230 msgstr "I<time_shift>, I<time_mult>, I<time_offset>"
5233 #: build/C/man2/perf_event_open.2:1494
5235 "If I<cap_usr_time>, these fields can be used to compute the time delta since "
5236 "time_enabled (in nanoseconds) using rdtsc or similar."
5240 #: build/C/man2/perf_event_open.2:1502
5245 " quot = (cyc E<gt>E<gt> time_shift);\n"
5246 " rem = cyc & ((1 E<lt>E<lt> time_shift) - 1);\n"
5247 " delta = time_offset + quot * time_mult +\n"
5248 " ((rem * time_mult) E<gt>E<gt> time_shift);\n"
5252 " quot = (cyc E<gt>E<gt> time_shift);\n"
5253 " rem = cyc & ((1 E<lt>E<lt> time_shift) - 1);\n"
5254 " delta = time_offset + quot * time_mult +\n"
5255 " ((rem * time_mult) E<gt>E<gt> time_shift);\n"
5258 #: build/C/man2/perf_event_open.2:1514
5260 "Where I<time_offset>, I<time_mult>, I<time_shift>, and I<cyc> are read in "
5261 "the seqcount loop described above. This delta can then be added to enabled "
5262 "and possible running (if idx), improving the scaling:"
5266 #: build/C/man2/perf_event_open.2:1522
5269 " enabled += delta;\n"
5271 " running += delta;\n"
5272 " quot = count / running;\n"
5273 " rem = count % running;\n"
5274 " count = quot * enabled + (rem * enabled) / running;\n"
5276 " enabled += delta;\n"
5278 " running += delta;\n"
5279 " quot = count / running;\n"
5280 " rem = count % running;\n"
5281 " count = quot * enabled + (rem * enabled) / running;\n"
5284 #: build/C/man2/perf_event_open.2:1523
5286 msgid "I<time_zero> (since Linux 3.12)"
5287 msgstr "I<time_zero> (Linux 3.12 以降)"
5289 #. commit fa7315871046b9a4c48627905691dbde57e51033
5291 #: build/C/man2/perf_event_open.2:1532
5293 "If I<cap_usr_time_zero> is set, then the hardware clock (the TSC timestamp "
5294 "counter on x86) can be calculated from the I<time_zero>, I<time_mult>, and "
5295 "I<time_shift> values:"
5299 #: build/C/man2/perf_event_open.2:1538
5302 " time = timestamp - time_zero;\n"
5303 " quot = time / time_mult;\n"
5304 " rem = time % time_mult;\n"
5305 " cyc = (quot E<lt>E<lt> time_shift) + (rem E<lt>E<lt> time_shift) / time_mult;\n"
5307 " time = timestamp - time_zero;\n"
5308 " quot = time / time_mult;\n"
5309 " rem = time % time_mult;\n"
5310 " cyc = (quot E<lt>E<lt> time_shift) + (rem E<lt>E<lt> time_shift) / time_mult;\n"
5313 #: build/C/man2/perf_event_open.2:1541
5314 msgid "And vice versa:"
5318 #: build/C/man2/perf_event_open.2:1547
5321 " quot = cyc E<gt>E<gt> time_shift;\n"
5322 " rem = cyc & ((1 E<lt>E<lt> time_shift) - 1);\n"
5323 " timestamp = time_zero + quot * time_mult +\n"
5324 " ((rem * time_mult) E<gt>E<gt> time_shift);\n"
5326 " quot = cyc E<gt>E<gt> time_shift;\n"
5327 " rem = cyc & ((1 E<lt>E<lt> time_shift) - 1);\n"
5328 " timestamp = time_zero + quot * time_mult +\n"
5329 " ((rem * time_mult) E<gt>E<gt> time_shift);\n"
5332 #: build/C/man2/perf_event_open.2:1548
5334 msgid "I<data_head>"
5335 msgstr "I<data_head>"
5338 #: build/C/man2/perf_event_open.2:1554
5340 "This points to the head of the data section. The value continuously "
5341 "increases, it does not wrap. The value needs to be manually wrapped by the "
5342 "size of the mmap buffer before accessing the samples."
5346 #: build/C/man2/perf_event_open.2:1559
5348 "On SMP-capable platforms, after reading the I<data_head> value, user space "
5349 "should issue an rmb()."
5353 #: build/C/man2/perf_event_open.2:1559
5355 msgid "I<data_tail>"
5356 msgstr "I<data_tail>"
5359 #: build/C/man2/perf_event_open.2:1567
5361 "When the mapping is B<PROT_WRITE>, the I<data_tail> value should be written "
5362 "by user space to reflect the last read data. In this case, the kernel will "
5363 "not overwrite unread data."
5367 #: build/C/man2/perf_event_open.2:1569
5368 msgid "The following 2^n ring-buffer pages have the layout described below."
5372 #: build/C/man2/perf_event_open.2:1583
5374 "If I<perf_event_attr.sample_id_all> is set, then all event types will have "
5375 "the sample_type selected fields related to where/when (identity) an event "
5376 "took place (TID, TIME, ID, CPU, STREAM_ID) described in "
5377 "B<PERF_RECORD_SAMPLE> below, it will be stashed just after the "
5378 "I<perf_event_header> and the fields already present for the existing fields, "
5379 "that is, at the end of the payload. That way a newer perf.data file will be "
5380 "supported by older perf tools, with these new optional fields being ignored."
5384 #: build/C/man2/perf_event_open.2:1585
5385 msgid "The mmap values start with a header:"
5389 #: build/C/man2/perf_event_open.2:1593
5392 "struct perf_event_header {\n"
5398 "struct perf_event_header {\n"
5405 #: build/C/man2/perf_event_open.2:1601
5407 "Below, we describe the I<perf_event_header> fields in more detail. For ease "
5408 "of reading, the fields with shorter descriptions are presented first."
5412 #: build/C/man2/perf_event_open.2:1604
5413 msgid "This indicates the size of the record."
5417 #: build/C/man2/perf_event_open.2:1604
5423 #: build/C/man2/perf_event_open.2:1609
5424 msgid "The I<misc> field contains additional information about the sample."
5428 #: build/C/man2/perf_event_open.2:1614
5430 "The CPU mode can be determined from this value by masking with "
5431 "B<PERF_RECORD_MISC_CPUMODE_MASK> and looking for one of the following (note "
5432 "these are not bit masks, only one can be set at a time):"
5436 #: build/C/man2/perf_event_open.2:1615
5438 msgid "B<PERF_RECORD_MISC_CPUMODE_UNKNOWN>"
5439 msgstr "B<PERF_RECORD_MISC_CPUMODE_UNKNOWN>"
5442 #: build/C/man2/perf_event_open.2:1618
5443 msgid "Unknown CPU mode."
5447 #: build/C/man2/perf_event_open.2:1618
5449 msgid "B<PERF_RECORD_MISC_KERNEL>"
5450 msgstr "B<PERF_RECORD_MISC_KERNEL>"
5453 #: build/C/man2/perf_event_open.2:1621
5454 msgid "Sample happened in the kernel."
5458 #: build/C/man2/perf_event_open.2:1621
5460 msgid "B<PERF_RECORD_MISC_USER>"
5461 msgstr "B<PERF_RECORD_MISC_USER>"
5464 #: build/C/man2/perf_event_open.2:1624
5465 msgid "Sample happened in user code."
5469 #: build/C/man2/perf_event_open.2:1624
5471 msgid "B<PERF_RECORD_MISC_HYPERVISOR>"
5472 msgstr "B<PERF_RECORD_MISC_HYPERVISOR>"
5475 #: build/C/man2/perf_event_open.2:1627
5476 msgid "Sample happened in the hypervisor."
5480 #: build/C/man2/perf_event_open.2:1627
5482 msgid "B<PERF_RECORD_MISC_GUEST_KERNEL> (since Linux 2.6.35)"
5483 msgstr "B<PERF_RECORD_MISC_GUEST_KERNEL> (Linux 2.6.35 以降)"
5485 #. commit 39447b386c846bbf1c56f6403c5282837486200f
5487 #: build/C/man2/perf_event_open.2:1631
5488 msgid "Sample happened in the guest kernel."
5492 #: build/C/man2/perf_event_open.2:1631
5494 msgid "B<PERF_RECORD_MISC_GUEST_USER (since Linux 2.6.35)>"
5495 msgstr "B<PERF_RECORD_MISC_GUEST_USER (Linux 2.6.35 以降)>"
5497 #. commit 39447b386c846bbf1c56f6403c5282837486200f
5499 #: build/C/man2/perf_event_open.2:1635
5500 msgid "Sample happened in guest user code."
5504 #: build/C/man2/perf_event_open.2:1639
5505 msgid "In addition, one of the following bits can be set:"
5509 #: build/C/man2/perf_event_open.2:1639
5511 msgid "B<PERF_RECORD_MISC_MMAP_DATA> (since Linux 3.10)"
5512 msgstr "B<PERF_RECORD_MISC_MMAP_DATA> (Linux 3.10 以降)"
5514 #. commit 2fe85427e3bf65d791700d065132772fc26e4d75
5516 #: build/C/man2/perf_event_open.2:1644
5518 "This is set when the mapping is not executable; otherwise the mapping is "
5523 #: build/C/man2/perf_event_open.2:1644
5525 msgid "B<PERF_RECORD_MISC_COMM_EXEC> (since Linux 3.16)"
5526 msgstr "B<PERF_RECORD_MISC_COMM_EXEC> (Linux 3.16 以降)"
5528 #. commit 82b897782d10fcc4930c9d4a15b175348fdd2871
5530 #: build/C/man2/perf_event_open.2:1656
5532 "This is set for a B<PERF_RECORD_COMM> record on kernels more recent than "
5533 "Linux 3.16 if a process name change was caused by an B<exec>(2) system "
5534 "call. It is an alias for B<PERF_RECORD_MISC_MMAP_DATA> since the two values "
5535 "would not be set in the same record."
5539 #: build/C/man2/perf_event_open.2:1656
5541 msgid "B<PERF_RECORD_MISC_EXACT_IP>"
5542 msgstr "B<PERF_RECORD_MISC_EXACT_IP>"
5545 #: build/C/man2/perf_event_open.2:1664
5547 "This indicates that the content of B<PERF_SAMPLE_IP> points to the actual "
5548 "instruction that triggered the event. See also I<perf_event_attr."
5553 #: build/C/man2/perf_event_open.2:1664
5555 msgid "B<PERF_RECORD_MISC_EXT_RESERVED> (since Linux 2.6.35)"
5556 msgstr "B<PERF_RECORD_MISC_EXT_RESERVED> (Linux 2.6.35 以降)"
5558 #. commit 1676b8a077c352085d52578fb4f29350b58b6e74
5560 #: build/C/man2/perf_event_open.2:1668
5561 msgid "This indicates there is extended data available (currently not used)."
5565 #: build/C/man2/perf_event_open.2:1678
5567 "The I<type> value is one of the below. The values in the corresponding "
5568 "record (that follows the header) depend on the I<type> selected as shown."
5572 #: build/C/man2/perf_event_open.2:1680
5574 msgid "B<PERF_RECORD_MMAP>"
5575 msgstr "B<PERF_RECORD_MMAP>"
5578 #: build/C/man2/perf_event_open.2:1687
5580 "The MMAP events record the B<PROT_EXEC> mappings so that we can correlate "
5581 "user-space IPs to code. They have the following structure:"
5585 #: build/C/man2/perf_event_open.2:1698
5589 " struct perf_event_header header;\n"
5594 " char filename[];\n"
5598 " struct perf_event_header header;\n"
5603 " char filename[];\n"
5607 #: build/C/man2/perf_event_open.2:1701 build/C/man2/perf_event_open.2:1755
5608 #: build/C/man2/perf_event_open.2:2276
5614 #: build/C/man2/perf_event_open.2:1704 build/C/man2/perf_event_open.2:1758
5615 #: build/C/man2/perf_event_open.2:2279
5616 msgid "is the process ID."
5620 #: build/C/man2/perf_event_open.2:1704 build/C/man2/perf_event_open.2:1758
5621 #: build/C/man2/perf_event_open.2:2279
5627 #: build/C/man2/perf_event_open.2:1707 build/C/man2/perf_event_open.2:1761
5628 #: build/C/man2/perf_event_open.2:2282
5629 msgid "is the thread ID."
5633 #: build/C/man2/perf_event_open.2:1707 build/C/man2/perf_event_open.2:1891
5634 #: build/C/man2/perf_event_open.2:2282
5640 #: build/C/man2/perf_event_open.2:1716
5642 "is the address of the allocated memory. I<len> is the length of the "
5643 "allocated memory. I<pgoff> is the page offset of the allocated memory. "
5644 "I<filename> is a string describing the backing of the allocated memory."
5648 #: build/C/man2/perf_event_open.2:1717
5650 msgid "B<PERF_RECORD_LOST>"
5651 msgstr "B<PERF_RECORD_LOST>"
5654 #: build/C/man2/perf_event_open.2:1720
5655 msgid "This record indicates when events are lost."
5659 #: build/C/man2/perf_event_open.2:1729
5663 " struct perf_event_header header;\n"
5666 " struct sample_id sample_id;\n"
5670 " struct perf_event_header header;\n"
5673 " struct sample_id sample_id;\n"
5677 #: build/C/man2/perf_event_open.2:1735
5678 msgid "is the unique event ID for the samples that were lost."
5682 #: build/C/man2/perf_event_open.2:1735
5688 #: build/C/man2/perf_event_open.2:1738
5689 msgid "is the number of events that were lost."
5693 #: build/C/man2/perf_event_open.2:1739
5695 msgid "B<PERF_RECORD_COMM>"
5696 msgstr "B<PERF_RECORD_COMM>"
5699 #: build/C/man2/perf_event_open.2:1742
5700 msgid "This record indicates a change in the process name."
5704 #: build/C/man2/perf_event_open.2:1752
5708 " struct perf_event_header header;\n"
5712 " struct sample_id sample_id;\n"
5716 " struct perf_event_header header;\n"
5720 " struct sample_id sample_id;\n"
5724 #: build/C/man2/perf_event_open.2:1764
5725 msgid "is a string containing the new name of the process."
5729 #: build/C/man2/perf_event_open.2:1765
5731 msgid "B<PERF_RECORD_EXIT>"
5732 msgstr "B<PERF_RECORD_EXIT>"
5735 #: build/C/man2/perf_event_open.2:1768
5736 msgid "This record indicates a process exit event."
5740 #: build/C/man2/perf_event_open.2:1778 build/C/man2/perf_event_open.2:1808
5744 " struct perf_event_header header;\n"
5748 " struct sample_id sample_id;\n"
5752 " struct perf_event_header header;\n"
5756 " struct sample_id sample_id;\n"
5760 #: build/C/man2/perf_event_open.2:1780
5762 msgid "B<PERF_RECORD_THROTTLE>, B<PERF_RECORD_UNTHROTTLE>"
5763 msgstr "B<PERF_RECORD_THROTTLE>, B<PERF_RECORD_UNTHROTTLE>"
5766 #: build/C/man2/perf_event_open.2:1783
5767 msgid "This record indicates a throttle/unthrottle event."
5771 #: build/C/man2/perf_event_open.2:1793
5775 " struct perf_event_header header;\n"
5779 " struct sample_id sample_id;\n"
5783 " struct perf_event_header header;\n"
5787 " struct sample_id sample_id;\n"
5791 #: build/C/man2/perf_event_open.2:1795
5793 msgid "B<PERF_RECORD_FORK>"
5794 msgstr "B<PERF_RECORD_FORK>"
5797 #: build/C/man2/perf_event_open.2:1798
5798 msgid "This record indicates a fork event."
5802 #: build/C/man2/perf_event_open.2:1810
5804 msgid "B<PERF_RECORD_READ>"
5805 msgstr "B<PERF_RECORD_READ>"
5808 #: build/C/man2/perf_event_open.2:1813
5809 msgid "This record indicates a read event."
5813 #: build/C/man2/perf_event_open.2:1822
5817 " struct perf_event_header header;\n"
5819 " struct read_format values;\n"
5820 " struct sample_id sample_id;\n"
5824 " struct perf_event_header header;\n"
5826 " struct read_format values;\n"
5827 " struct sample_id sample_id;\n"
5831 #: build/C/man2/perf_event_open.2:1824
5833 msgid "B<PERF_RECORD_SAMPLE>"
5834 msgstr "B<PERF_RECORD_SAMPLE>"
5837 #: build/C/man2/perf_event_open.2:1827
5838 msgid "This record indicates a sample."
5842 #: build/C/man2/perf_event_open.2:1859
5846 " struct perf_event_header header;\n"
5847 " u64 sample_id; /* if PERF_SAMPLE_IDENTIFIER */\n"
5848 " u64 ip; /* if PERF_SAMPLE_IP */\n"
5849 " u32 pid, tid; /* if PERF_SAMPLE_TID */\n"
5850 " u64 time; /* if PERF_SAMPLE_TIME */\n"
5851 " u64 addr; /* if PERF_SAMPLE_ADDR */\n"
5852 " u64 id; /* if PERF_SAMPLE_ID */\n"
5853 " u64 stream_id; /* if PERF_SAMPLE_STREAM_ID */\n"
5854 " u32 cpu, res; /* if PERF_SAMPLE_CPU */\n"
5855 " u64 period; /* if PERF_SAMPLE_PERIOD */\n"
5856 " struct read_format v; /* if PERF_SAMPLE_READ */\n"
5857 " u64 nr; /* if PERF_SAMPLE_CALLCHAIN */\n"
5858 " u64 ips[nr]; /* if PERF_SAMPLE_CALLCHAIN */\n"
5859 " u32 size; /* if PERF_SAMPLE_RAW */\n"
5860 " char data[size]; /* if PERF_SAMPLE_RAW */\n"
5861 " u64 bnr; /* if PERF_SAMPLE_BRANCH_STACK */\n"
5862 " struct perf_branch_entry lbr[bnr];\n"
5863 " /* if PERF_SAMPLE_BRANCH_STACK */\n"
5864 " u64 abi; /* if PERF_SAMPLE_REGS_USER */\n"
5865 " u64 regs[weight(mask)];\n"
5866 " /* if PERF_SAMPLE_REGS_USER */\n"
5867 " u64 size; /* if PERF_SAMPLE_STACK_USER */\n"
5868 " char data[size]; /* if PERF_SAMPLE_STACK_USER */\n"
5869 " u64 dyn_size; /* if PERF_SAMPLE_STACK_USER */\n"
5870 " u64 weight; /* if PERF_SAMPLE_WEIGHT */\n"
5871 " u64 data_src; /* if PERF_SAMPLE_DATA_SRC */\n"
5872 " u64 transaction;/* if PERF_SAMPLE_TRANSACTION */\n"
5876 " struct perf_event_header header;\n"
5877 " u64 sample_id; /* if PERF_SAMPLE_IDENTIFIER */\n"
5878 " u64 ip; /* if PERF_SAMPLE_IP */\n"
5879 " u32 pid, tid; /* if PERF_SAMPLE_TID */\n"
5880 " u64 time; /* if PERF_SAMPLE_TIME */\n"
5881 " u64 addr; /* if PERF_SAMPLE_ADDR */\n"
5882 " u64 id; /* if PERF_SAMPLE_ID */\n"
5883 " u64 stream_id; /* if PERF_SAMPLE_STREAM_ID */\n"
5884 " u32 cpu, res; /* if PERF_SAMPLE_CPU */\n"
5885 " u64 period; /* if PERF_SAMPLE_PERIOD */\n"
5886 " struct read_format v; /* if PERF_SAMPLE_READ */\n"
5887 " u64 nr; /* if PERF_SAMPLE_CALLCHAIN */\n"
5888 " u64 ips[nr]; /* if PERF_SAMPLE_CALLCHAIN */\n"
5889 " u32 size; /* if PERF_SAMPLE_RAW */\n"
5890 " char data[size]; /* if PERF_SAMPLE_RAW */\n"
5891 " u64 bnr; /* if PERF_SAMPLE_BRANCH_STACK */\n"
5892 " struct perf_branch_entry lbr[bnr];\n"
5893 " /* if PERF_SAMPLE_BRANCH_STACK */\n"
5894 " u64 abi; /* if PERF_SAMPLE_REGS_USER */\n"
5895 " u64 regs[weight(mask)];\n"
5896 " /* if PERF_SAMPLE_REGS_USER */\n"
5897 " u64 size; /* if PERF_SAMPLE_STACK_USER */\n"
5898 " char data[size]; /* if PERF_SAMPLE_STACK_USER */\n"
5899 " u64 dyn_size; /* if PERF_SAMPLE_STACK_USER */\n"
5900 " u64 weight; /* if PERF_SAMPLE_WEIGHT */\n"
5901 " u64 data_src; /* if PERF_SAMPLE_DATA_SRC */\n"
5902 " u64 transaction;/* if PERF_SAMPLE_TRANSACTION */\n"
5906 #: build/C/man2/perf_event_open.2:1861
5908 msgid "I<sample_id>"
5909 msgstr "I<sample_id>"
5912 #: build/C/man2/perf_event_open.2:1871
5914 "If B<PERF_SAMPLE_IDENTIFIER> is enabled, a 64-bit unique ID is included. "
5915 "This is a duplication of the B<PERF_SAMPLE_ID> I<id> value, but included at "
5916 "the beginning of the sample so parsers can easily obtain the value."
5920 #: build/C/man2/perf_event_open.2:1871
5926 #: build/C/man2/perf_event_open.2:1877
5928 "If B<PERF_SAMPLE_IP> is enabled, then a 64-bit instruction pointer value is "
5933 #: build/C/man2/perf_event_open.2:1877
5935 msgid "I<pid>, I<tid>"
5936 msgstr "I<pid>, I<tid>"
5939 #: build/C/man2/perf_event_open.2:1883
5941 "If B<PERF_SAMPLE_TID> is enabled, then a 32-bit process ID and 32-bit thread "
5946 #: build/C/man2/perf_event_open.2:1883
5952 #: build/C/man2/perf_event_open.2:1891
5954 "If B<PERF_SAMPLE_TIME> is enabled, then a 64-bit timestamp is included. "
5955 "This is obtained via local_clock() which is a hardware timestamp if "
5956 "available and the jiffies value if not."
5960 #: build/C/man2/perf_event_open.2:1898
5962 "If B<PERF_SAMPLE_ADDR> is enabled, then a 64-bit address is included. This "
5963 "is usually the address of a tracepoint, breakpoint, or software event; "
5964 "otherwise the value is 0."
5968 #: build/C/man2/perf_event_open.2:1906
5970 "If B<PERF_SAMPLE_ID> is enabled, a 64-bit unique ID is included. If the "
5971 "event is a member of an event group, the group leader ID is returned. This "
5972 "ID is the same as the one returned by B<PERF_FORMAT_ID>."
5976 #: build/C/man2/perf_event_open.2:1906
5978 msgid "I<stream_id>"
5979 msgstr "I<stream_id>"
5982 #: build/C/man2/perf_event_open.2:1916
5984 "If B<PERF_SAMPLE_STREAM_ID> is enabled, a 64-bit unique ID is included. "
5985 "Unlike B<PERF_SAMPLE_ID> the actual ID is returned, not the group leader. "
5986 "This ID is the same as the one returned by B<PERF_FORMAT_ID>."
5990 #: build/C/man2/perf_event_open.2:1916
5992 msgid "I<cpu>, I<res>"
5993 msgstr "I<cpu>, I<res>"
5996 #: build/C/man2/perf_event_open.2:1923
5998 "If B<PERF_SAMPLE_CPU> is enabled, this is a 32-bit value indicating which "
5999 "CPU was being used, in addition to a reserved (unused) 32-bit value."
6003 #: build/C/man2/perf_event_open.2:1923
6009 #: build/C/man2/perf_event_open.2:1929
6011 "If B<PERF_SAMPLE_PERIOD> is enabled, a 64-bit value indicating the current "
6012 "sampling period is written."
6016 #: build/C/man2/perf_event_open.2:1929
6022 #: build/C/man2/perf_event_open.2:1940
6024 "If B<PERF_SAMPLE_READ> is enabled, a structure of type read_format is "
6025 "included which has values for all events in the event group. The values "
6026 "included depend on the I<read_format> value used at B<perf_event_open>() "
6031 #: build/C/man2/perf_event_open.2:1940
6033 msgid "I<nr>, I<ips[nr]>"
6034 msgstr "I<nr>, I<ips[nr]>"
6037 #: build/C/man2/perf_event_open.2:1948
6039 "If B<PERF_SAMPLE_CALLCHAIN> is enabled, then a 64-bit number is included "
6040 "which indicates how many following 64-bit instruction pointers will follow. "
6041 "This is the current callchain."
6045 #: build/C/man2/perf_event_open.2:1948
6047 msgid "I<size>, I<data[size]>"
6048 msgstr "I<size>, I<data[size]>"
6051 #: build/C/man2/perf_event_open.2:1955
6053 "If B<PERF_SAMPLE_RAW> is enabled, then a 32-bit value indicating size is "
6054 "included followed by an array of 8-bit values of length size. The values "
6055 "are padded with 0 to have 64-bit alignment."
6059 #: build/C/man2/perf_event_open.2:1960
6061 "This RAW record data is opaque with respect to the ABI. The ABI doesn't "
6062 "make any promises with respect to the stability of its content, it may vary "
6063 "depending on event, hardware, and kernel version."
6067 #: build/C/man2/perf_event_open.2:1960
6069 msgid "I<bnr>, I<lbr[bnr]>"
6070 msgstr "I<bnr>, I<lbr[bnr]>"
6073 #: build/C/man2/perf_event_open.2:1969
6075 "If B<PERF_SAMPLE_BRANCH_STACK> is enabled, then a 64-bit value indicating "
6076 "the number of records is included, followed by I<bnr> I<perf_branch_entry> "
6077 "structures which each include the fields:"
6081 #: build/C/man2/perf_event_open.2:1970
6087 #: build/C/man2/perf_event_open.2:1973
6088 msgid "This indicates the source instruction (may not be a branch)."
6092 #: build/C/man2/perf_event_open.2:1973
6098 #: build/C/man2/perf_event_open.2:1976
6099 msgid "The branch target."
6103 #: build/C/man2/perf_event_open.2:1976
6109 #: build/C/man2/perf_event_open.2:1979
6110 msgid "The branch target was mispredicted."
6114 #: build/C/man2/perf_event_open.2:1979
6116 msgid "I<predicted>"
6117 msgstr "I<predicted>"
6120 #: build/C/man2/perf_event_open.2:1982
6121 msgid "The branch target was predicted."
6125 #: build/C/man2/perf_event_open.2:1982
6127 msgid "I<in_tx> (since Linux 3.11)"
6128 msgstr "I<in_tx> (Linux 3.11 以降)"
6130 #. commit 135c5612c460f89657c4698fe2ea753f6f667963
6132 #: build/C/man2/perf_event_open.2:1986
6133 msgid "The branch was in a transactional memory transaction."
6137 #: build/C/man2/perf_event_open.2:1986
6139 msgid "I<abort> (since Linux 3.11)"
6140 msgstr "I<abort> (Linux 3.11 以降)"
6142 #. commit 135c5612c460f89657c4698fe2ea753f6f667963
6144 #: build/C/man2/perf_event_open.2:1990
6145 msgid "The branch was in an aborted transactional memory transaction."
6149 #: build/C/man2/perf_event_open.2:1994
6151 "The entries are from most to least recent, so the first entry has the most "
6156 #: build/C/man2/perf_event_open.2:2001
6158 "Support for I<mispred> and I<predicted> is optional; if not supported, both "
6163 #: build/C/man2/perf_event_open.2:2005
6165 "The type of branches recorded is specified by the I<branch_sample_type> "
6170 #: build/C/man2/perf_event_open.2:2007
6172 msgid "I<abi>, I<regs[weight(mask)]>"
6173 msgstr "I<abi>, I<regs[weight(mask)]>"
6176 #: build/C/man2/perf_event_open.2:2012
6178 "If B<PERF_SAMPLE_REGS_USER> is enabled, then the user CPU registers are "
6183 #: build/C/man2/perf_event_open.2:2018
6185 "The I<abi> field is one of B<PERF_SAMPLE_REGS_ABI_NONE>, "
6186 "B<PERF_SAMPLE_REGS_ABI_32> or B<PERF_SAMPLE_REGS_ABI_64>."
6190 #: build/C/man2/perf_event_open.2:2028
6192 "The I<regs> field is an array of the CPU registers that were specified by "
6193 "the I<sample_regs_user> attr field. The number of values is the number of "
6194 "bits set in the I<sample_regs_user> bit mask."
6198 #: build/C/man2/perf_event_open.2:2028
6200 msgid "I<size>, I<data[size]>, I<dyn_size>"
6201 msgstr "I<size>, I<data[size]>, I<dyn_size>"
6204 #: build/C/man2/perf_event_open.2:2044
6206 "If B<PERF_SAMPLE_STACK_USER> is enabled, then the user stack is recorded. "
6207 "This can be used to generate stack backtraces. I<size> is the size "
6208 "requested by the user in I<sample_stack_user> or else the maximum record "
6209 "size. I<data> is the stack data (a raw dump of the memory pointed to by the "
6210 "stack pointer at the time of sampling). I<dyn_size> is the amount of data "
6211 "actually dumped (can be less than I<size>)."
6215 #: build/C/man2/perf_event_open.2:2044
6221 #: build/C/man2/perf_event_open.2:2052
6223 "If B<PERF_SAMPLE_WEIGHT> is enabled, then a 64-bit value provided by the "
6224 "hardware is recorded that indicates how costly the event was. This allows "
6225 "expensive events to stand out more clearly in profiles."
6229 #: build/C/man2/perf_event_open.2:2052
6232 msgstr "I<data_src>"
6235 #: build/C/man2/perf_event_open.2:2058
6237 "If B<PERF_SAMPLE_DATA_SRC> is enabled, then a 64-bit value is recorded that "
6238 "is made up of the following fields:"
6242 #: build/C/man2/perf_event_open.2:2059
6248 #: build/C/man2/perf_event_open.2:2062
6249 msgid "Type of opcode, a bitwise combination of:"
6253 #: build/C/man2/perf_event_open.2:2065
6255 msgid "B<PERF_MEM_OP_NA>"
6256 msgstr "B<PERF_MEM_OP_NA>"
6259 #: build/C/man2/perf_event_open.2:2068 build/C/man2/perf_event_open.2:2093
6260 #: build/C/man2/perf_event_open.2:2144 build/C/man2/perf_event_open.2:2168
6261 #: build/C/man2/perf_event_open.2:2184
6262 msgid "Not available"
6266 #: build/C/man2/perf_event_open.2:2068
6268 msgid "B<PERF_MEM_OP_LOAD>"
6269 msgstr "B<PERF_MEM_OP_LOAD>"
6272 #: build/C/man2/perf_event_open.2:2071
6273 msgid "Load instruction"
6277 #: build/C/man2/perf_event_open.2:2071
6279 msgid "B<PERF_MEM_OP_STORE>"
6280 msgstr "B<PERF_MEM_OP_STORE>"
6283 #: build/C/man2/perf_event_open.2:2074
6284 msgid "Store instruction"
6288 #: build/C/man2/perf_event_open.2:2074
6290 msgid "B<PERF_MEM_OP_PFETCH>"
6291 msgstr "B<PERF_MEM_OP_PFETCH>"
6294 #: build/C/man2/perf_event_open.2:2077
6299 #: build/C/man2/perf_event_open.2:2077
6301 msgid "B<PERF_MEM_OP_EXEC>"
6302 msgstr "B<PERF_MEM_OP_EXEC>"
6305 #: build/C/man2/perf_event_open.2:2080
6306 msgid "Executable code"
6310 #: build/C/man2/perf_event_open.2:2082
6316 #: build/C/man2/perf_event_open.2:2087
6318 "Memory hierarchy level hit or miss, a bitwise combination of the following, "
6319 "shifted left by B<PERF_MEM_LVL_SHIFT>:"
6323 #: build/C/man2/perf_event_open.2:2090
6325 msgid "B<PERF_MEM_LVL_NA>"
6326 msgstr "B<PERF_MEM_LVL_NA>"
6329 #: build/C/man2/perf_event_open.2:2093
6331 msgid "B<PERF_MEM_LVL_HIT>"
6332 msgstr "B<PERF_MEM_LVL_HIT>"
6335 #: build/C/man2/perf_event_open.2:2096 build/C/man2/perf_event_open.2:2187
6340 #: build/C/man2/perf_event_open.2:2096
6342 msgid "B<PERF_MEM_LVL_MISS>"
6343 msgstr "B<PERF_MEM_LVL_MISS>"
6346 #: build/C/man2/perf_event_open.2:2099 build/C/man2/perf_event_open.2:2190
6351 #: build/C/man2/perf_event_open.2:2099
6353 msgid "B<PERF_MEM_LVL_L1>"
6354 msgstr "B<PERF_MEM_LVL_L1>"
6357 #: build/C/man2/perf_event_open.2:2102
6358 msgid "Level 1 cache"
6362 #: build/C/man2/perf_event_open.2:2102
6364 msgid "B<PERF_MEM_LVL_LFB>"
6365 msgstr "B<PERF_MEM_LVL_LFB>"
6368 #: build/C/man2/perf_event_open.2:2105
6369 msgid "Line fill buffer"
6373 #: build/C/man2/perf_event_open.2:2105
6375 msgid "B<PERF_MEM_LVL_L2>"
6376 msgstr "B<PERF_MEM_LVL_L2>"
6379 #: build/C/man2/perf_event_open.2:2108
6380 msgid "Level 2 cache"
6384 #: build/C/man2/perf_event_open.2:2108
6386 msgid "B<PERF_MEM_LVL_L3>"
6387 msgstr "B<PERF_MEM_LVL_L3>"
6390 #: build/C/man2/perf_event_open.2:2111
6391 msgid "Level 3 cache"
6395 #: build/C/man2/perf_event_open.2:2111
6397 msgid "B<PERF_MEM_LVL_LOC_RAM>"
6398 msgstr "B<PERF_MEM_LVL_LOC_RAM>"
6401 #: build/C/man2/perf_event_open.2:2114
6406 #: build/C/man2/perf_event_open.2:2114
6408 msgid "B<PERF_MEM_LVL_REM_RAM1>"
6409 msgstr "B<PERF_MEM_LVL_REM_RAM1>"
6412 #: build/C/man2/perf_event_open.2:2117
6413 msgid "Remote DRAM 1 hop"
6417 #: build/C/man2/perf_event_open.2:2117
6419 msgid "B<PERF_MEM_LVL_REM_RAM2>"
6420 msgstr "B<PERF_MEM_LVL_REM_RAM2>"
6423 #: build/C/man2/perf_event_open.2:2120
6424 msgid "Remote DRAM 2 hops"
6428 #: build/C/man2/perf_event_open.2:2120
6430 msgid "B<PERF_MEM_LVL_REM_CCE1>"
6431 msgstr "B<PERF_MEM_LVL_REM_CCE1>"
6434 #: build/C/man2/perf_event_open.2:2123
6435 msgid "Remote cache 1 hop"
6439 #: build/C/man2/perf_event_open.2:2123
6441 msgid "B<PERF_MEM_LVL_REM_CCE2>"
6442 msgstr "B<PERF_MEM_LVL_REM_CCE2>"
6445 #: build/C/man2/perf_event_open.2:2126
6446 msgid "Remote cache 2 hops"
6450 #: build/C/man2/perf_event_open.2:2126
6452 msgid "B<PERF_MEM_LVL_IO>"
6453 msgstr "B<PERF_MEM_LVL_IO>"
6456 #: build/C/man2/perf_event_open.2:2129
6461 #: build/C/man2/perf_event_open.2:2129
6463 msgid "B<PERF_MEM_LVL_UNC>"
6464 msgstr "B<PERF_MEM_LVL_UNC>"
6467 #: build/C/man2/perf_event_open.2:2132
6468 msgid "Uncached memory"
6472 #: build/C/man2/perf_event_open.2:2134
6474 msgid "I<mem_snoop>"
6475 msgstr "I<mem_snoop>"
6478 #: build/C/man2/perf_event_open.2:2138
6480 "Snoop mode, a bitwise combination of the following, shifted left by "
6481 "B<PERF_MEM_SNOOP_SHIFT>:"
6485 #: build/C/man2/perf_event_open.2:2141
6487 msgid "B<PERF_MEM_SNOOP_NA>"
6488 msgstr "B<PERF_MEM_SNOOP_NA>"
6491 #: build/C/man2/perf_event_open.2:2144
6493 msgid "B<PERF_MEM_SNOOP_NONE>"
6494 msgstr "B<PERF_MEM_SNOOP_NONE>"
6497 #: build/C/man2/perf_event_open.2:2147
6502 #: build/C/man2/perf_event_open.2:2147
6504 msgid "B<PERF_MEM_SNOOP_HIT>"
6505 msgstr "B<PERF_MEM_SNOOP_HIT>"
6508 #: build/C/man2/perf_event_open.2:2150
6513 #: build/C/man2/perf_event_open.2:2150
6515 msgid "B<PERF_MEM_SNOOP_MISS>"
6516 msgstr "B<PERF_MEM_SNOOP_MISS>"
6519 #: build/C/man2/perf_event_open.2:2153
6524 #: build/C/man2/perf_event_open.2:2153
6526 msgid "B<PERF_MEM_SNOOP_HITM>"
6527 msgstr "B<PERF_MEM_SNOOP_HITM>"
6530 #: build/C/man2/perf_event_open.2:2156
6531 msgid "Snoop hit modified"
6535 #: build/C/man2/perf_event_open.2:2158
6538 msgstr "I<mem_lock>"
6541 #: build/C/man2/perf_event_open.2:2162
6543 "Lock instruction, a bitwise combination of the following, shifted left by "
6544 "B<PERF_MEM_LOCK_SHIFT>:"
6548 #: build/C/man2/perf_event_open.2:2165
6550 msgid "B<PERF_MEM_LOCK_NA>"
6551 msgstr "B<PERF_MEM_LOCK_NA>"
6554 #: build/C/man2/perf_event_open.2:2168
6556 msgid "B<PERF_MEM_LOCK_LOCKED>"
6557 msgstr "B<PERF_MEM_LOCK_LOCKED>"
6560 #: build/C/man2/perf_event_open.2:2171
6561 msgid "Locked transaction"
6565 #: build/C/man2/perf_event_open.2:2173
6568 msgstr "I<mem_dtlb>"
6571 #: build/C/man2/perf_event_open.2:2178
6573 "TLB access hit or miss, a bitwise combination of the following, shifted left "
6574 "by B<PERF_MEM_TLB_SHIFT>:"
6578 #: build/C/man2/perf_event_open.2:2181
6580 msgid "B<PERF_MEM_TLB_NA>"
6581 msgstr "B<PERF_MEM_TLB_NA>"
6584 #: build/C/man2/perf_event_open.2:2184
6586 msgid "B<PERF_MEM_TLB_HIT>"
6587 msgstr "B<PERF_MEM_TLB_HIT>"
6590 #: build/C/man2/perf_event_open.2:2187
6592 msgid "B<PERF_MEM_TLB_MISS>"
6593 msgstr "B<PERF_MEM_TLB_MISS>"
6596 #: build/C/man2/perf_event_open.2:2190
6598 msgid "B<PERF_MEM_TLB_L1>"
6599 msgstr "B<PERF_MEM_TLB_L1>"
6602 #: build/C/man2/perf_event_open.2:2193
6607 #: build/C/man2/perf_event_open.2:2193
6609 msgid "B<PERF_MEM_TLB_L2>"
6610 msgstr "B<PERF_MEM_TLB_L2>"
6613 #: build/C/man2/perf_event_open.2:2196
6618 #: build/C/man2/perf_event_open.2:2196
6620 msgid "B<PERF_MEM_TLB_WK>"
6621 msgstr "B<PERF_MEM_TLB_WK>"
6624 #: build/C/man2/perf_event_open.2:2199
6625 msgid "Hardware walker"
6629 #: build/C/man2/perf_event_open.2:2199
6631 msgid "B<PERF_MEM_TLB_OS>"
6632 msgstr "B<PERF_MEM_TLB_OS>"
6635 #: build/C/man2/perf_event_open.2:2202
6636 msgid "OS fault handler"
6640 #: build/C/man2/perf_event_open.2:2205
6642 msgid "I<transaction>"
6643 msgstr "I<transaction>"
6646 #: build/C/man2/perf_event_open.2:2211
6648 "If the B<PERF_SAMPLE_TRANSACTION> flag is set, then a 64-bit field is "
6649 "recorded describing the sources of any transactional memory aborts."
6653 #: build/C/man2/perf_event_open.2:2213
6654 msgid "The field is a bitwise combination of the following values:"
6658 #: build/C/man2/perf_event_open.2:2214
6660 msgid "B<PERF_TXN_ELISION>"
6661 msgstr "B<PERF_TXN_ELISION>"
6664 #: build/C/man2/perf_event_open.2:2217
6665 msgid "Abort from an elision type transaction (Intel-CPU-specific)."
6669 #: build/C/man2/perf_event_open.2:2217
6671 msgid "B<PERF_TXN_TRANSACTION>"
6672 msgstr "B<PERF_TXN_TRANSACTION>"
6675 #: build/C/man2/perf_event_open.2:2220
6676 msgid "Abort from a generic transaction."
6680 #: build/C/man2/perf_event_open.2:2220
6682 msgid "B<PERF_TXN_SYNC>"
6683 msgstr "B<PERF_TXN_SYNC>"
6686 #: build/C/man2/perf_event_open.2:2223
6687 msgid "Synchronous abort (related to the reported instruction)."
6691 #: build/C/man2/perf_event_open.2:2223
6693 msgid "B<PERF_TXN_ASYNC>"
6694 msgstr "B<PERF_TXN_ASYNC>"
6697 #: build/C/man2/perf_event_open.2:2226
6698 msgid "Asynchronous abort (not related to the reported instruction)."
6702 #: build/C/man2/perf_event_open.2:2226
6704 msgid "B<PERF_TXN_RETRY>"
6705 msgstr "B<PERF_TXN_RETRY>"
6708 #: build/C/man2/perf_event_open.2:2229
6709 msgid "Retryable abort (retrying the transaction may have succeeded)."
6713 #: build/C/man2/perf_event_open.2:2229
6715 msgid "B<PERF_TXN_CONFLICT>"
6716 msgstr "B<PERF_TXN_CONFLICT>"
6719 #: build/C/man2/perf_event_open.2:2232
6720 msgid "Abort due to memory conflicts with other threads."
6724 #: build/C/man2/perf_event_open.2:2232
6726 msgid "B<PERF_TXN_CAPACITY_WRITE>"
6730 #: build/C/man2/perf_event_open.2:2235
6731 msgid "Abort due to write capacity overflow."
6735 #: build/C/man2/perf_event_open.2:2235
6737 msgid "B<PERF_TXN_CAPACITY_READ>"
6741 #: build/C/man2/perf_event_open.2:2238
6742 msgid "Abort due to read capacity overflow."
6746 #: build/C/man2/perf_event_open.2:2245
6748 "In addition, a user-specified abort code can be obtained from the high 32 "
6749 "bits of the field by shifting right by B<PERF_TXN_ABORT_SHIFT> and masking "
6750 "with B<PERF_TXN_ABORT_MASK>."
6754 #: build/C/man2/perf_event_open.2:2246
6756 msgid "B<PERF_RECORD_MMAP2>"
6757 msgstr "B<PERF_RECORD_MMAP2>"
6760 #: build/C/man2/perf_event_open.2:2255
6762 "This record includes extended information on B<mmap>(2) calls returning "
6763 "executable mappings. The format is similar to that of the "
6764 "B<PERF_RECORD_MMAP> record, but includes extra values that allow uniquely "
6765 "identifying shared mappings."
6769 #: build/C/man2/perf_event_open.2:2274
6773 " struct perf_event_header header;\n"
6782 " u64 ino_generation;\n"
6785 " char filename[];\n"
6786 " struct sample_id sample_id;\n"
6790 " struct perf_event_header header;\n"
6799 " u64 ino_generation;\n"
6802 " char filename[];\n"
6803 " struct sample_id sample_id;\n"
6807 #: build/C/man2/perf_event_open.2:2285
6808 msgid "is the address of the allocated memory."
6812 #: build/C/man2/perf_event_open.2:2285
6818 #: build/C/man2/perf_event_open.2:2288
6819 msgid "is the length of the allocated memory."
6823 #: build/C/man2/perf_event_open.2:2288
6829 #: build/C/man2/perf_event_open.2:2291
6830 msgid "is the page offset of the allocated memory."
6834 #: build/C/man2/perf_event_open.2:2291
6840 #: build/C/man2/perf_event_open.2:2294
6841 msgid "is the major ID of the underlying device."
6845 #: build/C/man2/perf_event_open.2:2294
6851 #: build/C/man2/perf_event_open.2:2297
6852 msgid "is the minor ID of the underlying device."
6856 #: build/C/man2/perf_event_open.2:2297
6862 #: build/C/man2/perf_event_open.2:2300
6863 msgid "is the inode number."
6867 #: build/C/man2/perf_event_open.2:2300
6869 msgid "I<ino_generation>"
6870 msgstr "I<ino_generation>"
6873 #: build/C/man2/perf_event_open.2:2303
6874 msgid "is the inode generation."
6878 #: build/C/man2/perf_event_open.2:2303
6884 #: build/C/man2/perf_event_open.2:2306
6885 msgid "is the protection information."
6889 #: build/C/man2/perf_event_open.2:2306
6895 #: build/C/man2/perf_event_open.2:2309
6896 msgid "is the flags information."
6900 #: build/C/man2/perf_event_open.2:2309
6903 msgstr "I<filename>"
6906 #: build/C/man2/perf_event_open.2:2312
6907 msgid "is a string describing the backing of the allocated memory."
6911 #: build/C/man2/perf_event_open.2:2314
6913 msgid "Overflow handling"
6917 #: build/C/man2/perf_event_open.2:2327
6919 "Events can be set to notify when a threshold is crossed, indicating an "
6920 "overflow. Overflow conditions can be captured by monitoring the event file "
6921 "descriptor with B<poll>(2), B<select>(2), or B<epoll>(2). Alternately, a "
6922 "SIGIO signal handler can be created and the event configured with "
6923 "B<fcntl>(2) to generate SIGIO signals."
6927 #: build/C/man2/perf_event_open.2:2331
6929 "Overflows are generated only by sampling events (I<sample_period> must have "
6934 #: build/C/man2/perf_event_open.2:2333
6935 msgid "There are two ways to generate overflow notifications."
6939 #: build/C/man2/perf_event_open.2:2343
6941 "The first is to set a I<wakeup_events> or I<wakeup_watermark> value that "
6942 "will trigger if a certain number of samples or bytes have been written to "
6943 "the mmap ring buffer. In this case B<POLL_IN> is indicated."
6947 #: build/C/man2/perf_event_open.2:2355
6949 "The other way is by use of the B<PERF_EVENT_IOC_REFRESH> ioctl. This ioctl "
6950 "adds to a counter that decrements each time the event overflows. When "
6951 "nonzero, B<POLL_IN> is indicated, but once the counter reaches 0 B<POLL_HUP> "
6952 "is indicated and the underlying event is disabled."
6955 #. commit 179033b3e064d2cd3f5f9945e76b0a0f0fbf4883
6957 #: build/C/man2/perf_event_open.2:2361
6959 "Starting with Linux 3.18, B<POLL_HUP> is indicated if the event being "
6960 "monitored is attached to a different process and that process exits."
6964 #: build/C/man2/perf_event_open.2:2361
6966 msgid "rdpmc instruction"
6969 #. commit c7206205d00ab375839bd6c7ddb247d600693c09
6971 #: build/C/man2/perf_event_open.2:2369
6973 "Starting with Linux 3.4 on x86, you can use the I<rdpmc> instruction to get "
6974 "low-latency reads without having to enter the kernel. Note that using "
6975 "I<rdpmc> is not necessarily faster than other methods for reading event "
6980 #: build/C/man2/perf_event_open.2:2374
6982 "Support for this can be detected with the I<cap_usr_rdpmc> field in the mmap "
6983 "page; documentation on how to calculate event values can be found in that "
6988 #: build/C/man2/perf_event_open.2:2374
6990 msgid "perf_event ioctl calls"
6994 #: build/C/man2/perf_event_open.2:2379
6995 msgid "Various ioctls act on B<perf_event_open>() file descriptors:"
6999 #: build/C/man2/perf_event_open.2:2379
7001 msgid "B<PERF_EVENT_IOC_ENABLE>"
7002 msgstr "B<PERF_EVENT_IOC_ENABLE>"
7005 #: build/C/man2/perf_event_open.2:2383
7007 "This enables the individual event or event group specified by the file "
7008 "descriptor argument."
7012 #: build/C/man2/perf_event_open.2:2389
7014 "If the B<PERF_IOC_FLAG_GROUP> bit is set in the ioctl argument, then all "
7015 "events in a group are enabled, even if the event specified is not the group "
7016 "leader (but see BUGS)."
7020 #: build/C/man2/perf_event_open.2:2389
7022 msgid "B<PERF_EVENT_IOC_DISABLE>"
7023 msgstr "B<PERF_EVENT_IOC_DISABLE>"
7026 #: build/C/man2/perf_event_open.2:2393
7028 "This disables the individual counter or event group specified by the file "
7029 "descriptor argument."
7033 #: build/C/man2/perf_event_open.2:2400
7035 "Enabling or disabling the leader of a group enables or disables the entire "
7036 "group; that is, while the group leader is disabled, none of the counters in "
7037 "the group will count. Enabling or disabling a member of a group other than "
7038 "the leader affects only that counter; disabling a non-leader stops that "
7039 "counter from counting but doesn't affect any other counter."
7043 #: build/C/man2/perf_event_open.2:2406
7045 "If the B<PERF_IOC_FLAG_GROUP> bit is set in the ioctl argument, then all "
7046 "events in a group are disabled, even if the event specified is not the group "
7047 "leader (but see BUGS)."
7051 #: build/C/man2/perf_event_open.2:2406
7053 msgid "B<PERF_EVENT_IOC_REFRESH>"
7054 msgstr "B<PERF_EVENT_IOC_REFRESH>"
7057 #: build/C/man2/perf_event_open.2:2420
7059 "Non-inherited overflow counters can use this to enable a counter for a "
7060 "number of overflows specified by the argument, after which it is disabled. "
7061 "Subsequent calls of this ioctl add the argument value to the current count. "
7062 "An overflow notification with B<POLL_IN> set will happen on each overflow "
7063 "until the count reaches 0; when that happens a notification with B<POLL_HUP> "
7064 "set is sent and the event is disabled. Using an argument of 0 is considered "
7065 "undefined behavior."
7069 #: build/C/man2/perf_event_open.2:2420
7071 msgid "B<PERF_EVENT_IOC_RESET>"
7072 msgstr "B<PERF_EVENT_IOC_RESET>"
7075 #: build/C/man2/perf_event_open.2:2430
7077 "Reset the event count specified by the file descriptor argument to zero. "
7078 "This resets only the counts; there is no way to reset the multiplexing "
7079 "I<time_enabled> or I<time_running> values."
7083 #: build/C/man2/perf_event_open.2:2436
7085 "If the B<PERF_IOC_FLAG_GROUP> bit is set in the ioctl argument, then all "
7086 "events in a group are reset, even if the event specified is not the group "
7087 "leader (but see BUGS)."
7091 #: build/C/man2/perf_event_open.2:2436
7093 msgid "B<PERF_EVENT_IOC_PERIOD>"
7094 msgstr "B<PERF_EVENT_IOC_PERIOD>"
7097 #: build/C/man2/perf_event_open.2:2439
7098 msgid "This updates the overflow period for the event."
7101 #. commit 3581fe0ef37ce12ac7a4f74831168352ae848edc
7102 #. commit bad7192b842c83e580747ca57104dd51fe08c223
7104 #: build/C/man2/perf_event_open.2:2447
7106 "Since Linux 3.7 (on ARM) and Linux 3.14 (all other architectures), the new "
7107 "period takes effect immediately. On older kernels, the new period did not "
7108 "take effect until after the next overflow."
7112 #: build/C/man2/perf_event_open.2:2450
7114 "The argument is a pointer to a 64-bit value containing the desired new "
7118 #. commit ad0cf3478de8677f720ee06393b3147819568d6a
7120 #: build/C/man2/perf_event_open.2:2455
7122 "Prior to Linux 2.6.36 this ioctl always failed due to a bug in the kernel."
7126 #: build/C/man2/perf_event_open.2:2456
7128 msgid "B<PERF_EVENT_IOC_SET_OUTPUT>"
7132 #: build/C/man2/perf_event_open.2:2461
7134 "This tells the kernel to report event notifications to the specified file "
7135 "descriptor rather than the default one. The file descriptors must all be on "
7140 #: build/C/man2/perf_event_open.2:2464
7142 "The argument specifies the desired file descriptor, or -1 if output should "
7147 #: build/C/man2/perf_event_open.2:2464
7149 msgid "B<PERF_EVENT_IOC_SET_FILTER> (since Linux 2.6.33)"
7150 msgstr "B<PERF_EVENT_IOC_SET_FILTER> (Linux 2.6.33 以降)"
7152 #. commit 6fb2915df7f0747d9044da9dbff5b46dc2e20830
7154 #: build/C/man2/perf_event_open.2:2468
7155 msgid "This adds an ftrace filter to this event."
7159 #: build/C/man2/perf_event_open.2:2470
7160 msgid "The argument is a pointer to the desired ftrace filter."
7164 #: build/C/man2/perf_event_open.2:2470
7166 msgid "B<PERF_EVENT_IOC_ID> (since Linux 3.12)"
7167 msgstr "B<PERF_EVENT_IOC_ID> (Linux 3.12 以降)"
7169 #. commit cf4957f17f2a89984915ea808876d9c82225b862
7171 #: build/C/man2/perf_event_open.2:2474
7172 msgid "This returns the event ID value for the given event file descriptor."
7176 #: build/C/man2/perf_event_open.2:2477
7178 "The argument is a pointer to a 64-bit unsigned integer to hold the result."
7182 #: build/C/man2/perf_event_open.2:2477
7188 #: build/C/man2/perf_event_open.2:2490
7190 "A process can enable or disable all the event groups that are attached to it "
7191 "using the B<prctl>(2) B<PR_TASK_PERF_EVENTS_ENABLE> and "
7192 "B<PR_TASK_PERF_EVENTS_DISABLE> operations. This applies to all counters on "
7193 "the calling process, whether created by this process or by another, and does "
7194 "not affect any counters that this process has created on other processes. "
7195 "It enables or disables only the group leaders, not any other members in the "
7200 #: build/C/man2/perf_event_open.2:2490
7202 msgid "perf_event related configuration files"
7206 #: build/C/man2/perf_event_open.2:2493
7207 msgid "Files in I</proc/sys/kernel/>"
7211 #: build/C/man2/perf_event_open.2:2494
7213 msgid "I</proc/sys/kernel/perf_event_paranoid>"
7217 #: build/C/man2/perf_event_open.2:2500
7219 "The I<perf_event_paranoid> file can be set to restrict access to the "
7220 "performance counters."
7224 #: build/C/man2/perf_event_open.2:2501
7230 #: build/C/man2/perf_event_open.2:2503
7231 msgid "allow only user-space measurements."
7235 #: build/C/man2/perf_event_open.2:2503
7241 #: build/C/man2/perf_event_open.2:2505
7242 msgid "allow both kernel and user measurements (default)."
7246 #: build/C/man2/perf_event_open.2:2505
7252 #: build/C/man2/perf_event_open.2:2507
7253 msgid "allow access to CPU-specific data but not raw tracepoint samples."
7257 #: build/C/man2/perf_event_open.2:2507
7263 #: build/C/man2/perf_event_open.2:2509
7264 msgid "no restrictions."
7268 #: build/C/man2/perf_event_open.2:2515
7270 "The existence of the I<perf_event_paranoid> file is the official method for "
7271 "determining if a kernel supports B<perf_event_open>()."
7275 #: build/C/man2/perf_event_open.2:2515
7277 msgid "I</proc/sys/kernel/perf_event_max_sample_rate>"
7281 #: build/C/man2/perf_event_open.2:2524
7283 "This sets the maximum sample rate. Setting this too high can allow users to "
7284 "sample at a rate that impacts overall machine performance and potentially "
7285 "lock up the machine. The default value is 100000 (samples per second)."
7289 #: build/C/man2/perf_event_open.2:2524
7291 msgid "I</proc/sys/kernel/perf_event_mlock_kb>"
7295 #: build/C/man2/perf_event_open.2:2530
7297 "Maximum number of pages an unprivileged user can B<mlock>(2). The default "
7302 #: build/C/man2/perf_event_open.2:2534
7303 msgid "Files in I</sys/bus/event_source/devices/>"
7307 #: build/C/man2/perf_event_open.2:2540
7309 "Since Linux 2.6.34, the kernel supports having multiple PMUs available for "
7310 "monitoring. Information on how to program these PMUs can be found under I</"
7311 "sys/bus/event_source/devices/>. Each subdirectory corresponds to a "
7316 #: build/C/man2/perf_event_open.2:2540
7318 msgid "I</sys/bus/event_source/devices/*/type> (since Linux 2.6.38)"
7319 msgstr "I</sys/bus/event_source/devices/*/type> (Linux 2.6.38 以降)"
7321 #. commit abe43400579d5de0078c2d3a760e6598e183f871
7323 #: build/C/man2/perf_event_open.2:2548
7325 "This contains an integer that can be used in the I<type> field of "
7326 "I<perf_event_attr> to indicate that you wish to use this PMU."
7330 #: build/C/man2/perf_event_open.2:2548
7332 msgid "I</sys/bus/event_source/devices/*/rdpmc> (since Linux 3.4)"
7333 msgstr "I</sys/bus/event_source/devices/*/rdpmc> (Linux 3.4 以降)"
7335 #. commit 0c9d42ed4cee2aa1dfc3a260b741baae8615744f
7337 #: build/C/man2/perf_event_open.2:2554
7339 "If this file is 1, then direct user-space access to the performance counter "
7340 "registers is allowed via the rdpmc instruction. This can be disabled by "
7341 "echoing 0 to the file."
7345 #: build/C/man2/perf_event_open.2:2554
7347 msgid "I</sys/bus/event_source/devices/*/format/> (since Linux 3.4)"
7348 msgstr "I</sys/bus/event_source/devices/*/format/> (Linux 3.4 以降)"
7350 #. commit 641cc938815dfd09f8fa1ec72deb814f0938ac33
7352 #: build/C/man2/perf_event_open.2:2563
7354 "This subdirectory contains information on the architecture-specific "
7355 "subfields available for programming the various I<config> fields in the "
7356 "I<perf_event_attr> struct."
7360 #: build/C/man2/perf_event_open.2:2574
7362 "The content of each file is the name of the config field, followed by a "
7363 "colon, followed by a series of integer bit ranges separated by commas. For "
7364 "example, the file I<event> may contain the value I<config1:1,6-10,44> which "
7365 "indicates that event is an attribute that occupies bits 1,6-10, and 44 of "
7366 "I<perf_event_attr::config1>."
7370 #: build/C/man2/perf_event_open.2:2574
7372 msgid "I</sys/bus/event_source/devices/*/events/> (since Linux 3.4)"
7373 msgstr "I</sys/bus/event_source/devices/*/events/> (Linux 3.4 以降)"
7375 #. commit 641cc938815dfd09f8fa1ec72deb814f0938ac33
7377 #: build/C/man2/perf_event_open.2:2584
7379 "This subdirectory contains files with predefined events. The contents are "
7380 "strings describing the event settings expressed in terms of the fields found "
7381 "in the previously mentioned I<./format/> directory. These are not "
7382 "necessarily complete lists of all events supported by a PMU, but usually a "
7383 "subset of events deemed useful or interesting."
7387 #: build/C/man2/perf_event_open.2:2592
7389 "The content of each file is a list of attribute names separated by commas. "
7390 "Each entry has an optional value (either hex or decimal). If no value is "
7391 "specified, then it is assumed to be a single-bit field with a value of 1. "
7392 "An example entry may look like this: I<event=0x2,inv,ldlat=3>."
7396 #: build/C/man2/perf_event_open.2:2592
7398 msgid "I</sys/bus/event_source/devices/*/uevent>"
7399 msgstr "I</sys/bus/event_source/devices/*/uevent>"
7402 #: build/C/man2/perf_event_open.2:2596
7404 "This file is the standard kernel device interface for injecting hotplug "
7409 #: build/C/man2/perf_event_open.2:2596
7411 msgid "I</sys/bus/event_source/devices/*/cpumask> (since Linux 3.7)"
7412 msgstr "I</sys/bus/event_source/devices/*/cpumask> (Linux 3.7 以降)"
7414 #. commit 314d9f63f385096580e9e2a06eaa0745d92fe4ac
7416 #: build/C/man2/perf_event_open.2:2606
7418 "The I<cpumask> file contains a comma-separated list of integers that "
7419 "indicate a representative CPU number for each socket (package) on the "
7420 "motherboard. This is needed when setting up uncore or northbridge events, "
7421 "as those PMUs present socket-wide events."
7425 #: build/C/man2/perf_event_open.2:2613
7427 "B<perf_event_open>() returns the new file descriptor, or -1 if an error "
7428 "occurred (in which case, I<errno> is set appropriately)."
7432 #: build/C/man2/perf_event_open.2:2618
7434 "The errors returned by B<perf_event_open>() can be inconsistent, and may "
7435 "vary across processor architectures and performance monitoring units."
7439 #: build/C/man2/perf_event_open.2:2618
7445 #: build/C/man2/perf_event_open.2:2635
7447 "Returned if the I<perf_event_attr> I<size> value is too small (smaller than "
7448 "B<PERF_ATTR_SIZE_VER0>), too big (larger than the page size), or larger than "
7449 "the kernel supports and the extra bytes are not zero. When B<E2BIG> is "
7450 "returned, the I<perf_event_attr> I<size> field is overwritten by the kernel "
7451 "to be the size of the structure it was expecting."
7455 #: build/C/man2/perf_event_open.2:2649
7457 "Returned when the requested event requires B<CAP_SYS_ADMIN> permissions (or "
7458 "a more permissive perf_event paranoid setting). Some common cases where an "
7459 "unprivileged process may encounter this error: attaching to a process owned "
7460 "by a different user; monitoring all processes on a given CPU (i.e., "
7461 "specifying the I<pid> argument as -1); and not setting I<exclude_kernel> "
7462 "when the paranoid setting requires it."
7466 #: build/C/man2/perf_event_open.2:2659
7468 "Returned if the I<group_fd> file descriptor is not valid, or, if "
7469 "B<PERF_FLAG_PID_CGROUP> is set, the cgroup file descriptor in I<pid> is not "
7474 #: build/C/man2/perf_event_open.2:2664
7475 msgid "Returned if the I<attr> pointer points at an invalid memory address."
7479 #: build/C/man2/perf_event_open.2:2690
7481 "Returned if the specified event is invalid. There are many possible reasons "
7482 "for this. A not-exhaustive list: I<sample_freq> is higher than the maximum "
7483 "setting; the I<cpu> to monitor does not exist; I<read_format> is out of "
7484 "range; I<sample_type> is out of range; the I<flags> value is out of range; "
7485 "I<exclusive> or I<pinned> set and the event is not a group leader; the event "
7486 "I<config> values are out of range or set reserved bits; the generic event "
7487 "selected is not supported; or there is not enough room to add the selected "
7492 #: build/C/man2/perf_event_open.2:2690
7498 #: build/C/man2/perf_event_open.2:2696
7500 "Each opened event uses one file descriptor. If a large number of events are "
7501 "opened the per-user file descriptor limit (often 1024) will be hit and no "
7502 "more events can be created."
7506 #: build/C/man2/perf_event_open.2:2700
7508 "Returned when the event involves a feature not supported by the current CPU."
7512 #: build/C/man2/perf_event_open.2:2700 build/C/man2/quotactl.2:440
7518 #: build/C/man2/perf_event_open.2:2707
7520 "Returned if the I<type> setting is not valid. This error is also returned "
7521 "for some unsupported generic events."
7525 #: build/C/man2/perf_event_open.2:2707
7530 #. commit aa2bc1ade59003a379ffc485d6da2d92ea3370a6
7532 #: build/C/man2/perf_event_open.2:2718
7534 "Prior to Linux 3.3, if there was not enough room for the event, B<ENOSPC> "
7535 "was returned. In Linux 3.3, this was changed to B<EINVAL>. B<ENOSPC> is "
7536 "still returned if you try to add more breakpoint events than supported by "
7541 #: build/C/man2/perf_event_open.2:2725
7543 "Returned if B<PERF_SAMPLE_STACK_USER> is set in I<sample_type> and it is not "
7544 "supported by hardware."
7548 #: build/C/man2/perf_event_open.2:2732
7550 "Returned if an event requiring a specific hardware feature is requested but "
7551 "there is no hardware support. This includes requesting low-skid events if "
7552 "not supported, branch tracing if it is not available, sampling if no PMU "
7553 "interrupt is available, and branch stacks for software events."
7557 #: build/C/man2/perf_event_open.2:2737
7559 "Returned on many (but not all) architectures when an unsupported "
7560 "I<exclude_hv>, I<exclude_idle>, I<exclude_user>, or I<exclude_kernel> "
7561 "setting is specified."
7564 #. commit a4e95fc2cbb31d70a65beffeaf8773f881328c34
7566 #: build/C/man2/perf_event_open.2:2746
7568 "It can also happen, as with B<EACCES>, when the requested event requires "
7569 "B<CAP_SYS_ADMIN> permissions (or a more permissive perf_event paranoid "
7570 "setting). This includes setting a breakpoint on a kernel address, and "
7571 "(since Linux 3.13) setting a kernel function-trace tracepoint."
7575 #: build/C/man2/perf_event_open.2:2749
7576 msgid "Returned if attempting to attach to a process that does not exist."
7580 #: build/C/man2/perf_event_open.2:2749
7585 #. commit 0793a61d4df8daeac6492dbf8d2f3e5713caae5e
7586 #. commit cdd6c482c9ff9c55475ee7392ec8f672eddb7be6
7588 #: build/C/man2/perf_event_open.2:2756
7590 "B<perf_event_open>() was introduced in Linux 2.6.31 but was called "
7591 "B<perf_counter_open>(). It was renamed in Linux 2.6.32."
7595 #: build/C/man2/perf_event_open.2:2761
7597 "This B<perf_event_open>() system call Linux- specific and should not be "
7598 "used in programs intended to be portable."
7600 "B<perf_event_open>() システムコールは Linux 固有であり、 移植を意図したプログ"
7604 #: build/C/man2/perf_event_open.2:2765
7606 "Glibc does not provide a wrapper for this system call; call it using "
7607 "B<syscall>(2). See the example below."
7609 "glibc はこのシステムコールに対するラッパー関数を提供していない。 "
7610 "B<syscall>(2) を使って呼び出すこと。 以下の例を参照。"
7613 #: build/C/man2/perf_event_open.2:2771
7615 "The official way of knowing if B<perf_event_open>() support is enabled is "
7616 "checking for the existence of the file I</proc/sys/kernel/"
7617 "perf_event_paranoid>."
7621 #: build/C/man2/perf_event_open.2:2771 build/C/man2/pivot_root.2:134
7622 #: build/C/man2/ptrace.2:2006
7627 #. commit ba0a6c9f6fceed11c6a99e8326f0477fe383e6b5
7629 #: build/C/man2/perf_event_open.2:2779
7631 "The B<F_SETOWN_EX> option to B<fcntl>(2) is needed to properly get overflow "
7632 "signals in threads. This was introduced in Linux 2.6.32."
7635 #. commit b690081d4d3f6a23541493f1682835c3cd5c54a1
7637 #: build/C/man2/perf_event_open.2:2789
7639 "Prior to Linux 2.6.33 (at least for x86), the kernel did not check if events "
7640 "could be scheduled together until read time. The same happens on all known "
7641 "kernels if the NMI watchdog is enabled. This means to see if a given set of "
7642 "events works you have to B<perf_event_open>(), start, then read before you "
7643 "know for sure you can get valid measurements."
7646 #. FIXME: cannot find a kernel commit for this one
7648 #: build/C/man2/perf_event_open.2:2794
7650 "Prior to Linux 2.6.34, event constraints were not enforced by the kernel. "
7651 "In that case, some events would silently return \"0\" if the kernel "
7652 "scheduled them in an improper counter slot."
7655 #. commit 45e16a6834b6af098702e5ea6c9a40de42ff77d8
7657 #: build/C/man2/perf_event_open.2:2798
7659 "Prior to Linux 2.6.34, there was a bug when multiplexing where the wrong "
7660 "results could be returned."
7663 #. commit 38b435b16c36b0d863efcf3f07b34a6fac9873fd
7665 #: build/C/man2/perf_event_open.2:2802
7667 "Kernels from Linux 2.6.35 to Linux 2.6.39 can quickly crash the kernel if "
7668 "\"inherit\" is enabled and many threads are started."
7671 #. commit 050735b08ca8a016bbace4445fa025b88fee770b
7673 #: build/C/man2/perf_event_open.2:2807
7675 "Prior to Linux 2.6.35, B<PERF_FORMAT_GROUP> did not work with attached "
7680 #: build/C/man2/perf_event_open.2:2812
7682 "In older Linux 2.6 versions, refreshing an event group leader refreshed all "
7683 "siblings, and refreshing with a parameter of 0 enabled infinite refresh. "
7684 "This behavior is unsupported and should not be relied on."
7687 #. commit 4ec8363dfc1451f8c8f86825731fe712798ada02
7689 #: build/C/man2/perf_event_open.2:2819
7691 "There is a bug in the kernel code between Linux 2.6.36 and Linux 3.0 that "
7692 "ignores the \"watermark\" field and acts as if a wakeup_event was chosen if "
7693 "the union has a nonzero value in it."
7696 #. commit 724b6daa13e100067c30cfc4d1ad06629609dc4e
7698 #: build/C/man2/perf_event_open.2:2826
7700 "From Linux 2.6.31 to Linux 3.4, the B<PERF_IOC_FLAG_GROUP> ioctl argument "
7701 "was broken and would repeatedly operate on the event specified rather than "
7702 "iterating across all sibling events in a group."
7705 #. commit fa7315871046b9a4c48627905691dbde57e51033
7707 #: build/C/man2/perf_event_open.2:2838
7709 "From Linux 3.4 to Linux 3.11, the mmap I<cap_usr_rdpmc> and I<cap_usr_time> "
7710 "bits mapped to the same location. Code should migrate to the new "
7711 "I<cap_user_rdpmc> and I<cap_user_time> fields instead."
7714 #. commit f287d332ce835f77a4f5077d2c0ef1e3f9ea42d2
7716 #: build/C/man2/perf_event_open.2:2844
7718 "Always double-check your results! Various generalized events have had wrong "
7719 "values. For example, retired branches measured the wrong thing on AMD "
7720 "machines until Linux 2.6.35."
7724 #: build/C/man2/perf_event_open.2:2844 build/C/man2/process_vm_readv.2:311
7725 #: build/C/man2/splice.2:237 build/C/man2/tee.2:136
7731 #: build/C/man2/perf_event_open.2:2848
7733 "The following is a short example that measures the total instruction count "
7734 "of a call to B<printf>(3)."
7738 #: build/C/man2/perf_event_open.2:2857
7741 "#include E<lt>stdlib.hE<gt>\n"
7742 "#include E<lt>stdio.hE<gt>\n"
7743 "#include E<lt>unistd.hE<gt>\n"
7744 "#include E<lt>string.hE<gt>\n"
7745 "#include E<lt>sys/ioctl.hE<gt>\n"
7746 "#include E<lt>linux/perf_event.hE<gt>\n"
7747 "#include E<lt>asm/unistd.hE<gt>\n"
7749 "#include E<lt>stdlib.hE<gt>\n"
7750 "#include E<lt>stdio.hE<gt>\n"
7751 "#include E<lt>unistd.hE<gt>\n"
7752 "#include E<lt>string.hE<gt>\n"
7753 "#include E<lt>sys/ioctl.hE<gt>\n"
7754 "#include E<lt>linux/perf_event.hE<gt>\n"
7755 "#include E<lt>asm/unistd.hE<gt>\n"
7758 #: build/C/man2/perf_event_open.2:2863
7762 "perf_event_open(struct perf_event_attr *hw_event, pid_t pid,\n"
7763 " int cpu, int group_fd, unsigned long flags)\n"
7768 "perf_event_open(struct perf_event_attr *hw_event, pid_t pid,\n"
7769 " int cpu, int group_fd, unsigned long flags)\n"
7774 #: build/C/man2/perf_event_open.2:2868
7777 " ret = syscall(__NR_perf_event_open, hw_event, pid, cpu,\n"
7778 " group_fd, flags);\n"
7782 " ret = syscall(__NR_perf_event_open, hw_event, pid, cpu,\n"
7783 " group_fd, flags);\n"
7788 #: build/C/man2/perf_event_open.2:2875
7792 "main(int argc, char **argv)\n"
7794 " struct perf_event_attr pe;\n"
7795 " long long count;\n"
7799 "main(int argc, char **argv)\n"
7801 " struct perf_event_attr pe;\n"
7802 " long long count;\n"
7806 #: build/C/man2/perf_event_open.2:2883
7809 " memset(&pe, 0, sizeof(struct perf_event_attr));\n"
7810 " pe.type = PERF_TYPE_HARDWARE;\n"
7811 " pe.size = sizeof(struct perf_event_attr);\n"
7812 " pe.config = PERF_COUNT_HW_INSTRUCTIONS;\n"
7813 " pe.disabled = 1;\n"
7814 " pe.exclude_kernel = 1;\n"
7815 " pe.exclude_hv = 1;\n"
7817 " memset(&pe, 0, sizeof(struct perf_event_attr));\n"
7818 " pe.type = PERF_TYPE_HARDWARE;\n"
7819 " pe.size = sizeof(struct perf_event_attr);\n"
7820 " pe.config = PERF_COUNT_HW_INSTRUCTIONS;\n"
7821 " pe.disabled = 1;\n"
7822 " pe.exclude_kernel = 1;\n"
7823 " pe.exclude_hv = 1;\n"
7826 #: build/C/man2/perf_event_open.2:2889
7829 " fd = perf_event_open(&pe, 0, -1, -1, 0);\n"
7830 " if (fd == -1) {\n"
7831 " fprintf(stderr, \"Error opening leader %llx\\en\", pe.config);\n"
7832 " exit(EXIT_FAILURE);\n"
7835 " fd = perf_event_open(&pe, 0, -1, -1, 0);\n"
7836 " if (fd == -1) {\n"
7837 " fprintf(stderr, \"Error opening leader %llx\\en\", pe.config);\n"
7838 " exit(EXIT_FAILURE);\n"
7842 #: build/C/man2/perf_event_open.2:2892
7845 " ioctl(fd, PERF_EVENT_IOC_RESET, 0);\n"
7846 " ioctl(fd, PERF_EVENT_IOC_ENABLE, 0);\n"
7848 " ioctl(fd, PERF_EVENT_IOC_RESET, 0);\n"
7849 " ioctl(fd, PERF_EVENT_IOC_ENABLE, 0);\n"
7852 #: build/C/man2/perf_event_open.2:2894
7854 msgid " printf(\"Measuring instruction count for this printf\\en\");\n"
7855 msgstr " printf(\"Measuring instruction count for this printf\\en\");\n"
7858 #: build/C/man2/perf_event_open.2:2897
7861 " ioctl(fd, PERF_EVENT_IOC_DISABLE, 0);\n"
7862 " read(fd, &count, sizeof(long long));\n"
7864 " ioctl(fd, PERF_EVENT_IOC_DISABLE, 0);\n"
7865 " read(fd, &count, sizeof(long long));\n"
7868 #: build/C/man2/perf_event_open.2:2899
7870 msgid " printf(\"Used %lld instructions\\en\", count);\n"
7871 msgstr " printf(\"Used %lld instructions\\en\", count);\n"
7874 #: build/C/man2/perf_event_open.2:2902
7884 #: build/C/man2/perf_event_open.2:2909
7885 msgid "B<fcntl>(2), B<mmap>(2), B<open>(2), B<prctl>(2), B<read>(2)"
7886 msgstr "B<fcntl>(2), B<mmap>(2), B<open>(2), B<prctl>(2), B<read>(2)"
7889 #: build/C/man2/perfmonctl.2:27
7895 #: build/C/man2/perfmonctl.2:27
7901 #: build/C/man2/perfmonctl.2:30
7902 msgid "perfmonctl - interface to IA-64 performance monitoring unit"
7903 msgstr "perfmonctl - IA-64 の PMU (性能監視ユニット) のインターフェース"
7906 #: build/C/man2/perfmonctl.2:34
7909 "B<#include E<lt>syscall.hE<gt>>\n"
7910 "B<#include E<lt>perfmon.hE<gt>>\n"
7912 "B<#include E<lt>syscall.hE<gt>>\n"
7913 "B<#include E<lt>perfmon.hE<gt>>\n"
7916 #: build/C/man2/perfmonctl.2:36
7918 msgid "B<long perfmonctl(int >I<fd>B<, int >I<cmd>B<, void *>I<arg>B<, int >I<narg>B<);>\n"
7919 msgstr "B<long perfmonctl(int >I<fd>B<, int >I<cmd>B<, void *>I<arg>B<, int >I<narg>B<);>\n"
7922 #: build/C/man2/perfmonctl.2:47
7924 "The IA-64-specific B<perfmonctl>() system call provides an interface to the "
7925 "PMU (performance monitoring unit). The PMU consists of PMD (performance "
7926 "monitoring data) registers and PMC (performance monitoring control) "
7927 "registers, which gather hardware statistics."
7929 "IA-64 固有の B<perfmonctl>() システムコールは PMU (性能監視ユニット; "
7930 "performance monitoring unit) へのインターフェースを提供する。 PMU は PMD "
7931 "(performance monitoring data) レジスターと PMC (performance monitoring "
7932 "control) レジスターで構成され、 ハードウェアの統計を収集する。"
7935 #: build/C/man2/perfmonctl.2:57
7937 "B<perfmonctl>() applies the operation I<cmd> to the input arguments "
7938 "specified by I<arg>. The number of arguments is defined by I<narg>. The "
7939 "I<fd> argument specifies the perfmon context to operate on."
7941 "B<perfmonctl>() は、 操作 I<cmd> を I<arg> で指定された入力引き数で行う。 引"
7942 "き数の数は I<narg> で規定される。 I<fd> 引き数は操作対象の perfmon コンテキス"
7946 #: build/C/man2/perfmonctl.2:61
7947 msgid "Supported values for I<cmd> are:"
7948 msgstr "I<cmd> に指定できる値は以下のとおりである。"
7951 #: build/C/man2/perfmonctl.2:61
7953 msgid "B<PFM_CREATE_CONTEXT>"
7954 msgstr "B<PFM_CREATE_CONTEXT>"
7957 #: build/C/man2/perfmonctl.2:65
7959 msgid "B<perfmonctl(int >I<fd>B<, PFM_CREATE_CONTEXT, pfarg_context_t *>I<ctxt>B<, 1);>\n"
7960 msgstr "B<perfmonctl(int >I<fd>B<, PFM_CREATE_CONTEXT, pfarg_context_t *>I<ctxt>B<, 1);>\n"
7963 #: build/C/man2/perfmonctl.2:67
7964 msgid "Set up a context."
7965 msgstr "コンテキストを用意する。"
7968 #: build/C/man2/perfmonctl.2:74
7970 "The I<fd> parameter is ignored. A new perfmon context is created as "
7971 "specified in I<ctxt> and its file descriptor is returned in I<ctxt-"
7974 "I<fd> 引き数は無視される。 新しい perfmon コンテキストを I<ctxt> で指定した内"
7975 "容で作成し、 そのファイルディスクリプターを I<ctxt-E<gt>ctx_fd> で返す。"
7978 #: build/C/man2/perfmonctl.2:86
7980 "The file descriptor can be used in subsequent calls to B<perfmonctl>() and "
7981 "can be used to read event notifications (type I<pfm_msg_t>) using "
7982 "B<read>(2). The file descriptor is pollable using B<select>(2), B<poll>(2), "
7985 "ファイルディスクリプターはそれ以降の B<perfmonctl>() の呼び出しで使用した"
7986 "り、 B<read>(2) を使ってイベント通知 (I<pfm_msg_t> 型) を読み出したりするのに"
7987 "使用できる。 このファイルディスクリプターは B<select>(2), B<poll>(2), "
7988 "B<epoll>(7) で状態監視 (ポーリング) することができる。"
7991 #: build/C/man2/perfmonctl.2:90
7993 "The context can be destroyed by calling B<close>(2) on the file descriptor."
7995 "コンテキストを破棄するには、 そのファイルディスクリプターに対して "
7996 "B<close>(2) を呼び出す。"
7999 #: build/C/man2/perfmonctl.2:90
8001 msgid "B<PFM_WRITE_PMCS>"
8002 msgstr "B<PFM_WRITE_PMCS>"
8005 #: build/C/man2/perfmonctl.2:95
8007 msgid "B<perfmonctl(int >I<fd>B<, PFM_WRITE_PMCS, pfarg_reg_t *>I<pmcs>B<, n);>\n"
8008 msgstr "B<perfmonctl(int >I<fd>B<, PFM_WRITE_PMCS, pfarg_reg_t *>I<pmcs>B<, n);>\n"
8011 #: build/C/man2/perfmonctl.2:97
8012 msgid "Set PMC registers."
8013 msgstr "PMC レジスターを設定する。"
8016 #: build/C/man2/perfmonctl.2:97
8018 msgid "B<PFM_WRITE_PMDS>"
8019 msgstr "B<PFM_WRITE_PMDS>"
8022 #: build/C/man2/perfmonctl.2:101
8024 msgid "B<perfmonctl(int >I<fd>B<, PFM_WRITE_PMDS, pfarg_reg_t *>I<pmds>B<, n);>\n"
8025 msgstr "B<perfmonctl(int >I<fd>B<, PFM_WRITE_PMDS, pfarg_reg_t *>I<pmds>B<, n);>\n"
8029 #: build/C/man2/perfmonctl.2:104
8030 msgid "Set PMD registers."
8031 msgstr "PMD レジスターを設定する。"
8034 #: build/C/man2/perfmonctl.2:104
8036 msgid "B<PFM_READ_PMDS>"
8037 msgstr "B<PFM_READ_PMDS>"
8040 #: build/C/man2/perfmonctl.2:109
8042 msgid "B<perfmonctl(int >I<fd>B<, PFM_READ_PMDS, pfarg_reg_t *>I<pmds>B<, n);>\n"
8043 msgstr "B<perfmonctl(int >I<fd>B<, PFM_READ_PMDS, pfarg_reg_t *>I<pmds>B<, n);>\n"
8046 #: build/C/man2/perfmonctl.2:111
8047 msgid "Read PMD registers."
8048 msgstr "PMD レジスターを読み出す。"
8051 #: build/C/man2/perfmonctl.2:111
8053 msgid "B<PFM_START>"
8054 msgstr "B<PFM_START>"
8056 #. .BI "perfmonctl(int " fd ", PFM_START, arg, 1);
8058 #: build/C/man2/perfmonctl.2:117
8060 msgid "B<perfmonctl(int >I<fd>B<, PFM_START, NULL, 0);>\n"
8061 msgstr "B<perfmonctl(int >I<fd>B<, PFM_START, NULL, 0);>\n"
8064 #: build/C/man2/perfmonctl.2:119
8065 msgid "Start monitoring."
8069 #: build/C/man2/perfmonctl.2:119
8072 msgstr "B<PFM_STOP>"
8075 #: build/C/man2/perfmonctl.2:124
8077 msgid "B<perfmonctl(int >I<fd>B<, PFM_STOP, NULL, 0);>\n"
8078 msgstr "B<perfmonctl(int >I<fd>B<, PFM_STOP, NULL, 0);>\n"
8081 #: build/C/man2/perfmonctl.2:126
8082 msgid "Stop monitoring."
8086 #: build/C/man2/perfmonctl.2:126
8088 msgid "B<PFM_LOAD_CONTEXT>"
8089 msgstr "B<PFM_LOAD_CONTEXT>"
8092 #: build/C/man2/perfmonctl.2:131
8094 msgid "B<perfmonctl(int >I<fd>B<, PFM_LOAD_CONTEXT, pfarg_load_t *>I<largs>B<, 1);>\n"
8095 msgstr "B<perfmonctl(int >I<fd>B<, PFM_LOAD_CONTEXT, pfarg_load_t *>I<largs>B<, 1);>\n"
8098 #: build/C/man2/perfmonctl.2:133
8099 msgid "Attach the context to a thread."
8100 msgstr "指定したコンテキストをスレッドに接続する。"
8103 #: build/C/man2/perfmonctl.2:133
8105 msgid "B<PFM_UNLOAD_CONTEXT>"
8106 msgstr "B<PFM_UNLOAD_CONTEXT>"
8109 #: build/C/man2/perfmonctl.2:138
8111 msgid "B<perfmonctl(int >I<fd>B<, PFM_UNLOAD_CONTEXT, NULL, 0);>\n"
8112 msgstr "B<perfmonctl(int >I<fd>B<, PFM_UNLOAD_CONTEXT, NULL, 0);>\n"
8115 #: build/C/man2/perfmonctl.2:140
8116 msgid "Detach the context from a thread."
8117 msgstr "指定したコンテキストをスレッドが切り離す。"
8120 #: build/C/man2/perfmonctl.2:140
8122 msgid "B<PFM_RESTART>"
8123 msgstr "B<PFM_RESTART>"
8126 #: build/C/man2/perfmonctl.2:145
8128 msgid "B<perfmonctl(int >I<fd>B<, PFM_RESTART, NULL, 0);>\n"
8129 msgstr "B<perfmonctl(int >I<fd>B<, PFM_RESTART, NULL, 0);>\n"
8132 #: build/C/man2/perfmonctl.2:147
8133 msgid "Restart monitoring after receiving an overflow notification."
8134 msgstr "オーバーフロー通知を受信した後、 監視を再開する。"
8137 #: build/C/man2/perfmonctl.2:147
8139 msgid "B<PFM_GET_FEATURES>"
8140 msgstr "B<PFM_GET_FEATURES>"
8143 #: build/C/man2/perfmonctl.2:152
8145 msgid "B<perfmonctl(int >I<fd>B<, PFM_GET_FEARURES, pfarg_features_t *>I<arg>B<, 1);>\n"
8146 msgstr "B<perfmonctl(int >I<fd>B<, PFM_GET_FEARURES, pfarg_features_t *>I<arg>B<, 1);>\n"
8149 #: build/C/man2/perfmonctl.2:153
8151 msgid "B<PFM_DEBUG>"
8152 msgstr "B<PFM_DEBUG>"
8155 #: build/C/man2/perfmonctl.2:158
8157 msgid "B<perfmonctl(int >I<fd>B<, PFM_DEBUG, >I<val>B<, 0);>\n"
8158 msgstr "B<perfmonctl(int >I<fd>B<, PFM_DEBUG, >I<val>B<, 0);>\n"
8161 #: build/C/man2/perfmonctl.2:162
8162 msgid "If I<val> is nonzero, enable debugging mode, otherwise disable."
8164 "I<val> が 0 以外の場合、デバッグモードを有効にする。 そうでない場合、 無効に"
8168 #: build/C/man2/perfmonctl.2:162
8170 msgid "B<PFM_GET_PMC_RESET_VAL>"
8171 msgstr "B<PFM_GET_PMC_RESET_VAL>"
8174 #: build/C/man2/perfmonctl.2:167
8176 msgid "B<perfmonctl(int >I<fd>B<, PFM_GET_PMC_RESET_VAL, pfarg_reg_t * >I<req>B<, n);>\n"
8177 msgstr "B<perfmonctl(int >I<fd>B<, PFM_GET_PMC_RESET_VAL, pfarg_reg_t * >I<req>B<, n);>\n"
8183 #. .B PFM_CREATE_EVTSETS
8184 #. create or modify event sets
8186 #. .BI "perfmonctl(int " fd ", PFM_CREATE_EVTSETS, pfarg_setdesc_t *desc , n);
8189 #. .B PFM_DELETE_EVTSETS
8190 #. delete event sets
8192 #. .BI "perfmonctl(int " fd ", PFM_DELETE_EVTSET, pfarg_setdesc_t *desc , n);
8195 #. .B PFM_GETINFO_EVTSETS
8196 #. get information about event sets
8198 #. .BI "perfmonctl(int " fd ", PFM_GETINFO_EVTSETS, pfarg_setinfo_t *info, n);
8201 #: build/C/man2/perfmonctl.2:190
8202 msgid "Reset PMC registers to default values."
8203 msgstr "PMC レジスターをデフォルト値にリセットする。"
8206 #: build/C/man2/perfmonctl.2:196
8208 "B<perfmonctl>() returns zero when the operation is successful. On error, "
8209 "-1 is returned and I<errno> is set to indicate the cause of the error."
8211 "B<perfmonctl>() は操作が成功すると 0 を返す。 エラーの場合、 -1 が返り、 "
8212 "I<errno> にエラーの原因を示す値が設定される。"
8215 #: build/C/man2/perfmonctl.2:199
8216 msgid "B<perfmonctl>() is available since Linux 2.4."
8217 msgstr "B<perfmonctl>() は Linux 2.4 以降で利用可能である。"
8220 #: build/C/man2/perfmonctl.2:202
8222 "B<perfmonctl>() is Linux-specific and is available only on the IA-64 "
8225 "B<perfmonctl>() は Linux 固有で、 IA-64 アーキテクチャーでのみ利用できる。"
8228 #: build/C/man2/perfmonctl.2:207
8230 msgstr "B<gprof>(1)"
8233 #: build/C/man2/perfmonctl.2:209
8234 msgid "The perfmon2 interface specification"
8235 msgstr "perfmon2 インターフェース仕様"
8238 #: build/C/man2/personality.2:32
8241 msgstr "PERSONALITY"
8244 #: build/C/man2/personality.2:35
8245 msgid "personality - set the process execution domain"
8246 msgstr "personality - プロセスを実行するドメインを設定する"
8249 #: build/C/man2/personality.2:37
8250 msgid "B<#include E<lt>sys/personality.hE<gt>>"
8251 msgstr "B<#include E<lt>sys/personality.hE<gt>>"
8254 #: build/C/man2/personality.2:39
8255 msgid "B<int personality(unsigned long >I<persona>B<);>"
8256 msgstr "B<int personality(unsigned long >I<persona>B<);>"
8259 #: build/C/man2/personality.2:47
8261 "Linux supports different execution domains, or personalities, for each "
8262 "process. Among other things, execution domains tell Linux how to map signal "
8263 "numbers into signal actions. The execution domain system allows Linux to "
8264 "provide limited support for binaries compiled under other UNIX-like "
8265 "operating systems."
8267 "Linux は、プロセス毎の異なる実行ドメイン、すなわち パーソナリティ "
8268 "(personality) をサポートしている。 実行ドメインは Linux にシグナル番号にどの"
8269 "シグナルを割り付けるかを 教えたりする。また、実行ドメインシステムにより、 "
8270 "Linux は、 他の UNIX 風のオペレーティングシステムでコンパイルされたバイナリに"
8271 "対する限定的なサポートを提供している。"
8274 #: build/C/man2/personality.2:59
8276 "If I<persona> is not 0xffffffff, then B<personality>() sets the caller's "
8277 "execution domain to the value specified by I<persona>. Specifying "
8278 "I<persona> as 0xffffffff provides a way of retrieving the current persona "
8279 "without changing it."
8281 "I<persona> が 0xffffffff 以外の場合、 B<personality>() は呼び出し元の実行ドメ"
8282 "インを I<persona> で指定された値に設定する。 I<persona> に 0xffffffff を指定"
8283 "すると、変更を行わず、現在の persona 値を取得できる。"
8286 #: build/C/man2/personality.2:62
8288 "A list of the available execution domains can be found in I<E<lt>sys/"
8289 "personality.hE<gt>>."
8291 "利用可能な実行ドメインのリストは I<E<lt>sys/personality.hE<gt>> にある。"
8294 #: build/C/man2/personality.2:69
8296 "On success, the previous I<persona> is returned. On error, -1 is returned, "
8297 "and I<errno> is set appropriately."
8299 "成功した場合、以前の I<persona> が返される。エラーの場合は、-1 が返され、 "
8300 "I<errno> が適切に設定される。"
8303 #: build/C/man2/personality.2:73
8304 msgid "The kernel was unable to change the personality."
8305 msgstr "カーネルがパーソナリティを変更できなかった。"
8308 #: build/C/man2/personality.2:77
8310 "B<personality>() is Linux-specific and should not be used in programs "
8311 "intended to be portable."
8313 "B<personality>() は Linux 固有であり、移植を意図したプログラムで使用すべきで"
8317 #: build/C/man2/personality.2:79
8318 msgid "B<setarch>(8)"
8322 #: build/C/man2/pivot_root.2:10
8328 #: build/C/man2/pivot_root.2:13
8329 msgid "pivot_root - change the root filesystem"
8330 msgstr "pivot_root - root ファイルシステムを変更する"
8333 #: build/C/man2/pivot_root.2:15
8335 "B<int pivot_root(const char *>I<new_root>B<, const char *>I<put_old>B<);>"
8337 "B<int pivot_root(const char *>I<new_root>B<, const char *>I<put_old>B<);>"
8341 #. capability is required.
8343 #: build/C/man2/pivot_root.2:27
8345 "B<pivot_root>() moves the root filesystem of the calling process to the "
8346 "directory I<put_old> and makes I<new_root> the new root filesystem of the "
8349 "B<pivot_root>() は呼び出し元のプロセスの root ファイルシステムを I<put_old> "
8350 "ディレクトリに移動し、 I<new_root> を呼び出し元のプロセスの新しい root ファイ"
8354 #: build/C/man2/pivot_root.2:34
8356 "The typical use of B<pivot_root>() is during system startup, when the "
8357 "system mounts a temporary root filesystem (e.g., an B<initrd>), then mounts "
8358 "the real root filesystem, and eventually turns the latter into the current "
8359 "root of all relevant processes or threads."
8361 "B<pivot_root>() の典型的な利用法は、システムの起動中にシステムが一時的な "
8362 "root ファイルシステム (例えば B<initrd>) をマウントし、これに続いて本当の "
8363 "root ファイルシステムをマウントし、 後者を必要な全てのプロセス・スレッドの カ"
8364 "レント root に変更するような場合である。"
8367 #: build/C/man2/pivot_root.2:46
8369 "B<pivot_root>() may or may not change the current root and the current "
8370 "working directory of any processes or threads which use the old root "
8371 "directory. The caller of B<pivot_root>() must ensure that processes with "
8372 "root or current working directory at the old root operate correctly in "
8373 "either case. An easy way to ensure this is to change their root and current "
8374 "working directory to I<new_root> before invoking B<pivot_root>()."
8376 "古い root ディレクトリを使っていた全てのプロセスやスレッドの カレント root と"
8377 "カレントワーキングディレクトリを、 B<pivot_root>() が変更するかどうかはわか"
8378 "らない。 B<pivot_root>() の呼びだしプロセスは、古い root やカレントワーキン"
8379 "グディレクトリを使っていた プロセスが、いずれの場合でも正しく動作することを保"
8380 "証しなければならない。 これを簡単に行うには、それらのプロセスの root と カレ"
8381 "ントワーキングディレクトリを B<pivot_root>() を呼び出す前に I<new_root> に変"
8385 #: build/C/man2/pivot_root.2:64
8387 "The paragraph above is intentionally vague because the implementation of "
8388 "B<pivot_root>() may change in the future. At the time of writing, "
8389 "B<pivot_root>() changes root and current working directory of each process "
8390 "or thread to I<new_root> if they point to the old root directory. This is "
8391 "necessary in order to prevent kernel threads from keeping the old root "
8392 "directory busy with their root and current working directory, even if they "
8393 "never access the filesystem in any way. In the future, there may be a "
8394 "mechanism for kernel threads to explicitly relinquish any access to the "
8395 "filesystem, such that this fairly intrusive mechanism can be removed from "
8398 "上記の段落は、将来 B<pivot_root>() が変更されるかも知れないことを鑑みて、わ"
8399 "ざと曖昧に書いてある。 本ページを記述している時点では、 B<pivot_root>() は古"
8400 "い root ディレクトリを用いている全てのプロセス・スレッドの root と カレント"
8401 "ワーキングディレクトリを I<new_root> に変更する。これはカーネルのスレッドが古"
8402 "い root ディレクトリを busy 状態にしないために必要である。これらのスレッドが "
8403 "古いディレクトリを root やカレントワーキングディレクトリとしていると、 ファイ"
8404 "ルシステムに一切アクセスしない場合でも 古い root が busy になってしまうからで"
8405 "ある。 将来は、カーネルスレッドがあらゆるファイルシステムへのアクセスを 明示"
8406 "的に放棄するメカニズムができ、このでしゃばりな機能は B<pivot_root>() から削"
8410 #: build/C/man2/pivot_root.2:72
8412 "Note that this also applies to the calling process: B<pivot_root>() may or "
8413 "may not affect its current working directory. It is therefore recommended "
8414 "to call B<chdir(\"/\")> immediately after B<pivot_root>()."
8416 "これは呼び出し元のプロセスについても当てはまることに注意。 B<pivot_root>() "
8417 "がカレントプロセスのカレントワーキングディレクトリに影響するかどうかは 分から"
8418 "ない。したがって B<pivot_root>() の直後に B<chdir(\"/\")> を呼び出すとよい。"
8421 #: build/C/man2/pivot_root.2:74
8422 msgid "The following restrictions apply to I<new_root> and I<put_old>:"
8423 msgstr "I<new_root> および I<put_old> には以下の制限がある:"
8426 #: build/C/man2/pivot_root.2:74 build/C/man2/pivot_root.2:76
8427 #: build/C/man2/pivot_root.2:79 build/C/man2/pivot_root.2:83
8433 #: build/C/man2/pivot_root.2:76
8434 msgid "They must be directories."
8435 msgstr "ディレクトリでなければならない。"
8438 #: build/C/man2/pivot_root.2:79
8440 "I<new_root> and I<put_old> must not be on the same filesystem as the current "
8443 "I<new_root> と I<put_old> は現在の root と同じファイルシステムにあってはなら"
8447 #: build/C/man2/pivot_root.2:83
8449 "I<put_old> must be underneath I<new_root>, that is, adding a nonzero number "
8450 "of I</..> to the string pointed to by I<put_old> must yield the same "
8451 "directory as I<new_root>."
8453 "I<put_old> は I<new_root> 以下になければならない。すなわち I<put_old> を差す"
8454 "文字列に 1 個以上の I<../> を付けることによって I<new_root> と同じディレクト"
8458 #: build/C/man2/pivot_root.2:85
8459 msgid "No other filesystem may be mounted on I<put_old>."
8460 msgstr "他のファイルシステムが I<put_old> にマウントされていてはならない。"
8463 #: build/C/man2/pivot_root.2:89
8464 msgid "See also B<pivot_root>(8) for additional usage examples."
8465 msgstr "利用例については B<pivot_root>(8) を参照のこと。"
8468 #: build/C/man2/pivot_root.2:96
8470 "If the current root is not a mount point (e.g., after B<chroot>(2) or "
8471 "B<pivot_root>(), see also below), not the old root directory, but the mount "
8472 "point of that filesystem is mounted on I<put_old>."
8474 "現在の root がマウントポイントではない (B<chroot>(2) や B<pivot_root>() の"
8475 "後など。以下も参照) 場合、 古い root ディレクトリではなく、 そのファイルシス"
8476 "テムのマウントポイントが I<put_old> にマウントされる。"
8479 #: build/C/man2/pivot_root.2:101
8481 "I<new_root> does not have to be a mount point. In this case, I</proc/"
8482 "mounts> will show the mount point of the filesystem containing I<new_root> "
8485 "I<new_root> はマウントポイントでなくてもよい。 この場合 I</proc/mounts> は、 "
8486 "I<new_root> を root (I</>) とするファイルシステムのマウントポイントを表示す"
8490 #: build/C/man2/pivot_root.2:110
8492 "B<pivot_root>() may return (in I<errno>) any of the errors returned by "
8493 "B<stat>(2). Additionally, it may return:"
8495 "B<pivot_root>() は B<stat>(2) の返すあらゆるエラーを (I<errno> に) 返す可能"
8496 "性がある。さらに以下を返すことがある:"
8499 #: build/C/man2/pivot_root.2:114
8501 "I<new_root> or I<put_old> are on the current root filesystem, or a "
8502 "filesystem is already mounted on I<put_old>."
8504 "I<new_root> または I<put_old> が、現在の root ファイルシステム上にあるか、既"
8505 "に I<put_old> になんらかのファイルシステムがマウントされている。"
8508 #: build/C/man2/pivot_root.2:117
8509 msgid "I<put_old> is not underneath I<new_root>."
8510 msgstr "I<put_old> が I<new_root> の下層にない。"
8513 #: build/C/man2/pivot_root.2:117
8519 #: build/C/man2/pivot_root.2:120
8520 msgid "I<new_root> or I<put_old> is not a directory."
8521 msgstr "I<new_root> または I<put_old> がディレクトリでない。"
8524 #: build/C/man2/pivot_root.2:125
8525 msgid "The calling process does not have the B<CAP_SYS_ADMIN> capability."
8526 msgstr "呼び出し元のプロセスが B<CAP_SYS_ADMIN> ケーパビリティを持っていない。"
8529 #: build/C/man2/pivot_root.2:128
8530 msgid "B<pivot_root>() was introduced in Linux 2.3.41."
8531 msgstr "B<pivot_root>() は Linux 2.3.41 で導入された。"
8534 #: build/C/man2/pivot_root.2:131
8535 msgid "B<pivot_root>() is Linux-specific and hence is not portable."
8536 msgstr "B<pivot_root>() は Linux に固有のものなので、移植性はない。"
8539 #: build/C/man2/pivot_root.2:138
8541 "B<pivot_root>() should not have to change root and current working "
8542 "directory of all other processes in the system."
8544 "B<pivot_root>() はシステムの他のプロセス全ての root と カレントワーキング"
8545 "ディレクトリとを変更しなくてもよいはずである。"
8548 #: build/C/man2/pivot_root.2:143
8550 "Some of the more obscure uses of B<pivot_root>() may quickly lead to "
8553 "B<pivot_root>() の使い方がもうちょっと曖昧になると、 あっという間にわけのわ"
8557 #: build/C/man2/pivot_root.2:149
8558 msgid "B<chdir>(2), B<chroot>(2), B<stat>(2), B<initrd>(4), B<pivot_root>(8)"
8559 msgstr "B<chdir>(2), B<chroot>(2), B<stat>(2), B<initrd>(4), B<pivot_root>(8)"
8562 #: build/C/man2/process_vm_readv.2:29
8564 msgid "PROCESS_VM_READV"
8565 msgstr "PROCESS_VM_READV"
8568 #: build/C/man2/process_vm_readv.2:29
8574 #: build/C/man2/process_vm_readv.2:32
8576 "process_vm_readv, process_vm_writev - transfer data between process address "
8579 "process_vm_readv, process_vm_writev - プロセスのアドレス空間間でデータを転送"
8583 #: build/C/man2/process_vm_readv.2:35
8585 msgid "B<#include E<lt>sys/uio.hE<gt>>\n"
8586 msgstr "B<#include E<lt>sys/uio.hE<gt>>\n"
8589 #: build/C/man2/process_vm_readv.2:42
8592 "B<ssize_t process_vm_readv(pid_t >I<pid>B<,>\n"
8593 "B< const struct iovec *>I<local_iov>B<,>\n"
8594 "B< unsigned long >I<liovcnt>B<,>\n"
8595 "B< const struct iovec *>I<remote_iov>B<,>\n"
8596 "B< unsigned long >I<riovcnt>B<,>\n"
8597 "B< unsigned long >I<flags>B<);>\n"
8599 "B<ssize_t process_vm_readv(pid_t >I<pid>B<,>\n"
8600 "B< const struct iovec *>I<local_iov>B<,>\n"
8601 "B< unsigned long >I<liovcnt>B<,>\n"
8602 "B< const struct iovec *>I<remote_iov>B<,>\n"
8603 "B< unsigned long >I<riovcnt>B<,>\n"
8604 "B< unsigned long >I<flags>B<);>\n"
8607 #: build/C/man2/process_vm_readv.2:49
8610 "B<ssize_t process_vm_writev(pid_t >I<pid>B<,>\n"
8611 "B< const struct iovec *>I<local_iov>B<,>\n"
8612 "B< unsigned long >I<liovcnt>B<,>\n"
8613 "B< const struct iovec *>I<remote_iov>B<,>\n"
8614 "B< unsigned long >I<riovcnt>B<,>\n"
8615 "B< unsigned long >I<flags>B<);>\n"
8617 "B<ssize_t process_vm_writev(pid_t >I<pid>B<,>\n"
8618 "B< const struct iovec *>I<local_iov>B<,>\n"
8619 "B< unsigned long >I<liovcnt>B<,>\n"
8620 "B< const struct iovec *>I<remote_iov>B<,>\n"
8621 "B< unsigned long >I<riovcnt>B<,>\n"
8622 "B< unsigned long >I<flags>B<);>\n"
8625 #: build/C/man2/process_vm_readv.2:54
8627 "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
8628 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7) 参照):"
8631 #: build/C/man2/process_vm_readv.2:58
8632 msgid "B<process_vm_readv>(), B<process_vm_writev>():"
8633 msgstr "B<process_vm_readv>(), B<process_vm_writev>():"
8636 #: build/C/man2/process_vm_readv.2:62
8637 msgid "B<_GNU_SOURCE>"
8638 msgstr "B<_GNU_SOURCE>"
8641 #: build/C/man2/process_vm_readv.2:73
8643 "These system calls transfer data between the address space of the calling "
8644 "process (\"the local process\") and the process identified by I<pid> (\"the "
8645 "remote process\"). The data moves directly between the address spaces of "
8646 "the two processes, without passing through kernel space."
8648 "これらのシステムコールは、 呼び出し元プロセス (「ローカルプロセス」) と "
8649 "I<pid> で指定されるプロセス (「リモートプロセス」) のアドレス空間間でデータを"
8650 "転送する。 データの移動は、 カーネル空間を経由することなく、 2 つのプロセスの"
8654 #: build/C/man2/process_vm_readv.2:98
8656 "The B<process_vm_readv>() system call transfers data from the remote "
8657 "process to the local process. The data to be transferred is identified by "
8658 "I<remote_iov> and I<riovcnt>: I<remote_iov> is a pointer to an array "
8659 "describing address ranges in the process I<pid>, and I<riovcnt> specifies "
8660 "the number of elements in I<remote_iov>. The data is transferred to the "
8661 "locations specified by I<local_iov> and I<liovcnt>: I<local_iov> is a "
8662 "pointer to an array describing address ranges in the calling process, and "
8663 "I<liovcnt> specifies the number of elements in I<local_iov>."
8665 "B<process_vm_readv>() システムコールは、 リモートプロセスからローカルプロセス"
8666 "へデータを転送する。 転送対象のデータは I<remote_iov> と I<riovcnt> で指定さ"
8667 "れる。 I<remote_iov> はプロセス I<pid> におけるアドレス範囲を指定する配列への"
8668 "ポインターで、 I<riovcnt> は I<remote_iov> の要素数を指定する。 データは "
8669 "I<local_iov> と I<liovcnt> で指定された場所に転送される。 I<local_iov> は呼び"
8670 "出し元プロセスにおけるアドレス範囲を指定する配列で、 I<liovcnt> は "
8671 "I<local_iov> の要素数を指定する。"
8674 #: build/C/man2/process_vm_readv.2:112
8676 "The B<process_vm_writev>() system call is the converse of "
8677 "B<process_vm_readv>()\\(emit transfers data from the local process to the "
8678 "remote process. Other than the direction of the transfer, the arguments "
8679 "I<liovcnt>, I<local_iov>, I<riovcnt>, and I<remote_iov> have the same "
8680 "meaning as for B<process_vm_readv>()."
8682 "B<process_vm_writev>() システムコールは B<process_vm_readv>() の逆で、 ローカ"
8683 "ルプロセスからリモートプロセスにデータを転送する。 転送の方向が違う以外は、 "
8684 "引き数 I<liovcnt>, I<local_iov>, I<riovcnt>, I<remote_iov> は "
8685 "B<process_vm_readv>() と同じ意味を持つ。"
8688 #: build/C/man2/process_vm_readv.2:122
8690 "The I<local_iov> and I<remote_iov> arguments point to an array of I<iovec> "
8691 "structures, defined in I<E<lt>sys/uio.hE<gt>> as:"
8693 "引き数 I<local_iov> と I<remote_iov> は I<iovec> 構造体の配列へのポイン\n"
8694 "タである。 I<iovec> 構造体は I<E<lt>sys/uio.hE<gt>> で以下のように定義\n"
8698 #: build/C/man2/process_vm_readv.2:129
8702 " void *iov_base; /* Starting address */\n"
8703 " size_t iov_len; /* Number of bytes to transfer */\n"
8707 " void *iov_base; /* Starting address */\n"
8708 " size_t iov_len; /* Number of bytes to transfer */\n"
8712 #: build/C/man2/process_vm_readv.2:145
8714 "Buffers are processed in array order. This means that "
8715 "B<process_vm_readv>() completely fills I<local_iov[0]> before proceeding to "
8716 "I<local_iov[1]>, and so on. Likewise, I<remote_iov[0]> is completely read "
8717 "before proceeding to I<remote_iov[1]>, and so on."
8719 "バッファーは配列の順序で処理される。 つまり、 B<process_vm_readv>() は "
8720 "I<local_iov>[0] が一杯になるまでデータを詰めてから、 I<local_iov>[1] に進むこ"
8721 "とを意味する。 同様に、 I<remote_iov>[0] を全部読み出してから "
8722 "I<remote_iov>[1] に進み、 以降も同様である。"
8725 #: build/C/man2/process_vm_readv.2:156
8727 "Similarly, B<process_vm_writev>() writes out the entire contents of "
8728 "I<local_iov[0]> before proceeding to I<local_iov[1]>, and it completely "
8729 "fills I<remote_iov[0]> before proceeding to I<remote_iov[1]>."
8731 "同様に、 B<process_vm_writev>() は I<local_iov[0]> の内容を全部読み出してか"
8732 "ら I<local_iov[1]> に進み、 書き込み先でも I<remote_iov[0]> が一杯になってか"
8733 "ら I<remote_iov[1]> に進む。"
8736 #: build/C/man2/process_vm_readv.2:164
8738 "The lengths of I<remote_iov[i].iov_len> and I<local_iov[i].iov_len> do not "
8739 "have to be the same. Thus, it is possible to split a single local buffer "
8740 "into multiple remote buffers, or vice versa."
8742 "長さ I<remote_iov[i].iov_len> と I<local_iov[i].iov_len> は同じである必要はな"
8743 "い。 したがって、 ローカル側で 1 つのバッファーのデータがリモート側で複数の"
8744 "バッファーに分割されることがあるし、 その逆も起こりえる。"
8747 #: build/C/man2/process_vm_readv.2:168
8748 msgid "The I<flags> argument is currently unused and must be set to 0."
8749 msgstr "I<flags> 引き数は現在使用されておらず、 0 を設定しなければならない。"
8751 #. In time, glibc might provide a wrapper that works around this limit,
8752 #. as is done for readv()/writev()
8754 #: build/C/man2/process_vm_readv.2:181
8756 "The values specified in the I<liovcnt> and I<riovcnt> arguments must be less "
8757 "than or equal to B<IOV_MAX> (defined in I<E<lt>limits.hE<gt>> or accessible "
8758 "via the call I<sysconf(_SC_IOV_MAX)>)."
8760 "I<liovcnt> と I<riovcnt> で指定される値は B<IOV_MAX> 以下でなければならない "
8761 "(B<IOV_MAX> は I<E<lt>limits.hE<gt>> で定義されており、 "
8762 "I<sysconf(_SC_IOV_MAX)> の呼び出しでも入手できる)。"
8765 #: build/C/man2/process_vm_readv.2:191
8767 "The count arguments and I<local_iov> are checked before doing any "
8768 "transfers. If the counts are too big, or I<local_iov> is invalid, or the "
8769 "addresses refer to regions that are inaccessible to the local process, none "
8770 "of the vectors will be processed and an error will be returned immediately."
8772 "要素数引き数と I<local_iov> のチェックは、 すべてのデータ転送に先立って行われ"
8773 "る。 要素数が大きすぎる場合や I<local_iov> が無効な場合、 アドレスがローカル"
8774 "プロセスがアクセスできない領域を参照している場合は、 配列のどの要素も処理され"
8778 #: build/C/man2/process_vm_readv.2:211
8780 "Note, however, that these system calls do not check the memory regions in "
8781 "the remote process until just before doing the read/write. Consequently, a "
8782 "partial read/write (see RETURN VALUE) may result if one of the "
8783 "I<remote_iov> elements points to an invalid memory region in the remote "
8784 "process. No further reads/writes will be attempted beyond that point. Keep "
8785 "this in mind when attempting to read data of unknown length (such as C "
8786 "strings that are null-terminated) from a remote process, by avoiding "
8787 "spanning memory pages (typically 4KiB) in a single remote I<iovec> element. "
8788 "(Instead, split the remote read into two I<remote_iov> elements and have "
8789 "them merge back into a single write I<local_iov> entry. The first read "
8790 "entry goes up to the page boundary, while the second starts on the next page "
8793 "ただし、 これらのシステムコールは、 実際に読み出し/書き込みを行う直前までリ"
8794 "モートプロセスのメモリー領域のチェックを行わない点に注意すること。 結果とし"
8795 "て、 I<remote_iov> の要素の一つがリモートプロセスで無効なメモリー領域を参照し"
8796 "ている場合、 部分的な読み出し/書き込み (「返り値」の節を参照) が行われること"
8797 "になる。 これ以降は読み出し/書き込みは行われない。 リモートプロセスから長さ不"
8798 "明のデータ (例えば NULL 終端された C 文字列) を読み出す際で、 リモート側の一"
8799 "つの I<iovec> 要素が複数のメモリーページ (通常は 4KiB) にまたがらないようにし"
8800 "ている場合は、 この点に注意が必要である。\n"
8801 "(リモートからの読み出しを 2 つの I<remote_iov> 要素に分割し、 1 つの "
8802 "I<local_iov> 要素への書き込みにマージすればよい。 最初の読み出しでページ境界"
8803 "まで読み出し、 次の読み出しを次のページ境界から行う。)"
8806 #: build/C/man2/process_vm_readv.2:225
8808 "In order to read from or write to another process, either the caller must "
8809 "have the capability B<CAP_SYS_PTRACE>, or the real user ID, effective user "
8810 "ID, and saved set-user-ID of the remote process must match the real user ID "
8811 "of the caller I<and> the real group ID, effective group ID, and saved set-"
8812 "group-ID of the remote process must match the real group ID of the caller. "
8813 "(The permission required is exactly the same as that required to perform a "
8814 "B<ptrace>(2) B<PTRACE_ATTACH> on the remote process.)"
8816 "他のプロセスからの読み出しや他のプロセスへの書き込みを行うには、 呼び出し元が"
8817 "ケーパビリティ B<CAP_SYS_PTRACE> を持っていなければならない、もしくは、 リ"
8818 "モートプロセスの実ユーザー ID、 実効ユーザー ID、 保存 set-user-ID が呼び出し"
8819 "元の実ユーザー ID と一致し、 かつリモートプロセスの実グループ ID、 実効グルー"
8820 "プ ID、 保存 set-group-ID が呼び出し元の実グループ ID と一致していなければな"
8821 "らない。 (ここで必要なアクセス許可は、 リモートプロセスに対して B<ptrace>(2) "
8822 "の B<PTRACE_ATTACH> を実行するのに必要な許可と全く同じである。)"
8825 #: build/C/man2/process_vm_readv.2:241
8827 "On success, B<process_vm_readv>() returns the number of bytes read and "
8828 "B<process_vm_writev>() returns the number of bytes written. This return "
8829 "value may be less than the total number of requested bytes, if a partial "
8830 "read/write occurred. (Partial transfers apply at the granularity of "
8831 "I<iovec> elements. These system calls won't perform a partial transfer that "
8832 "splits a single I<iovec> element.) The caller should check the return value "
8833 "to determine whether a partial read/write occurred."
8835 "成功すると、 B<process_vm_readv>() は読み出したバイト数を返し、 "
8836 "B<process_vm_writev>() は書き込んだバイト数を返す。 この返り値は、 読み出し/"
8837 "書き込みが部分的に行われた場合には、 要求された総バイト数よりも小さくなること"
8838 "がある (部分的な転送は I<iovec> 要素単位に行われ、 これらのシステムコールが一"
8839 "つの I<iovec> 要素の一部だけが転送されることはない)。 呼び出し元は返り値を検"
8840 "査して、 部分的な読み出し/書き込みが起こったかどうかを判定できる。"
8843 #: build/C/man2/process_vm_readv.2:245
8844 msgid "On error, -1 is returned and I<errno> is set appropriately."
8845 msgstr "エラーの場合は -1 が返され、 I<errno> が適切に設定される。"
8848 #: build/C/man2/process_vm_readv.2:257
8850 "The sum of the I<iov_len> values of either I<local_iov> or I<remote_iov> "
8851 "overflows a I<ssize_t> value."
8853 "I<local_iov> か I<remote_iov> のいずれかの I<iov_len> の合計値が I<ssize_t> "
8857 #: build/C/man2/process_vm_readv.2:261
8858 msgid "I<flags> is not 0."
8859 msgstr "I<flags> が 0 でない。"
8862 #: build/C/man2/process_vm_readv.2:267
8863 msgid "I<liovcnt> or I<riovcnt> is too large."
8864 msgstr "I<liovcnt> か I<riovcnt> が大きすぎる。"
8867 #: build/C/man2/process_vm_readv.2:272
8869 "The memory described by I<local_iov> is outside the caller's accessible "
8872 "I<local_iov> で指定されたメモリーが呼び出し元がアクセス可能なアドレス空間の外"
8876 #: build/C/man2/process_vm_readv.2:278
8878 "The memory described by I<remote_iov> is outside the accessible address "
8879 "space of the process I<pid>."
8881 "I<remote_iov> で指定されたメモリーがプロセス I<pid> がアクセス可能なアドレス"
8885 #: build/C/man2/process_vm_readv.2:283
8887 "Could not allocate memory for internal copies of the I<iovec> structures."
8888 msgstr "I<iovec> 構造体の内部コピーのためのメモリーを割り当てできなかった。"
8891 #: build/C/man2/process_vm_readv.2:287
8893 "The caller does not have permission to access the address space of the "
8896 "呼び出し側がプロセス I<pid> のアドレス空間に対するアクセス許可を\n"
8900 #: build/C/man2/process_vm_readv.2:292
8901 msgid "No process with ID I<pid> exists."
8902 msgstr "ID が I<pid> のプロセスが存在しない。"
8905 #: build/C/man2/process_vm_readv.2:295
8907 "These system calls were added in Linux 3.2. Support is provided in glibc "
8908 "since version 2.15."
8910 "これらのシステムコールは Linux 3.2 で追加された。ライブラリによる\n"
8911 "サポートは glibc バージョン 2.15 以降で提供されている。"
8914 #: build/C/man2/process_vm_readv.2:297
8915 msgid "These system calls are nonstandard Linux extensions."
8916 msgstr "これらのシステムコールは非標準で Linux による拡張である。"
8919 #: build/C/man2/process_vm_readv.2:303
8921 "The data transfers performed by B<process_vm_readv>() and "
8922 "B<process_vm_writev>() are not guaranteed to be atomic in any way."
8924 "B<process_vm_readv>() と B<process_vm_writev>() により実行されるデータ転送を"
8925 "どのように行ったとしても、 これらがアトミックに行われる保証はない。"
8927 #. Original user is MPI, http://www.mcs.anl.gov/research/projects/mpi/
8928 #. See also some benchmarks at http://lwn.net/Articles/405284/
8929 #. and http://marc.info/?l=linux-mm&m=130105930902915&w=2
8931 #: build/C/man2/process_vm_readv.2:311
8933 "These system calls were designed to permit fast message passing by allowing "
8934 "messages to be exchanged with a single copy operation (rather than the "
8935 "double copy that would be required when using, for example, shared memory or "
8938 "これらのシステムコールは、 (共有メモリーやパイプなどを使った場合に必要となる "
8940 "1 回のコピー処理でメッセージの交換を許すことで、 高速なメッセージ送信をできる"
8944 #: build/C/man2/process_vm_readv.2:319
8946 "The following code sample demonstrates the use of B<process_vm_readv>(). It "
8947 "reads 20 bytes at the address 0x10000 from the process with PID 10 and "
8948 "writes the first 10 bytes into I<buf1> and the second 10 bytes into I<buf2>."
8950 "以下のサンプルコードは B<process_vm_readv>() の使用例を示すものである。 この"
8951 "コードは PID 10 のプロセスのアドレス 0x10000 から 20 バイトを読み取り、 最初"
8952 "の 10 バイトを I<buf1> に、 残りの 10 バイトを I<buf2> に書き込む。"
8955 #: build/C/man2/process_vm_readv.2:322
8957 msgid "#include E<lt>sys/uio.hE<gt>\n"
8958 msgstr "#include E<lt>sys/uio.hE<gt>\n"
8961 #: build/C/man2/process_vm_readv.2:332
8967 " struct iovec local[2];\n"
8968 " struct iovec remote[1];\n"
8972 " pid_t pid = 10; /* PID of remote process */\n"
8977 " struct iovec local[2];\n"
8978 " struct iovec remote[1];\n"
8982 " pid_t pid = 10; /* PID of remote process */\n"
8985 #: build/C/man2/process_vm_readv.2:339
8988 " local[0].iov_base = buf1;\n"
8989 " local[0].iov_len = 10;\n"
8990 " local[1].iov_base = buf2;\n"
8991 " local[1].iov_len = 10;\n"
8992 " remote[0].iov_base = (void *) 0x10000;\n"
8993 " remote[0].iov_len = 20;\n"
8995 " local[0].iov_base = buf1;\n"
8996 " local[0].iov_len = 10;\n"
8997 " local[1].iov_base = buf2;\n"
8998 " local[1].iov_len = 10;\n"
8999 " remote[0].iov_base = (void *) 0x10000;\n"
9000 " remote[0].iov_len = 20;\n"
9003 #: build/C/man2/process_vm_readv.2:346
9006 " nread = process_vm_readv(pid, local, 2, remote, 1, 0);\n"
9007 " if (nread != 20)\n"
9013 " nread = process_vm_readv(pid, local, 2, remote, 1, 0);\n"
9014 " if (nread != 20)\n"
9021 #: build/C/man2/process_vm_readv.2:350
9022 msgid "B<readv>(2), B<writev>(2)"
9023 msgstr "B<readv>(2), B<writev>(2)"
9026 #: build/C/man2/ptrace.2:46
9032 #: build/C/man2/ptrace.2:49
9033 msgid "ptrace - process trace"
9034 msgstr "ptrace - プロセスのトレース"
9037 #: build/C/man2/ptrace.2:52
9039 msgid "B<#include E<lt>sys/ptrace.hE<gt>>\n"
9040 msgstr "B<#include E<lt>sys/ptrace.hE<gt>>\n"
9043 #: build/C/man2/ptrace.2:55
9046 "B<long ptrace(enum __ptrace_request >I<request>B<, pid_t >I<pid>B<, >\n"
9047 "B< void *>I<addr>B<, void *>I<data>B<);>\n"
9049 "B<long ptrace(enum __ptrace_request >I<request>B<, pid_t >I<pid>B<, >\n"
9050 "B< void *>I<addr>B<, void *>I<data>B<);>\n"
9053 #: build/C/man2/ptrace.2:64
9055 "The B<ptrace>() system call provides a means by which one process (the "
9056 "\"tracer\") may observe and control the execution of another process (the "
9057 "\"tracee\"), and examine and change the tracee's memory and registers. It "
9058 "is primarily used to implement breakpoint debugging and system call tracing."
9060 "B<ptrace>() システムコールは、 あるプロセス (\"tracer\") が、 別のプロセス "
9061 "(\"tracee\") の実行の監視/制御を行ったり、 tracee のメモリーやレジスターの調"
9062 "査/変更を行ったりする手段を提供する。 B<ptrace>() は、 主にブレークポイント"
9063 "によるデバッグやシステムコールのトレースを実装するのに用いられる。"
9066 #: build/C/man2/ptrace.2:75
9068 "A tracee first needs to be attached to the tracer. Attachment and "
9069 "subsequent commands are per thread: in a multithreaded process, every thread "
9070 "can be individually attached to a (potentially different) tracer, or left "
9071 "not attached and thus not debugged. Therefore, \"tracee\" always means "
9072 "\"(one) thread\", never \"a (possibly multithreaded) process\". Ptrace "
9073 "commands are always sent to a specific tracee using a call of the form"
9077 #: build/C/man2/ptrace.2:77
9079 msgid " ptrace(PTRACE_foo, pid, ...)\n"
9080 msgstr " ptrace(PTRACE_foo, pid, ...)\n"
9083 #: build/C/man2/ptrace.2:81
9084 msgid "where I<pid> is the thread ID of the corresponding Linux thread."
9085 msgstr "ここで I<pid> は対応する Linux スレッドのスレッド ID である。"
9088 #: build/C/man2/ptrace.2:87
9090 "(Note that in this page, a \"multithreaded process\" means a thread group "
9091 "consisting of threads created using the B<clone>(2) B<CLONE_THREAD> flag.)"
9095 #: build/C/man2/ptrace.2:98
9097 "A process can initiate a trace by calling B<fork>(2) and having the "
9098 "resulting child do a B<PTRACE_TRACEME>, followed (typically) by an "
9099 "B<execve>(2). Alternatively, one process may commence tracing another "
9100 "process using B<PTRACE_ATTACH> or B<PTRACE_SEIZE>."
9102 "プロセスがトレースを開始するには、 まず親プロセスで B<fork>(2) を呼び出す。 "
9103 "生成された子プロセスで B<PTRACE_TRACEME> を行い、 続いて (典型的には) "
9104 "B<execve>(2) を行なう。 別の方法としては、 プロセスが別のプロセスに対して "
9105 "B<PTRACE_ATTACH> か B<PTRACE_SEIZE> を使用し、 トレースを開始する。"
9108 #: build/C/man2/ptrace.2:115
9110 "While being traced, the tracee will stop each time a signal is delivered, "
9111 "even if the signal is being ignored. (An exception is B<SIGKILL>, which has "
9112 "its usual effect.) The tracer will be notified at its next call to "
9113 "B<waitpid>(2) (or one of the related \"wait\" system calls); that call will "
9114 "return a I<status> value containing information that indicates the cause of "
9115 "the stop in the tracee. While the tracee is stopped, the tracer can use "
9116 "various ptrace requests to inspect and modify the tracee. The tracer then "
9117 "causes the tracee to continue, optionally ignoring the delivered signal (or "
9118 "even delivering a different signal instead)."
9120 "トレースの実行中、tracee はシグナルが配送されるたびに、 たとえそのシグナルが"
9121 "無視されている場合であっても停止する (B<SIGKILL> は例外で、通常どおりの効果を"
9122 "持つ)。 tracer には次の B<waitpid>(2) (や関連の \"wait\" システムコール) の呼"
9123 "び出しで通知され、 その呼び出しでは tracee で停止の原因を示す情報が入った "
9124 "I<status> 値が返される。 tracee が停止している間に、 tracer は様々な ptrace "
9125 "の要求を使って tracee を調査したり修正したりすることができる。 それから "
9126 "tracer は tracee の実行を再開させるが、 配送されたシグナルを無視することもで"
9127 "きる (あるいは別のシグナルを配送することもできる) 。"
9130 #: build/C/man2/ptrace.2:125
9132 "If the B<PTRACE_O_TRACEEXEC> option is not in effect, all successful calls "
9133 "to B<execve>(2) by the traced process will cause it to be sent a B<SIGTRAP> "
9134 "signal, giving the parent a chance to gain control before the new program "
9139 #: build/C/man2/ptrace.2:129
9141 "When the tracer is finished tracing, it can cause the tracee to continue "
9142 "executing in a normal, untraced mode via B<PTRACE_DETACH>."
9144 "tracer がトレースを終了する際には、 B<PTRACE_DETACH> を用いて tracee を通常の"
9145 "トレースなしのモードにして、 実行を継続させることができる。"
9148 #: build/C/man2/ptrace.2:133
9149 msgid "The value of I<request> determines the action to be performed:"
9150 msgstr "I<request> の値がこのシステムコールの動作を決定する:"
9153 #: build/C/man2/ptrace.2:133
9155 msgid "B<PTRACE_TRACEME>"
9156 msgstr "B<PTRACE_TRACEME>"
9159 #: build/C/man2/ptrace.2:143
9161 "Indicate that this process is to be traced by its parent. A process "
9162 "probably shouldn't make this request if its parent isn't expecting to trace "
9163 "it. (I<pid>, I<addr>, and I<data> are ignored.)"
9165 "このプロセスが親プロセスによってトレースされることを表す。親プロセスが自プロ"
9166 "セスをトレースするつもりがない場合には、 おそらくこのプロセスは本要求を行うべ"
9167 "きではないだろう。 (I<pid>, I<addr>, I<data> は無視される。)"
9170 #: build/C/man2/ptrace.2:158
9172 "The B<PTRACE_TRACEME> request is used only by the tracee; the remaining "
9173 "requests are used only by the tracer. In the following requests, I<pid> "
9174 "specifies the thread ID of the tracee to be acted on. For requests other "
9175 "than B<PTRACE_ATTACH>, B<PTRACE_SEIZE>, B<PTRACE_INTERRUPT>, and "
9176 "B<PTRACE_KILL>, the tracee must be stopped."
9178 "B<PTRACE_TRACEME> 要求は tracee だけが使用するものである。 残りの要求は "
9179 "tracer だけが使用する。 以下の要求では、I<pid> は操作の対象となる tracee のス"
9180 "レッド ID を指定する。 B<PTRACE_ATTACH>, B<PTRACE_SEIZE>, "
9181 "B<PTRACE_INTERRUPT>, B<PTRACE_KILL> 以外の要求では、 tracee は停止していなけ"
9185 #: build/C/man2/ptrace.2:158
9187 msgid "B<PTRACE_PEEKTEXT>, B<PTRACE_PEEKDATA>"
9188 msgstr "B<PTRACE_PEEKTEXT>, B<PTRACE_PEEKDATA>"
9191 #: build/C/man2/ptrace.2:169
9193 "Read a word at the address I<addr> in the tracee's memory, returning the "
9194 "word as the result of the B<ptrace>() call. Linux does not have separate "
9195 "text and data address spaces, so these two requests are currently "
9196 "equivalent. (I<data> is ignored; but see NOTES.)"
9198 "tracee のメモリーの I<addr> のアドレスから 1 ワードを読み出す。 読み出した"
9199 "ワードは B<ptrace>() の返り値として返される。 Linux ではテキスト (text) と"
9200 "データ (data) で 同じアドレス空間を使用するため、これらの 2 つの要求は現在の"
9201 "ところ 同じものである。 (I<data> は無視される。 ただし「注意」を参照。)"
9204 #: build/C/man2/ptrace.2:169
9206 msgid "B<PTRACE_PEEKUSER>"
9207 msgstr "B<PTRACE_PEEKUSER>"
9209 #. PTRACE_PEEKUSR in kernel source, but glibc uses PTRACE_PEEKUSER,
9210 #. and that is the name that seems common on other systems.
9212 #: build/C/man2/ptrace.2:187
9214 "Read a word at offset I<addr> in the tracee's USER area, which holds the "
9215 "registers and other information about the process (see I<E<lt>sys/user."
9216 "hE<gt>>). The word is returned as the result of the B<ptrace>() call. "
9217 "Typically, the offset must be word-aligned, though this might vary by "
9218 "architecture. See NOTES. (I<data> is ignored; but see NOTES.)"
9220 "tracee の USER 領域のオフセット I<addr> の位置から 1 ワードを読み込む。USER "
9221 "領域にはそのプロセスの レジスター (registers) などの情報が保持されている "
9222 "(I<E<lt>sys/user.hE<gt>> を参照)。読み込んだワードは B<ptrace>() コールの結"
9223 "果として返される。 たいていはオフセットはワード境界になければならないが、 "
9224 "アーキテクチャーによってはその必要はない。 「注意」の節を参照。 (I<data> は無"
9225 "視される。 ただし「注意」を参照。)"
9228 #: build/C/man2/ptrace.2:187
9230 msgid "B<PTRACE_POKETEXT>, B<PTRACE_POKEDATA>"
9231 msgstr "B<PTRACE_POKETEXT>, B<PTRACE_POKEDATA>"
9234 #: build/C/man2/ptrace.2:199
9236 "Copy the word I<data> to the address I<addr> in the tracee's memory. As for "
9237 "B<PTRACE_PEEKTEXT> and B<PTRACE_PEEKDATA>, these two requests are currently "
9240 "ワード I<data> を tracee のメモリーの I<addr> のアドレスへコピーする。 "
9241 "B<PTRACE_PEEKTEXT> や B<PTRACE_PEEKDATA> と同様に、 現在のところ二つの要求は"
9245 #: build/C/man2/ptrace.2:199
9247 msgid "B<PTRACE_POKEUSER>"
9248 msgstr "B<PTRACE_POKEUSER>"
9250 #. PTRACE_POKEUSR in kernel source, but glibc uses PTRACE_POKEUSER,
9251 #. and that is the name that seems common on other systems.
9252 #. FIXME In the preceding sentence, which modifications are disallowed,
9253 #. and when they are disallowed, how does user space discover that fact?
9255 #: build/C/man2/ptrace.2:215
9257 "Copy the word I<data> to offset I<addr> in the tracee's USER area. As for "
9258 "B<PTRACE_PEEKUSER>, the offset must typically be word-aligned. In order to "
9259 "maintain the integrity of the kernel, some modifications to the USER area "
9262 "ワード I<data> を tracee の USER 領域のオフセット I<addr> のアドレスにコピー"
9263 "する。 B<PTRACE_PEEKUSER> と同様に、通常、オフセットはワード境界になければな"
9264 "らない。 カーネルの完全性 (integrity) を維持するため、 変更内容によっては "
9265 "USER 領域の変更は禁止されている。"
9268 #: build/C/man2/ptrace.2:215
9270 msgid "B<PTRACE_GETREGS>, B<PTRACE_GETFPREGS>"
9271 msgstr "B<PTRACE_GETREGS>, B<PTRACE_GETFPREGS>"
9274 #: build/C/man2/ptrace.2:238
9276 "Copy the tracee's general-purpose or floating-point registers, respectively, "
9277 "to the address I<data> in the tracer. See I<E<lt>sys/user.hE<gt>> for "
9278 "information on the format of this data. (I<addr> is ignored.) Note that "
9279 "SPARC systems have the meaning of I<data> and I<addr> reversed; that is, "
9280 "I<data> is ignored and the registers are copied to the address I<addr>. "
9281 "B<PTRACE_GETREGS> and B<PTRACE_GETFPREGS> are not present on all "
9284 "それぞれ、 tracee の汎用レジスター、 浮動小数点レジスターを tracer の "
9285 "I<data> のアドレスにコピーする。この data の書式に関しては I<E<lt>sys/user."
9286 "hE<gt>> を参照すること。(I<addr> は無視される。) SPARC システムでは I<data> "
9287 "と I<addr> の意味が逆になっている点に注意。 つまり、 I<data> は無視され、 レ"
9288 "ジスターはアドレス I<addr> にコピーされる。 B<PTRACE_GETREGS> と "
9289 "B<PTRACE_GETFPREGS> はすべてのアーキテクチャーで存在するわけではない。"
9292 #: build/C/man2/ptrace.2:238
9294 msgid "B<PTRACE_GETREGSET> (since Linux 2.6.34)"
9295 msgstr " B<PTRACE_GETREGSET> (since Linux 2.6.34)"
9298 #: build/C/man2/ptrace.2:259
9300 "Read the tracee's registers. I<addr> specifies, in an architecture-"
9301 "dependent way, the type of registers to be read. B<NT_PRSTATUS> (with "
9302 "numerical value 1) usually results in reading of general-purpose "
9303 "registers. If the CPU has, for example, floating-point and/or vector "
9304 "registers, they can be retrieved by setting I<addr> to the corresponding "
9305 "B<NT_foo> constant. I<data> points to a B<struct iovec>, which describes "
9306 "the destination buffer's location and length. On return, the kernel "
9307 "modifies B<iov.len> to indicate the actual number of bytes returned."
9311 #: build/C/man2/ptrace.2:259
9313 msgid "B<PTRACE_SETREGS>, B<PTRACE_SETFPREGS>"
9314 msgstr "B<PTRACE_SETREGS>, B<PTRACE_SETFPREGS>"
9316 #. FIXME . In the preceding sentence, which modifications are disallowed,
9317 #. and when they are disallowed, how does user space discover that fact?
9319 #: build/C/man2/ptrace.2:284
9321 "Modify the tracee's general-purpose or floating-point registers, "
9322 "respectively, from the address I<data> in the tracer. As for "
9323 "B<PTRACE_POKEUSER>, some general-purpose register modifications may be "
9324 "disallowed. (I<addr> is ignored.) Note that SPARC systems have the meaning "
9325 "of I<data> and I<addr> reversed; that is, I<data> is ignored and the "
9326 "registers are copied from the address I<addr>. B<PTRACE_SETREGS> and "
9327 "B<PTRACE_SETFPREGS> are not present on all architectures."
9329 "それぞれ、 tracee の汎用レジスター、浮動小数点レジスターに tracer の I<date> "
9330 "のアドレスからコピーする。 B<PTRACE_POKEUSER> と同様に、汎用レジスターによっ"
9331 "ては 変更が禁止されている場合がある。 (I<addr> は無視される。)\n"
9333 "Note that SPARC systems have the meaning of I<data> and I<addr>\n"
9334 "reversed; that is, I<data> is ignored and the registers are copied\n"
9335 "from the address I<addr>. B<PTRACE_SETREGS> and B<PTRACE_SETFPREGS>\n"
9336 "are not present on all architectures."
9339 #: build/C/man2/ptrace.2:284
9341 msgid "B<PTRACE_SETREGSET> (since Linux 2.6.34)"
9342 msgstr " B<PTRACE_SETREGSET> (since Linux 2.6.34)"
9345 #: build/C/man2/ptrace.2:293
9347 "Modify the tracee's registers. The meaning of I<addr> and I<data> is "
9348 "analogous to B<PTRACE_GETREGSET>."
9352 #: build/C/man2/ptrace.2:293
9354 msgid "B<PTRACE_GETSIGINFO> (since Linux 2.3.99-pre6)"
9355 msgstr "B<PTRACE_GETSIGINFO> (Linux 2.3.99-pre6 以降)"
9358 #: build/C/man2/ptrace.2:305
9360 "Retrieve information about the signal that caused the stop. Copy a "
9361 "I<siginfo_t> structure (see B<sigaction>(2)) from the tracee to the address "
9362 "I<data> in the tracer. (I<addr> is ignored.)"
9364 "停止の原因となったシグナルに関する情報を取得する。 I<siginfo_t> 構造体 "
9365 "(B<sigaction>(2) 参照) を tracee から tracer の I<data> のアドレスにコピーす"
9366 "る。 (I<addr> は無視される。)"
9369 #: build/C/man2/ptrace.2:305
9371 msgid "B<PTRACE_SETSIGINFO> (since Linux 2.3.99-pre6)"
9372 msgstr "B<PTRACE_SETSIGINFO> (Linux 2.3.99-pre6 以降)"
9375 #: build/C/man2/ptrace.2:321
9377 "Set signal information: copy a I<siginfo_t> structure from the address "
9378 "I<data> in the tracer to the tracee. This will affect only signals that "
9379 "would normally be delivered to the tracee and were caught by the tracer. It "
9380 "may be difficult to tell these normal signals from synthetic signals "
9381 "generated by B<ptrace>() itself. (I<addr> is ignored.)"
9383 "シグナル情報を設定する。 I<siginfo_t> 構造体を tracer のデータ I<data> のアド"
9384 "レスから tracee にコピーする。 この処理を行うことができるのは、 tracee に通常"
9385 "は配送されるはずで トレーサに捕捉されたシグナルについてだけである。 これらの"
9386 "通常のシグナルと B<ptrace>() 自身が発生するシグナルを見分けるのは難しいかも"
9387 "しれない。 (I<addr> は無視される。)"
9390 #: build/C/man2/ptrace.2:321
9392 msgid "B<PTRACE_PEEKSIGINFO> (since Linux 3.10)"
9393 msgstr "B<PTRACE_PEEKSIGINFO> (Linux 3.10 以降)"
9395 #. commit 84c751bd4aebbaae995fe32279d3dba48327bad4
9397 #: build/C/man2/ptrace.2:347
9399 "Retrieve I<siginfo_t> structures without removing signals from a queue. "
9400 "I<addr> points to a I<ptrace_peeksiginfo_args> structure that specifies the "
9401 "ordinal position from which copying of signals should start, and the number "
9402 "of signals to copy. I<siginfo_t> structures are copied into the buffer "
9403 "pointed to by I<data>. The return value contains the number of copied "
9404 "signals (zero indicates that there is no signal corresponding to the "
9405 "specified ordinal position). Within the returned I<siginfo> structures, the "
9406 "I<si_code> field includes information (B<__SI_CHLD>, B<__SI_FAULT>, etc.) "
9407 "that are not otherwise exposed to user space."
9411 #: build/C/man2/ptrace.2:356
9414 "struct ptrace_peeksiginfo_args {\n"
9415 " u64 off; /* Ordinal position in queue at which\n"
9416 " to start copying signals */\n"
9417 " u32 flags; /* PTRACE_PEEKSIGINFO_SHARED or 0 */\n"
9418 " s32 nr; /* Number of signals to copy */\n"
9423 #: build/C/man2/ptrace.2:363
9425 "Currently, there is only one flag, B<PTRACE_PEEKSIGINFO_SHARED>, for dumping "
9426 "signals from the process-wide signal queue. If this flag is not set, "
9427 "signals are read from the per-thread queue of the specified thread."
9431 #: build/C/man2/ptrace.2:365
9433 msgid "B<PTRACE_GETSIGMASK> (since Linux 3.11)"
9434 msgstr "B<PTRACE_GETSIGMASK> (Linux 3.11 以降)"
9436 #. commit 29000caecbe87b6b66f144f72111f0d02fbbf0c1
9438 #: build/C/man2/ptrace.2:380
9440 "Place a copy of the mask of blocked signals (see B<sigprocmask>(2)) in the "
9441 "buffer pointed to by I<data>, which should be a pointer to a buffer of type "
9442 "I<sigset_t>. The I<addr> argument contains the size of the buffer pointed "
9443 "to by I<data> (i.e., I<sizeof(sigset_t)>)."
9447 #: build/C/man2/ptrace.2:380
9449 msgid "B<PTRACE_SETSIGMASK> (since Linux 3.11)"
9450 msgstr "B<PTRACE_SETSIGMASK> (Linux 3.11 以降)"
9453 #: build/C/man2/ptrace.2:394
9455 "Change the mask of blocked signals (see B<sigprocmask>(2)) to the value "
9456 "specified in the buffer pointed to by I<data>, which should be a pointer to "
9457 "a buffer of type I<sigset_t>. The I<addr> argument contains the size of the "
9458 "buffer pointed to by I<data> (i.e., I<sizeof(sigset_t)>)."
9462 #: build/C/man2/ptrace.2:394
9464 msgid "B<PTRACE_SETOPTIONS> (since Linux 2.4.6; see BUGS for caveats)"
9465 msgstr "B<PTRACE_SETOPTIONS> (Linux 2.4.6 以降; バグの章にある警告も参照)"
9468 #: build/C/man2/ptrace.2:403
9470 "Set ptrace options from I<data>. (I<addr> is ignored.) I<data> is "
9471 "interpreted as a bit mask of options, which are specified by the following "
9474 "I<data> に基づいて ptrace のオプションを設定する (I<addr> は無視される)。 "
9475 "I<data> はオプションのビットマスクとして解釈され、 オプションには以下のフラグ"
9479 #: build/C/man2/ptrace.2:404
9481 msgid "B<PTRACE_O_EXITKILL> (since Linux 3.8)"
9482 msgstr " B<PTRACE_O_EXITKILL> (since Linux 3.8)"
9484 #. commit 992fb6e170639b0849bace8e49bf31bd37c4123
9486 #: build/C/man2/ptrace.2:412
9488 "If a tracer sets this flag, a B<SIGKILL> signal will be sent to every tracee "
9489 "if the tracer exits. This option is useful for ptrace jailers that want to "
9490 "ensure that tracees can never escape the tracer's control."
9494 #: build/C/man2/ptrace.2:412
9496 msgid "B<PTRACE_O_TRACECLONE> (since Linux 2.5.46)"
9497 msgstr "B<PTRACE_O_TRACECLONE> (Linux 2.5.46 以降)"
9500 #: build/C/man2/ptrace.2:429
9502 "Stop the tracee at the next B<clone>(2) and automatically start tracing the "
9503 "newly cloned process, which will start with a B<SIGSTOP>, or "
9504 "B<PTRACE_EVENT_STOP> if B<PTRACE_SEIZE> was used. A B<waitpid>(2) by the "
9505 "tracer will return a I<status> value such that"
9507 "次の B<clone>(2) 呼び出し時に tracee を停止し、 新しくクローンされたプロセス"
9508 "のトレースを自動的に開始し、 B<SIGSTOP> でプロセスの実行を開始する。 "
9509 "B<PTRACE_SEIZE> が使用された場合は B<PTRACE_EVENT_STOP> で開始する。 tracer "
9510 "による B<waitpid>(2) の呼び出しでは以下のような I<status> 値が返る。"
9513 #: build/C/man2/ptrace.2:432
9515 msgid " statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_CLONEE<lt>E<lt>8))\n"
9516 msgstr " statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_CLONEE<lt>E<lt>8))\n"
9519 #: build/C/man2/ptrace.2:436 build/C/man2/ptrace.2:522
9520 #: build/C/man2/ptrace.2:555
9521 msgid "The PID of the new process can be retrieved with B<PTRACE_GETEVENTMSG>."
9522 msgstr "新規のプロセスの PID は B<PTRACE_GETEVENTMSG> で取得できる。"
9525 #: build/C/man2/ptrace.2:457
9527 "This option may not catch B<clone>(2) calls in all cases. If the tracee "
9528 "calls B<clone>(2) with the B<CLONE_VFORK> flag, B<PTRACE_EVENT_VFORK> will "
9529 "be delivered instead if B<PTRACE_O_TRACEVFORK> is set; otherwise if the "
9530 "tracee calls B<clone>(2) with the exit signal set to B<SIGCHLD>, "
9531 "B<PTRACE_EVENT_FORK> will be delivered if B<PTRACE_O_TRACEFORK> is set."
9533 "このオプションで全ての B<clone>(2) コールを捕まえられるわけではない。 "
9534 "tracee が B<CLONE_VFORK> フラグ付きで B<clone>(2) を呼び出した場合、 "
9535 "B<PTRACE_O_TRACEVFORK> が設定されていれば代わりに B<PTRACE_EVENT_VFORK> が配"
9536 "送される。 また、 tracee が終了シグナルを B<SIGCHLD> に設定して B<clone>(2) "
9537 "を呼び出した場合は、 B<PTRACE_O_TRACEFORK> が設定されていれば "
9538 "B<PTRACE_EVENT_FORK> が配送される。"
9541 #: build/C/man2/ptrace.2:457
9543 msgid "B<PTRACE_O_TRACEEXEC> (since Linux 2.5.46)"
9544 msgstr "B<PTRACE_O_TRACEEXEC> (Linux 2.5.46 以降)"
9547 #: build/C/man2/ptrace.2:466
9549 "Stop the tracee at the next B<execve>(2). A B<waitpid>(2) by the tracer "
9550 "will return a I<status> value such that"
9554 #: build/C/man2/ptrace.2:469
9556 msgid " statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_EXECE<lt>E<lt>8))\n"
9557 msgstr " statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_EXECE<lt>E<lt>8))\n"
9560 #: build/C/man2/ptrace.2:475
9562 "If the execing thread is not a thread group leader, the thread ID is reset "
9563 "to thread group leader's ID before this stop. Since Linux 3.0, the former "
9564 "thread ID can be retrieved with B<PTRACE_GETEVENTMSG>."
9568 #: build/C/man2/ptrace.2:475
9570 msgid "B<PTRACE_O_TRACEEXIT> (since Linux 2.5.60)"
9571 msgstr "B<PTRACE_O_TRACEEXIT> (Linux 2.5.60 以降)"
9574 #: build/C/man2/ptrace.2:483
9576 "Stop the tracee at exit. A B<waitpid>(2) by the tracer will return a "
9577 "I<status> value such that"
9579 "exit 時に tracee を停止する。 tracer による B<waiting>(2) では以下のような "
9583 #: build/C/man2/ptrace.2:486
9585 msgid " statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_EXITE<lt>E<lt>8))\n"
9586 msgstr " statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_EXITE<lt>E<lt>8))\n"
9589 #: build/C/man2/ptrace.2:490
9590 msgid "The tracee's exit status can be retrieved with B<PTRACE_GETEVENTMSG>."
9591 msgstr "tracee の終了ステータスは B<PTRACE_GETEVENTMSG> で取得できる。"
9594 #: build/C/man2/ptrace.2:498
9596 "The tracee is stopped early during process exit, when registers are still "
9597 "available, allowing the tracer to see where the exit occurred, whereas the "
9598 "normal exit notification is done after the process is finished exiting. "
9599 "Even though context is available, the tracer cannot prevent the exit from "
9600 "happening at this point."
9602 "tracee の停止はレジスターがまだ参照可能であるプロセス終了処理の初期に行わ"
9603 "れ、 トレーサはどこで終了が発生したかを知ることができる。 通常の終了通知 "
9604 "(exit notification) はプロセスの終了処理が完了した後に 行われる。コンテキスト"
9605 "を参照することはできるにも関わらず、 トレーサはこの時点から終了を止めることは"
9609 #: build/C/man2/ptrace.2:498
9611 msgid "B<PTRACE_O_TRACEFORK> (since Linux 2.5.46)"
9612 msgstr "B<PTRACE_O_TRACEFORK> (Linux 2.5.46 以降)"
9615 #: build/C/man2/ptrace.2:515
9617 "Stop the tracee at the next B<fork>(2) and automatically start tracing the "
9618 "newly forked process, which will start with a B<SIGSTOP>, or "
9619 "B<PTRACE_EVENT_STOP> if B<PTRACE_SEIZE> was used. A B<waitpid>(2) by the "
9620 "tracer will return a I<status> value such that"
9622 "次の B<fork>(2) 呼び出し時に tracee を停止し、 新しく fork されたプロセスの"
9623 "トレースを自動的に開始し、 B<SIGSTOP> でそのプロセスの実行を開始する。 "
9624 "B<PTRACE_SEIZE> が使用された場合は B<PTRACE_EVENT_STOP> で実行を開始する。 "
9625 "tracer による B<waitpid>(2) の呼び出しでは以下のような I<status> 値が返る。"
9628 #: build/C/man2/ptrace.2:518
9630 msgid " statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_FORKE<lt>E<lt>8))\n"
9631 msgstr " statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_FORKE<lt>E<lt>8))\n"
9634 #: build/C/man2/ptrace.2:522
9636 msgid "B<PTRACE_O_TRACESYSGOOD> (since Linux 2.4.6)"
9637 msgstr "B<PTRACE_O_TRACESYSGOOD> (Linux 2.4.6 以降)"
9640 #: build/C/man2/ptrace.2:531
9642 "When delivering system call traps, set bit 7 in the signal number (i.e., "
9643 "deliver I<SIGTRAP|0x80>). This makes it easy for the tracer to distinguish "
9644 "normal traps from those caused by a system call. (B<PTRACE_O_TRACESYSGOOD> "
9645 "may not work on all architectures.)"
9647 "システムコールのトラップが配送されたときに、シグナル番号のビット 7 を設定す"
9648 "る (すなわち、I<SIGTRAP | 0x80> を配送する)。 これにより、トレーサが通常のト"
9649 "ラップとシステムコールによるトラップを区別しやすくなる。 "
9650 "(B<PTRACE_O_TRACESYSGOOD> はどのアーキテクチャーでも動作しない可能性がある。)"
9653 #: build/C/man2/ptrace.2:531
9655 msgid "B<PTRACE_O_TRACEVFORK> (since Linux 2.5.46)"
9656 msgstr "B<PTRACE_O_TRACEVFORK> (Linux 2.5.46 以降)"
9659 #: build/C/man2/ptrace.2:548
9661 "Stop the tracee at the next B<vfork>(2) and automatically start tracing the "
9662 "newly vforked process, which will start with a B<SIGSTOP>, or "
9663 "B<PTRACE_EVENT_STOP> if B<PTRACE_SEIZE> was used. A B<waitpid>(2) by the "
9664 "tracer will return a I<status> value such that"
9666 "次の B<vfork>(2) 呼び出し時に tracee を停止し、 新しく vfork されたプロセス"
9667 "のトレースを自動的に開始し、 B<SIGSTOP> でそのプロセスの実行を開始する。 "
9668 "B<PTRACE_SEIZE> が使用された場合は B<PTRACE_EVENT_STOP> で実行を開始する。 "
9669 "tracer による B<waitpid>(2) の呼び出しでは以下のような I<status> 値が返る。"
9672 #: build/C/man2/ptrace.2:551
9674 msgid " statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_VFORKE<lt>E<lt>8))\n"
9675 msgstr " statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_VFORKE<lt>E<lt>8))\n"
9678 #: build/C/man2/ptrace.2:555
9680 msgid "B<PTRACE_O_TRACEVFORKDONE> (since Linux 2.5.60)"
9681 msgstr "B<PTRACE_O_TRACEVFORKDONE> (Linux 2.5.60 以降)"
9684 #: build/C/man2/ptrace.2:564
9686 "Stop the tracee at the completion of the next B<vfork>(2). A B<waitpid>(2) "
9687 "by the tracer will return a I<status> value such that"
9691 #: build/C/man2/ptrace.2:567
9693 msgid " statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_VFORK_DONEE<lt>E<lt>8))\n"
9697 #: build/C/man2/ptrace.2:571
9699 "The PID of the new process can (since Linux 2.6.18) be retrieved with "
9700 "B<PTRACE_GETEVENTMSG>."
9704 #: build/C/man2/ptrace.2:571
9706 msgid "B<PTRACE_O_TRACESECCOMP> (since Linux 3.5)"
9707 msgstr "B<PTRACE_O_TRACESECCOMP> (Linux 3.5 以降)"
9710 #: build/C/man2/ptrace.2:582
9712 "Stop the tracee when a B<seccomp>(2) B<SECCOMP_RET_TRACE> rule is "
9713 "triggered. A B<waitpid>(2) by the tracer will return a I<status> value "
9716 "B<seccomp>(2) B<SECCOMP_RET_TRACE> ルールが起動された場合に tracee を停止す"
9717 "る。 tracer による B<waitpid>(2) の呼び出しでは以下のような I<status> 値が返"
9721 #: build/C/man2/ptrace.2:585
9723 msgid " statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_SECCOMPE<lt>E<lt>8))\n"
9724 msgstr " statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_SECCOMPE<lt>E<lt>8))\n"
9727 #: build/C/man2/ptrace.2:595
9729 "While this triggers a B<PTRACE_EVENT> stop, it is similar to a syscall-enter-"
9730 "stop, in that the tracee has not yet entered the syscall that seccomp "
9731 "triggered on. The seccomp event message data (from the B<SECCOMP_RET_DATA> "
9732 "portion of the seccomp filter rule) can be retrieved with "
9733 "B<PTRACE_GETEVENTMSG>."
9737 #: build/C/man2/ptrace.2:596
9739 msgid "B<PTRACE_GETEVENTMSG> (since Linux 2.5.46)"
9740 msgstr "B<PTRACE_GETEVENTMSG> (Linux 2.5.46 以降)"
9743 #: build/C/man2/ptrace.2:623
9745 "Retrieve a message (as an I<unsigned long>) about the ptrace event that "
9746 "just happened, placing it at the address I<data> in the tracer. For "
9747 "B<PTRACE_EVENT_EXIT>, this is the tracee's exit status. For "
9748 "B<PTRACE_EVENT_FORK>, B<PTRACE_EVENT_VFORK>, B<PTRACE_EVENT_VFORK_DONE>, and "
9749 "B<PTRACE_EVENT_CLONE>, this is the PID of the new process. For "
9750 "B<PTRACE_EVENT_SECCOMP>, this is the B<seccomp>(2) filter's "
9751 "B<SECCOMP_RET_DATA> associated with the triggered rule. (I<addr> is "
9754 "発生したばかりの ptrace イベントに関するメッセージを (I<unsigned long> 型で) "
9755 "取得する。 取得したメッセージは tracer の I<data> のアドレスに格納される。 格"
9756 "納される内容は、 B<PTRACE_EVENT_EXIT> の場合は tracee の終了ステータスであ"
9757 "る。 B<PTRACE_EVENT_FORK>, B<PTRACE_EVENT_VFORK>, "
9758 "B<PTRACE_EVENT_VFORK_DONE>, B<PTRACE_EVENT_CLONE> の場合は新しいプロセスの "
9759 "PID が格納される。 B<PTRACE_EVENT_SECCOMP> の場合は、起動されたルールに関連付"
9760 "けられた B<seccomp>(2) フィルターの B<SECCOMP_RET_DATA> が格納される。 "
9764 #: build/C/man2/ptrace.2:623
9766 msgid "B<PTRACE_CONT>"
9767 msgstr "B<PTRACE_CONT>"
9770 #: build/C/man2/ptrace.2:635
9772 "Restart the stopped tracee process. If I<data> is nonzero, it is "
9773 "interpreted as the number of a signal to be delivered to the tracee; "
9774 "otherwise, no signal is delivered. Thus, for example, the tracer can "
9775 "control whether a signal sent to the tracee is delivered or not. (I<addr> "
9778 "停止した tracee の実行を再開させる。 I<data> がゼロでない場合、 tracee に配送"
9779 "されるシグナル数と解釈される。 ゼロの場合はシグナルは配送されない。 これを使"
9780 "うと、例えば、 tracer は tracee に送られたシグナルを実際に配送するかどうかを "
9781 "制御することができる。(I<addr> は無視される。)"
9784 #: build/C/man2/ptrace.2:635
9786 msgid "B<PTRACE_SYSCALL>, B<PTRACE_SINGLESTEP>"
9787 msgstr "B<PTRACE_SYSCALL>, B<PTRACE_SINGLESTEP>"
9790 #: build/C/man2/ptrace.2:659
9792 "Restart the stopped tracee as for B<PTRACE_CONT>, but arrange for the tracee "
9793 "to be stopped at the next entry to or exit from a system call, or after "
9794 "execution of a single instruction, respectively. (The tracee will also, as "
9795 "usual, be stopped upon receipt of a signal.) From the tracer's perspective, "
9796 "the tracee will appear to have been stopped by receipt of a B<SIGTRAP>. So, "
9797 "for B<PTRACE_SYSCALL>, for example, the idea is to inspect the arguments to "
9798 "the system call at the first stop, then do another B<PTRACE_SYSCALL> and "
9799 "inspect the return value of the system call at the second stop. The I<data> "
9800 "argument is treated as for B<PTRACE_CONT>. (I<addr> is ignored.)"
9802 "B<PTRACE_CONT> と同様に停止した tracee を再開する。ただし、 "
9803 "B<PTRACE_SYSCALL> の場合は tracee が 次にシステムコールに入るかシステムコール"
9804 "から抜けるかする時に、 B<PTRACE_SINGLESTEP> の場合は 1 命令 (instruction) 実"
9805 "行した後に停止させる (通常どおり、 tracee はシグナルを受け取った場合にも停止"
9806 "する)。 tracer から見ると、 tracee は B<SIGTRAP> を受信して停止したように見え"
9807 "る。そのため、例えば B<PTRACE_SYSCALL> を使うと、1回目の停止で引き数を調べて "
9808 "B<PTRACE_SYSCALL> を実行し、 2回目の停止でシステムコールの返り値を調べる、 と"
9809 "いうようなことができる。 引き数 I<data> は B<PTRACE_CONT> の場合と同じ様に解"
9810 "釈される。 (I<addr> は無視される。)"
9813 #: build/C/man2/ptrace.2:659
9815 msgid "B<PTRACE_SYSEMU>, B<PTRACE_SYSEMU_SINGLESTEP> (since Linux 2.6.14)"
9816 msgstr "B<PTRACE_SYSEMU>, B<PTRACE_SYSEMU_SINGLESTEP> (Linux 2.6.14 以降)"
9820 #: build/C/man2/ptrace.2:680
9822 "For B<PTRACE_SYSEMU>, continue and stop on entry to the next system call, "
9823 "which will not be executed. For B<PTRACE_SYSEMU_SINGLESTEP>, do the same "
9824 "but also singlestep if not a system call. This call is used by programs "
9825 "like User Mode Linux that want to emulate all the tracee's system calls. "
9826 "The I<data> argument is treated as for B<PTRACE_CONT>. The I<addr> argument "
9827 "is ignored. These requests are currently supported only on x86."
9829 "B<PTRACE_SYSEMU> は、実行を再開し、次のシステムコールに入る時に停止させる。 "
9830 "システムコールは実行されない。 B<PTRACE_SYSEMU_SINGLESTEP> も同様だが、システ"
9831 "ムコールでない場合には 1 命令 (singlestep) だけ実行した時点でも停止させる。 "
9832 "このコールは User Mode Linux のように tracee のシステムコールを全て エミュ"
9833 "レートしようとするプログラムで使用される。 引き数 I<data> は B<PTRACE_CONT> "
9834 "の場合と同じ様に解釈される。 I<addr> 引き数は無視される。 現在のところこれら"
9835 "の要求は x86 でのみサポートされている。"
9838 #: build/C/man2/ptrace.2:680
9840 msgid "B<PTRACE_LISTEN> (since Linux 3.4)"
9841 msgstr " B<PTRACE_LISTEN> (since Linux 3.4)"
9844 #: build/C/man2/ptrace.2:691
9846 "Restart the stopped tracee, but prevent it from executing. The resulting "
9847 "state of the tracee is similar to a process which has been stopped by a "
9848 "B<SIGSTOP> (or other stopping signal). See the \"group-stop\" subsection "
9849 "for additional information. B<PTRACE_LISTEN> works only on tracees attached "
9850 "by B<PTRACE_SEIZE>."
9854 #: build/C/man2/ptrace.2:691
9856 msgid "B<PTRACE_KILL>"
9857 msgstr "B<PTRACE_KILL>"
9860 #: build/C/man2/ptrace.2:700
9862 "Send the tracee a B<SIGKILL> to terminate it. (I<addr> and I<data> are "
9865 "tracee に B<SIGKILL> を送り終了させる。(I<addr> と I<data> は無視される。)"
9867 #. [Note from Denys Vlasenko:
9868 #. deprecation suggested by Oleg Nesterov. He prefers to deprecate it
9869 #. instead of describing (and needing to support) PTRACE_KILL's quirks.]
9871 #: build/C/man2/ptrace.2:719
9873 "I<This operation is deprecated; do not use it!> Instead, send a B<SIGKILL> "
9874 "directly using B<kill>(2) or B<tgkill>(2). The problem with B<PTRACE_KILL> "
9875 "is that it requires the tracee to be in signal-delivery-stop, otherwise it "
9876 "may not work (i.e., may complete successfully but won't kill the tracee). "
9877 "By contrast, sending a B<SIGKILL> directly has no such limitation."
9881 #: build/C/man2/ptrace.2:719
9883 msgid "B<PTRACE_INTERRUPT> (since Linux 3.4)"
9884 msgstr " B<PTRACE_INTERRUPT> (since Linux 3.4)"
9887 #: build/C/man2/ptrace.2:747
9889 "Stop a tracee. If the tracee is running or sleeping in kernel space and "
9890 "B<PTRACE_SYSCALL> is in effect, the system call is interrupted and syscall-"
9891 "exit-stop is reported. (The interrupted system call is restarted when the "
9892 "tracee is restarted.) If the tracee was already stopped by a signal and "
9893 "B<PTRACE_LISTEN> was sent to it, the tracee stops with B<PTRACE_EVENT_STOP> "
9894 "and I<WSTOPSIG(status)> returns the stop signal. If any other ptrace-stop "
9895 "is generated at the same time (for example, if a signal is sent to the "
9896 "tracee), this ptrace-stop happens. If none of the above applies (for "
9897 "example, if the tracee is running in user space), it stops with "
9898 "B<PTRACE_EVENT_STOP> with I<WSTOPSIG(status)> == B<SIGTRAP>. "
9899 "B<PTRACE_INTERRUPT> only works on tracees attached by B<PTRACE_SEIZE>."
9903 #: build/C/man2/ptrace.2:747
9905 msgid "B<PTRACE_ATTACH>"
9906 msgstr "B<PTRACE_ATTACH>"
9908 #. No longer true (removed by Denys Vlasenko, 2011, who remarks:
9909 #. "I think it isn't true in non-ancient 2.4 and in 2.6/3.x.
9910 #. Basically, it's not true for any Linux in practical use.
9911 #. ; the behavior of the tracee is as if it had done a
9912 #. .BR PTRACE_TRACEME .
9913 #. The calling process actually becomes the parent of the tracee
9914 #. process for most purposes (e.g., it will receive
9915 #. notification of tracee events and appears in
9917 #. output as the tracee's parent), but a
9919 #. by the tracee will still return the PID of the original parent.
9921 #: build/C/man2/ptrace.2:775
9923 "Attach to the process specified in I<pid>, making it a tracee of the calling "
9924 "process. The tracee is sent a B<SIGSTOP>, but will not necessarily have "
9925 "stopped by the completion of this call; use B<waitpid>(2) to wait for the "
9926 "tracee to stop. See the \"Attaching and detaching\" subsection for "
9927 "additional information. (I<addr> and I<data> are ignored.)"
9931 #: build/C/man2/ptrace.2:775
9933 msgid "B<PTRACE_SEIZE> (since Linux 3.4)"
9934 msgstr " B<PTRACE_SEIZE> (since Linux 3.4)"
9937 #: build/C/man2/ptrace.2:795
9939 "Attach to the process specified in I<pid>, making it a tracee of the calling "
9940 "process. Unlike B<PTRACE_ATTACH>, B<PTRACE_SEIZE> does not stop the "
9941 "process. Only a B<PTRACE_SEIZE>d process can accept B<PTRACE_INTERRUPT> and "
9942 "B<PTRACE_LISTEN> commands. I<addr> must be zero. I<data> contains a bit "
9943 "mask of ptrace options to activate immediately."
9947 #: build/C/man2/ptrace.2:795
9949 msgid "B<PTRACE_DETACH>"
9950 msgstr "B<PTRACE_DETACH>"
9953 #: build/C/man2/ptrace.2:804
9955 "Restart the stopped tracee as for B<PTRACE_CONT>, but first detach from it. "
9956 "Under Linux, a tracee can be detached in this way regardless of which method "
9957 "was used to initiate tracing. (I<addr> is ignored.)"
9959 "B<PTRACE_CONT> と同様に停止した tracee を再開するが、 まずそのプロセスからの"
9960 "分離 (detach) を行う。 Linux では、トレースされている tracee はどのような方法"
9961 "でトレースを開始されたとしても、この方法で分離 (detach) することができる。 "
9965 #: build/C/man2/ptrace.2:804
9967 msgid "Death under ptrace"
9971 #: build/C/man2/ptrace.2:813
9973 "When a (possibly multithreaded) process receives a killing signal (one whose "
9974 "disposition is set to B<SIG_DFL> and whose default action is to kill the "
9975 "process), all threads exit. Tracees report their death to their tracer(s). "
9976 "Notification of this event is delivered via B<waitpid>(2)."
9980 #: build/C/man2/ptrace.2:822
9982 "Note that the killing signal will first cause signal-delivery-stop (on one "
9983 "tracee only), and only after it is injected by the tracer (or after it was "
9984 "dispatched to a thread which isn't traced), will death from the signal "
9985 "happen on I<all> tracees within a multithreaded process. (The term \"signal-"
9986 "delivery-stop\" is explained below.)"
9990 #: build/C/man2/ptrace.2:834
9992 "B<SIGKILL> does not generate signal-delivery-stop and therefore the tracer "
9993 "can't suppress it. B<SIGKILL> kills even within system calls (syscall-exit-"
9994 "stop is not generated prior to death by B<SIGKILL>). The net effect is that "
9995 "B<SIGKILL> always kills the process (all its threads), even if some threads "
9996 "of the process are ptraced."
10000 #: build/C/man2/ptrace.2:839
10002 "When the tracee calls B<_exit>(2), it reports its death to its tracer. "
10003 "Other threads are not affected."
10006 #. type: Plain text
10007 #: build/C/man2/ptrace.2:843
10009 "When any thread executes B<exit_group>(2), every tracee in its thread group "
10010 "reports its death to its tracer."
10013 #. type: Plain text
10014 #: build/C/man2/ptrace.2:857
10016 "If the B<PTRACE_O_TRACEEXIT> option is on, B<PTRACE_EVENT_EXIT> will happen "
10017 "before actual death. This applies to exits via B<exit>(2), "
10018 "B<exit_group>(2), and signal deaths (except B<SIGKILL>), and when threads "
10019 "are torn down on B<execve>(2) in a multithreaded process."
10022 #. type: Plain text
10023 #: build/C/man2/ptrace.2:882
10025 "The tracer cannot assume that the ptrace-stopped tracee exists. There are "
10026 "many scenarios when the tracee may die while stopped (such as B<SIGKILL>). "
10027 "Therefore, the tracer must be prepared to handle an B<ESRCH> error on any "
10028 "ptrace operation. Unfortunately, the same error is returned if the tracee "
10029 "exists but is not ptrace-stopped (for commands which require a stopped "
10030 "tracee), or if it is not traced by the process which issued the ptrace "
10031 "call. The tracer needs to keep track of the stopped/running state of the "
10032 "tracee, and interpret B<ESRCH> as \"tracee died unexpectedly\" only if it "
10033 "knows that the tracee has been observed to enter ptrace-stop. Note that "
10034 "there is no guarantee that I<waitpid(WNOHANG)> will reliably report the "
10035 "tracee's death status if a ptrace operation returned B<ESRCH>. "
10036 "I<waitpid(WNOHANG)> may return 0 instead. In other words, the tracee may be "
10037 "\"not yet fully dead\", but already refusing ptrace requests."
10040 #. type: Plain text
10041 #: build/C/man2/ptrace.2:896
10043 "The tracer can't assume that the tracee I<always> ends its life by reporting "
10044 "I<WIFEXITED(status)> or I<WIFSIGNALED(status)>; there are cases where this "
10045 "does not occur. For example, if a thread other than thread group leader "
10046 "does an B<execve>(2), it disappears; its PID will never be seen again, and "
10047 "any subsequent ptrace stops will be reported under the thread group leader's "
10052 #: build/C/man2/ptrace.2:896
10054 msgid "Stopped states"
10057 #. type: Plain text
10058 #: build/C/man2/ptrace.2:918
10060 "A tracee can be in two states: running or stopped. For the purposes of "
10061 "ptrace, a tracee which is blocked in a system call (such as B<read>(2), "
10062 "B<pause>(2), etc.) is nevertheless considered to be running, even if the "
10063 "tracee is blocked for a long time. The state of the tracee after "
10064 "B<PTRACE_LISTEN> is somewhat of a gray area: it is not in any ptrace-stop "
10065 "(ptrace commands won't work on it, and it will deliver B<waitpid>(2) "
10066 "notifications), but it also may be considered \"stopped\" because it is not "
10067 "executing instructions (is not scheduled), and if it was in group-stop "
10068 "before B<PTRACE_LISTEN>, it will not respond to signals until B<SIGCONT> is "
10072 #. type: Plain text
10073 #: build/C/man2/ptrace.2:922
10075 "There are many kinds of states when the tracee is stopped, and in ptrace "
10076 "discussions they are often conflated. Therefore, it is important to use "
10080 #. type: Plain text
10081 #: build/C/man2/ptrace.2:933
10083 "In this manual page, any stopped state in which the tracee is ready to "
10084 "accept ptrace commands from the tracer is called I<ptrace-stop>. Ptrace-"
10085 "stops can be further subdivided into I<signal-delivery-stop>, I<group-stop>, "
10086 "I<syscall-stop>, and so on. These stopped states are described in detail "
10090 #. type: Plain text
10091 #: build/C/man2/ptrace.2:938
10093 "When the running tracee enters ptrace-stop, it notifies its tracer using "
10094 "B<waitpid>(2) (or one of the other \"wait\" system calls). Most of this "
10095 "manual page assumes that the tracer waits with:"
10098 #. type: Plain text
10099 #: build/C/man2/ptrace.2:940
10101 msgid " pid = waitpid(pid_or_minus_1, &status, __WALL);\n"
10105 #. Do we require __WALL usage, or will just using 0 be ok? (With 0,
10106 #. I am not 100% sure there aren't ugly corner cases.) Are the
10107 #. rules different if user wants to use waitid? Will waitid require
10109 #. type: Plain text
10110 #: build/C/man2/ptrace.2:952
10112 "Ptrace-stopped tracees are reported as returns with I<pid> greater than 0 "
10113 "and I<WIFSTOPPED(status)> true."
10116 #. type: Plain text
10117 #: build/C/man2/ptrace.2:960
10119 "The B<__WALL> flag does not include the B<WSTOPPED> and B<WEXITED> flags, "
10120 "but implies their functionality."
10123 #. type: Plain text
10124 #: build/C/man2/ptrace.2:967
10126 "Setting the B<WCONTINUED> flag when calling B<waitpid>(2) is not "
10127 "recommended: the \"continued\" state is per-process and consuming it can "
10128 "confuse the real parent of the tracee."
10131 #. type: Plain text
10132 #: build/C/man2/ptrace.2:975
10134 "Use of the B<WNOHANG> flag may cause B<waitpid>(2) to return 0 (\"no wait "
10135 "results available yet\") even if the tracer knows there should be a "
10136 "notification. Example:"
10139 #. type: Plain text
10140 #: build/C/man2/ptrace.2:984
10144 " ptrace(PTRACE_CONT, pid, 0L, 0L);\n"
10145 " if (errno == ESRCH) {\n"
10146 " /* tracee is dead */\n"
10147 " r = waitpid(tracee, &status, __WALL | WNOHANG);\n"
10148 " /* r can still be 0 here! */\n"
10152 #. type: Plain text
10153 #: build/C/man2/ptrace.2:1007
10155 "The following kinds of ptrace-stops exist: signal-delivery-stops, group-"
10156 "stops, B<PTRACE_EVENT> stops, syscall-stops. They all are reported by "
10157 "B<waitpid>(2) with I<WIFSTOPPED(status)> true. They may be differentiated "
10158 "by examining the value I<statusE<gt>E<gt>8>, and if there is ambiguity in "
10159 "that value, by querying B<PTRACE_GETSIGINFO>. (Note: the "
10160 "I<WSTOPSIG(status)> macro can't be used to perform this examination, because "
10161 "it returns the value I<(statusE<gt>E<gt>8)\\ &\\ 0xff>.)"
10165 #: build/C/man2/ptrace.2:1007
10167 msgid "Signal-delivery-stop"
10170 #. type: Plain text
10171 #: build/C/man2/ptrace.2:1027
10173 "When a (possibly multithreaded) process receives any signal except "
10174 "B<SIGKILL>, the kernel selects an arbitrary thread which handles the "
10175 "signal. (If the signal is generated with B<tgkill>(2), the target thread "
10176 "can be explicitly selected by the caller.) If the selected thread is "
10177 "traced, it enters signal-delivery-stop. At this point, the signal is not "
10178 "yet delivered to the process, and can be suppressed by the tracer. If the "
10179 "tracer doesn't suppress the signal, it passes the signal to the tracee in "
10180 "the next ptrace restart request. This second step of signal delivery is "
10181 "called I<signal injection> in this manual page. Note that if the signal is "
10182 "blocked, signal-delivery-stop doesn't happen until the signal is unblocked, "
10183 "with the usual exception that B<SIGSTOP> can't be blocked."
10186 #. type: Plain text
10187 #: build/C/man2/ptrace.2:1041
10189 "Signal-delivery-stop is observed by the tracer as B<waitpid>(2) returning "
10190 "with I<WIFSTOPPED(status)> true, with the signal returned by "
10191 "I<WSTOPSIG(status)>. If the signal is B<SIGTRAP>, this may be a different "
10192 "kind of ptrace-stop; see the \"Syscall-stops\" and \"execve\" sections below "
10193 "for details. If I<WSTOPSIG(status)> returns a stopping signal, this may be "
10194 "a group-stop; see below."
10198 #: build/C/man2/ptrace.2:1041
10200 msgid "Signal injection and suppression"
10203 #. type: Plain text
10204 #: build/C/man2/ptrace.2:1044
10206 "After signal-delivery-stop is observed by the tracer, the tracer should "
10207 "restart the tracee with the call"
10210 #. type: Plain text
10211 #: build/C/man2/ptrace.2:1046
10213 msgid " ptrace(PTRACE_restart, pid, 0, sig)\n"
10216 #. type: Plain text
10217 #: build/C/man2/ptrace.2:1059
10219 "where B<PTRACE_restart> is one of the restarting ptrace requests. If I<sig> "
10220 "is 0, then a signal is not delivered. Otherwise, the signal I<sig> is "
10221 "delivered. This operation is called I<signal injection> in this manual "
10222 "page, to distinguish it from signal-delivery-stop."
10225 #. type: Plain text
10226 #: build/C/man2/ptrace.2:1065
10228 "The I<sig> value may be different from the I<WSTOPSIG(status)> value: the "
10229 "tracer can cause a different signal to be injected."
10232 #. type: Plain text
10233 #: build/C/man2/ptrace.2:1081
10235 "Note that a suppressed signal still causes system calls to return "
10236 "prematurely. In this case, system calls will be restarted: the tracer will "
10237 "observe the tracee to reexecute the interrupted system call (or "
10238 "B<restart_syscall>(2) system call for a few system calls which use a "
10239 "different mechanism for restarting) if the tracer uses B<PTRACE_SYSCALL>. "
10240 "Even system calls (such as B<poll>(2)) which are not restartable after "
10241 "signal are restarted after signal is suppressed; however, kernel bugs exist "
10242 "which cause some system calls to fail with B<EINTR> even though no "
10243 "observable signal is injected to the tracee."
10246 #. type: Plain text
10247 #: build/C/man2/ptrace.2:1092
10249 "Restarting ptrace commands issued in ptrace-stops other than signal-delivery-"
10250 "stop are not guaranteed to inject a signal, even if I<sig> is nonzero. No "
10251 "error is reported; a nonzero I<sig> may simply be ignored. Ptrace users "
10252 "should not try to \"create a new signal\" this way: use B<tgkill>(2) "
10256 #. type: Plain text
10257 #: build/C/man2/ptrace.2:1099
10259 "The fact that signal injection requests may be ignored when restarting the "
10260 "tracee after ptrace stops that are not signal-delivery-stops is a cause of "
10261 "confusion among ptrace users. One typical scenario is that the tracer "
10262 "observes group-stop, mistakes it for signal-delivery-stop, restarts the "
10266 #. type: Plain text
10267 #: build/C/man2/ptrace.2:1101
10269 msgid " ptrace(PTRACE_restart, pid, 0, stopsig)\n"
10272 #. type: Plain text
10273 #: build/C/man2/ptrace.2:1107
10275 "with the intention of injecting I<stopsig>, but I<stopsig> gets ignored and "
10276 "the tracee continues to run."
10279 #. type: Plain text
10280 #: build/C/man2/ptrace.2:1127
10282 "The B<SIGCONT> signal has a side effect of waking up (all threads of) a "
10283 "group-stopped process. This side effect happens before signal-delivery-"
10284 "stop. The tracer can't suppress this side effect (it can only suppress "
10285 "signal injection, which only causes the B<SIGCONT> handler to not be "
10286 "executed in the tracee, if such a handler is installed). In fact, waking up "
10287 "from group-stop may be followed by signal-delivery-stop for signal(s) "
10288 "I<other than> B<SIGCONT>, if they were pending when B<SIGCONT> was "
10289 "delivered. In other words, B<SIGCONT> may be not the first signal observed "
10290 "by the tracee after it was sent."
10293 #. type: Plain text
10294 #: build/C/man2/ptrace.2:1131
10296 "Stopping signals cause (all threads of) a process to enter group-stop. This "
10297 "side effect happens after signal injection, and therefore can be suppressed "
10302 #. In the Linux 2.4 sources, in arch/i386/kernel/signal.c::do_signal(),
10304 #. /* The debugger continued. Ignore SIGSTOP. */
10305 #. if (signr == SIGSTOP)
10307 #. type: Plain text
10308 #: build/C/man2/ptrace.2:1141
10309 msgid "In Linux 2.4 and earlier, the B<SIGSTOP> signal can't be injected."
10312 #. type: Plain text
10313 #: build/C/man2/ptrace.2:1158
10315 "B<PTRACE_GETSIGINFO> can be used to retrieve a I<siginfo_t> structure which "
10316 "corresponds to the delivered signal. B<PTRACE_SETSIGINFO> may be used to "
10317 "modify it. If B<PTRACE_SETSIGINFO> has been used to alter I<siginfo_t>, the "
10318 "I<si_signo> field and the I<sig> parameter in the restarting command must "
10319 "match, otherwise the result is undefined."
10323 #: build/C/man2/ptrace.2:1158
10328 #. type: Plain text
10329 #: build/C/man2/ptrace.2:1170
10331 "When a (possibly multithreaded) process receives a stopping signal, all "
10332 "threads stop. If some threads are traced, they enter a group-stop. Note "
10333 "that the stopping signal will first cause signal-delivery-stop (on one "
10334 "tracee only), and only after it is injected by the tracer (or after it was "
10335 "dispatched to a thread which isn't traced), will group-stop be initiated on "
10336 "I<all> tracees within the multithreaded process. As usual, every tracee "
10337 "reports its group-stop separately to the corresponding tracer."
10340 #. type: Plain text
10341 #: build/C/man2/ptrace.2:1179
10343 "Group-stop is observed by the tracer as B<waitpid>(2) returning with "
10344 "I<WIFSTOPPED(status)> true, with the stopping signal available via "
10345 "I<WSTOPSIG(status)>. The same result is returned by some other classes of "
10346 "ptrace-stops, therefore the recommended practice is to perform the call"
10349 #. type: Plain text
10350 #: build/C/man2/ptrace.2:1181
10352 msgid " ptrace(PTRACE_GETSIGINFO, pid, 0, &siginfo)\n"
10355 #. type: Plain text
10356 #: build/C/man2/ptrace.2:1202
10358 "The call can be avoided if the signal is not B<SIGSTOP>, B<SIGTSTP>, "
10359 "B<SIGTTIN>, or B<SIGTTOU>; only these four signals are stopping signals. If "
10360 "the tracer sees something else, it can't be a group-stop. Otherwise, the "
10361 "tracer needs to call B<PTRACE_GETSIGINFO>. If B<PTRACE_GETSIGINFO> fails "
10362 "with B<EINVAL>, then it is definitely a group-stop. (Other failure codes "
10363 "are possible, such as B<ESRCH> (\"no such process\") if a B<SIGKILL> killed "
10367 #. type: Plain text
10368 #: build/C/man2/ptrace.2:1212
10370 "If tracee was attached using B<PTRACE_SEIZE>, group-stop is indicated by "
10371 "B<PTRACE_EVENT_STOP>: I<statusE<gt>E<gt>16 == PTRACE_EVENT_STOP>. This "
10372 "allows detection of group-stops without requiring an extra "
10373 "B<PTRACE_GETSIGINFO> call."
10376 #. type: Plain text
10377 #: build/C/man2/ptrace.2:1221
10379 "As of Linux 2.6.38, after the tracer sees the tracee ptrace-stop and until "
10380 "it restarts or kills it, the tracee will not run, and will not send "
10381 "notifications (except B<SIGKILL> death) to the tracer, even if the tracer "
10382 "enters into another B<waitpid>(2) call."
10385 #. type: Plain text
10386 #: build/C/man2/ptrace.2:1235
10388 "The kernel behavior described in the previous paragraph causes a problem "
10389 "with transparent handling of stopping signals. If the tracer restarts the "
10390 "tracee after group-stop, the stopping signal is effectively ignored\\(emthe "
10391 "tracee doesn't remain stopped, it runs. If the tracer doesn't restart the "
10392 "tracee before entering into the next B<waitpid>(2), future B<SIGCONT> "
10393 "signals will not be reported to the tracer; this would cause the B<SIGCONT> "
10394 "signals to have no effect on the tracee."
10397 #. type: Plain text
10398 #: build/C/man2/ptrace.2:1246
10400 "Since Linux 3.4, there is a method to overcome this problem: instead of "
10401 "B<PTRACE_CONT>, a B<PTRACE_LISTEN> command can be used to restart a tracee "
10402 "in a way where it does not execute, but waits for a new event which it can "
10403 "report via B<waitpid>(2) (such as when it is restarted by a B<SIGCONT>)."
10407 #: build/C/man2/ptrace.2:1246
10409 msgid "PTRACE_EVENT stops"
10412 #. type: Plain text
10413 #: build/C/man2/ptrace.2:1252
10415 "If the tracer sets B<PTRACE_O_TRACE_*> options, the tracee will enter ptrace-"
10416 "stops called B<PTRACE_EVENT> stops."
10419 #. type: Plain text
10420 #: build/C/man2/ptrace.2:1266
10422 "B<PTRACE_EVENT> stops are observed by the tracer as B<waitpid>(2) returning "
10423 "with I<WIFSTOPPED(status)>, and I<WSTOPSIG(status)> returns B<SIGTRAP>. An "
10424 "additional bit is set in the higher byte of the status word: the value "
10425 "I<statusE<gt>E<gt>8> will be"
10428 #. type: Plain text
10429 #: build/C/man2/ptrace.2:1268
10431 msgid " (SIGTRAP | PTRACE_EVENT_foo E<lt>E<lt> 8).\n"
10434 #. type: Plain text
10435 #: build/C/man2/ptrace.2:1270
10436 msgid "The following events exist:"
10440 #: build/C/man2/ptrace.2:1270
10442 msgid "B<PTRACE_EVENT_VFORK>"
10443 msgstr "B<PTRACE_EVENT_VFORK>"
10445 #. type: Plain text
10446 #: build/C/man2/ptrace.2:1283
10448 "Stop before return from B<vfork>(2) or B<clone>(2) with the B<CLONE_VFORK> "
10449 "flag. When the tracee is continued after this stop, it will wait for child "
10450 "to exit/exec before continuing its execution (in other words, the usual "
10451 "behavior on B<vfork>(2))."
10455 #: build/C/man2/ptrace.2:1283
10457 msgid "B<PTRACE_EVENT_FORK>"
10458 msgstr "B<PTRACE_EVENT_FORK>"
10460 #. type: Plain text
10461 #: build/C/man2/ptrace.2:1291
10463 "Stop before return from B<fork>(2) or B<clone>(2) with the exit signal set "
10468 #: build/C/man2/ptrace.2:1291
10470 msgid "B<PTRACE_EVENT_CLONE>"
10471 msgstr "B<PTRACE_EVENT_CLONE>"
10473 #. type: Plain text
10474 #: build/C/man2/ptrace.2:1295
10475 msgid "Stop before return from B<clone>(2)."
10479 #: build/C/man2/ptrace.2:1295
10481 msgid "B<PTRACE_EVENT_VFORK_DONE>"
10482 msgstr "B<PTRACE_EVENT_VFORK_DONE>"
10484 #. type: Plain text
10485 #: build/C/man2/ptrace.2:1305
10487 "Stop before return from B<vfork>(2) or B<clone>(2) with the B<CLONE_VFORK> "
10488 "flag, but after the child unblocked this tracee by exiting or execing."
10491 #. type: Plain text
10492 #: build/C/man2/ptrace.2:1311
10494 "For all four stops described above, the stop occurs in the parent (i.e., the "
10495 "tracee), not in the newly created thread. B<PTRACE_GETEVENTMSG> can be used "
10496 "to retrieve the new thread's ID."
10500 #: build/C/man2/ptrace.2:1311
10502 msgid "B<PTRACE_EVENT_EXEC>"
10503 msgstr "B<PTRACE_EVENT_EXEC>"
10505 #. type: Plain text
10506 #: build/C/man2/ptrace.2:1318
10508 "Stop before return from B<execve>(2). Since Linux 3.0, "
10509 "B<PTRACE_GETEVENTMSG> returns the former thread ID."
10513 #: build/C/man2/ptrace.2:1318
10515 msgid "B<PTRACE_EVENT_EXIT>"
10516 msgstr "B<PTRACE_EVENT_EXIT>"
10518 #. type: Plain text
10519 #: build/C/man2/ptrace.2:1334
10521 "Stop before exit (including death from B<exit_group>(2)), signal death, or "
10522 "exit caused by B<execve>(2) in a multithreaded process. "
10523 "B<PTRACE_GETEVENTMSG> returns the exit status. Registers can be examined "
10524 "(unlike when \"real\" exit happens). The tracee is still alive; it needs to "
10525 "be B<PTRACE_CONT>ed or B<PTRACE_DETACH>ed to finish exiting."
10529 #: build/C/man2/ptrace.2:1334
10531 msgid "B<PTRACE_EVENT_STOP>"
10532 msgstr "B<PTRACE_EVENT_STOP>"
10534 #. type: Plain text
10535 #: build/C/man2/ptrace.2:1346
10537 "Stop induced by B<PTRACE_INTERRUPT> command, or group-stop, or initial "
10538 "ptrace-stop when a new child is attached (only if attached using "
10539 "B<PTRACE_SEIZE>), or B<PTRACE_EVENT_STOP> if B<PTRACE_SEIZE> was used."
10543 #: build/C/man2/ptrace.2:1346
10545 msgid "B<PTRACE_EVENT_SECCOMP>"
10546 msgstr "B<PTRACE_EVENT_SECCOMP>"
10548 #. type: Plain text
10549 #: build/C/man2/ptrace.2:1357
10551 "Stop triggered by a B<seccomp>(2) rule on tracee syscall entry when "
10552 "B<PTRACE_O_TRACESECCOMP> has been set by the tracer. The seccomp event "
10553 "message data (from the B<SECCOMP_RET_DATA> portion of the seccomp filter "
10554 "rule) can be retrieved with B<PTRACE_GETEVENTMSG>."
10557 #. type: Plain text
10558 #: build/C/man2/ptrace.2:1369
10560 "B<PTRACE_GETSIGINFO> on B<PTRACE_EVENT> stops returns B<SIGTRAP> in "
10561 "I<si_signo>, with I<si_code> set to I<(eventE<lt>E<lt>8)\\ |\\ SIGTRAP>."
10565 #: build/C/man2/ptrace.2:1369
10567 msgid "Syscall-stops"
10570 #. type: Plain text
10571 #: build/C/man2/ptrace.2:1382
10573 "If the tracee was restarted by B<PTRACE_SYSCALL>, the tracee enters syscall-"
10574 "enter-stop just prior to entering any system call. If the tracer restarts "
10575 "the tracee with B<PTRACE_SYSCALL>, the tracee enters syscall-exit-stop when "
10576 "the system call is finished, or if it is interrupted by a signal. (That is, "
10577 "signal-delivery-stop never happens between syscall-enter-stop and syscall-"
10578 "exit-stop; it happens I<after> syscall-exit-stop.)"
10581 #. type: Plain text
10582 #: build/C/man2/ptrace.2:1396
10584 "Other possibilities are that the tracee may stop in a B<PTRACE_EVENT> stop, "
10585 "exit (if it entered B<_exit>(2) or B<exit_group>(2)), be killed by "
10586 "B<SIGKILL>, or die silently (if it is a thread group leader, the "
10587 "B<execve>(2) happened in another thread, and that thread is not traced by "
10588 "the same tracer; this situation is discussed later)."
10591 #. type: Plain text
10592 #: build/C/man2/ptrace.2:1411
10594 "Syscall-enter-stop and syscall-exit-stop are observed by the tracer as "
10595 "B<waitpid>(2) returning with I<WIFSTOPPED(status)> true, and "
10596 "I<WSTOPSIG(status)> giving B<SIGTRAP>. If the B<PTRACE_O_TRACESYSGOOD> "
10597 "option was set by the tracer, then I<WSTOPSIG(status)> will give the value "
10598 "I<(SIGTRAP\\ |\\ 0x80)>."
10601 #. type: Plain text
10602 #: build/C/man2/ptrace.2:1417
10604 "Syscall-stops can be distinguished from signal-delivery-stop with B<SIGTRAP> "
10605 "by querying B<PTRACE_GETSIGINFO> for the following cases:"
10609 #: build/C/man2/ptrace.2:1417
10611 msgid "I<si_code> E<lt>= 0"
10614 #. type: Plain text
10615 #: build/C/man2/ptrace.2:1429
10617 "B<SIGTRAP> was delivered as a result of a user-space action, for example, a "
10618 "system call (B<tgkill>(2), B<kill>(2), B<sigqueue>(3), etc.), expiration of "
10619 "a POSIX timer, change of state on a POSIX message queue, or completion of an "
10620 "asynchronous I/O request."
10624 #: build/C/man2/ptrace.2:1429
10626 msgid "I<si_code> == SI_KERNEL (0x80)"
10629 #. type: Plain text
10630 #: build/C/man2/ptrace.2:1433
10631 msgid "B<SIGTRAP> was sent by the kernel."
10635 #: build/C/man2/ptrace.2:1433
10637 msgid "I<si_code> == SIGTRAP or I<si_code> == (SIGTRAP|0x80)"
10640 #. type: Plain text
10641 #: build/C/man2/ptrace.2:1436
10642 msgid "This is a syscall-stop."
10645 #. type: Plain text
10646 #: build/C/man2/ptrace.2:1441
10648 "However, syscall-stops happen very often (twice per system call), and "
10649 "performing B<PTRACE_GETSIGINFO> for every syscall-stop may be somewhat "
10653 #. type: Plain text
10654 #: build/C/man2/ptrace.2:1464
10656 "Some architectures allow the cases to be distinguished by examining "
10657 "registers. For example, on x86, I<rax> == -B<ENOSYS> in syscall-enter-"
10658 "stop. Since B<SIGTRAP> (like any other signal) always happens I<after> "
10659 "syscall-exit-stop, and at this point I<rax> almost never contains -"
10660 "B<ENOSYS>, the B<SIGTRAP> looks like \"syscall-stop which is not syscall-"
10661 "enter-stop\"; in other words, it looks like a \"stray syscall-exit-stop\" "
10662 "and can be detected this way. But such detection is fragile and is best "
10666 #. type: Plain text
10667 #: build/C/man2/ptrace.2:1470
10669 "Using the B<PTRACE_O_TRACESYSGOOD> option is the recommended method to "
10670 "distinguish syscall-stops from other kinds of ptrace-stops, since it is "
10671 "reliable and does not incur a performance penalty."
10674 #. type: Plain text
10675 #: build/C/man2/ptrace.2:1481
10677 "Syscall-enter-stop and syscall-exit-stop are indistinguishable from each "
10678 "other by the tracer. The tracer needs to keep track of the sequence of "
10679 "ptrace-stops in order to not misinterpret syscall-enter-stop as syscall-exit-"
10680 "stop or vice versa. The rule is that syscall-enter-stop is always followed "
10681 "by syscall-exit-stop, B<PTRACE_EVENT> stop or the tracee's death; no other "
10682 "kinds of ptrace-stop can occur in between."
10685 #. type: Plain text
10686 #: build/C/man2/ptrace.2:1486
10688 "If after syscall-enter-stop, the tracer uses a restarting command other than "
10689 "B<PTRACE_SYSCALL>, syscall-exit-stop is not generated."
10692 #. type: Plain text
10693 #: build/C/man2/ptrace.2:1498
10695 "B<PTRACE_GETSIGINFO> on syscall-stops returns B<SIGTRAP> in I<si_signo>, "
10696 "with I<si_code> set to B<SIGTRAP> or I<(SIGTRAP|0x80)>."
10700 #: build/C/man2/ptrace.2:1498
10702 msgid "PTRACE_SINGLESTEP, PTRACE_SYSEMU, PTRACE_SYSEMU_SINGLESTEP stops"
10707 #. document stops occurring with PTRACE_SINGLESTEP, PTRACE_SYSEMU,
10708 #. PTRACE_SYSEMU_SINGLESTEP
10709 #. type: Plain text
10710 #: build/C/man2/ptrace.2:1504
10711 msgid "[Details of these kinds of stops are yet to be documented.]"
10715 #: build/C/man2/ptrace.2:1504
10717 msgid "Informational and restarting ptrace commands"
10720 #. type: Plain text
10721 #: build/C/man2/ptrace.2:1514
10723 "Most ptrace commands (all except B<PTRACE_ATTACH>, B<PTRACE_SEIZE>, "
10724 "B<PTRACE_TRACEME>, B<PTRACE_INTERRUPT>, and B<PTRACE_KILL>) require the "
10725 "tracee to be in a ptrace-stop, otherwise they fail with B<ESRCH>."
10728 #. type: Plain text
10729 #: build/C/man2/ptrace.2:1519
10731 "When the tracee is in ptrace-stop, the tracer can read and write data to the "
10732 "tracee using informational commands. These commands leave the tracee in "
10733 "ptrace-stopped state:"
10736 #. type: Plain text
10737 #: build/C/man2/ptrace.2:1531
10740 " ptrace(PTRACE_PEEKTEXT/PEEKDATA/PEEKUSER, pid, addr, 0);\n"
10741 " ptrace(PTRACE_POKETEXT/POKEDATA/POKEUSER, pid, addr, long_val);\n"
10742 " ptrace(PTRACE_GETREGS/GETFPREGS, pid, 0, &struct);\n"
10743 " ptrace(PTRACE_SETREGS/SETFPREGS, pid, 0, &struct);\n"
10744 " ptrace(PTRACE_GETREGSET, pid, NT_foo, &iov);\n"
10745 " ptrace(PTRACE_SETREGSET, pid, NT_foo, &iov);\n"
10746 " ptrace(PTRACE_GETSIGINFO, pid, 0, &siginfo);\n"
10747 " ptrace(PTRACE_SETSIGINFO, pid, 0, &siginfo);\n"
10748 " ptrace(PTRACE_GETEVENTMSG, pid, 0, &long_var);\n"
10749 " ptrace(PTRACE_SETOPTIONS, pid, 0, PTRACE_O_flags);\n"
10752 #. type: Plain text
10753 #: build/C/man2/ptrace.2:1543
10755 "Note that some errors are not reported. For example, setting signal "
10756 "information (I<siginfo>) may have no effect in some ptrace-stops, yet the "
10757 "call may succeed (return 0 and not set I<errno>); querying "
10758 "B<PTRACE_GETEVENTMSG> may succeed and return some random value if current "
10759 "ptrace-stop is not documented as returning a meaningful event message."
10762 #. type: Plain text
10763 #: build/C/man2/ptrace.2:1545
10767 #. type: Plain text
10768 #: build/C/man2/ptrace.2:1547
10770 msgid " ptrace(PTRACE_SETOPTIONS, pid, 0, PTRACE_O_flags);\n"
10773 #. type: Plain text
10774 #: build/C/man2/ptrace.2:1556
10776 "affects one tracee. The tracee's current flags are replaced. Flags are "
10777 "inherited by new tracees created and \"auto-attached\" via active "
10778 "B<PTRACE_O_TRACEFORK>, B<PTRACE_O_TRACEVFORK>, or B<PTRACE_O_TRACECLONE> "
10782 #. type: Plain text
10783 #: build/C/man2/ptrace.2:1559
10785 "Another group of commands makes the ptrace-stopped tracee run. They have "
10789 #. type: Plain text
10790 #: build/C/man2/ptrace.2:1561
10792 msgid " ptrace(cmd, pid, 0, sig);\n"
10795 #. type: Plain text
10796 #: build/C/man2/ptrace.2:1582
10798 "where I<cmd> is B<PTRACE_CONT>, B<PTRACE_LISTEN>, B<PTRACE_DETACH>, "
10799 "B<PTRACE_SYSCALL>, B<PTRACE_SINGLESTEP>, B<PTRACE_SYSEMU>, or "
10800 "B<PTRACE_SYSEMU_SINGLESTEP>. If the tracee is in signal-delivery-stop, "
10801 "I<sig> is the signal to be injected (if it is nonzero). Otherwise, I<sig> "
10802 "may be ignored. (When restarting a tracee from a ptrace-stop other than "
10803 "signal-delivery-stop, recommended practice is to always pass 0 in I<sig>.)"
10807 #: build/C/man2/ptrace.2:1582
10809 msgid "Attaching and detaching"
10812 #. type: Plain text
10813 #: build/C/man2/ptrace.2:1584
10814 msgid "A thread can be attached to the tracer using the call"
10817 #. type: Plain text
10818 #: build/C/man2/ptrace.2:1586
10820 msgid " ptrace(PTRACE_ATTACH, pid, 0, 0);\n"
10823 #. type: Plain text
10824 #: build/C/man2/ptrace.2:1588 build/C/man2/ptrace.2:2090
10828 #. type: Plain text
10829 #: build/C/man2/ptrace.2:1590
10831 msgid " ptrace(PTRACE_SEIZE, pid, 0, PTRACE_O_flags);\n"
10835 #. FIXME . Describe how to attach to a thread which is already group-stopped.
10836 #. type: Plain text
10837 #: build/C/man2/ptrace.2:1614
10839 "B<PTRACE_ATTACH> sends B<SIGSTOP> to this thread. If the tracer wants this "
10840 "B<SIGSTOP> to have no effect, it needs to suppress it. Note that if other "
10841 "signals are concurrently sent to this thread during attach, the tracer may "
10842 "see the tracee enter signal-delivery-stop with other signal(s) first! The "
10843 "usual practice is to reinject these signals until B<SIGSTOP> is seen, then "
10844 "suppress B<SIGSTOP> injection. The design bug here is that a ptrace attach "
10845 "and a concurrently delivered B<SIGSTOP> may race and the concurrent "
10846 "B<SIGSTOP> may be lost."
10849 #. type: Plain text
10850 #: build/C/man2/ptrace.2:1621
10852 "Since attaching sends B<SIGSTOP> and the tracer usually suppresses it, this "
10853 "may cause a stray B<EINTR> return from the currently executing system call "
10854 "in the tracee, as described in the \"Signal injection and suppression\" "
10858 #. type: Plain text
10859 #: build/C/man2/ptrace.2:1633
10861 "Since Linux 3.4, B<PTRACE_SEIZE> can be used instead of B<PTRACE_ATTACH>. "
10862 "B<PTRACE_SEIZE> does not stop the attached process. If you need to stop it "
10863 "after attach (or at any other time) without sending it any signals, use "
10864 "B<PTRACE_INTERRUPT> command."
10867 #. type: Plain text
10868 #: build/C/man2/ptrace.2:1635
10869 msgid "The request"
10872 #. type: Plain text
10873 #: build/C/man2/ptrace.2:1637
10875 msgid " ptrace(PTRACE_TRACEME, 0, 0, 0);\n"
10878 #. type: Plain text
10879 #: build/C/man2/ptrace.2:1643
10881 "turns the calling thread into a tracee. The thread continues to run "
10882 "(doesn't enter ptrace-stop). A common practice is to follow the "
10883 "B<PTRACE_TRACEME> with"
10886 #. type: Plain text
10887 #: build/C/man2/ptrace.2:1645
10889 msgid " raise(SIGSTOP);\n"
10892 #. type: Plain text
10893 #: build/C/man2/ptrace.2:1648
10895 "and allow the parent (which is our tracer now) to observe our signal-"
10899 #. type: Plain text
10900 #: build/C/man2/ptrace.2:1672
10902 "If the B<PTRACE_O_TRACEFORK>, B<PTRACE_O_TRACEVFORK>, or "
10903 "B<PTRACE_O_TRACECLONE> options are in effect, then children created by, "
10904 "respectively, B<vfork>(2) or B<clone>(2) with the B<CLONE_VFORK> flag, "
10905 "B<fork>(2) or B<clone>(2) with the exit signal set to B<SIGCHLD>, and "
10906 "other kinds of B<clone>(2), are automatically attached to the same tracer "
10907 "which traced their parent. B<SIGSTOP> is delivered to the children, causing "
10908 "them to enter signal-delivery-stop after they exit the system call which "
10912 #. type: Plain text
10913 #: build/C/man2/ptrace.2:1674
10914 msgid "Detaching of the tracee is performed by:"
10917 #. type: Plain text
10918 #: build/C/man2/ptrace.2:1676
10920 msgid " ptrace(PTRACE_DETACH, pid, 0, sig);\n"
10923 #. type: Plain text
10924 #: build/C/man2/ptrace.2:1684
10926 "B<PTRACE_DETACH> is a restarting operation; therefore it requires the tracee "
10927 "to be in ptrace-stop. If the tracee is in signal-delivery-stop, a signal "
10928 "can be injected. Otherwise, the I<sig> parameter may be silently ignored."
10931 #. FIXME . Describe how to detach from a group-stopped tracee so that it
10932 #. doesn't run, but continues to wait for SIGCONT.
10933 #. type: Plain text
10934 #: build/C/man2/ptrace.2:1708
10936 "If the tracee is running when the tracer wants to detach it, the usual "
10937 "solution is to send B<SIGSTOP> (using B<tgkill>(2), to make sure it goes to "
10938 "the correct thread), wait for the tracee to stop in signal-delivery-stop for "
10939 "B<SIGSTOP> and then detach it (suppressing B<SIGSTOP> injection). A design "
10940 "bug is that this can race with concurrent B<SIGSTOP>s. Another complication "
10941 "is that the tracee may enter other ptrace-stops and needs to be restarted "
10942 "and waited for again, until B<SIGSTOP> is seen. Yet another complication is "
10943 "to be sure that the tracee is not already ptrace-stopped, because no signal "
10944 "delivery happens while it is\\(emnot even B<SIGSTOP>."
10947 #. type: Plain text
10948 #: build/C/man2/ptrace.2:1716
10950 "If the tracer dies, all tracees are automatically detached and restarted, "
10951 "unless they were in group-stop. Handling of restart from group-stop is "
10952 "currently buggy, but the \"as planned\" behavior is to leave tracee stopped "
10953 "and waiting for B<SIGCONT>. If the tracee is restarted from signal-delivery-"
10954 "stop, the pending signal is injected."
10958 #: build/C/man2/ptrace.2:1716
10960 msgid "execve(2) under ptrace"
10964 #. clone(2) CLONE_THREAD says:
10965 #. If any of the threads in a thread group performs an execve(2),
10966 #. then all threads other than the thread group leader are terminated,
10967 #. and the new program is executed in the thread group leader.
10968 #. In kernel 3.1 sources, see fs/exec.c::de_thread()
10969 #. type: Plain text
10970 #: build/C/man2/ptrace.2:1735
10972 "When one thread in a multithreaded process calls B<execve>(2), the kernel "
10973 "destroys all other threads in the process, and resets the thread ID of the "
10974 "execing thread to the thread group ID (process ID). (Or, to put things "
10975 "another way, when a multithreaded process does an B<execve>(2), at "
10976 "completion of the call, it appears as though the B<execve>(2) occurred in "
10977 "the thread group leader, regardless of which thread did the B<execve>(2).) "
10978 "This resetting of the thread ID looks very confusing to tracers:"
10981 #. type: Plain text
10982 #: build/C/man2/ptrace.2:1745
10984 "All other threads stop in B<PTRACE_EVENT_EXIT> stop, if the "
10985 "B<PTRACE_O_TRACEEXIT> option was turned on. Then all other threads except "
10986 "the thread group leader report death as if they exited via B<_exit>(2) with "
10990 #. type: Plain text
10991 #: build/C/man2/ptrace.2:1753
10993 "The execing tracee changes its thread ID while it is in the B<execve>(2). "
10994 "(Remember, under ptrace, the \"pid\" returned from B<waitpid>(2), or fed "
10995 "into ptrace calls, is the tracee's thread ID.) That is, the tracee's thread "
10996 "ID is reset to be the same as its process ID, which is the same as the "
10997 "thread group leader's thread ID."
11000 #. type: Plain text
11001 #: build/C/man2/ptrace.2:1759
11003 "Then a B<PTRACE_EVENT_EXEC> stop happens, if the B<PTRACE_O_TRACEEXEC> "
11004 "option was turned on."
11007 #. type: Plain text
11008 #: build/C/man2/ptrace.2:1780
11010 "If the thread group leader has reported its B<PTRACE_EVENT_EXIT> stop by "
11011 "this time, it appears to the tracer that the dead thread leader \"reappears "
11012 "from nowhere\". (Note: the thread group leader does not report death via "
11013 "I<WIFEXITED(status)> until there is at least one other live thread. This "
11014 "eliminates the possibility that the tracer will see it dying and then "
11015 "reappearing.) If the thread group leader was still alive, for the tracer "
11016 "this may look as if thread group leader returns from a different system call "
11017 "than it entered, or even \"returned from a system call even though it was "
11018 "not in any system call\". If the thread group leader was not traced (or was "
11019 "traced by a different tracer), then during B<execve>(2) it will appear as "
11020 "if it has become a tracee of the tracer of the execing tracee."
11023 #. type: Plain text
11024 #: build/C/man2/ptrace.2:1783
11026 "All of the above effects are the artifacts of the thread ID change in the "
11030 #. type: Plain text
11031 #: build/C/man2/ptrace.2:1803
11033 "The B<PTRACE_O_TRACEEXEC> option is the recommended tool for dealing with "
11034 "this situation. First, it enables B<PTRACE_EVENT_EXEC> stop, which occurs "
11035 "before B<execve>(2) returns. In this stop, the tracer can use "
11036 "B<PTRACE_GETEVENTMSG> to retrieve the tracee's former thread ID. (This "
11037 "feature was introduced in Linux 3.0). Second, the B<PTRACE_O_TRACEEXEC> "
11038 "option disables legacy B<SIGTRAP> generation on B<execve>(2)."
11041 #. type: Plain text
11042 #: build/C/man2/ptrace.2:1809
11044 "When the tracer receives B<PTRACE_EVENT_EXEC> stop notification, it is "
11045 "guaranteed that except this tracee and the thread group leader, no other "
11046 "threads from the process are alive."
11049 #. type: Plain text
11050 #: build/C/man2/ptrace.2:1817
11052 "On receiving the B<PTRACE_EVENT_EXEC> stop notification, the tracer should "
11053 "clean up all its internal data structures describing the threads of this "
11054 "process, and retain only one data structure\\(emone which describes the "
11055 "single still running tracee, with"
11058 #. type: Plain text
11059 #: build/C/man2/ptrace.2:1819
11061 msgid " thread ID == thread group ID == process ID.\n"
11064 #. type: Plain text
11065 #: build/C/man2/ptrace.2:1823
11066 msgid "Example: two threads call B<execve>(2) at the same time:"
11069 #. type: Plain text
11070 #: build/C/man2/ptrace.2:1834
11073 "*** we get syscall-enter-stop in thread 1: **\n"
11074 "PID1 execve(\"/bin/foo\", \"foo\" E<lt>unfinished ...E<gt>\n"
11075 "*** we issue PTRACE_SYSCALL for thread 1 **\n"
11076 "*** we get syscall-enter-stop in thread 2: **\n"
11077 "PID2 execve(\"/bin/bar\", \"bar\" E<lt>unfinished ...E<gt>\n"
11078 "*** we issue PTRACE_SYSCALL for thread 2 **\n"
11079 "*** we get PTRACE_EVENT_EXEC for PID0, we issue PTRACE_SYSCALL **\n"
11080 "*** we get syscall-exit-stop for PID0: **\n"
11081 "PID0 E<lt>... execve resumedE<gt> ) = 0\n"
11084 #. type: Plain text
11085 #: build/C/man2/ptrace.2:1857
11087 "If the B<PTRACE_O_TRACEEXEC> option is I<not> in effect for the execing "
11088 "tracee, the kernel delivers an extra B<SIGTRAP> to the tracee after "
11089 "B<execve>(2) returns. This is an ordinary signal (similar to one which can "
11090 "be generated by I<kill -TRAP>), not a special kind of ptrace-stop. "
11091 "Employing B<PTRACE_GETSIGINFO> for this signal returns I<si_code> set to 0 "
11092 "(I<SI_USER>). This signal may be blocked by signal mask, and thus may be "
11093 "delivered (much) later."
11096 #. type: Plain text
11097 #: build/C/man2/ptrace.2:1876
11099 "Usually, the tracer (for example, B<strace>(1)) would not want to show this "
11100 "extra post-execve B<SIGTRAP> signal to the user, and would suppress its "
11101 "delivery to the tracee (if B<SIGTRAP> is set to B<SIG_DFL>, it is a killing "
11102 "signal). However, determining I<which> B<SIGTRAP> to suppress is not easy. "
11103 "Setting the B<PTRACE_O_TRACEEXEC> option and thus suppressing this extra "
11104 "B<SIGTRAP> is the recommended approach."
11108 #: build/C/man2/ptrace.2:1876
11110 msgid "Real parent"
11113 #. type: Plain text
11114 #: build/C/man2/ptrace.2:1883
11116 "The ptrace API (ab)uses the standard UNIX parent/child signaling over "
11117 "B<waitpid>(2). This used to cause the real parent of the process to stop "
11118 "receiving several kinds of B<waitpid>(2) notifications when the child "
11119 "process is traced by some other process."
11122 #. type: Plain text
11123 #: build/C/man2/ptrace.2:1886
11125 "Many of these bugs have been fixed, but as of Linux 2.6.38 several still "
11126 "exist; see BUGS below."
11129 #. type: Plain text
11130 #: build/C/man2/ptrace.2:1888
11131 msgid "As of Linux 2.6.38, the following is believed to work correctly:"
11134 #. type: Plain text
11135 #: build/C/man2/ptrace.2:1896
11137 "exit/death by signal is reported first to the tracer, then, when the tracer "
11138 "consumes the B<waitpid>(2) result, to the real parent (to the real parent "
11139 "only when the whole multithreaded process exits). If the tracer and the "
11140 "real parent are the same process, the report is sent only once."
11143 #. type: Plain text
11144 #: build/C/man2/ptrace.2:1901
11146 "On success, the B<PTRACE_PEEK*> requests return the requested data (but see "
11147 "NOTES), while other requests return zero."
11149 "成功すると B<PTRACE_PEEK*> の場合は要求したデータを返し (「注意」を参照)、 そ"
11152 #. type: Plain text
11153 #: build/C/man2/ptrace.2:1911
11155 "On error, all requests return -1, and I<errno> is set appropriately. Since "
11156 "the value returned by a successful B<PTRACE_PEEK*> request may be -1, the "
11157 "caller must clear I<errno> before the call, and then check it afterward to "
11158 "determine whether or not an error occurred."
11160 "エラーの場合は -1 を返し、 I<errno> が適切に設定される。 B<PTRACE_PEEK*> が成"
11161 "功して返す値も-1 になることがあるため、 呼び出し元は呼び出しを行う前に "
11162 "I<errno> をクリアして、 あとで I<errno> を調べ、エラーか発生したのかどうかを"
11165 #. type: Plain text
11166 #: build/C/man2/ptrace.2:1915
11168 "(i386 only) There was an error with allocating or freeing a debug register."
11169 msgstr "(i386 のみ) デバッグレジスターの確保または解放でエラーが発生した。"
11171 #. type: Plain text
11172 #: build/C/man2/ptrace.2:1926
11174 "There was an attempt to read from or write to an invalid area in the "
11175 "tracer's or the tracee's memory, probably because the area wasn't mapped or "
11176 "accessible. Unfortunately, under Linux, different variations of this fault "
11177 "will return B<EIO> or B<EFAULT> more or less arbitrarily."
11179 "tracer または tracee のメモリーの不正な領域に読み書きしようとした。 おそらく"
11180 "その領域がマッピングされていないか、 その領域へのアクセスが許されていないかで"
11181 "ある。 不運なことに、Linux ではこのようなエラーの場合、多かれ少なかれ 恣意的"
11182 "に B<EIO> を返したり B<EFAULT> を返したりすることがある。"
11184 #. type: Plain text
11185 #: build/C/man2/ptrace.2:1929
11186 msgid "An attempt was made to set an invalid option."
11187 msgstr "不正なオプションを設定しようとした。"
11189 #. type: Plain text
11190 #: build/C/man2/ptrace.2:1936
11192 "I<request> is invalid, or an attempt was made to read from or write to an "
11193 "invalid area in the tracer's or the tracee's memory, or there was a word-"
11194 "alignment violation, or an invalid signal was specified during a restart "
11197 "I<request> が不正である。 または、tracer または tracee のメモリーの 不正な領"
11198 "域に読み書きしようとした。 または、ワード境界違反があった。 または、実行再開"
11199 "の要求で不正なシグナルを指定した。"
11201 #. type: Plain text
11202 #: build/C/man2/ptrace.2:1949
11204 "The specified process cannot be traced. This could be because the tracer "
11205 "has insufficient privileges (the required capability is B<CAP_SYS_PTRACE>); "
11206 "unprivileged processes cannot trace processes that they cannot send signals "
11207 "to or those running set-user-ID/set-group-ID programs, for obvious reasons. "
11208 "Alternatively, the process may already be being traced, or (on kernels "
11209 "before 2.6.26) be B<init>(1) (PID 1)."
11211 "指定したプロセスをトレースすることができない。これは tracer が 必要な権限 (必"
11212 "要なケーパビリティは B<CAP_SYS_PTRACE>) を持っていないことが原因の場合があ"
11213 "る。 分かりやすい理由を挙げるなら、 非特権プロセスはシグナルを送ることができ"
11214 "ないプロセスをトレースできないし、 set-user-ID/set-group-ID プログラムを実行"
11215 "しているプロセスはトレースできない。 または、プロセスはすでにトレース中であ"
11216 "る、 または (カーネル 2.6.26 より前では) B<init>(1) プロセス (PID が 1) であ"
11219 #. type: Plain text
11220 #: build/C/man2/ptrace.2:1954
11222 "The specified process does not exist, or is not currently being traced by "
11223 "the caller, or is not stopped (for requests that require a stopped tracee)."
11225 "指定したプロセスが存在しない。 または、指定したプロセスは呼び出したプロセスが"
11226 "トレース中のプロセスではない。 または、指定したプロセスが停止していない "
11227 "(tracee が停止していることが必要な要求の場合)。"
11229 #. type: Plain text
11230 #: build/C/man2/ptrace.2:1956
11231 msgid "SVr4, 4.3BSD."
11232 msgstr "SVr4, 4.3BSD."
11234 #. type: Plain text
11235 #: build/C/man2/ptrace.2:1971
11237 "Although arguments to B<ptrace>() are interpreted according to the "
11238 "prototype given, glibc currently declares B<ptrace>() as a variadic "
11239 "function with only the I<request> argument fixed. It is recommended to "
11240 "always supply four arguments, even if the requested operation does not use "
11241 "them, setting unused/ignored arguments to I<0L> or I<(void\\ *)\\ 0>."
11243 "B<ptrace>() の引き数は上のようなプロトタイプに基づいて解釈されるが、 glibc "
11244 "では、現在のところ B<ptrace>() は I<request> 引き数だけが固定の可変長引き数"
11245 "関数として宣言されている。 要求する操作が引き数を使用しない場合であっても、 "
11246 "未使用や無視される引き数には I<0L> や I<(void\\ *)\\ 0> を設定して、 4 つの引"
11247 "き数を常に省略せずに指定することを推奨する。"
11249 #. See commit 00cd5c37afd5f431ac186dd131705048c0a11fdb
11250 #. type: Plain text
11251 #: build/C/man2/ptrace.2:1976
11253 "In Linux kernels before 2.6.26, B<init>(1), the process with PID 1, may not "
11256 "バージョン 2.6.26 より前の Linux カーネルでは、 B<init>(1) すなわち PID が 1 "
11257 "のプロセスはトレースすることができない。"
11259 #. See http://lkml.org/lkml/2008/5/8/375
11260 #. type: Plain text
11261 #: build/C/man2/ptrace.2:1983
11263 "The layout of the contents of memory and the USER area are quite operating-"
11264 "system- and architecture-specific. The offset supplied, and the data "
11265 "returned, might not entirely match with the definition of I<struct user>."
11267 "メモリーや USER 領域の内容や配置はオペレーティングシステムごと、アーキテク"
11268 "チャーごとに 非常に依存する。 オフセットが指定された場合、返されるデータは "
11269 "I<struct user> の定義と完全に一致しないこともありえる。"
11271 #. type: Plain text
11272 #: build/C/man2/ptrace.2:1986
11274 "The size of a \"word\" is determined by the operating-system variant (e.g., "
11275 "for 32-bit Linux it is 32 bits)."
11277 "「ワード (word) 」の大きさはオペレーティングシステムによって決まる。 (例え"
11278 "ば、32 ビットの Linux では 32 ビットである、など。)"
11280 #. type: Plain text
11281 #: build/C/man2/ptrace.2:1994
11283 "This page documents the way the B<ptrace>() call works currently in Linux. "
11284 "Its behavior differs significantly on other flavors of UNIX. In any case, "
11285 "use of B<ptrace>() is highly specific to the operating system and "
11288 "このマニュアルは現在の Linux における B<ptrace>() コールの動作について記述し"
11289 "ている。他の UNIX では その動作は著しく異なる。 いかなる場合も B<ptrace>() "
11290 "を使うとオペレーションシステムやアーキテクチャーに非常に依存したものになる。"
11293 #: build/C/man2/ptrace.2:1994
11295 msgid "C library/kernel ABI differences"
11296 msgstr "C ライブラリとカーネル ABI の違い"
11298 #. type: Plain text
11299 #: build/C/man2/ptrace.2:2006
11301 "At the system call level, the B<PTRACE_PEEKTEXT>, B<PTRACE_PEEKDATA>, and "
11302 "B<PTRACE_PEEKUSER> requests have a different API: they store the result at "
11303 "the address specified by the I<data> parameter, and the return value is the "
11304 "error flag. The glibc wrapper function provides the API given in "
11305 "DESCRIPTION above, with the result being returned via the function return "
11309 #. type: Plain text
11310 #: build/C/man2/ptrace.2:2017
11312 "On hosts with 2.6 kernel headers, B<PTRACE_SETOPTIONS> is declared with a "
11313 "different value than the one for 2.4. This leads to applications compiled "
11314 "with 2.6 kernel headers failing when run on 2.4 kernels. This can be worked "
11315 "around by redefining B<PTRACE_SETOPTIONS> to B<PTRACE_OLDSETOPTIONS>, if "
11318 "カーネル 2.6 のヘッダーがインストールされたホストでは、 B<PTRACE_SETOPTIONS> "
11319 "はカーネル 2.4 のヘッダーとは異なる値で宣言される。 このため、カーネル 2.6 の"
11320 "ヘッダーでコンパイルされたアプリケーションは カーネル 2.4 では正しく動作しな"
11321 "い。 この問題は、 B<PTRACE_SETOPTIONS> が定義されていた際は、 "
11322 "B<PTRACE_SETOPTIONS> を B<PTRACE_OLDSETOPTIONS> に定義し直すことで対処でき"
11325 #. type: Plain text
11326 #: build/C/man2/ptrace.2:2020
11328 "Group-stop notifications are sent to the tracer, but not to real parent. "
11329 "Last confirmed on 2.6.38.6."
11332 #. Note from Denys Vlasenko:
11333 #. Here "exits" means any kind of death - _exit, exit_group,
11334 #. signal death. Signal death and exit_group cases are trivial,
11335 #. though: since signal death and exit_group kill all other threads
11336 #. too, "until all other threads exit" thing happens rather soon
11337 #. in these cases. Therefore, only _exit presents observably
11338 #. puzzling behavior to ptrace users: thread leader _exit's,
11339 #. but WIFEXITED isn't reported! We are trying to explain here
11341 #. FIXME . need to test/verify this scenario
11342 #. type: Plain text
11343 #: build/C/man2/ptrace.2:2051
11345 "If a thread group leader is traced and exits by calling B<_exit>(2), a "
11346 "B<PTRACE_EVENT_EXIT> stop will happen for it (if requested), but the "
11347 "subsequent B<WIFEXITED> notification will not be delivered until all other "
11348 "threads exit. As explained above, if one of other threads calls "
11349 "B<execve>(2), the death of the thread group leader will I<never> be "
11350 "reported. If the execed thread is not traced by this tracer, the tracer "
11351 "will never know that B<execve>(2) happened. One possible workaround is to "
11352 "B<PTRACE_DETACH> the thread group leader instead of restarting it in this "
11353 "case. Last confirmed on 2.6.38.6."
11356 #. type: Plain text
11357 #: build/C/man2/ptrace.2:2061
11359 "A B<SIGKILL> signal may still cause a B<PTRACE_EVENT_EXIT> stop before "
11360 "actual signal death. This may be changed in the future; B<SIGKILL> is meant "
11361 "to always immediately kill tasks even under ptrace. Last confirmed on "
11365 #. type: Plain text
11366 #: build/C/man2/ptrace.2:2079
11368 "Some system calls return with B<EINTR> if a signal was sent to a tracee, but "
11369 "delivery was suppressed by the tracer. (This is very typical operation: it "
11370 "is usually done by debuggers on every attach, in order to not introduce a "
11371 "bogus B<SIGSTOP>). As of Linux 3.2.9, the following system calls are "
11372 "affected (this list is likely incomplete): B<epoll_wait>(2), and B<read>(2) "
11373 "from an B<inotify>(7) file descriptor. The usual symptom of this bug is "
11374 "that when you attach to a quiescent process with the command"
11377 #. type: Plain text
11378 #: build/C/man2/ptrace.2:2081
11380 msgid " strace -p E<lt>process-IDE<gt>\n"
11383 #. type: Plain text
11384 #: build/C/man2/ptrace.2:2084
11385 msgid "then, instead of the usual and expected one-line output such as"
11388 #. type: Plain text
11389 #: build/C/man2/ptrace.2:2087
11391 msgid " restart_syscall(E<lt>... resuming interrupted call ...E<gt>_\n"
11394 #. type: Plain text
11395 #: build/C/man2/ptrace.2:2093
11397 msgid " select(6, [5], NULL, [5], NULL_\n"
11400 #. type: Plain text
11401 #: build/C/man2/ptrace.2:2097
11403 "('_' denotes the cursor position), you observe more than one line. For "
11407 #. type: Plain text
11408 #: build/C/man2/ptrace.2:2101
11411 " clock_gettime(CLOCK_MONOTONIC, {15370, 690928118}) = 0\n"
11412 " epoll_wait(4,_\n"
11415 #. type: Plain text
11416 #: build/C/man2/ptrace.2:2122
11418 "What is not visible here is that the process was blocked in "
11419 "B<epoll_wait>(2) before B<strace>(1) has attached to it. Attaching caused "
11420 "B<epoll_wait>(2) to return to user space with the error B<EINTR>. In this "
11421 "particular case, the program reacted to B<EINTR> by checking the current "
11422 "time, and then executing B<epoll_wait>(2) again. (Programs which do not "
11423 "expect such \"stray\" B<EINTR> errors may behave in an unintended way upon "
11424 "an B<strace>(1) attach.)"
11427 #. type: Plain text
11428 #: build/C/man2/ptrace.2:2137
11430 "B<gdb>(1), B<strace>(1), B<clone>(2), B<execve>(2), B<fork>(2), "
11431 "B<gettid>(2), B<seccomp>(2), B<sigaction>(2), B<tgkill>(2), B<vfork>(2), "
11432 "B<waitpid>(2), B<exec>(3), B<capabilities>(7), B<signal>(7)"
11434 "B<gdb>(1), B<strace>(1), B<clone>(2), B<execve>(2), B<fork>(2), "
11435 "B<gettid>(2), B<seccomp>(2), B<sigaction>(2), B<tgkill>(2), B<vfork>(2), "
11436 "B<waitpid>(2), B<exec>(3), B<capabilities>(7), B<signal>(7)"
11439 #: build/C/man2/quotactl.2:27
11445 #: build/C/man2/quotactl.2:27
11448 msgstr "2010-06-16"
11450 #. type: Plain text
11451 #: build/C/man2/quotactl.2:30
11452 msgid "quotactl - manipulate disk quotas"
11453 msgstr "quotactl - ディスク quota を操作する"
11455 #. type: Plain text
11456 #: build/C/man2/quotactl.2:34
11459 "B<#include E<lt>sys/quota.hE<gt>>\n"
11460 "B<#include E<lt>xfs/xqm.hE<gt>>\n"
11462 "B<#include E<lt>sys/quota.hE<gt>>\n"
11463 "B<#include E<lt>xfs/xqm.hE<gt>>\n"
11465 #. type: Plain text
11466 #: build/C/man2/quotactl.2:37
11468 msgid "B<int quotactl(int >I<cmd>B<, const char *>I<special>B<, int >I<id>B<, caddr_t >I<addr>B<);>\n"
11469 msgstr "B<int quotactl(int >I<cmd>B<, const char *>I<special>B<, int >I<id>B<, caddr_t >I<addr>B<);>\n"
11471 #. type: Plain text
11472 #: build/C/man2/quotactl.2:49
11474 "The quota system can be used to set per-user and per-group limits on the "
11475 "amount of disk space used on a filesystem. For each user and/or group, a "
11476 "soft limit and a hard limit can be set for each filesystem. The hard limit "
11477 "can't be exceeded. The soft limit can be exceeded, but warnings will "
11478 "ensue. Moreover, the user can't exceed the soft limit for more than one "
11479 "week (by default) at a time; after this time, the soft limit counts as a "
11483 #. type: Plain text
11484 #: build/C/man2/quotactl.2:74
11486 "The B<quotactl>() call manipulates disk quotas. The I<cmd> argument "
11487 "indicates a command to be applied to the user or group ID specified in "
11488 "I<id>. To initialize the I<cmd> argument, use the I<QCMD(subcmd, type)> "
11489 "macro. The I<type> value is either B<USRQUOTA>, for user quotas, or "
11490 "B<GRPQUOTA>, for group quotas. The I<subcmd> value is described below."
11493 #. type: Plain text
11494 #: build/C/man2/quotactl.2:79
11496 "The I<special> argument is a pointer to a null-terminated string containing "
11497 "the pathname of the (mounted) block special device for the filesystem being "
11501 #. type: Plain text
11502 #: build/C/man2/quotactl.2:87
11504 "The I<addr> argument is the address of an optional, command-specific, data "
11505 "structure that is copied in or out of the system. The interpretation of "
11506 "I<addr> is given with each command below."
11509 #. type: Plain text
11510 #: build/C/man2/quotactl.2:91
11511 msgid "The I<subcmd> value is one of the following:"
11512 msgstr "I<subcmd> の値は以下のいずれかである"
11515 #: build/C/man2/quotactl.2:91
11517 msgid "B<Q_QUOTAON>"
11518 msgstr "B<Q_QUOTAON>"
11520 #. type: Plain text
11521 #: build/C/man2/quotactl.2:98
11523 "Turn on quotas for a filesystem. The I<id> argument is the identification "
11524 "number of the quota format to be used. Currently, there are three supported "
11529 #: build/C/man2/quotactl.2:99
11531 msgid "B<QFMT_VFS_OLD>"
11534 #. type: Plain text
11535 #: build/C/man2/quotactl.2:102
11536 msgid "The original quota format."
11540 #: build/C/man2/quotactl.2:102
11542 msgid "B<QFMT_VFS_V0>"
11545 #. type: Plain text
11546 #: build/C/man2/quotactl.2:106
11548 "The standard VFS v0 quota format, which can handle 32-bit UIDs and GIDs and "
11549 "quota limits up to 2^42 bytes and 2^32 inodes."
11553 #: build/C/man2/quotactl.2:106
11555 msgid "B<QFMT_VFS_V1>"
11558 #. type: Plain text
11559 #: build/C/man2/quotactl.2:110
11561 "A quota format that can handle 32-bit UIDs and GIDs and quota limits of 2^64 "
11562 "bytes and 2^64 inodes."
11565 #. type: Plain text
11566 #: build/C/man2/quotactl.2:121
11568 "The I<addr> argument points to the pathname of a file containing the quotas "
11569 "for the filesystem. The quota file must exist; it is normally created with "
11570 "the B<quotacheck>(8) program. This operation requires privilege "
11571 "(B<CAP_SYS_ADMIN>)."
11575 #: build/C/man2/quotactl.2:121
11577 msgid "B<Q_QUOTAOFF>"
11578 msgstr "B<Q_QUOTAOFF>"
11580 #. type: Plain text
11581 #: build/C/man2/quotactl.2:131
11583 "Turn off quotas for a filesystem. The I<addr> and I<id> arguments are "
11584 "ignored. This operation requires privilege (B<CAP_SYS_ADMIN>)."
11588 #: build/C/man2/quotactl.2:131
11590 msgid "B<Q_GETQUOTA>"
11591 msgstr "B<Q_GETQUOTA>"
11593 #. type: Plain text
11594 #: build/C/man2/quotactl.2:142
11596 "Get disk quota limits and current usage for user or group I<id>. The "
11597 "I<addr> argument is a pointer to a I<dqblk> structure defined in I<E<lt>sys/"
11598 "quota.hE<gt>> as follows:"
11601 #. type: Plain text
11602 #: build/C/man2/quotactl.2:147 build/C/man2/quotactl.2:234
11605 "/* uint64_t is an unsigned 64-bit integer;\n"
11606 " uint32_t is an unsigned 32-bit integer */\n"
11609 #. type: Plain text
11610 #: build/C/man2/quotactl.2:167
11613 "struct dqblk { /* Definition since Linux 2.4.22 */\n"
11614 " uint64_t dqb_bhardlimit; /* absolute limit on disk\n"
11615 " quota blocks alloc */\n"
11616 " uint64_t dqb_bsoftlimit; /* preferred limit on\n"
11617 " disk quota blocks */\n"
11618 " uint64_t dqb_curspace; /* current quota block\n"
11620 " uint64_t dqb_ihardlimit; /* maximum number of\n"
11621 " allocated inodes */\n"
11622 " uint64_t dqb_isoftlimit; /* preferred inode limit */\n"
11623 " uint64_t dqb_curinodes; /* current number of\n"
11624 " allocated inodes */\n"
11625 " uint64_t dqb_btime; /* time limit for excessive\n"
11627 " uint64_t dqb_itime; /* time limit for excessive\n"
11629 " uint32_t dqb_valid; /* bit mask of QIF_*\n"
11634 #. type: Plain text
11635 #: build/C/man2/quotactl.2:170
11638 "/* Flags in dqb_valid that indicate which fields in\n"
11639 " dqblk structure are valid. */\n"
11642 #. type: Plain text
11643 #: build/C/man2/quotactl.2:181
11646 "#define QIF_BLIMITS 1\n"
11647 "#define QIF_SPACE 2\n"
11648 "#define QIF_ILIMITS 4\n"
11649 "#define QIF_INODES 8\n"
11650 "#define QIF_BTIME 16\n"
11651 "#define QIF_ITIME 32\n"
11652 "#define QIF_LIMITS (QIF_BLIMITS | QIF_ILIMITS)\n"
11653 "#define QIF_USAGE (QIF_SPACE | QIF_INODES)\n"
11654 "#define QIF_TIMES (QIF_BTIME | QIF_ITIME)\n"
11655 "#define QIF_ALL (QIF_LIMITS | QIF_USAGE | QIF_TIMES)\n"
11658 #. type: Plain text
11659 #: build/C/man2/quotactl.2:198
11661 "The I<dqb_valid> field is a bit mask that is set to indicate the entries in "
11662 "the I<dqblk> structure that are valid. Currently, the kernel fills in all "
11663 "entries of the I<dqblk> structure and marks them as valid in the "
11664 "I<dqb_valid> field. Unprivileged users may retrieve only their own quotas; "
11665 "a privileged user (B<CAP_SYS_ADMIN>) can retrieve the quotas of any user."
11669 #: build/C/man2/quotactl.2:198
11671 msgid "B<Q_SETQUOTA>"
11672 msgstr "B<Q_SETQUOTA>"
11674 #. type: Plain text
11675 #: build/C/man2/quotactl.2:218
11677 "Set quota information for user or group I<id>, using the information "
11678 "supplied in the I<dqblk> structure pointed to by I<addr>. The I<dqb_valid> "
11679 "field of the I<dqblk> structure indicates which entries in the structure "
11680 "have been set by the caller. This operation supersedes the B<Q_SETQLIM> and "
11681 "B<Q_SETUSE> operations in the previous quota interfaces. This operation "
11682 "requires privilege (B<CAP_SYS_ADMIN>)."
11686 #: build/C/man2/quotactl.2:218
11688 msgid "B<Q_GETINFO>"
11689 msgstr "B<Q_GETINFO>"
11691 #. type: Plain text
11692 #: build/C/man2/quotactl.2:229
11694 "Get information (like grace times) about quotafile. The I<addr> argument "
11695 "should be a pointer to a I<dqinfo> structure. This structure is defined in "
11696 "I<E<lt>sys/quota.hE<gt>> as follows:"
11699 #. type: Plain text
11700 #: build/C/man2/quotactl.2:238
11703 "struct dqinfo { /* Defined since kernel 2.4.22 */\n"
11704 " uint64_t dqi_bgrace; /* Time before block soft limit\n"
11705 " becomes hard limit */\n"
11707 "struct dqinfo { /* Defined since kernel 2.4.22 */\n"
11708 " uint64_t dqi_bgrace; /* Time before block soft limit\n"
11709 " becomes hard limit */\n"
11711 #. type: Plain text
11712 #: build/C/man2/quotactl.2:245
11715 " uint64_t dqi_igrace; /* Time before inode soft limit\n"
11716 " becomes hard limit */\n"
11717 " uint32_t dqi_flags; /* Flags for quotafile\n"
11719 " uint32_t dqi_valid;\n"
11722 " uint64_t dqi_igrace; /* Time before inode soft limit\n"
11723 " becomes hard limit */\n"
11724 " uint32_t dqi_flags; /* Flags for quotafile\n"
11726 " uint32_t dqi_valid;\n"
11729 #. type: Plain text
11730 #: build/C/man2/quotactl.2:247
11732 msgid "/* Bits for dqi_flags */\n"
11733 msgstr "/* Bits for dqi_flags */\n"
11735 #. type: Plain text
11736 #: build/C/man2/quotactl.2:249
11738 msgid "/* Quota format QFMT_VFS_OLD */\n"
11739 msgstr "/* Quota format QFMT_VFS_OLD */\n"
11741 #. type: Plain text
11742 #: build/C/man2/quotactl.2:251
11744 msgid "#define V1_DQF_RSQUASH\t1 /* Root squash enabled */\n"
11745 msgstr "#define V1_DQF_RSQUASH\t1 /* Root squash enabled */\n"
11747 #. type: Plain text
11748 #: build/C/man2/quotactl.2:253
11750 msgid "/* Other quota formats have no dqi_flags bits defined */\n"
11751 msgstr "/* Other quota formats have no dqi_flags bits defined */\n"
11753 #. type: Plain text
11754 #: build/C/man2/quotactl.2:256
11757 "/* Flags in dqi_valid that indicate which fields in\n"
11758 " dqinfo structure are valid. */\n"
11760 "/* Flags in dqi_valid that indicate which fields in\n"
11761 " dqinfo structure are valid. */\n"
11763 #. type: Plain text
11764 #: build/C/man2/quotactl.2:261
11767 "# define IIF_BGRACE\t1\n"
11768 "# define IIF_IGRACE\t2\n"
11769 "# define IIF_FLAGS\t4\n"
11770 "# define IIF_ALL (IIF_BGRACE | IIF_IGRACE | IIF_FLAGS)\n"
11772 "# define IIF_BGRACE\t1\n"
11773 "# define IIF_IGRACE\t2\n"
11774 "# define IIF_FLAGS\t4\n"
11775 "# define IIF_ALL (IIF_BGRACE | IIF_IGRACE | IIF_FLAGS)\n"
11777 #. type: Plain text
11778 #: build/C/man2/quotactl.2:277
11780 "The I<dqi_valid> field in the I<dqinfo> structure indicates the entries in "
11781 "the structure that are valid. Currently, the kernel fills in all entries of "
11782 "the I<dqinfo> structure and marks them all as valid in the I<dqi_valid> "
11783 "field. The I<id> argument is ignored."
11787 #: build/C/man2/quotactl.2:277
11789 msgid "B<Q_SETINFO>"
11790 msgstr "B<Q_SETINFO>"
11792 #. type: Plain text
11793 #: build/C/man2/quotactl.2:301
11795 "Set information about quotafile. The I<addr> argument should be a pointer "
11796 "to a I<dqinfo> structure. The I<dqi_valid> field of the I<dqinfo> structure "
11797 "indicates the entries in the structure that have been set by the caller. "
11798 "This operation supersedes the B<Q_SETGRACE> and B<Q_SETFLAGS> operations in "
11799 "the previous quota interfaces. The I<id> argument is ignored. This "
11800 "operation requires privilege (B<CAP_SYS_ADMIN>)."
11804 #: build/C/man2/quotactl.2:301
11806 msgid "B<Q_GETFMT>"
11807 msgstr "B<Q_GETFMT>"
11809 #. type: Plain text
11810 #: build/C/man2/quotactl.2:308
11812 "Get quota format used on the specified filesystem. The I<addr> argument "
11813 "should be a pointer to a 4-byte buffer where the format number will be "
11818 #: build/C/man2/quotactl.2:308
11823 #. type: Plain text
11824 #: build/C/man2/quotactl.2:319
11826 "Update the on-disk copy of quota usages for a filesystem. If I<special> is "
11827 "NULL, then all filesystems with active quotas are sync'ed. The I<addr> and "
11828 "I<id> arguments are ignored."
11832 #: build/C/man2/quotactl.2:319
11834 msgid "B<Q_GETSTATS>"
11835 msgstr "B<Q_GETSTATS>"
11837 #. Q_GETSTATS was removed in kernel 2.4.22.
11838 #. type: Plain text
11839 #: build/C/man2/quotactl.2:339
11841 "Get statistics and other generic information about the quota subsystem. The "
11842 "I<addr> argument should be a pointer to a I<dqstats> structure in which data "
11843 "should be stored. This structure is defined in I<E<lt>sys/quota.hE<gt>>. "
11844 "The I<special> and I<id> arguments are ignored. This operation is obsolete "
11845 "and not supported by recent kernels. Files in I</proc/sys/fs/quota/> carry "
11846 "the information instead."
11849 #. type: Plain text
11850 #: build/C/man2/quotactl.2:342
11852 "For XFS filesystems making use of the XFS Quota Manager (XQM), the above "
11853 "commands are bypassed and the following commands are used:"
11857 #: build/C/man2/quotactl.2:342
11859 msgid "B<Q_XQUOTAON>"
11860 msgstr "B<Q_XQUOTAON>"
11862 #. type: Plain text
11863 #: build/C/man2/quotactl.2:363
11865 "Turn on quotas for an XFS filesystem. XFS provides the ability to turn on/"
11866 "off quota limit enforcement with quota accounting. Therefore, XFS expects "
11867 "I<addr> to be a pointer to an I<unsigned int> that contains either the flags "
11868 "B<XFS_QUOTA_UDQ_ACCT> and/or B<XFS_QUOTA_UDQ_ENFD> (for user quota), or "
11869 "B<XFS_QUOTA_GDQ_ACCT> and/or B<XFS_QUOTA_GDQ_ENFD> (for group quota), as "
11870 "defined in I<E<lt>xfs/xqm.hE<gt>>. This operation requires privilege "
11871 "(B<CAP_SYS_ADMIN>)."
11875 #: build/C/man2/quotactl.2:363
11877 msgid "B<Q_XQUOTAOFF>"
11878 msgstr "B<Q_XQUOTAOFF>"
11880 #. type: Plain text
11881 #: build/C/man2/quotactl.2:374
11883 "Turn off quotas for an XFS filesystem. As with B<Q_QUOTAON>, XFS "
11884 "filesystems expect a pointer to an I<unsigned int> that specifies whether "
11885 "quota accounting and/or limit enforcement need to be turned off. This "
11886 "operation requires privilege (B<CAP_SYS_ADMIN>)."
11890 #: build/C/man2/quotactl.2:374
11892 msgid "B<Q_XGETQUOTA>"
11893 msgstr "B<Q_XGETQUOTA>"
11895 #. type: Plain text
11896 #: build/C/man2/quotactl.2:388
11898 "Get disk quota limits and current usage for user I<id>. The I<addr> "
11899 "argument is a pointer to an I<fs_disk_quota> structure (defined in "
11900 "I<E<lt>xfs/xqm.hE<gt>>). Unprivileged users may retrieve only their own "
11901 "quotas; a privileged user (B<CAP_SYS_ADMIN>) may retrieve the quotas of any "
11906 #: build/C/man2/quotactl.2:388
11908 msgid "B<Q_XSETQLIM>"
11909 msgstr "B<Q_XSETQLIM>"
11911 #. type: Plain text
11912 #: build/C/man2/quotactl.2:400
11914 "Set disk quota limits for user I<id>. The I<addr> argument is a pointer to "
11915 "an I<fs_disk_quota> structure (defined in I<E<lt>xfs/xqm.hE<gt>>). This "
11916 "operation requires privilege (B<CAP_SYS_ADMIN>)."
11920 #: build/C/man2/quotactl.2:400
11922 msgid "B<Q_XGETQSTAT>"
11923 msgstr "B<Q_XGETQSTAT>"
11925 #. type: Plain text
11926 #: build/C/man2/quotactl.2:408
11928 "Returns an I<fs_quota_stat> structure containing XFS filesystem-specific "
11929 "quota information. This is useful for finding out how much space is used to "
11930 "store quota information, and also to get quotaon/off status of a given local "
11935 #: build/C/man2/quotactl.2:408
11937 msgid "B<Q_XQUOTARM>"
11938 msgstr "B<Q_XQUOTARM>"
11940 #. type: Plain text
11941 #: build/C/man2/quotactl.2:412
11943 "Free the disk space taken by disk quotas. Quotas must have already been "
11947 #. type: Plain text
11948 #: build/C/man2/quotactl.2:419
11950 "There is no command equivalent to B<Q_SYNC> for XFS since B<sync>(1) writes "
11951 "quota information to disk (in addition to the other filesystem metadata that "
11955 #. type: Plain text
11956 #: build/C/man2/quotactl.2:427
11958 "On success, B<quotactl>() returns 0; on error -1 is returned, and I<errno> "
11959 "is set to indicate the error."
11961 "成功すると、 B<quotactl>() は 0 を返す。\n"
11962 "エラーの場合、-1 を返し、 I<errno> をエラーを示す値に設定する。"
11964 #. type: Plain text
11965 #: build/C/man2/quotactl.2:434
11966 msgid "I<addr> or I<special> is invalid."
11969 #. type: Plain text
11970 #: build/C/man2/quotactl.2:440
11971 msgid "I<cmd> or I<type> is invalid."
11974 #. type: Plain text
11975 #: build/C/man2/quotactl.2:447
11976 msgid "The file specified by I<special> or I<addr> does not exist."
11979 #. type: Plain text
11980 #: build/C/man2/quotactl.2:452
11981 msgid "The kernel has not been compiled with the B<CONFIG_QUOTA> option."
11985 #: build/C/man2/quotactl.2:452
11988 msgstr "B<ENOTBLK>"
11990 #. type: Plain text
11991 #: build/C/man2/quotactl.2:456
11992 msgid "I<special> is not a block device."
11993 msgstr "I<special> がブロックデバイスではない。"
11995 #. type: Plain text
11996 #: build/C/man2/quotactl.2:461
11998 "The caller lacked the required privilege (B<CAP_SYS_ADMIN>) for the "
11999 "specified operation."
12002 #. type: Plain text
12003 #: build/C/man2/quotactl.2:465
12005 "No disk quota is found for the indicated user. Quotas have not been turned "
12006 "on for this filesystem."
12009 #. type: Plain text
12010 #: build/C/man2/quotactl.2:474
12011 msgid "If I<cmd> is B<Q_SETQUOTA>, B<quotactl>() may also set I<errno> to:"
12014 #. type: Plain text
12015 #: build/C/man2/quotactl.2:477
12016 msgid "Specified limits are out of range allowed by quota format."
12019 #. type: Plain text
12020 #: build/C/man2/quotactl.2:486
12021 msgid "If I<cmd> is B<Q_QUOTAON>, B<quotactl>() may also set I<errno> to:"
12024 #. type: Plain text
12025 #: build/C/man2/quotactl.2:495
12027 "The quota file pointed to by I<addr> exists, but is not a regular file; or, "
12028 "the quota file pointed to by I<addr> exists, but is not on the filesystem "
12029 "pointed to by I<special>."
12032 #. type: Plain text
12033 #: build/C/man2/quotactl.2:501
12035 "B<Q_QUOTAON> attempted, but another B<Q_QUOTAON> had already been performed."
12038 #. type: Plain text
12039 #: build/C/man2/quotactl.2:504
12040 msgid "The quota file is corrupted."
12041 msgstr "quota ファイルが壊れている。"
12043 #. type: Plain text
12044 #: build/C/man2/quotactl.2:507
12045 msgid "Specified quota format was not found."
12048 #. type: Plain text
12049 #: build/C/man2/quotactl.2:512
12050 msgid "B<quota>(1), B<getrlimit>(2), B<quotacheck>(8), B<quotaon>(8)"
12051 msgstr "B<quota>(1), B<getrlimit>(2), B<quotacheck>(8), B<quotaon>(8)"
12054 #: build/C/man2/sendfile.2:19
12060 #: build/C/man2/sendfile.2:19
12063 msgstr "2011-09-14"
12065 #. type: Plain text
12066 #: build/C/man2/sendfile.2:22
12067 msgid "sendfile - transfer data between file descriptors"
12068 msgstr "sendfile - ファイルディスクリプター間でデータを転送する"
12070 #. type: Plain text
12071 #: build/C/man2/sendfile.2:24
12072 msgid "B<#include E<lt>sys/sendfile.hE<gt>>"
12073 msgstr "B<#include E<lt>sys/sendfile.hE<gt>>"
12075 #. The below is too ugly. Comments about glibc versions belong
12076 #. in the notes, not in the header.
12077 #. .B #include <features.h>
12079 #. .B #if (__GLIBC__==2 && __GLIBC_MINOR__>=1) || __GLIBC__>2
12081 #. .B #include <sys/sendfile.h>
12085 #. .B #include <sys/types.h>
12087 #. .B /* No system prototype before glibc 2.1. */
12089 #. .BI "ssize_t sendfile(int" " out_fd" ", int" " in_fd" ", off_t *" #. offset ", size_t" " count" )
12092 #. type: Plain text
12093 #: build/C/man2/sendfile.2:47
12095 "B<ssize_t sendfile(int>I< out_fd>B<, int>I< in_fd>B<, off_t *>I<offset>B<, "
12096 "size_t>I< count>B<);>"
12098 "B<ssize_t sendfile(int>I< out_fd>B<, int>I< in_fd>B<, off_t *>I<offset>B<, "
12099 "size_t>I< count>B<);>"
12101 #. type: Plain text
12102 #: build/C/man2/sendfile.2:57
12104 "B<sendfile>() copies data between one file descriptor and another. Because "
12105 "this copying is done within the kernel, B<sendfile>() is more efficient "
12106 "than the combination of B<read>(2) and B<write>(2), which would require "
12107 "transferring data to and from user space."
12109 "B<sendfile>() は、あるファイルディスクリプターから別の ファイルディスクリプ"
12110 "ターへのデータのコピーを行う。 このコピーはカーネル内で行われるので、 "
12111 "B<sendfile>() は、 B<read>(2) と B<write>(2) を組み合わせるよりも効率がよ"
12112 "い。 B<read>(2) や B<write>(2) ではユーザー空間との間でデータの転送が必要と"
12115 #. type: Plain text
12116 #: build/C/man2/sendfile.2:62
12118 "I<in_fd> should be a file descriptor opened for reading and I<out_fd> should "
12119 "be a descriptor opened for writing."
12121 "I<in_fd> は読み込みのためにオープンされたファイルディスクリプター、 "
12122 "I<out_fd> は書き込みのためにオープンされたディスクリプターでなければならな"
12125 #. type: Plain text
12126 #: build/C/man2/sendfile.2:83
12128 "If I<offset> is not NULL, then it points to a variable holding the file "
12129 "offset from which B<sendfile>() will start reading data from I<in_fd>. "
12130 "When B<sendfile>() returns, this variable will be set to the offset of the "
12131 "byte following the last byte that was read. If I<offset> is not NULL, then "
12132 "B<sendfile>() does not modify the current file offset of I<in_fd>; "
12133 "otherwise the current file offset is adjusted to reflect the number of bytes "
12134 "read from I<in_fd>."
12136 "I<offset> が NULL でない場合、 I<offset> は B<sendfile>() が I<in_fd> のどこ"
12137 "からデータを読み始めるかを示すファイルオフセットを保持する変数への ポインター"
12138 "である。 B<sendfile>() は復帰する時、この変数に最後に読み込んだバイトの 次の"
12139 "バイトのオフセットを書き込む。 I<offset> が NULL でない場合、 B<sendfile>() "
12140 "は I<in_fd> のファイルオフセットの現在値を変更しない。 NULL の場合は、ファイ"
12141 "ルオフセットの現在値を I<in_fd> から読み込んだバイト数を反映した位置に調整す"
12144 #. type: Plain text
12145 #: build/C/man2/sendfile.2:90
12147 "If I<offset> is NULL, then data will be read from I<in_fd> starting at the "
12148 "current file offset, and the file offset will be updated by the call."
12150 "I<offset> が NULL の場合、データは I<in_fd> の現在のファイルオフセットから読"
12151 "み出され、 ファイルオフセットはこの呼び出しで更新される。"
12153 #. type: Plain text
12154 #: build/C/man2/sendfile.2:93
12155 msgid "I<count> is the number of bytes to copy between the file descriptors."
12156 msgstr "I<count> は、ファイルディスクリプター間でコピーするバイト数である。"
12158 #. type: Plain text
12159 #: build/C/man2/sendfile.2:100
12161 "The I<in_fd> argument must correspond to a file which supports B<mmap>(2)-"
12162 "like operations (i.e., it cannot be a socket)."
12164 "I<in_fd> 引き数は B<mmap>(2) 風の操作ができるファイルを指していなければなら"
12166 "い (ソケットを指定することはできない)。"
12168 #. type: Plain text
12169 #: build/C/man2/sendfile.2:108
12171 "In Linux kernels before 2.6.33, I<out_fd> must refer to a socket. Since "
12172 "Linux 2.6.33 it can be any file. If it is a regular file, then "
12173 "B<sendfile>() changes the file offset appropriately."
12175 "2.6.33 より前の Linux カーネルでは I<out_fd> はソケットを参照していなければ"
12177 "らない。Linux 2.6.33 以降では、任意のファイルを参照することができる。\n"
12178 "通常のファイルの場合には B<sendfile>() はファイルオフセットを適切に変更する。"
12180 #. type: Plain text
12181 #: build/C/man2/sendfile.2:115
12183 "If the transfer was successful, the number of bytes written to I<out_fd> is "
12184 "returned. On error, -1 is returned, and I<errno> is set appropriately."
12186 "転送に成功した場合、 I<out_fd> に書き込まれたバイト数を返す。エラーの場"
12187 "合、-1 を返し、 I<errno> に適切な値を設定する。"
12189 #. type: Plain text
12190 #: build/C/man2/sendfile.2:121
12192 "Nonblocking I/O has been selected using B<O_NONBLOCK> and the write would "
12195 "B<O_NONBLOCK> を用いて非ブロック I/O が選択されたが、書き込みがブロックされ"
12198 #. type: Plain text
12199 #: build/C/man2/sendfile.2:125
12201 "The input file was not opened for reading or the output file was not opened "
12204 "入力ファイルが読み込みのためにオープンされていないか、 出力ファイルが書き込み"
12207 #. type: Plain text
12208 #: build/C/man2/sendfile.2:128
12209 msgid "Bad address."
12210 msgstr "アドレスがおかしい。"
12212 #. type: Plain text
12213 #: build/C/man2/sendfile.2:134
12215 "Descriptor is not valid or locked, or an B<mmap>(2)-like operation is not "
12216 "available for I<in_fd>."
12218 "ディスクリプターが有効でないか、ロックされている。もしくは B<mmap>(2) 風の操"
12219 "作が I<in_fd> では利用できない。"
12221 #. type: Plain text
12222 #: build/C/man2/sendfile.2:138
12223 msgid "Unspecified error while reading from I<in_fd>."
12224 msgstr "I<in_fd> から読み込んでいるうちに予期しないエラーが起こった。"
12226 #. type: Plain text
12227 #: build/C/man2/sendfile.2:142
12228 msgid "Insufficient memory to read from I<in_fd>."
12229 msgstr "I<in_fd> から読み込むための十分なメモリーがない。"
12231 #. type: Plain text
12232 #: build/C/man2/sendfile.2:148
12234 "B<sendfile>() is a new feature in Linux 2.2. The include file I<E<lt>sys/"
12235 "sendfile.hE<gt>> is present since glibc 2.1."
12237 "B<sendfile> は Linux 2.2 の新しい機能である。 インクルードファイル "
12238 "I<E<lt>sys/sendfile.hE<gt>> は glibc 2.1 から存在している。"
12240 #. type: Plain text
12241 #: build/C/man2/sendfile.2:150
12242 msgid "Not specified in POSIX.1-2001, or other standards."
12243 msgstr "POSIX.1-2001 や他の標準では規定されていない。"
12245 #. type: Plain text
12246 #: build/C/man2/sendfile.2:155
12248 "Other UNIX systems implement B<sendfile>() with different semantics and "
12249 "prototypes. It should not be used in portable programs."
12251 "他の UNIX システムでは、異なった方式やプロトタイプで B<sendfile>() を実装し"
12252 "ている。移植性を考慮したプログラムでは使用すべきではない。"
12254 #. type: Plain text
12255 #: build/C/man2/sendfile.2:165
12257 "If you plan to use B<sendfile>() for sending files to a TCP socket, but "
12258 "need to send some header data in front of the file contents, you will find "
12259 "it useful to employ the B<TCP_CORK> option, described in B<tcp>(7), to "
12260 "minimize the number of packets and to tune performance."
12262 "B<sendfile>() を使って TCP ソケットにファイルを送ろうとしていて、 ファイルの"
12263 "内容の前にヘッダーデータを付け加える必要がある場合は、 パケット数を最小にして"
12264 "性能を上げるために B<tcp>(7) に記述されている B<TCP_CORK> オプションを使うと"
12267 #. type: Plain text
12268 #: build/C/man2/sendfile.2:171
12270 "In Linux 2.4 and earlier, I<out_fd> could also refer to a regular file, and "
12271 "B<sendfile>() changed the current offset of that file."
12273 "Linux 2.4 とそれ以前のバージョンでも、 I<out_fd> は通常のファイルを参照で"
12275 "B<sendfile>() はそのファイルのオフセットの現在値を変更していた。"
12277 #. type: Plain text
12278 #: build/C/man2/sendfile.2:183
12280 "The original Linux B<sendfile>() system call was not designed to handle "
12281 "large file offsets. Consequently, Linux 2.4 added B<sendfile64>(), with a "
12282 "wider type for the I<offset> argument. The glibc B<sendfile>() wrapper "
12283 "function transparently deals with the kernel differences."
12285 "元々の Linux B<sendfile>() システムコールは大きなファイルオフセットを\n"
12286 "扱えるように設計されていなかった。その結果、Linux 2.4 で、\n"
12287 "ビット幅の大きな I<offset> 引き数を持った B<sendfile64>() が追加された。\n"
12288 "glibc の B<sendfile>() のラッパー関数はカーネルによるこの違いを吸収している。"
12290 #. type: Plain text
12291 #: build/C/man2/sendfile.2:192
12293 "Applications may wish to fall back to B<read>(2)/B<write>(2) in the case "
12294 "where B<sendfile>() fails with B<EINVAL> or B<ENOSYS>."
12296 "B<sendfile>() が B<EINVAL> や B<ENOSYS> で失敗するような場合は、 アプリケー"
12297 "ションは B<read>(2)/B<write>(2) に戻すことを考えてもよいかもしれない。"
12299 #. type: Plain text
12300 #: build/C/man2/sendfile.2:197
12302 "The Linux-specific B<splice>(2) call supports transferring data between "
12303 "arbitrary files (e.g., a pair of sockets)."
12305 "Linux 固有の B<splice>(2) システムコールは、任意のファイル間 (例えば、\n"
12306 "ソケット同士) でのデータ転送をサポートしている。"
12308 #. type: Plain text
12309 #: build/C/man2/sendfile.2:202
12310 msgid "B<mmap>(2), B<open>(2), B<socket>(2), B<splice>(2)"
12311 msgstr "B<mmap>(2), B<open>(2), B<socket>(2), B<splice>(2)"
12314 #: build/C/man2/set_tid_address.2:25
12316 msgid "SET_TID_ADDRESS"
12317 msgstr "SET_TID_ADDRESS"
12320 #: build/C/man2/set_tid_address.2:25
12323 msgstr "2014-07-08"
12325 #. type: Plain text
12326 #: build/C/man2/set_tid_address.2:28
12327 msgid "set_tid_address - set pointer to thread ID"
12328 msgstr "set_tid_address - スレッド ID へのポインターを設定する"
12330 #. type: Plain text
12331 #: build/C/man2/set_tid_address.2:31
12333 msgid "B<#include E<lt>linux/unistd.hE<gt>>\n"
12334 msgstr "B<#include E<lt>linux/unistd.hE<gt>>\n"
12336 #. type: Plain text
12337 #: build/C/man2/set_tid_address.2:33
12339 msgid "B<long set_tid_address(int *>I<tidptr>B<);>\n"
12340 msgstr "B<long set_tid_address(int *>I<tidptr>B<);>\n"
12342 #. type: Plain text
12343 #: build/C/man2/set_tid_address.2:40
12345 "For each thread, the kernel maintains two attributes (addresses) called "
12346 "I<set_child_tid> and I<clear_child_tid>. These two attributes contain the "
12347 "value NULL by default."
12349 "各スレッドについて、カーネルは I<set_child_tid> と I<clear_child_tid> という "
12350 "2 つの属性を保持する。この 2 つの属性はデフォルトでは NULL である。"
12353 #: build/C/man2/set_tid_address.2:40
12355 msgid "I<set_child_tid>"
12356 msgstr "I<set_child_tid>"
12358 #. type: Plain text
12359 #: build/C/man2/set_tid_address.2:51
12361 "If a thread is started using B<clone>(2) with the B<CLONE_CHILD_SETTID> "
12362 "flag, I<set_child_tid> is set to the value passed in the I<ctid> argument of "
12363 "that system call."
12365 "スレッドが B<CLONE_CHILD_SETTID> フラグを指定した B<clone>(2) によって開始さ"
12366 "れた場合、 I<set_child_tid> は B<clone>(2) のシステムコールの I<ctid> 引き数"
12369 #. type: Plain text
12370 #: build/C/man2/set_tid_address.2:56
12372 "When I<set_child_tid> is set, the very first thing the new thread does is to "
12373 "write its thread ID at this address."
12375 "I<set_child_tid> が設定された場合、一番最初に新しいスレッドが行うことは、 こ"
12376 "のアドレスに自身のスレッド ID を書き込むことである。"
12379 #: build/C/man2/set_tid_address.2:56
12381 msgid "I<clear_child_tid>"
12382 msgstr "I<clear_child_tid>"
12384 #. type: Plain text
12385 #: build/C/man2/set_tid_address.2:67
12387 "If a thread is started using B<clone>(2) with the B<CLONE_CHILD_CLEARTID> "
12388 "flag, I<clear_child_tid> is set to the value passed in the I<ctid> argument "
12389 "of that system call."
12391 "スレッドが B<CLONE_CHILD_CLEARTID> フラグを指定した B<clone>(2) によって開始"
12392 "された場合、 I<clear_child_tid> は B<clone>(2) のシステムコールの I<ctid> 引"
12395 #. type: Plain text
12396 #: build/C/man2/set_tid_address.2:74
12398 "The system call B<set_tid_address>() sets the I<clear_child_tid> value for "
12399 "the calling thread to I<tidptr>."
12401 "システムコール B<set_tid_address>() は呼び出し元スレッドの "
12402 "I<clear_child_tid> の値を I<tidptr> に設定する。"
12404 #. type: Plain text
12405 #: build/C/man2/set_tid_address.2:82
12407 "When a thread whose I<clear_child_tid> is not NULL terminates, then, if the "
12408 "thread is sharing memory with other threads, then 0 is written at the "
12409 "address specified in I<clear_child_tid> and the kernel performs the "
12410 "following operation:"
12412 "I<clear_child_tid> が NULL でないスレッドが終了すると、そのスレッドが他のス"
12413 "レッドとメモリーを共有していれば、 I<clear_child_tid> で指定されたアドレスに "
12414 "0 が書き込まれ、カーネルは以下の処理を実行する。"
12416 #. type: Plain text
12417 #: build/C/man2/set_tid_address.2:84
12419 msgid " futex(clear_child_tid, FUTEX_WAKE, 1, NULL, NULL, 0);\n"
12420 msgstr " futex(clear_child_tid, FUTEX_WAKE, 1, NULL, NULL, 0);\n"
12422 #. type: Plain text
12423 #: build/C/man2/set_tid_address.2:88
12425 "The effect of this operation is to wake a single thread that is performing a "
12426 "futex wait on the memory location. Errors from the futex wake operation are "
12429 "この処理の結果、このメモリーアドレスに対する futex wait を実行しているスレッ"
12430 "ドを一つ起こす (wake)。 futex wake 操作でのエラーは無視される。"
12432 #. type: Plain text
12433 #: build/C/man2/set_tid_address.2:91
12434 msgid "B<set_tid_address>() always returns the caller's thread ID."
12435 msgstr "B<set_tid_address>() は常に呼び出し元のスレッド ID を返す。"
12437 #. type: Plain text
12438 #: build/C/man2/set_tid_address.2:94
12439 msgid "B<set_tid_address>() always succeeds."
12440 msgstr "B<set_tid_address>() は常に成功する。"
12442 #. type: Plain text
12443 #: build/C/man2/set_tid_address.2:97
12445 "This call is present since Linux 2.5.48. Details as given here are valid "
12446 "since Linux 2.5.49."
12448 "この呼び出しは Linux 2.5.48 以降で存在する。 ここで書かれた詳細は Linux "
12451 #. type: Plain text
12452 #: build/C/man2/set_tid_address.2:103
12453 msgid "B<clone>(2), B<futex>(2), B<gettid>(2)"
12454 msgstr "B<clone>(2), B<futex>(2), B<gettid>(2)"
12457 #: build/C/man2/splice.2:26
12463 #: build/C/man2/splice.2:26 build/C/man2/tee.2:26
12466 msgstr "2014-12-31"
12468 #. type: Plain text
12469 #: build/C/man2/splice.2:29
12470 msgid "splice - splice data to/from a pipe"
12471 msgstr "splice - パイプとの間でデータを継ぎ合わせる"
12473 #. type: Plain text
12474 #: build/C/man2/splice.2:33 build/C/man2/tee.2:33
12477 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
12478 "B<#include E<lt>fcntl.hE<gt>>\n"
12480 "B<#define _GNU_SOURCE> /* feature_test_macros(7) 参照 */\n"
12481 "B<#include E<lt>fcntl.hE<gt>>\n"
12483 #. Return type was long before glibc 2.7
12484 #. type: Plain text
12485 #: build/C/man2/splice.2:38
12488 "B<ssize_t splice(int >I<fd_in>B<, loff_t *>I<off_in>B<, int >I<fd_out>B<,>\n"
12489 "B< loff_t *>I<off_out>B<, size_t >I<len>B<, unsigned int >I<flags>B<);>\n"
12491 "B<ssize_t splice(int >I<fd_in>B<, loff_t *>I<off_in>B<, int >I<fd_out>B<,>\n"
12492 "B< loff_t *>I<off_out>B<, size_t >I<len>B<, unsigned int >I<flags>B<);>\n"
12494 #. type: Plain text
12495 #: build/C/man2/splice.2:50
12497 "B<splice>() moves data between two file descriptors without copying between "
12498 "kernel address space and user address space. It transfers up to I<len> "
12499 "bytes of data from the file descriptor I<fd_in> to the file descriptor "
12500 "I<fd_out>, where one of the descriptors must refer to a pipe."
12502 "B<splice>() は、カーネルアドレス空間とユーザーアドレス空間との間のコピーを伴"
12503 "わずに、 2 つのファイルディスクリプター間でデータの移動を行う。 ファイルディ"
12504 "スクリプター I<fd_in> からファイルディスクリプター I<fd_out> へ最大 I<len> バ"
12505 "イトを転送する。 2 つのファイルディスクリプターのうち一つは パイプを参照して"
12508 #. type: Plain text
12509 #: build/C/man2/splice.2:55
12510 msgid "The following semantics apply for I<fd_in> and I<off_in>:"
12511 msgstr "I<fd_in> と I<off_in> には以下のルールが適用される。"
12513 #. type: Plain text
12514 #: build/C/man2/splice.2:61
12515 msgid "If I<fd_in> refers to a pipe, then I<off_in> must be NULL."
12517 "I<fd_in> がパイプを参照している場合、 I<off_in> は NULL でなければならない。"
12519 #. type: Plain text
12520 #: build/C/man2/splice.2:70
12522 "If I<fd_in> does not refer to a pipe and I<off_in> is NULL, then bytes are "
12523 "read from I<fd_in> starting from the current file offset, and the current "
12524 "file offset is adjusted appropriately."
12526 "I<fd_in> がパイプを参照しておらず、かつ I<off_in> が NULL の場合、 バイトは "
12527 "I<fd_in> の現在のファイルオフセットから読み出され、 現在のファイルオフセット"
12530 #. type: Plain text
12531 #: build/C/man2/splice.2:83
12533 "If I<fd_in> does not refer to a pipe and I<off_in> is not NULL, then "
12534 "I<off_in> must point to a buffer which specifies the starting offset from "
12535 "which bytes will be read from I<fd_in>; in this case, the current file "
12536 "offset of I<fd_in> is not changed."
12538 "I<fd_in> がパイプを参照しておらず、 I<off_in> が NULL でない場合、 I<off_in> "
12539 "は I<fd_in> からのデータ読み出しを開始する先頭オフセットを格納したバッファー "
12540 "へのポインターでなければならない。この場合、 I<fd_in> の現在のファイルオフ"
12543 #. type: Plain text
12544 #: build/C/man2/splice.2:88
12545 msgid "Analogous statements apply for I<fd_out> and I<off_out>."
12546 msgstr "I<fd_out> と I<off_out> に関しても同様である。"
12548 #. type: Plain text
12549 #: build/C/man2/splice.2:93 build/C/man2/vmsplice.2:78
12551 "The I<flags> argument is a bit mask that is composed by ORing together zero "
12552 "or more of the following values:"
12554 "I<flags> 引き数には、以下の値の 0 個以上をビット毎の論理和の形で指定する。"
12557 #: build/C/man2/splice.2:93 build/C/man2/tee.2:62 build/C/man2/vmsplice.2:78
12559 msgid "B<SPLICE_F_MOVE>"
12560 msgstr "B<SPLICE_F_MOVE>"
12562 #. type: Plain text
12563 #: build/C/man2/splice.2:106
12565 "Attempt to move pages instead of copying. This is only a hint to the "
12566 "kernel: pages may still be copied if the kernel cannot move the pages from "
12567 "the pipe, or if the pipe buffers don't refer to full pages. The initial "
12568 "implementation of this flag was buggy: therefore starting in Linux 2.6.21 it "
12569 "is a no-op (but is still permitted in a B<splice>() call); in the future, a "
12570 "correct implementation may be restored."
12572 "ページのコピーでなく移動を試みる。 これはカーネルに対するヒントでしかない。 "
12573 "つまり、カーネルがパイプからページを移動できない場合や、 パイプバッファーが"
12574 "ページ全部を参照していない場合は、 ページのコピーが行われることもある。 この"
12575 "フラグの最初の実装にはバグがあった。そのため、 Linux 2.6.21 以降ではこのフラ"
12576 "グの操作はできないようになっている (ただし、 B<splice>() コールでこのフラグ"
12577 "を指定することは今も認められている)。 将来、正しい実装が行われることだろう。"
12580 #: build/C/man2/splice.2:106 build/C/man2/tee.2:68 build/C/man2/vmsplice.2:84
12582 msgid "B<SPLICE_F_NONBLOCK>"
12583 msgstr "B<SPLICE_F_NONBLOCK>"
12585 #. type: Plain text
12586 #: build/C/man2/splice.2:115
12588 "Do not block on I/O. This makes the splice pipe operations nonblocking, but "
12589 "B<splice>() may nevertheless block because the file descriptors that are "
12590 "spliced to/from may block (unless they have the B<O_NONBLOCK> flag set)."
12592 "入出力時に停止 (block) しない。 このフラグを指定すると、 splice によるパイプ"
12593 "操作を非停止モード (nonblocking) で 行おうとするが、その場合でも "
12594 "B<splice>() は停止することもある。なぜなら、データのやり取りを行う ファイル"
12595 "ディスクリプターは (B<O_NONBLOCK> フラグをセットされていない場合) 停止する可"
12599 #: build/C/man2/splice.2:115 build/C/man2/tee.2:73 build/C/man2/vmsplice.2:91
12601 msgid "B<SPLICE_F_MORE>"
12602 msgstr "B<SPLICE_F_MORE>"
12604 #. type: Plain text
12605 #: build/C/man2/splice.2:129
12607 "More data will be coming in a subsequent splice. This is a helpful hint "
12608 "when the I<fd_out> refers to a socket (see also the description of "
12609 "B<MSG_MORE> in B<send>(2), and the description of B<TCP_CORK> in B<tcp>(7))"
12611 "この後の splice でさらに転送されるデータがあることを示す。 このフラグは "
12612 "I<fd_out> がソケットを参照している場合に有用なヒントとなる (B<send>(2) の "
12613 "B<MSG_MORE> や B<tcp>(7) の B<TCP_CORK> の説明も参照)。"
12616 #: build/C/man2/splice.2:129 build/C/man2/tee.2:79 build/C/man2/vmsplice.2:97
12618 msgid "B<SPLICE_F_GIFT>"
12619 msgstr "B<SPLICE_F_GIFT>"
12621 #. type: Plain text
12622 #: build/C/man2/splice.2:135
12623 msgid "Unused for B<splice>(); see B<vmsplice>(2)."
12624 msgstr "B<splice>() では使用しない。 B<vmsplice>(2) 参照。"
12626 #. type: Plain text
12627 #: build/C/man2/splice.2:144
12629 "Upon successful completion, B<splice>() returns the number of bytes spliced "
12630 "to or from the pipe. A return value of 0 means that there was no data to "
12631 "transfer, and it would not make sense to block, because there are no writers "
12632 "connected to the write end of the pipe referred to by I<fd_in>."
12634 "成功して完了すると、 B<splice>() はパイプから出し入れしたバイト数を返す。 返"
12635 "り値 0 はデータの転送が行わなかったことを示す。 この場合、処理を停止 (block) "
12636 "しても無意味である。 なぜなら、 I<fd_in> が参照するパイプの書き込み側に接続さ"
12639 #. type: Plain text
12640 #: build/C/man2/splice.2:150
12642 "On error, B<splice>() returns -1 and I<errno> is set to indicate the error."
12644 "エラーの場合、 B<splice>() は -1 を返し、 I<errno> にエラーを示す値を設定す"
12647 #. type: Plain text
12648 #: build/C/man2/splice.2:157 build/C/man2/tee.2:107
12649 #: build/C/man2/vmsplice.2:133
12651 "B<SPLICE_F_NONBLOCK> was specified in I<flags>, and the operation would "
12654 "B<SPLICE_F_NONBLOCK> が I<flags> に指定されていて、かつ操作が停止するような状"
12657 #. type: Plain text
12658 #: build/C/man2/splice.2:161
12660 "One or both file descriptors are not valid, or do not have proper read-write "
12663 "ファイルディスクリプターの一方または両方が有効ではない、 もしくは適切な read-"
12666 #. The append-mode error is given since 2.6.27; in earlier kernels,
12667 #. splice() in append mode was broken
12668 #. type: Plain text
12669 #: build/C/man2/splice.2:169
12671 "Target filesystem doesn't support splicing; target file is opened in append "
12672 "mode; neither of the descriptors refers to a pipe; or offset given for "
12673 "nonseekable device."
12675 "対象のファイルシステムが splice に対応していない、 または対象のファイルが追記"
12676 "モードでオープンされている、 またはディスクリプターのどちらもパイプを参照して"
12677 "いない、 または seek できないデバイスに対してオフセットが指定された。"
12679 #. type: Plain text
12680 #: build/C/man2/splice.2:172 build/C/man2/tee.2:120
12681 #: build/C/man2/vmsplice.2:148
12682 msgid "Out of memory."
12686 #: build/C/man2/splice.2:172
12691 #. type: Plain text
12692 #: build/C/man2/splice.2:179
12694 "Either I<off_in> or I<off_out> was not NULL, but the corresponding file "
12695 "descriptor refers to a pipe."
12697 "I<off_in> か I<off_out> のいずれかが NULL ではないが、対応するファイルディス"
12698 "クリプターが パイプを参照している。"
12700 #. type: Plain text
12701 #: build/C/man2/splice.2:184
12703 "The B<splice>() system call first appeared in Linux 2.6.17; library support "
12704 "was added to glibc in version 2.5."
12706 "B<splice>() システムコールは Linux 2.6.17 で初めて登場した。\n"
12707 "ライブラリによるサポートは glibc バージョン 2.5 で追加された。"
12709 #. type: Plain text
12710 #: build/C/man2/splice.2:196
12712 "The three system calls B<splice>(), B<vmsplice>(2), and B<tee>(2), provide "
12713 "user-space programs with full control over an arbitrary kernel buffer, "
12714 "implemented within the kernel using the same type of buffer that is used for "
12715 "a pipe. In overview, these system calls perform the following tasks:"
12717 "3 つのシステムコール (B<splice>(), B<vmsplice>(2), B<tee>(2)) を使うと、ユー"
12718 "ザー空間プログラムは任意のカーネルバッファーに対する 完全な制御ができる。カー"
12719 "ネルバッファーは、パイプに使用されているのと 同種のバッファーを使ってカーネル"
12720 "内に実装されている。 大まかにいうと、これらのシステムコールは以下の仕事を行"
12724 #: build/C/man2/splice.2:196
12726 msgid "B<splice>()"
12727 msgstr "B<splice>()"
12729 #. type: Plain text
12730 #: build/C/man2/splice.2:200
12732 "moves data from the buffer to an arbitrary file descriptor, or vice versa, "
12733 "or from one buffer to another."
12735 "バッファーから任意のファイルディスクリプターや、その逆方向、 もしくはあるバッ"
12736 "ファーから別のバッファーへの、データ移動を行う。"
12739 #: build/C/man2/splice.2:200
12744 #. type: Plain text
12745 #: build/C/man2/splice.2:203
12746 msgid "\"copies\" the data from one buffer to another."
12747 msgstr "あるバッファーから別のバッファーへのデータ「コピー」を行う。"
12750 #: build/C/man2/splice.2:203
12752 msgid "B<vmsplice>(2)"
12753 msgstr "B<vmsplice>(2)"
12755 #. type: Plain text
12756 #: build/C/man2/splice.2:206
12757 msgid "\"copies\" data from user space into the buffer."
12758 msgstr "ユーザー空間からバッファーへのデータ「コピー」を行う。"
12760 #. Linus: Now, imagine using the above in a media server, for example.
12761 #. Let's say that a year or two has passed, so that the video drivers
12762 #. have been updated to be able to do the splice thing, and what can
12763 #. you do? You can:
12764 #. - splice from the (mpeg or whatever - let's just assume that the video
12765 #. input is either digital or does the encoding on its own - like they
12766 #. pretty much all do) video input into a pipe (remember: no copies - the
12767 #. video input will just DMA directly into memory, and splice will just
12768 #. set up the pages in the pipe buffer)
12769 #. - tee that pipe to split it up
12770 #. - splice one end to a file (ie "save the compressed stream to disk")
12771 #. - splice the other end to a real-time video decoder window for your
12772 #. real-time viewing pleasure.
12773 #. Linus: Now, the advantage of splice()/tee() is that you can
12774 #. do zero-copy movement of data, and unlike sendfile() you can
12775 #. do it on _arbitrary_ data (and, as shown by "tee()", it's more
12776 #. than just sending the data to somebody else: you can duplicate
12777 #. the data and choose to forward it to two or more different
12778 #. users - for things like logging etc.).
12779 #. type: Plain text
12780 #: build/C/man2/splice.2:237
12782 "Though we talk of copying, actual copies are generally avoided. The kernel "
12783 "does this by implementing a pipe buffer as a set of reference-counted "
12784 "pointers to pages of kernel memory. The kernel creates \"copies\" of pages "
12785 "in a buffer by creating new pointers (for the output buffer) referring to "
12786 "the pages, and increasing the reference counts for the pages: only pointers "
12787 "are copied, not the pages of the buffer."
12789 "ここではコピーの話をしているが、実際のコピーは一般的に回避される。 カーネル"
12790 "は、パイプバッファーをカーネルメモリーのページへのポインター集合として 実装"
12791 "し、ページへの参照回数を管理することで、これを実現している。 カーネルは、対象"
12792 "となるページを参照する (出力バッファー用の) ポインターを 新規に作成することで"
12793 "バッファー内のページの「コピー」を作成し、 そのページの参照回数を増やす。つま"
12794 "り、ポインターだけがコピーされ、 バッファーのページはコピーされない。"
12796 #. type: Plain text
12797 #: build/C/man2/splice.2:240
12798 msgid "See B<tee>(2)."
12799 msgstr "B<tee>(2) 参照。"
12801 #. type: Plain text
12802 #: build/C/man2/splice.2:244
12803 msgid "B<sendfile>(2), B<tee>(2), B<vmsplice>(2)"
12804 msgstr "B<sendfile>(2), B<tee>(2), B<vmsplice>(2)"
12807 #: build/C/man2/tee.2:26
12812 #. type: Plain text
12813 #: build/C/man2/tee.2:29
12814 msgid "tee - duplicating pipe content"
12815 msgstr "tee - パイプの中身を複製する"
12817 #. type: Plain text
12818 #: build/C/man2/tee.2:36
12820 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"
12821 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"
12823 #. Example programs http://brick.kernel.dk/snaps
12824 #. add a "tee(in, out1, out2)" system call that duplicates the pages
12825 #. (again, incrementing their reference count, not copying the data) from
12826 #. one pipe to two other pipes.
12827 #. type: Plain text
12828 #: build/C/man2/tee.2:56
12830 "B<tee>() duplicates up to I<len> bytes of data from the pipe referred to by "
12831 "the file descriptor I<fd_in> to the pipe referred to by the file descriptor "
12832 "I<fd_out>. It does not consume the data that is duplicated from I<fd_in>; "
12833 "therefore, that data can be copied by a subsequent B<splice>(2)."
12835 "B<tee>() は、ファイルディスクリプター I<fd_in> が参照するパイプからファイル"
12836 "ディスクリプター I<fd_out> が参照するパイプへ最大 I<len> バイトのデータを複製"
12837 "する。 この操作では、複製されるデータは I<fd_in> からは消費されない。したがっ"
12838 "て、これらのデータをこの後の B<splice>(2) でコピーすることができる。"
12840 #. type: Plain text
12841 #: build/C/man2/tee.2:62
12843 "I<flags> is a series of modifier flags, which share the name space with "
12844 "B<splice>(2) and B<vmsplice>(2):"
12846 "I<flags> は一連の修飾フラグであり、 B<splice>(2) や B<vmsplice>(2) と共通の"
12849 #. type: Plain text
12850 #: build/C/man2/tee.2:68
12851 msgid "Currently has no effect for B<tee>(); see B<splice>(2)."
12852 msgstr "現在のところ B<tee>() では何の効果もない。 B<splice>(2) 参照。"
12854 #. Not used for vmsplice
12855 #. May be in the future -- therefore EAGAIN
12856 #. type: Plain text
12857 #: build/C/man2/tee.2:73 build/C/man2/vmsplice.2:91
12858 msgid "Do not block on I/O; see B<splice>(2) for further details."
12859 msgstr "入出力で停止 (block) しない。詳細は B<splice>(2) 参照。"
12861 #. type: Plain text
12862 #: build/C/man2/tee.2:79
12864 "Currently has no effect for B<tee>(), but may be implemented in the future; "
12865 "see B<splice>(2)."
12867 "現在のところ B<tee>() では何の効果もないが、将来的には実装される可能性があ"
12868 "る。 B<splice>(2) 参照。"
12870 #. type: Plain text
12871 #: build/C/man2/tee.2:85
12872 msgid "Unused for B<tee>(); see B<vmsplice>(2)."
12873 msgstr "B<tee>() では未使用。 B<vmsplice>(2) 参照。"
12875 #. type: Plain text
12876 #: build/C/man2/tee.2:94
12878 "Upon successful completion, B<tee>() returns the number of bytes that were "
12879 "duplicated between the input and output. A return value of 0 means that "
12880 "there was no data to transfer, and it would not make sense to block, because "
12881 "there are no writers connected to the write end of the pipe referred to by "
12884 "成功して完了すると、 B<tee>() は入出力間で複製されたバイト数を返す。 返り値 "
12885 "0 はデータの転送が行われなかったことを示す。 この場合、処理を停止 (block) し"
12886 "ても無意味である。 なぜなら、 I<fd_in> が参照するパイプの書き込み側に接続され"
12889 #. type: Plain text
12890 #: build/C/man2/tee.2:100
12892 "On error, B<tee>() returns -1 and I<errno> is set to indicate the error."
12894 "エラーの場合、 B<tee>() は -1 を返し、 I<errno> にエラーを示す値を設定する。"
12896 #. type: Plain text
12897 #: build/C/man2/tee.2:117
12899 "I<fd_in> or I<fd_out> does not refer to a pipe; or I<fd_in> and I<fd_out> "
12900 "refer to the same pipe."
12902 "I<fd_in> と I<fd_out> のどちらかがパイプを参照していない。もしくは I<fd_in> "
12903 "と I<fd_out> が同じパイプを参照している。"
12905 #. type: Plain text
12906 #: build/C/man2/tee.2:125
12908 "The B<tee>() system call first appeared in Linux 2.6.17; library support "
12909 "was added to glibc in version 2.5."
12911 "B<tee>() システムコールは Linux 2.6.17 で初めて登場した。\n"
12912 "ライブラリによるサポートは glibc バージョン 2.5 で追加された。"
12914 #. type: Plain text
12915 #: build/C/man2/tee.2:136
12917 "Conceptually, B<tee>() copies the data between the two pipes. In reality "
12918 "no real data copying takes place though: under the covers, B<tee>() assigns "
12919 "data in the output by merely grabbing a reference to the input."
12921 "概念としては、 B<tee>() は二つのパイプ間でデータのコピーを行う。 しかし、実"
12922 "際には実データのコピーは行われない。 内部では、 B<tee>() は入力側に対する参"
12923 "照だけを作成することで出力側にデータを 追加する。"
12925 #. type: Plain text
12926 #: build/C/man2/tee.2:143
12928 "The example below implements a basic B<tee>(1) program using the B<tee>() "
12929 "system call. Here is an example of its use:"
12931 "以下の例は、 B<tee>() システムコールを使って、 基本的な B<tee>(1) プログラ"
12932 "ムを実装したものである。 以下は利用例である。"
12934 #. type: Plain text
12935 #: build/C/man2/tee.2:150
12938 "$ B<date |./a.out out.log | cat>\n"
12939 "Tue Oct 28 10:06:00 CET 2014\n"
12940 "$ B<cat out.log>\n"
12941 "Tue Oct 28 10:06:00 CET 2014\n"
12943 "$ B<date |./a.out out.log | cat>\n"
12944 "Tue Oct 28 10:06:00 CET 2014\n"
12945 "$ B<cat out.log>\n"
12946 "Tue Oct 28 10:06:00 CET 2014\n"
12949 #: build/C/man2/tee.2:152
12951 msgid "Program source"
12954 #. type: Plain text
12955 #: build/C/man2/tee.2:162
12958 "#define _GNU_SOURCE\n"
12959 "#include E<lt>fcntl.hE<gt>\n"
12960 "#include E<lt>stdio.hE<gt>\n"
12961 "#include E<lt>stdlib.hE<gt>\n"
12962 "#include E<lt>unistd.hE<gt>\n"
12963 "#include E<lt>errno.hE<gt>\n"
12964 "#include E<lt>limits.hE<gt>\n"
12966 "#define _GNU_SOURCE\n"
12967 "#include E<lt>fcntl.hE<gt>\n"
12968 "#include E<lt>stdio.hE<gt>\n"
12969 "#include E<lt>stdlib.hE<gt>\n"
12970 "#include E<lt>unistd.hE<gt>\n"
12971 "#include E<lt>errno.hE<gt>\n"
12972 "#include E<lt>limits.hE<gt>\n"
12974 #. type: Plain text
12975 #: build/C/man2/tee.2:168
12979 "main(int argc, char *argv[])\n"
12982 " int len, slen;\n"
12985 "main(int argc, char *argv[])\n"
12988 " int len, slen;\n"
12990 #. type: Plain text
12991 #: build/C/man2/tee.2:173
12994 " if (argc != 2) {\n"
12995 " fprintf(stderr, \"Usage: %s E<lt>fileE<gt>\\en\", argv[0]);\n"
12996 " exit(EXIT_FAILURE);\n"
12999 " if (argc != 2) {\n"
13000 " fprintf(stderr, \"Usage: %s E<lt>fileE<gt>\\en\", argv[0]);\n"
13001 " exit(EXIT_FAILURE);\n"
13004 #. type: Plain text
13005 #: build/C/man2/tee.2:179
13008 " fd = open(argv[1], O_WRONLY | O_CREAT | O_TRUNC, 0644);\n"
13009 " if (fd == -1) {\n"
13010 " perror(\"open\");\n"
13011 " exit(EXIT_FAILURE);\n"
13014 " fd = open(argv[1], O_WRONLY | O_CREAT | O_TRUNC, 0644);\n"
13015 " if (fd == -1) {\n"
13016 " perror(\"open\");\n"
13017 " exit(EXIT_FAILURE);\n"
13020 #. type: Plain text
13021 #: build/C/man2/tee.2:186
13026 " * tee stdin to stdout.\n"
13028 " len = tee(STDIN_FILENO, STDOUT_FILENO,\n"
13029 " INT_MAX, SPLICE_F_NONBLOCK);\n"
13033 " * tee stdin to stdout.\n"
13035 " len = tee(STDIN_FILENO, STDOUT_FILENO,\n"
13036 " INT_MAX, SPLICE_F_NONBLOCK);\n"
13038 #. type: Plain text
13039 #: build/C/man2/tee.2:195
13042 " if (len E<lt> 0) {\n"
13043 " if (errno == EAGAIN)\n"
13045 " perror(\"tee\");\n"
13046 " exit(EXIT_FAILURE);\n"
13051 " if (len E<lt> 0) {\n"
13052 " if (errno == EAGAIN)\n"
13054 " perror(\"tee\");\n"
13055 " exit(EXIT_FAILURE);\n"
13060 #. type: Plain text
13061 #: build/C/man2/tee.2:209
13065 " * Consume stdin by splicing it to a file.\n"
13067 " while (len E<gt> 0) {\n"
13068 " slen = splice(STDIN_FILENO, NULL, fd, NULL,\n"
13069 " len, SPLICE_F_MOVE);\n"
13070 " if (slen E<lt> 0) {\n"
13071 " perror(\"splice\");\n"
13079 " * Consume stdin by splicing it to a file.\n"
13081 " while (len E<gt> 0) {\n"
13082 " slen = splice(STDIN_FILENO, NULL, fd, NULL,\n"
13083 " len, SPLICE_F_MOVE);\n"
13084 " if (slen E<lt> 0) {\n"
13085 " perror(\"splice\");\n"
13092 #. type: Plain text
13093 #: build/C/man2/tee.2:213
13097 " exit(EXIT_SUCCESS);\n"
13101 " exit(EXIT_SUCCESS);\n"
13104 #. type: Plain text
13105 #: build/C/man2/tee.2:217
13106 msgid "B<splice>(2), B<vmsplice>(2)"
13107 msgstr "B<splice>(2), B<vmsplice>(2)"
13110 #: build/C/man2/vm86.2:26
13116 #: build/C/man2/vm86.2:26
13119 msgstr "2009-02-20"
13121 #. type: Plain text
13122 #: build/C/man2/vm86.2:29
13123 msgid "vm86old, vm86 - enter virtual 8086 mode"
13124 msgstr "vm86old, vm86 - 仮想 8086 モードへ移行する"
13126 #. type: Plain text
13127 #: build/C/man2/vm86.2:31
13128 msgid "B<#include E<lt>sys/vm86.hE<gt>>"
13129 msgstr "B<#include E<lt>sys/vm86.hE<gt>>"
13131 #. type: Plain text
13132 #: build/C/man2/vm86.2:33
13133 msgid "B<int vm86old(struct vm86_struct *>I<info>B<);>"
13134 msgstr "B<int vm86old(struct vm86_struct *>I<info>B<);>"
13136 #. type: Plain text
13137 #: build/C/man2/vm86.2:35
13138 msgid "B<int vm86(unsigned long >I<fn>B<, struct vm86plus_struct *>I<v86>B<);>"
13140 "B<int vm86(unsigned long >I<fn>B<, struct vm86plus_struct *>I<v86>B<);>"
13142 #. type: Plain text
13143 #: build/C/man2/vm86.2:48
13145 "The system call B<vm86>() was introduced in Linux 0.97p2. In Linux 2.1.15 "
13146 "and 2.0.28, it was renamed to B<vm86old>(), and a new B<vm86>() was "
13147 "introduced. The definition of I<struct vm86_struct> was changed in 1.1.8 "
13150 "B<vm86>() システムコールは Linux 0.97p2 で導入された。 これは Linux 2.1.15 "
13151 "と 2.0.28 で B<vm86old>() に名前が変更され、 新しい B<vm86>() が導入され"
13152 "た。 I<struct vm86_struct> の定義は 1.1.8 と 1.1.9 で変更された。"
13154 #. type: Plain text
13155 #: build/C/man2/vm86.2:52
13157 "These calls cause the process to enter VM86 mode (virtual-8086 in Intel "
13158 "literature), and are used by B<dosemu>."
13160 "これらのコールによってプロセスは VM86 モード (Intel の文書では仮想 8086 モー"
13161 "ド) へと移行する。 これらのコールは B<dosemu> で使用される。"
13163 #. type: Plain text
13164 #: build/C/man2/vm86.2:54
13165 msgid "VM86 mode is an emulation of real mode within a protected mode task."
13167 "VM86 モードはプロテクトモードタスクにおける リアルモードのエミュレーションで"
13170 #. type: Plain text
13171 #: build/C/man2/vm86.2:64
13173 "This return value is specific to i386 and indicates a problem with getting "
13176 "この返り値は i386 固有のものであり、 ユーザー空間のデータを取得する際に問題が"
13179 #. type: Plain text
13180 #: build/C/man2/vm86.2:68
13182 "This return value indicates the call is not implemented on the present "
13185 "この返り値は、このコールが現在のアーキテクチャーで実装されていないことを示"
13188 #. type: Plain text
13189 #: build/C/man2/vm86.2:73
13191 "Saved kernel stack exists. (This is a kernel sanity check; the saved stack "
13192 "should exist only within vm86 mode itself.)"
13194 "保存されたカーネルスタックが既に存在している。(これはカーネルが通常の 状態で"
13195 "あるかをチェックしている。保存されたスタックは vm86 モードで しか存在しな"
13198 #. type: Plain text
13199 #: build/C/man2/vm86.2:76
13201 "This call is specific to Linux on 32-bit Intel processors, and should not be "
13202 "used in programs intended to be portable."
13204 "この関数は 32 ビット Intel プロセッサ上の Linux 特有の関数であり、 移植を意図"
13205 "したプログラムでは使用すべきでない。"
13208 #: build/C/man2/vmsplice.2:26
13214 #: build/C/man2/vmsplice.2:26
13217 msgstr "2014-10-02"
13219 #. type: Plain text
13220 #: build/C/man2/vmsplice.2:29
13221 msgid "vmsplice - splice user pages into a pipe"
13222 msgstr "vmsplice - ユーザーページをパイプに継ぎ合わせる"
13224 #. type: Plain text
13225 #: build/C/man2/vmsplice.2:34
13228 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
13229 "B<#include E<lt>fcntl.hE<gt>>\n"
13230 "B<#include E<lt>sys/uio.hE<gt>>\n"
13232 "B<#define _GNU_SOURCE> /* feature_test_macros(7) 参照 */\n"
13233 "B<#include E<lt>fcntl.hE<gt>>\n"
13234 "B<#include E<lt>sys/uio.hE<gt>>\n"
13236 #. type: Plain text
13237 #: build/C/man2/vmsplice.2:37
13240 "B<ssize_t vmsplice(int >I<fd>B<, const struct iovec *>I<iov>B<,>\n"
13241 "B< unsigned long >I<nr_segs>B<, unsigned int >I<flags>B<);>\n"
13243 "B<ssize_t vmsplice(int >I<fd>B<, const struct iovec *>I<iov>B<,>\n"
13244 "B< unsigned long >I<nr_segs>B<, unsigned int >I<flags>B<);>\n"
13246 #. Linus: vmsplice() system call to basically do a "write to
13247 #. the buffer", but using the reference counting and VM traversal
13248 #. to actually fill the buffer. This means that the user needs to
13249 #. be careful not to reuse the user-space buffer it spliced into
13250 #. the kernel-space one (contrast this to "write()", which copies
13251 #. the actual data, and you can thus reuse the buffer immediately
13252 #. after a successful write), but that is often easy to do.
13253 #. type: Plain text
13254 #: build/C/man2/vmsplice.2:57
13256 "The B<vmsplice>() system call maps I<nr_segs> ranges of user memory "
13257 "described by I<iov> into a pipe. The file descriptor I<fd> must refer to a "
13260 "B<vmsplice>() システムコールは、 I<iov> で指定されたユーザーメモリーの "
13261 "I<nr_segs> の範囲をパイプにマッピングする。 I<fd> はパイプを参照していなけれ"
13264 #. type: Plain text
13265 #: build/C/man2/vmsplice.2:64
13267 "The pointer I<iov> points to an array of I<iovec> structures as defined in "
13268 "I<E<lt>sys/uio.hE<gt>>:"
13270 "ポインター I<iov> は I<iovec> 構造体の配列を指す。 I<iovec> 構造体は "
13271 "I<E<lt>sys/uio.hE<gt>> で以下のように定義されている:"
13273 #. type: Plain text
13274 #: build/C/man2/vmsplice.2:71
13278 " void *iov_base; /* Starting address */\n"
13279 " size_t iov_len; /* Number of bytes */\n"
13283 " void *iov_base; /* 開始アドレス */\n"
13284 " size_t iov_len; /* バイト数 */\n"
13287 #. type: Plain text
13288 #: build/C/man2/vmsplice.2:84
13289 msgid "Unused for B<vmsplice>(); see B<splice>(2)."
13290 msgstr "B<vmsplice>() では未使用。 B<splice>(2) 参照。"
13292 #. type: Plain text
13293 #: build/C/man2/vmsplice.2:97
13295 "Currently has no effect for B<vmsplice>(), but may be implemented in the "
13296 "future; see B<splice>(2)."
13298 "現在のところ B<vmsplice>() では何の効果もないが、将来的には実装される可能性"
13299 "がある。 B<splice>(2) 参照。"
13301 #. FIXME . Explain the following line in a little more detail:
13303 #. It looks like the page-alignment requirement went away with
13304 #. commit bd1a68b59c8e3bce45fb76632c64e1e063c3962d
13305 #. .... if we expect to later SPLICE_F_MOVE to the cache.
13306 #. type: Plain text
13307 #: build/C/man2/vmsplice.2:117
13309 "The user pages are a gift to the kernel. The application may not modify "
13310 "this memory ever, or page cache and on-disk data may differ. Gifting pages "
13311 "to the kernel means that a subsequent B<splice>(2) B<SPLICE_F_MOVE> can "
13312 "successfully move the pages; if this flag is not specified, then a "
13313 "subsequent B<splice>(2) B<SPLICE_F_MOVE> must copy the pages. Data must "
13314 "also be properly page aligned, both in memory and length."
13316 "ユーザーページがカーネルへ渡すもの (gift) であることを示す。 アプリケーション"
13317 "はこのメモリーを絶対に変更してはならない。 さもなければ、ページキャッシュと"
13318 "ディスク上のデータは 一致しなくなるだろう。 ページをカーネルに渡すと、この次"
13319 "の B<splice>(2) B<SPLICE_F_MOVE> でそのページの移動を行うことができる。 この"
13320 "フラグが指定されなかった場合、この次の B<splice>(2) B<SPLICE_F_MOVE> でその"
13321 "ページのコピーを行わなければならない。 データはメモリー上でページ境界にあって"
13322 "いなければならず、 長さもページ境界の倍数でなければならない。"
13324 #. type: Plain text
13325 #: build/C/man2/vmsplice.2:126
13327 "Upon successful completion, B<vmsplice>() returns the number of bytes "
13328 "transferred to the pipe. On error, B<vmsplice>() returns -1 and I<errno> "
13329 "is set to indicate the error."
13331 "成功して完了すると、 B<vmsplice>() はパイプに転送したバイト数を返す。 エラー"
13332 "の場合、 B<vmplice>() は -1 を返し、 I<errno> をエラーを示す値に設定する。"
13334 #. type: Plain text
13335 #: build/C/man2/vmsplice.2:137
13336 msgid "I<fd> either not valid, or doesn't refer to a pipe."
13337 msgstr "I<fd> が有効でない、もしくはパイプを参照していない。"
13339 #. type: Plain text
13340 #: build/C/man2/vmsplice.2:145
13342 "I<nr_segs> is greater than B<IOV_MAX>; or memory not aligned if "
13343 "B<SPLICE_F_GIFT> set."
13345 "I<nr_segs> が B<IOV_MAX> よりも大きい。または B<SPLICE_F_GIFT> が設定されたが"
13346 "メモリーがページ境界にあっていない。"
13348 #. type: Plain text
13349 #: build/C/man2/vmsplice.2:153
13351 "The B<vmsplice>() system call first appeared in Linux 2.6.17; library "
13352 "support was added to glibc in version 2.5."
13354 "B<vmsplice>() システムコールは Linux 2.6.17 で初めて登場した。\n"
13355 "ライブラリによるサポートは glibc バージョン 2.5 で追加された。"
13357 #. type: Plain text
13358 #: build/C/man2/vmsplice.2:164
13360 "B<vmsplice>() follows the other vectorized read/write type functions when "
13361 "it comes to limitations on number of segments being passed in. This limit "
13362 "is B<IOV_MAX> as defined in I<E<lt>limits.hE<gt>>. At the time of this "
13363 "writing, that limit is 1024."
13365 "指定されたセグメント数が上限に達した場合、 B<vmsplice>() は他のベクトル形式"
13366 "の read/write を行う関数と同じ動作をする。 上限は B<IOV_MAX> であり、 "
13367 "I<E<lt>limits.hE<gt>> で定義されている。 このドキュメントを書いた時点での値"
13370 #. type: Plain text
13371 #: build/C/man2/vmsplice.2:167
13372 msgid "B<splice>(2), B<tee>(2)"
13373 msgstr "B<splice>(2), B<tee>(2)"
13376 #~ "B< struct kexec_segment *>I<segments>B<, unsigned long >I<flags>B<);>"
13378 #~ "B< struct kexec_segment *>I<segments>B<, unsigned long >I<flags>B<);>"
13380 #~ msgid "Execute the new kernel automatically on a system crash."
13381 #~ msgstr "システムのクラッシュ時に、新しいカーネルを自動的に実行する。"
13384 #~ "The kernel image defined by I<segments> is copied from the calling "
13385 #~ "process into previously reserved memory."
13387 #~ "I<segments> で定義されたカーネルイメージは、\n"
13388 #~ "呼び出したプロセスから予約済みメモリーにコピーされる。"
13390 #~ msgid "I<flags> is invalid; or I<nr_segments> is too large"
13391 #~ msgstr "I<flags> が無効である。 I<nr_segments> が大きすぎる。"
13394 #~ "The required constants are in the Linux kernel source file I<linux/kexec."
13395 #~ "h>, which is not currently exported to glibc. Therefore, these constants "
13396 #~ "must be defined manually."
13398 #~ "必要な定数は Linux カーネルのソースファイル I<linux/kexec.h> で定義されて"
13400 #~ "が、現在のところ glibc には公開されていない。\n"
13401 #~ "そのため、これらの定数は手動で定義しなければならない。"
13403 #~ msgid "2014-04-15"
13404 #~ msgstr "2014-04-15"