OSDN Git Service

7741fec3c22f3b5630d47f1ad4fc3ffc9629cfe6
[linuxjm/LDP_man-pages.git] / po4a / man2 / po / ja.po
1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # This file is distributed under the same license as the PACKAGE package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5 #
6 msgid ""
7 msgstr ""
8 "Project-Id-Version: PACKAGE VERSION\n"
9 "POT-Creation-Date: 2015-01-23 22:24+0900\n"
10 "PO-Revision-Date: 2015-01-25 01:03+0900\n"
11 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12 "Language-Team: LANGUAGE <LL@li.org>\n"
13 "Language: \n"
14 "MIME-Version: 1.0\n"
15 "Content-Type: text/plain; charset=UTF-8\n"
16 "Content-Transfer-Encoding: 8bit\n"
17
18 #. type: TH
19 #: build/C/man2/arch_prctl.2:25
20 #, no-wrap
21 msgid "ARCH_PRCTL"
22 msgstr "ARCH_PRCTL"
23
24 #. type: TH
25 #: build/C/man2/arch_prctl.2:25
26 #, no-wrap
27 msgid "2007-12-26"
28 msgstr "2007-12-26"
29
30 #. type: TH
31 #: build/C/man2/arch_prctl.2:25 build/C/man2/futex.2:53
32 #: build/C/man2/get_robust_list.2:29 build/C/man2/getunwind.2:27
33 #: build/C/man2/kexec_load.2:26 build/C/man2/lookup_dcookie.2:27
34 #: build/C/man2/modify_ldt.2:24 build/C/man2/nfsservctl.2:8
35 #: build/C/man2/outb.2:26 build/C/man2/pciconfig_read.2:8
36 #: build/C/man2/perf_event_open.2:27 build/C/man2/perfmonctl.2:27
37 #: build/C/man2/personality.2:32 build/C/man2/pivot_root.2:10
38 #: build/C/man2/process_vm_readv.2:29 build/C/man2/ptrace.2: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
42 #, no-wrap
43 msgid "Linux"
44 msgstr "Linux"
45
46 #. type: TH
47 #: build/C/man2/arch_prctl.2:25 build/C/man2/futex.2:53
48 #: build/C/man2/getunwind.2:27 build/C/man2/kexec_load.2:26
49 #: build/C/man2/lookup_dcookie.2:27 build/C/man2/modify_ldt.2:24
50 #: build/C/man2/nfsservctl.2:8 build/C/man2/outb.2:26
51 #: build/C/man2/pciconfig_read.2:8 build/C/man2/perf_event_open.2:27
52 #: build/C/man2/perfmonctl.2:27 build/C/man2/personality.2:32
53 #: build/C/man2/pivot_root.2:10 build/C/man2/process_vm_readv.2:29
54 #: build/C/man2/ptrace.2: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
58 #, no-wrap
59 msgid "Linux Programmer's Manual"
60 msgstr "Linux Programmer's Manual"
61
62 #. type: SH
63 #: build/C/man2/arch_prctl.2:26 build/C/man2/futex.2:54
64 #: build/C/man2/get_robust_list.2:30 build/C/man2/getunwind.2:28
65 #: build/C/man2/kexec_load.2:27 build/C/man2/lookup_dcookie.2:28
66 #: build/C/man2/modify_ldt.2:25 build/C/man2/nfsservctl.2:9
67 #: build/C/man2/outb.2:27 build/C/man2/pciconfig_read.2:9
68 #: build/C/man2/perf_event_open.2:28 build/C/man2/perfmonctl.2:28
69 #: build/C/man2/personality.2:33 build/C/man2/pivot_root.2:11
70 #: build/C/man2/process_vm_readv.2:30 build/C/man2/ptrace.2: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
74 #, no-wrap
75 msgid "NAME"
76 msgstr "名前"
77
78 #. type: Plain text
79 #: build/C/man2/arch_prctl.2:28
80 msgid "arch_prctl - set architecture-specific thread state"
81 msgstr "arch_prctl - アーキテクチャ固有のスレッド状態を設定する"
82
83 #. type: SH
84 #: build/C/man2/arch_prctl.2:28 build/C/man2/futex.2:56
85 #: build/C/man2/get_robust_list.2:32 build/C/man2/getunwind.2:30
86 #: build/C/man2/kexec_load.2:29 build/C/man2/lookup_dcookie.2:30
87 #: build/C/man2/modify_ldt.2:27 build/C/man2/nfsservctl.2:11
88 #: build/C/man2/outb.2:31 build/C/man2/pciconfig_read.2:11
89 #: build/C/man2/perf_event_open.2:30 build/C/man2/perfmonctl.2:30
90 #: build/C/man2/personality.2:35 build/C/man2/pivot_root.2:13
91 #: build/C/man2/process_vm_readv.2:32 build/C/man2/ptrace.2: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
95 #, no-wrap
96 msgid "SYNOPSIS"
97 msgstr "書式"
98
99 #. type: Plain text
100 #: build/C/man2/arch_prctl.2:31
101 #, no-wrap
102 msgid "B<#include E<lt>asm/prctl.hE<gt>>\n"
103 msgstr "B<#include E<lt>asm/prctl.hE<gt>>\n"
104
105 #. type: Plain text
106 #: build/C/man2/arch_prctl.2:33
107 #, no-wrap
108 msgid "B<#include E<lt>sys/prctl.hE<gt>>\n"
109 msgstr "B<#include E<lt>sys/prctl.hE<gt>>\n"
110
111 #. type: Plain text
112 #: build/C/man2/arch_prctl.2:36
113 #, no-wrap
114 msgid ""
115 "B<int arch_prctl(int >I<code>B<, unsigned long >I<addr>B<);>\n"
116 "B<int arch_prctl(int >I<code>B<, unsigned long *>I<addr>B<);>\n"
117 msgstr "B<int arch_prctl(int >I<code>B<, unsigned long *>I<addr>B<);>\n"
118
119 #.  Return type was long before glibc 2.7
120 #. type: SH
121 #: build/C/man2/arch_prctl.2:37 build/C/man2/futex.2:70
122 #: build/C/man2/get_robust_list.2:45 build/C/man2/getunwind.2:40
123 #: build/C/man2/kexec_load.2:39 build/C/man2/lookup_dcookie.2:32
124 #: build/C/man2/modify_ldt.2:36 build/C/man2/nfsservctl.2:18
125 #: build/C/man2/outb.2:62 build/C/man2/pciconfig_read.2:22
126 #: build/C/man2/perf_event_open.2:42 build/C/man2/perfmonctl.2:39
127 #: build/C/man2/personality.2:39 build/C/man2/pivot_root.2:18
128 #: build/C/man2/process_vm_readv.2:66 build/C/man2/ptrace.2: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
132 #, no-wrap
133 msgid "DESCRIPTION"
134 msgstr "説明"
135
136 #. type: Plain text
137 #: build/C/man2/arch_prctl.2:52
138 msgid "The B<arch_prctl>()  function sets architecture-specific process or thread state.  I<code> selects a subfunction and passes argument I<addr> to it; I<addr> is interpreted as either an I<unsigned long> for the \"set\" operations, or as an I<unsigned long\\ *>, for the \"get\" operations."
139 msgstr "B<arch_prctl>()  関数はアーキテクチャ固有のプロセス状態またはスレッド状態を設定する。 I<code> は副機能を選択し、引き数 I<addr> を副機能に渡す。 I<addr> は、\"set\" 操作では I<unsigned long> として、\"get\" 操作では I<unsigned long\\ *> として解釈される。"
140
141 #. type: Plain text
142 #: build/C/man2/arch_prctl.2:54
143 msgid "Subfunctions for x86-64 are:"
144 msgstr "x86-64 の副機能は以下の通り:"
145
146 #. type: TP
147 #: build/C/man2/arch_prctl.2:54
148 #, no-wrap
149 msgid "B<ARCH_SET_FS>"
150 msgstr "B<ARCH_SET_FS>"
151
152 #. type: Plain text
153 #: build/C/man2/arch_prctl.2:60
154 msgid "Set the 64-bit base for the I<FS> register to I<addr>."
155 msgstr "I<FS> レジスタの 64 ビットベースを I<addr> に設定する。"
156
157 #. type: TP
158 #: build/C/man2/arch_prctl.2:60
159 #, no-wrap
160 msgid "B<ARCH_GET_FS>"
161 msgstr "B<ARCH_GET_FS>"
162
163 #. type: Plain text
164 #: build/C/man2/arch_prctl.2:68
165 msgid "Return the 64-bit base value for the I<FS> register of the current thread in the I<unsigned long> pointed to by I<addr>."
166 msgstr "現在のスレッドの I<FS> レジスタの 64 ビットベース値を、 I<addr> が指す I<unsigned long> の領域に格納する。"
167
168 #. type: TP
169 #: build/C/man2/arch_prctl.2:68
170 #, no-wrap
171 msgid "B<ARCH_SET_GS>"
172 msgstr "B<ARCH_SET_GS>"
173
174 #. type: Plain text
175 #: build/C/man2/arch_prctl.2:74
176 msgid "Set the 64-bit base for the I<GS> register to I<addr>."
177 msgstr "I<GS> レジスタの 64 ビットベースを I<addr> に設定する。"
178
179 #. type: TP
180 #: build/C/man2/arch_prctl.2:74
181 #, no-wrap
182 msgid "B<ARCH_GET_GS>"
183 msgstr "B<ARCH_GET_GS>"
184
185 #. type: Plain text
186 #: build/C/man2/arch_prctl.2:82
187 msgid "Return the 64-bit base value for the I<GS> register of the current thread in the I<unsigned long> pointed to by I<addr>."
188 msgstr "現在のスレッドの I<GS> レジスタの 64 ビットベース値を、 I<addr> が指す I<unsigned long> の領域に格納する。"
189
190 #. type: SH
191 #: build/C/man2/arch_prctl.2:82 build/C/man2/futex.2:216
192 #: build/C/man2/get_robust_list.2:78 build/C/man2/getunwind.2:81
193 #: build/C/man2/kexec_load.2:117 build/C/man2/lookup_dcookie.2:43
194 #: build/C/man2/modify_ldt.2:98 build/C/man2/nfsservctl.2:53
195 #: build/C/man2/pciconfig_read.2:50 build/C/man2/perf_event_open.2:2551
196 #: build/C/man2/perfmonctl.2:190 build/C/man2/personality.2:62
197 #: build/C/man2/pivot_root.2:101 build/C/man2/process_vm_readv.2:225
198 #: build/C/man2/ptrace.2:1896 build/C/man2/quotactl.2:419
199 #: build/C/man2/sendfile.2:108 build/C/man2/set_tid_address.2:88
200 #: build/C/man2/splice.2:135 build/C/man2/tee.2:85 build/C/man2/vm86.2:54
201 #: build/C/man2/vmsplice.2:117
202 #, no-wrap
203 msgid "RETURN VALUE"
204 msgstr "返り値"
205
206 #. type: Plain text
207 #: build/C/man2/arch_prctl.2:88
208 msgid "On success, B<arch_prctl>()  returns 0; on error, -1 is returned, and I<errno> is set to indicate the error."
209 msgstr "成功すると、 B<arch_prctl>()  は 0 を返す。エラーの場合、-1 を返し、 I<errno> をエラーを示す値に設定する。"
210
211 #. type: SH
212 #: build/C/man2/arch_prctl.2:88 build/C/man2/futex.2:241
213 #: build/C/man2/get_robust_list.2:85 build/C/man2/getunwind.2:88
214 #: build/C/man2/kexec_load.2:124 build/C/man2/lookup_dcookie.2:50
215 #: build/C/man2/modify_ldt.2:108 build/C/man2/pciconfig_read.2:77
216 #: build/C/man2/perf_event_open.2:2557 build/C/man2/personality.2:69
217 #: build/C/man2/pivot_root.2:105 build/C/man2/process_vm_readv.2:245
218 #: build/C/man2/ptrace.2:1911 build/C/man2/quotactl.2:427
219 #: build/C/man2/sendfile.2:115 build/C/man2/set_tid_address.2:91
220 #: build/C/man2/splice.2:150 build/C/man2/tee.2:100 build/C/man2/vm86.2:59
221 #: build/C/man2/vmsplice.2:126
222 #, no-wrap
223 msgid "ERRORS"
224 msgstr "エラー"
225
226 #. type: TP
227 #: build/C/man2/arch_prctl.2:89 build/C/man2/futex.2:256
228 #: build/C/man2/get_robust_list.2:112 build/C/man2/lookup_dcookie.2:51
229 #: build/C/man2/modify_ldt.2:109 build/C/man2/perf_event_open.2:2603
230 #: build/C/man2/process_vm_readv.2:267 build/C/man2/process_vm_readv.2:272
231 #: build/C/man2/ptrace.2:1915 build/C/man2/quotactl.2:428
232 #: build/C/man2/sendfile.2:125 build/C/man2/vm86.2:60
233 #, no-wrap
234 msgid "B<EFAULT>"
235 msgstr "B<EFAULT>"
236
237 #. type: Plain text
238 #: build/C/man2/arch_prctl.2:93
239 msgid "I<addr> points to an unmapped address or is outside the process address space."
240 msgstr "I<addr> がアンマップされたアドレスを指しているか、プロセスのアドレス空間の外にある。"
241
242 #. type: TP
243 #: build/C/man2/arch_prctl.2:93 build/C/man2/futex.2:268
244 #: build/C/man2/get_robust_list.2:89 build/C/man2/kexec_load.2:129
245 #: build/C/man2/lookup_dcookie.2:54 build/C/man2/modify_ldt.2:113
246 #: build/C/man2/pciconfig_read.2:78 build/C/man2/perf_event_open.2:2608
247 #: build/C/man2/personality.2:70 build/C/man2/pivot_root.2:114
248 #: build/C/man2/process_vm_readv.2:246 build/C/man2/process_vm_readv.2:257
249 #: build/C/man2/process_vm_readv.2:261 build/C/man2/ptrace.2:1926
250 #: build/C/man2/quotactl.2:434 build/C/man2/quotactl.2:501
251 #: build/C/man2/sendfile.2:128 build/C/man2/splice.2:161
252 #: build/C/man2/tee.2:107 build/C/man2/vmsplice.2:137
253 #, no-wrap
254 msgid "B<EINVAL>"
255 msgstr "B<EINVAL>"
256
257 #. type: Plain text
258 #: build/C/man2/arch_prctl.2:97
259 msgid "I<code> is not a valid subcommand."
260 msgstr "I<code> が有効なサブコマンドでない。"
261
262 #. type: TP
263 #: build/C/man2/arch_prctl.2:97 build/C/man2/get_robust_list.2:99
264 #: build/C/man2/kexec_load.2:136 build/C/man2/lookup_dcookie.2:65
265 #: build/C/man2/pciconfig_read.2:105 build/C/man2/perf_event_open.2:2675
266 #: build/C/man2/pivot_root.2:120 build/C/man2/process_vm_readv.2:283
267 #: build/C/man2/ptrace.2:1936 build/C/man2/quotactl.2:456
268 #: build/C/man2/vm86.2:68
269 #, no-wrap
270 msgid "B<EPERM>"
271 msgstr "B<EPERM>"
272
273 #.  .SH AUTHOR
274 #.  Man page written by Andi Kleen.
275 #. type: Plain text
276 #: build/C/man2/arch_prctl.2:103
277 msgid "I<addr> is outside the process address space."
278 msgstr "I<addr> がプロセスのアドレス空間の外にある。"
279
280 #. type: SH
281 #: build/C/man2/arch_prctl.2:103 build/C/man2/futex.2:303
282 #: build/C/man2/getunwind.2:96 build/C/man2/kexec_load.2:145
283 #: build/C/man2/lookup_dcookie.2:78 build/C/man2/modify_ldt.2:130
284 #: build/C/man2/nfsservctl.2:58 build/C/man2/outb.2:87
285 #: build/C/man2/pciconfig_read.2:112 build/C/man2/perf_event_open.2:2696
286 #: build/C/man2/perfmonctl.2:199 build/C/man2/personality.2:73
287 #: build/C/man2/pivot_root.2:128 build/C/man2/process_vm_readv.2:295
288 #: build/C/man2/ptrace.2:1954 build/C/man2/sendfile.2:148
289 #: build/C/man2/set_tid_address.2:97 build/C/man2/splice.2:184
290 #: build/C/man2/tee.2:125 build/C/man2/vm86.2:73 build/C/man2/vmsplice.2:153
291 #, no-wrap
292 msgid "CONFORMING TO"
293 msgstr "準拠"
294
295 #. type: Plain text
296 #: build/C/man2/arch_prctl.2:107
297 msgid "B<arch_prctl>()  is a Linux/x86-64 extension and should not be used in programs intended to be portable."
298 msgstr "B<arch_prctl>()  は Linux/x86-64 拡張であり、移植性を意図したプログラムでは使うべきでない。"
299
300 #. type: SH
301 #: build/C/man2/arch_prctl.2:107 build/C/man2/futex.2:305
302 #: build/C/man2/get_robust_list.2:118 build/C/man2/getunwind.2:99
303 #: build/C/man2/kexec_load.2:147 build/C/man2/lookup_dcookie.2:81
304 #: build/C/man2/modify_ldt.2:133 build/C/man2/perf_event_open.2:2701
305 #: build/C/man2/perfmonctl.2:202 build/C/man2/pivot_root.2:131
306 #: build/C/man2/process_vm_readv.2:297 build/C/man2/ptrace.2:1956
307 #: build/C/man2/sendfile.2:155 build/C/man2/splice.2:186
308 #: build/C/man2/tee.2:127 build/C/man2/vmsplice.2:155
309 #, no-wrap
310 msgid "NOTES"
311 msgstr "注意"
312
313 #. type: Plain text
314 #: build/C/man2/arch_prctl.2:110
315 msgid "B<arch_prctl>()  is supported only on Linux/x86-64 for 64-bit programs currently."
316 msgstr "B<arch_prctl>()  は現在のところ Linux/x86-64 上の 64 ビットプログラムでのみサポートされている。"
317
318 #. type: Plain text
319 #: build/C/man2/arch_prctl.2:112
320 msgid "The 64-bit base changes when a new 32-bit segment selector is loaded."
321 msgstr "新しい 32 ビットセグメントセレクタがロードされた場合、 64 ビットベースは変更される。"
322
323 #. type: Plain text
324 #: build/C/man2/arch_prctl.2:115
325 msgid "B<ARCH_SET_GS> is disabled in some kernels."
326 msgstr "B<ARCH_SET_GS> が無効にされているカーネルもある。"
327
328 #. type: Plain text
329 #: build/C/man2/arch_prctl.2:130
330 msgid "Context switches for 64-bit segment bases are rather expensive.  It may be a faster alternative to set a 32-bit base using a segment selector by setting up an LDT with B<modify_ldt>(2)  or using the B<set_thread_area>(2)  system call in kernel 2.5 or later.  B<arch_prctl>()  is needed only when you want to set bases that are larger than 4GB.  Memory in the first 2GB of address space can be allocated by using B<mmap>(2)  with the B<MAP_32BIT> flag."
331 msgstr "64 ビットセグメントベースのコンテキストスイッチは、やや高価である。 LDT を B<modify_ldt>(2)  で設定してセグメントセレクタを使うか、 (カーネル 2.5 以降の)  B<set_thread_area>(2)  システムコールを使うことにより、 32 ビットベースを設定するという高速な代替手段もある。 4GB より大きなベースを設定したい場合にのみ、 B<arch_prctl>()  が必要である。 アドレス空間の最初の 2GB にあるメモリは、 B<mmap>(2)  に B<MAP_32BIT> フラグを指定して割り当てることができる。"
332
333 #. type: Plain text
334 #: build/C/man2/arch_prctl.2:135
335 msgid "As of version 2.7, glibc provides no prototype for B<arch_prctl>().  You have to declare it yourself for now.  This may be fixed in future glibc versions."
336 msgstr "バージョン 2.7 時点では、glibc には B<arch_prctl>()  のプロトタイプがない。 今のところユーザは自分自身で宣言する必要がある。 これは将来の glibc のバージョンで修正されるかもしれない。"
337
338 #. type: Plain text
339 #: build/C/man2/arch_prctl.2:138
340 msgid "I<FS> may be already used by the threading library."
341 msgstr "I<FS> はスレッドライブラリで既に使われているかもしれない。"
342
343 #. type: SH
344 #: build/C/man2/arch_prctl.2:138 build/C/man2/futex.2:319
345 #: build/C/man2/get_robust_list.2:127 build/C/man2/getunwind.2:111
346 #: build/C/man2/kexec_load.2:162 build/C/man2/modify_ldt.2:136
347 #: build/C/man2/outb.2:96 build/C/man2/pciconfig_read.2:114
348 #: build/C/man2/perf_event_open.2:2832 build/C/man2/perfmonctl.2:205
349 #: build/C/man2/pivot_root.2:143 build/C/man2/process_vm_readv.2:347
350 #: build/C/man2/ptrace.2:2122 build/C/man2/quotactl.2:507
351 #: build/C/man2/sendfile.2:197 build/C/man2/set_tid_address.2:99
352 #: build/C/man2/splice.2:240 build/C/man2/tee.2:214
353 #: build/C/man2/vmsplice.2:164
354 #, no-wrap
355 msgid "SEE ALSO"
356 msgstr "関連項目"
357
358 #. type: Plain text
359 #: build/C/man2/arch_prctl.2:143
360 msgid "B<mmap>(2), B<modify_ldt>(2), B<prctl>(2), B<set_thread_area>(2)"
361 msgstr "B<mmap>(2), B<modify_ldt>(2), B<prctl>(2), B<set_thread_area>(2)"
362
363 #. type: Plain text
364 #: build/C/man2/arch_prctl.2:145
365 msgid "AMD X86-64 Programmer's manual"
366 msgstr "AMD X86-64 Programmer's manual"
367
368 #. type: SH
369 #: build/C/man2/arch_prctl.2:145 build/C/man2/futex.2:333
370 #: build/C/man2/get_robust_list.2:136 build/C/man2/getunwind.2:113
371 #: build/C/man2/kexec_load.2:165 build/C/man2/lookup_dcookie.2:88
372 #: build/C/man2/modify_ldt.2:138 build/C/man2/nfsservctl.2:60
373 #: build/C/man2/outb.2:99 build/C/man2/pciconfig_read.2:116
374 #: build/C/man2/perf_event_open.2:2838 build/C/man2/perfmonctl.2:209
375 #: build/C/man2/personality.2:77 build/C/man2/pivot_root.2:149
376 #: build/C/man2/process_vm_readv.2:350 build/C/man2/ptrace.2:2137
377 #: build/C/man2/quotactl.2:512 build/C/man2/sendfile.2:203
378 #: build/C/man2/set_tid_address.2:103 build/C/man2/splice.2:244
379 #: build/C/man2/tee.2:217 build/C/man2/vm86.2:76 build/C/man2/vmsplice.2:167
380 #, no-wrap
381 msgid "COLOPHON"
382 msgstr "この文書について"
383
384 #. type: Plain text
385 #: build/C/man2/arch_prctl.2:153 build/C/man2/futex.2:341
386 #: build/C/man2/get_robust_list.2:144 build/C/man2/getunwind.2:121
387 #: build/C/man2/kexec_load.2:173 build/C/man2/lookup_dcookie.2:96
388 #: build/C/man2/modify_ldt.2:146 build/C/man2/nfsservctl.2:68
389 #: build/C/man2/outb.2:107 build/C/man2/pciconfig_read.2:124
390 #: build/C/man2/perf_event_open.2:2846 build/C/man2/perfmonctl.2:217
391 #: build/C/man2/personality.2:85 build/C/man2/pivot_root.2:157
392 #: build/C/man2/process_vm_readv.2:358 build/C/man2/ptrace.2:2145
393 #: build/C/man2/quotactl.2:520 build/C/man2/sendfile.2:211
394 #: build/C/man2/set_tid_address.2:111 build/C/man2/splice.2:252
395 #: build/C/man2/tee.2:225 build/C/man2/vm86.2:84 build/C/man2/vmsplice.2:175
396 msgid "This page is part of release 3.78 of the Linux I<man-pages> project.  A description of the project, information about reporting bugs, and the latest version of this page, can be found at \\%http://www.kernel.org/doc/man-pages/."
397 msgstr ""
398 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.78 の一部\n"
399 "である。プロジェクトの説明とバグ報告に関する情報は\n"
400 "http://www.kernel.org/doc/man-pages/ に書かれている。"
401
402 #. type: TH
403 #: build/C/man2/futex.2:53
404 #, no-wrap
405 msgid "FUTEX"
406 msgstr "FUTEX"
407
408 #. type: TH
409 #: build/C/man2/futex.2:53
410 #, no-wrap
411 msgid "2014-05-21"
412 msgstr "2014-05-21"
413
414 #. type: Plain text
415 #: build/C/man2/futex.2:56
416 msgid "futex - fast user-space locking"
417 msgstr "futex - 高速ユーザ空間ロック"
418
419 #. type: Plain text
420 #: build/C/man2/futex.2:61
421 #, no-wrap
422 msgid ""
423 "B<#include E<lt>linux/futex.hE<gt>>\n"
424 "B<#include E<lt>sys/time.hE<gt>>\n"
425 msgstr ""
426 "B<#include E<lt>linux/futex.hE<gt>>\n"
427 "B<#include E<lt>sys/time.hE<gt>>\n"
428
429 #. type: Plain text
430 #: build/C/man2/futex.2:64
431 #, no-wrap
432 msgid "B<int futex(int *>I<uaddr>B<, int >I<op>B<, int >I<val>B<, const struct timespec *>I<timeout>B<,>\n"
433 msgstr "B<int futex(int *>I<uaddr>B<, int >I<op>B<, int >I<val>B<, const struct timespec *>I<timeout>B<,>\n"
434
435 #.  int *? void *? u32 *?
436 #. type: Plain text
437 #: build/C/man2/futex.2:67
438 #, no-wrap
439 msgid "B<          int *>I<uaddr2>B<, int >I<val3>B<);>\n"
440 msgstr "B<          int *>I<uaddr2>B<, int >I<val3>B<);>\n"
441
442 #. type: Plain text
443 #: build/C/man2/futex.2:70 build/C/man2/getunwind.2:40
444 #: build/C/man2/kexec_load.2:39 build/C/man2/modify_ldt.2:36
445 #: build/C/man2/perf_event_open.2:42 build/C/man2/perfmonctl.2:39
446 #: build/C/man2/pivot_root.2:18
447 msgid "I<Note>: There is no glibc wrapper for this system call; see NOTES."
448 msgstr "I<注>: このシステムコールには glibc のラッパー関数は存在しない。「注意」の節を参照。"
449
450 #. type: Plain text
451 #: build/C/man2/futex.2:86
452 msgid "The B<futex>()  system call provides a method for a program to wait for a value at a given address to change, and a method to wake up anyone waiting on a particular address (while the addresses for the same memory in separate processes may not be equal, the kernel maps them internally so the same memory mapped in different locations will correspond for B<futex>()  calls).  This system call is typically used to implement the contended case of a lock in shared memory, as described in B<futex>(7)."
453 msgstr "B<futex>()  システムコールは、 指定したアドレスの値が変更されるのをプログラムが待つ手段や 特定のアドレスに対して待機中のプロセスを wake (起床) させる手段を提供する (プロセスが異なれば同じメモリに対するアドレスも同じではないかもしれないが、 カーネルは異なる位置にマップされた同じメモリを B<futex>()  で使えるよう内部でマップする)。 通常は、このシステムコールは B<futex>(7)  に書かれているように、 共有メモリ中のロックが競合する場合の処理を実装するのに用いられる。"
454
455 #. type: Plain text
456 #: build/C/man2/futex.2:93
457 msgid "When a B<futex>(7)  operation did not finish uncontended in user space, a call needs to be made to the kernel to arbitrate.  Arbitration can either mean putting the calling process to sleep or, conversely, waking a waiting process."
458 msgstr "B<futex>(7)  の操作がユーザ空間で競合なく完了しなかった場合、 カーネルに仲裁させるためにシステムコールを呼ぶ必要がある。 仲裁というのは、呼び出しプロセスを sleep (起床待ち) させたり、反対に 待ちプロセスを wake させたりすることを意味する。"
459
460 #. type: Plain text
461 #: build/C/man2/futex.2:100
462 msgid "Callers of this function are expected to adhere to the semantics as set out in B<futex>(7).  As these semantics involve writing nonportable assembly instructions, this in turn probably means that most users will in fact be library authors and not general application developers."
463 msgstr "この関数を呼び出すプロセスは B<futex>(7)  に記述されているセマンティクスに忠実であることが要求される。 このセマンティクスには移植不可能なアセンブリ命令を書くことが含まれる。 このことは言い換えると futex のユーザのほとんどは実際はライブラリの作者であり、 一般アプリケーションの開発者ではないということである。"
464
465 #. type: Plain text
466 #: build/C/man2/futex.2:108
467 msgid "The I<uaddr> argument needs to point to an aligned integer which stores the counter.  The operation to execute is passed via the I<op> argument, along with a value I<val>."
468 msgstr "I<uaddr> 引き数は、カウンタを格納する、 アラインメントの揃った int 型変数を指している必要がある。 実行する操作は I<op> 引き数を介して、値 I<val> とともに渡される。"
469
470 #. type: Plain text
471 #: build/C/man2/futex.2:110
472 msgid "Five operations are currently defined:"
473 msgstr "現在のところ 5 つの操作が定義されている:"
474
475 #. type: TP
476 #: build/C/man2/futex.2:110 build/C/man2/futex.2:223
477 #, no-wrap
478 msgid "B<FUTEX_WAIT>"
479 msgstr "B<FUTEX_WAIT>"
480
481 #. type: Plain text
482 #: build/C/man2/futex.2:133
483 msgid "This operation atomically verifies that the futex address I<uaddr> still contains the value I<val>, and sleeps awaiting B<FUTEX_WAKE> on this futex address.  If the I<timeout> argument is non-NULL, its contents specify the duration of the wait.  (This interval will be rounded up to the system clock granularity, and kernel scheduling delays mean that the blocking interval may overrun by a small amount.)  If I<timeout> is NULL, the call blocks indefinitely.  The arguments I<uaddr2> and I<val3> are ignored."
484 msgstr "この操作は futex アドレス I<uaddr> に指定された値 I<val> がまだ格納されているかどうかを不可分操作で検証し、 sleep 状態で この futex アドレスに対して B<FUTEX_WAKE> が実行されるのを待つ。 I<timeout> 引き数が NULL でない場合、その内容は待ち時間の最大値を表す (この停止時間はシステムクロックの粒度に切り上げられ、 カーネルのスケジューリング遅延により少しだけ長くなる可能性がある)。 NULL の場合、 呼び出しは無限に停止する。 引き数 I<uaddr2> と I<val3> は無視される。"
485
486 #. type: Plain text
487 #: build/C/man2/futex.2:141
488 msgid "For B<futex>(7), this call is executed if decrementing the count gave a negative value (indicating contention), and will sleep until another process releases the futex and executes the B<FUTEX_WAKE> operation."
489 msgstr "B<futex>(7)  に照らし合わせると、この呼び出しは カウントのデクリメントで負の値 (競合を表す) になった場合に実行され、 別のプロセスがその futex を解放し B<FUTEX_WAKE> の操作を実行するまで sleep する。"
490
491 #. type: TP
492 #: build/C/man2/futex.2:141 build/C/man2/futex.2:229
493 #, no-wrap
494 msgid "B<FUTEX_WAKE>"
495 msgstr "B<FUTEX_WAKE>"
496
497 #. type: Plain text
498 #: build/C/man2/futex.2:152
499 msgid "This operation wakes at most I<val> processes waiting on this futex address (i.e., inside B<FUTEX_WAIT>).  The arguments I<timeout>, I<uaddr2> and I<val3> are ignored."
500 msgstr "この操作では指定した futex アドレスに対して待ち状態の (すなわち B<FUTEX_WAIT> 中の) 最大 I<val> 個のプロセスを wake させる。 引き数 I<timeout>, I<uaddr2>, I<val3> は無視される。"
501
502 #. type: Plain text
503 #: build/C/man2/futex.2:158
504 msgid "For B<futex>(7), this is executed if incrementing the count showed that there were waiters, once the futex value has been set to 1 (indicating that it is available)."
505 msgstr "B<futex>(4) に照らし合わせると、 この操作は カウントのインクリメントで待ちプロセスがあると判明し、 futex 値が 1 に設定された (利用可能であることを表す) 場合に実行される。"
506
507 #. type: TP
508 #: build/C/man2/futex.2:158
509 #, no-wrap
510 msgid "B<FUTEX_FD> (present up to and including Linux 2.6.25)"
511 msgstr "B<FUTEX_FD> (Linux 2.6.25 以前)"
512
513 #.  , suitable for .BR poll (2).
514 #. type: Plain text
515 #: build/C/man2/futex.2:174
516 msgid "To support asynchronous wakeups, this operation associates a file descriptor with a futex.  If another process executes a B<FUTEX_WAKE>, the process will receive the signal number that was passed in I<val>.  The calling process must close the returned file descriptor after use.  The arguments I<timeout>, I<uaddr2> and I<val3> are ignored."
517 msgstr "非同期の wake に対応するため、この操作はファイルディスクリプタを futex に 関連づける。 別のプロセスが B<FUTEX_WAKE> を実行すると、プロセスは I<val> で渡されたシグナル番号のシグナルを受信する。 呼び出しプロセスは使用後、返されたファイルディスクリプタを クローズしなければならない。 引き数 I<timeout>, I<uaddr2>, I<val3> は無視される。"
518
519 #. type: Plain text
520 #: build/C/man2/futex.2:179
521 msgid "To prevent race conditions, the caller should test if the futex has been upped after B<FUTEX_FD> returns."
522 msgstr "競合状態を防止するため、呼び出しプロセスは B<FUTEX_FD> が返ったあと futex が up されたかどうかを確認しなければならない。"
523
524 #. type: Plain text
525 #: build/C/man2/futex.2:183
526 msgid "Because it was inherently racy, B<FUTEX_FD> has been removed from Linux 2.6.26 onward."
527 msgstr "B<FUTEX_FD> はもともと競合が起きやすかったため、 Linux 2.6.26 以降で削除されている。"
528
529 #. type: TP
530 #: build/C/man2/futex.2:183
531 #, no-wrap
532 msgid "B<FUTEX_REQUEUE> (since Linux 2.5.70)"
533 msgstr "B<FUTEX_REQUEUE> (Linux 2.5.70 以降)"
534
535 #. type: Plain text
536 #: build/C/man2/futex.2:198
537 msgid "This operation was introduced in order to avoid a \"thundering herd\" effect when B<FUTEX_WAKE> is used and all processes woken up need to acquire another futex.  This call wakes up I<val> processes, and requeues all other waiters on the futex at address I<uaddr2>.  The arguments I<timeout> and I<val3> are ignored."
538 msgstr "この操作は、 B<FUTEX_WAKE> が使われていて、かつ wake されている全てのプロセスが 他の futex を取得する必要がある場合に、 「獣の群れの暴走 (thundering herd)」効果を避けるために導入された。 この呼び出しは I<val> 個のプロセスを wake し、アドレス I<uaddr2> で futex を待っている他の全てのプロセスを再度キューにいれる。 引き数 I<timeout> と I<val3> は無視される。"
539
540 #. type: TP
541 #: build/C/man2/futex.2:198
542 #, no-wrap
543 msgid "B<FUTEX_CMP_REQUEUE> (since Linux 2.6.7)"
544 msgstr "B<FUTEX_CMP_REQUEUE> (Linux 2.6.7 以降)"
545
546 #. type: Plain text
547 #: build/C/man2/futex.2:216
548 msgid "There was a race in the intended use of B<FUTEX_REQUEUE>, so B<FUTEX_CMP_REQUEUE> was introduced.  This is similar to B<FUTEX_REQUEUE>, but first checks whether the location I<uaddr> still contains the value I<val3>.  If not, the operation fails with the error B<EAGAIN>.  The argument I<timeout> is ignored."
549 msgstr "故意に B<FUTEX_REQUEUE> を使う場合に競合が起こるため、 B<FUTEX_CMP_REQUEUE> が導入された。これは B<FUTEX_REQUEUE> と似ているが、場所 I<uaddr> に値 I<val3> がまだ保持されているかを最初にチェックする。 保持されていない場合、操作はエラー B<EAGAIN> で失敗する。引き数 I<timeout> は無視される。"
550
551 #. type: Plain text
552 #: build/C/man2/futex.2:223
553 msgid "In the event of an error, all operations return -1, and set I<errno> to indicate the error.  The return value on success depends on the operation, as described in the following list:"
554 msgstr "エラーの場合、全ての操作で -1 が返り、 I<errno> がエラーの内容を示す値に設定される。成功時の返り値は操作によって異なり、以下のリストに書かれている通りである。"
555
556 #. type: Plain text
557 #: build/C/man2/futex.2:229
558 msgid "Returns 0 if the process was woken by a B<FUTEX_WAKE> call.  See ERRORS for the various possible error returns."
559 msgstr "そのプロセスが B<FUTEX_WAKE> により wake された場合 0 を返す。発生する可能性があるエラーについては「エラー」の節を参照。"
560
561 #. type: Plain text
562 #: build/C/man2/futex.2:232 build/C/man2/futex.2:238 build/C/man2/futex.2:241
563 msgid "Returns the number of processes woken up."
564 msgstr "wake したプロセスの数を返す。"
565
566 #. type: TP
567 #: build/C/man2/futex.2:232
568 #, no-wrap
569 msgid "B<FUTEX_FD>"
570 msgstr "B<FUTEX_FD>"
571
572 #. type: Plain text
573 #: build/C/man2/futex.2:235
574 msgid "Returns the new file descriptor associated with the futex."
575 msgstr "futex に関連づけられた新たなファイルディスクリプタを返す。"
576
577 #. type: TP
578 #: build/C/man2/futex.2:235
579 #, no-wrap
580 msgid "B<FUTEX_REQUEUE>"
581 msgstr "B<FUTEX_REQUEUE>"
582
583 #. type: TP
584 #: build/C/man2/futex.2:238
585 #, no-wrap
586 msgid "B<FUTEX_CMP_REQUEUE>"
587 msgstr "B<FUTEX_CMP_REQUEUE>"
588
589 #. type: TP
590 #: build/C/man2/futex.2:242 build/C/man2/perf_event_open.2:2579
591 #: build/C/man2/quotactl.2:486
592 #, no-wrap
593 msgid "B<EACCES>"
594 msgstr "B<EACCES>"
595
596 #. type: Plain text
597 #: build/C/man2/futex.2:245
598 msgid "No read access to futex memory."
599 msgstr "futex メモリに読み込みアクセス権がなかった。"
600
601 #. type: TP
602 #: build/C/man2/futex.2:245 build/C/man2/sendfile.2:116
603 #: build/C/man2/splice.2:151 build/C/man2/tee.2:101
604 #: build/C/man2/vmsplice.2:127
605 #, no-wrap
606 msgid "B<EAGAIN>"
607 msgstr "B<EAGAIN>"
608
609 #. type: Plain text
610 #: build/C/man2/futex.2:256
611 msgid "B<FUTEX_CMP_REQUEUE> detected that the value pointed to by I<uaddr> is not equal to the expected value I<val3>.  (This probably indicates a race; use the safe B<FUTEX_WAKE> now.)"
612 msgstr "B<FUTEX_CMP_REQUEUE> で、I<uaddr> が指す値が期待値 I<val3> と異なる状況が検出された。 (これは競合を示しているかもしれない。この場合は安全な B<FUTEX_WAKE> を使うこと。)"
613
614 #. type: Plain text
615 #: build/C/man2/futex.2:261
616 msgid "Error retrieving I<timeout> information from user space."
617 msgstr "ユーザ空間から I<timeout> の情報を取得する際にエラーが発生した。"
618
619 #. type: TP
620 #: build/C/man2/futex.2:261
621 #, no-wrap
622 msgid "B<EINTR>"
623 msgstr "B<EINTR>"
624
625 #. type: Plain text
626 #: build/C/man2/futex.2:268
627 msgid "A B<FUTEX_WAIT> operation was interrupted by a signal (see B<signal>(7))  or a spurious wakeup."
628 msgstr "B<FUTEX_WAIT> 操作がシグナル (B<signal>(7) 参照) もしくは偽の wakeup により中断された。"
629
630 #. type: Plain text
631 #: build/C/man2/futex.2:271
632 msgid "Invalid argument."
633 msgstr "無効な引き数。"
634
635 #. type: TP
636 #: build/C/man2/futex.2:271
637 #, no-wrap
638 msgid "B<ENFILE>"
639 msgstr "B<ENFILE>"
640
641 #. type: Plain text
642 #: build/C/man2/futex.2:274
643 msgid "The system limit on the total number of open files has been reached."
644 msgstr "オープンされているファイルの総数がシステムの制限に達した。"
645
646 #. type: TP
647 #: build/C/man2/futex.2:274 build/C/man2/modify_ldt.2:126
648 #: build/C/man2/pciconfig_read.2:93 build/C/man2/perf_event_open.2:2661
649 #: build/C/man2/quotactl.2:447 build/C/man2/vm86.2:64
650 #, no-wrap
651 msgid "B<ENOSYS>"
652 msgstr "B<ENOSYS>"
653
654 #. type: Plain text
655 #: build/C/man2/futex.2:278
656 msgid "Invalid operation specified in I<op>."
657 msgstr "I<op> に無効な操作が指定された。"
658
659 #. type: TP
660 #: build/C/man2/futex.2:278
661 #, no-wrap
662 msgid "B<ETIMEDOUT>"
663 msgstr "B<ETIMEDOUT>"
664
665 #. type: Plain text
666 #: build/C/man2/futex.2:283
667 msgid "Timeout during the B<FUTEX_WAIT> operation."
668 msgstr "B<FUTEX_WAIT> 操作でタイムアウトが発生した。"
669
670 #. type: TP
671 #: build/C/man2/futex.2:283
672 #, no-wrap
673 msgid "B<EWOULDBLOCK>"
674 msgstr "B<EWOULDBLOCK>"
675
676 #. type: Plain text
677 #: build/C/man2/futex.2:293
678 msgid "I<op> was B<FUTEX_WAIT> and the value pointed to by I<uaddr> was not equal to the expected value I<val> at the time of the call."
679 msgstr "I<op> が B<FUTEX_WAIT> で、その呼び出しにおいて I<uaddr> が指す値が期待値 I<val> と異なっていた。"
680
681 #. type: SH
682 #: build/C/man2/futex.2:293 build/C/man2/get_robust_list.2:116
683 #: build/C/man2/getunwind.2:94 build/C/man2/kexec_load.2:141
684 #: build/C/man2/lookup_dcookie.2:73 build/C/man2/perfmonctl.2:196
685 #: build/C/man2/pivot_root.2:125 build/C/man2/process_vm_readv.2:292
686 #: build/C/man2/sendfile.2:142 build/C/man2/set_tid_address.2:94
687 #: build/C/man2/splice.2:179 build/C/man2/tee.2:120
688 #: build/C/man2/vmsplice.2:148
689 #, no-wrap
690 msgid "VERSIONS"
691 msgstr "バージョン"
692
693 #. type: Plain text
694 #: build/C/man2/futex.2:303
695 msgid "Initial futex support was merged in Linux 2.5.7 but with different semantics from what was described above.  A 4-argument system call with the semantics described in this page was introduced in Linux 2.5.40.  In Linux 2.5.70, one argument was added.  In Linux 2.6.7, a sixth argument was added\\(emmessy, especially on the s390 architecture."
696 msgstr "最初の futex 対応は Linux 2.5.7 で組み込まれたが、 上記のセマンティクスとは異なる。 4 つの引き数のここに書かれているセマンティクスを持つ システムコールは、Linux 2.5.40 で導入された。 Linux 2.5.70 では 1 つの引き数が追加された。 Linux 2.6.7 では 6 番目の引き数が追加された。 これは汚く、s390 アーキテクチャ上の特別のものである。"
697
698 #. type: Plain text
699 #: build/C/man2/futex.2:305 build/C/man2/kexec_load.2:147
700 #: build/C/man2/set_tid_address.2:99 build/C/man2/splice.2:186
701 #: build/C/man2/tee.2:127 build/C/man2/vmsplice.2:155
702 msgid "This system call is Linux-specific."
703 msgstr "このシステムコールは Linux 固有である。"
704
705 #.  .SH "AUTHORS"
706 #.  .PP
707 #.  Futexes were designed and worked on by
708 #.  Hubertus Franke (IBM Thomas J. Watson Research Center),
709 #.  Matthew Kirkwood, Ingo Molnar (Red Hat)
710 #.  and Rusty Russell (IBM Linux Technology Center).
711 #.  This page written by bert hubert.
712 #. type: Plain text
713 #: build/C/man2/futex.2:319
714 msgid "To reiterate, bare futexes are not intended as an easy-to-use abstraction for end-users.  (There is no wrapper function for this system call in glibc.)  Implementors are expected to be assembly literate and to have read the sources of the futex user-space library referenced below."
715 msgstr "繰り返すが、裸の futex はエンドユーザが容易に使うことのできる概念として 意図されたものではない (glibc にはこのシステムコールに対するラッパー関数はない)。 実装者は、アセンブリ言語に慣れており、以下に挙げる futex ユーザ空間ライブラリの ソースを読み終えていることが要求される。"
716
717 #. type: Plain text
718 #: build/C/man2/futex.2:322
719 msgid "B<restart_syscall>(2), B<futex>(7)"
720 msgstr "B<restart_syscall>(2), B<futex>(7)"
721
722 #. type: Plain text
723 #: build/C/man2/futex.2:325
724 msgid "I<Fuss, Futexes and Furwocks: Fast Userlevel Locking in Linux> (proceedings of the Ottawa Linux Symposium 2002), online at"
725 msgstr "I<Fuss, Futexes and Furwocks: Fast Userlevel Locking in Linux> (proceedings of the Ottawa Linux Symposium 2002), online at"
726
727 #. type: Plain text
728 #: build/C/man2/futex.2:328
729 msgid "E<.UR http://kernel.org\\:/doc\\:/ols\\:/2002\\:/ols2002-pages-479-495.pdf> E<.UE>"
730 msgstr "E<.UR http://kernel.org\\:/doc\\:/ols\\:/2002\\:/ols2002-pages-479-495.pdf> E<.UE>"
731
732 #. type: Plain text
733 #: build/C/man2/futex.2:330
734 msgid "Futex example library, futex-*.tar.bz2 at"
735 msgstr "futex の使用例ライブラリ, futex-*.tar.bz2"
736
737 #. type: Plain text
738 #: build/C/man2/futex.2:333
739 msgid "E<.UR ftp://ftp.kernel.org\\:/pub\\:/linux\\:/kernel\\:/people\\:/rusty/> E<.UE>"
740 msgstr "E<.UR ftp://ftp.kernel.org\\:/pub\\:/linux\\:/kernel\\:/people\\:/rusty/> E<.UE>"
741
742 #. type: TH
743 #: build/C/man2/get_robust_list.2:29
744 #, no-wrap
745 msgid "GET_ROBUST_LIST"
746 msgstr "GET_ROBUST_LIST"
747
748 #. type: TH
749 #: build/C/man2/get_robust_list.2:29 build/C/man2/ptrace.2:46
750 #, no-wrap
751 msgid "2015-01-22"
752 msgstr "2015-01-22"
753
754 #. type: TH
755 #: build/C/man2/get_robust_list.2:29
756 #, no-wrap
757 msgid "Linux System Calls"
758 msgstr "Linux System Calls"
759
760 #. type: Plain text
761 #: build/C/man2/get_robust_list.2:32
762 msgid "get_robust_list, set_robust_list - get/set list of robust futexes"
763 msgstr ""
764
765 #. type: Plain text
766 #: build/C/man2/get_robust_list.2:37
767 #, no-wrap
768 msgid ""
769 "B<#include E<lt>linux/futex.hE<gt>>\n"
770 "B<#include E<lt>sys/types.hE<gt>>\n"
771 "B<#include E<lt>syscall.hE<gt>>\n"
772 msgstr ""
773 "B<#include E<lt>linux/futex.hE<gt>>\n"
774 "B<#include E<lt>sys/types.hE<gt>>\n"
775 "B<#include E<lt>syscall.hE<gt>>\n"
776
777 #. type: Plain text
778 #: build/C/man2/get_robust_list.2:41
779 #, no-wrap
780 msgid ""
781 "B<long get_robust_list(int >I<pid>B<, struct robust_list_head **>I<head_ptr>B<,>\n"
782 "B<                     size_t *>I<len_ptr>B<);>\n"
783 "B<long set_robust_list(struct robust_list_head *>I<head>B<, size_t >I<len>B<);>\n"
784 msgstr ""
785
786 #. type: Plain text
787 #: build/C/man2/get_robust_list.2:45
788 msgid "I<Note>: There are no glibc wrappers for these system calls; see NOTES."
789 msgstr "I<注意>: これらのシステムコールには glibc ラッパー関数は存在しない。 「注意」の節を参照。"
790
791 #. type: Plain text
792 #: build/C/man2/get_robust_list.2:50
793 msgid "The robust futex implementation needs to maintain per-thread lists of robust futexes which are unlocked when the thread exits.  These lists are managed in user space; the kernel is notified about only the location of the head of the list."
794 msgstr ""
795
796 #. type: Plain text
797 #: build/C/man2/get_robust_list.2:66
798 msgid "The B<get_robust_list>()  system call returns the head of the robust futex list of the thread whose thread ID is specified in I<pid>.  If I<pid> is 0, the head of the list for the calling thread is returned.  The list head is stored in the location pointed to by I<head_ptr>.  The size of the object pointed to by I<**head_ptr> is stored in I<len_ptr>."
799 msgstr ""
800
801 #. type: Plain text
802 #: build/C/man2/get_robust_list.2:78
803 msgid "The B<set_robust_list>()  system call requests the kernel to record the head of the list of robust futexes owned by the calling thread.  The I<head> argument is the list head to record.  The I<len> argument should be I<sizeof(*head)>."
804 msgstr ""
805
806 #. type: Plain text
807 #: build/C/man2/get_robust_list.2:85
808 msgid "The B<set_robust_list>()  and B<get_robust_list>()  system calls return zero when the operation is successful, an error code otherwise."
809 msgstr ""
810
811 #. type: Plain text
812 #: build/C/man2/get_robust_list.2:89
813 msgid "The B<set_robust_list>()  system call can fail with the following error:"
814 msgstr ""
815
816 #. type: Plain text
817 #: build/C/man2/get_robust_list.2:95
818 msgid "I<len> does not match the size of structure B<struct robust_list_head> expected by kernel."
819 msgstr ""
820
821 #. type: Plain text
822 #: build/C/man2/get_robust_list.2:99
823 msgid "The B<get_robust_list>()  system call can fail with the following errors:"
824 msgstr ""
825
826 #. type: Plain text
827 #: build/C/man2/get_robust_list.2:107
828 msgid "The calling process does not have permission to see the robust futex list of the thread with the thread ID I<pid>, and does not have the B<CAP_SYS_PTRACE> capability."
829 msgstr ""
830
831 #. type: TP
832 #: build/C/man2/get_robust_list.2:107 build/C/man2/perf_event_open.2:2688
833 #: build/C/man2/process_vm_readv.2:287 build/C/man2/ptrace.2:1949
834 #: build/C/man2/quotactl.2:461 build/C/man2/quotactl.2:504
835 #, no-wrap
836 msgid "B<ESRCH>"
837 msgstr "B<ESRCH>"
838
839 #. type: Plain text
840 #: build/C/man2/get_robust_list.2:112
841 msgid "No thread with the thread ID I<pid> could be found."
842 msgstr ""
843
844 #. type: Plain text
845 #: build/C/man2/get_robust_list.2:116
846 msgid "The head of the robust futex list can't be stored at the location I<head>."
847 msgstr ""
848
849 #. type: Plain text
850 #: build/C/man2/get_robust_list.2:118
851 msgid "These system calls were added in Linux 2.6.17."
852 msgstr "これらのシステムコールは Linux 2.6.17 で追加された。"
853
854 #. type: Plain text
855 #: build/C/man2/get_robust_list.2:123
856 msgid "These system calls are not needed by normal applications.  No support for them is provided in glibc.  In the unlikely event that you want to call them directly, use B<syscall>(2)."
857 msgstr "通常のアプリケーションでは、これらのシステムコールは必要ではない。 glibc によるサポートは提供されていない。おそらくないと思うが、このシステムコールを直接呼び出したい場合は B<syscall>(2) を使うこと。"
858
859 #. type: Plain text
860 #: build/C/man2/get_robust_list.2:127
861 msgid "A thread can have only one robust futex list; therefore applications that wish to use this functionality should use the robust mutexes provided by glibc."
862 msgstr ""
863
864 #.  .BR pthread_mutexattr_setrobust_np (3)
865 #. type: Plain text
866 #: build/C/man2/get_robust_list.2:130
867 msgid "B<futex>(2)"
868 msgstr "B<futex>(2)"
869
870 #.  http://lwn.net/Articles/172149/
871 #. type: Plain text
872 #: build/C/man2/get_robust_list.2:136
873 msgid "I<Documentation/robust-futexes.txt> and I<Documentation/robust-futex-ABI.txt> in the Linux kernel source tree"
874 msgstr ""
875
876 #. type: TH
877 #: build/C/man2/getunwind.2:27
878 #, no-wrap
879 msgid "GETUNWIND"
880 msgstr ""
881
882 #. type: TH
883 #: build/C/man2/getunwind.2:27
884 #, no-wrap
885 msgid "2014-09-21"
886 msgstr "2014-09-21"
887
888 #. type: Plain text
889 #: build/C/man2/getunwind.2:30
890 msgid "getunwind - copy the unwind data to caller's buffer"
891 msgstr ""
892
893 #. type: Plain text
894 #: build/C/man2/getunwind.2:34
895 #, no-wrap
896 msgid ""
897 "B<#include E<lt>syscall.hE<gt>>\n"
898 "B<#include E<lt>linux/unwind.hE<gt>>\n"
899 msgstr ""
900 "B<#include E<lt>syscall.hE<gt>>\n"
901 "B<#include E<lt>linux/unwind.hE<gt>>\n"
902
903 #. type: Plain text
904 #: build/C/man2/getunwind.2:36
905 #, no-wrap
906 msgid "B<long getunwind(void >I<*buf>B<, size_t >I<buf_size>B<);>\n"
907 msgstr ""
908
909 #. type: Plain text
910 #: build/C/man2/getunwind.2:42
911 msgid "I<Note: this function is obsolete.>"
912 msgstr ""
913
914 #. type: Plain text
915 #: build/C/man2/getunwind.2:52
916 msgid "The IA-64-specific B<getunwind>()  system call copies the kernel's call frame unwind data into the buffer pointed to by I<buf> and returns the size of the unwind data; this data describes the gate page (kernel code that is mapped into user space)."
917 msgstr ""
918
919 #. type: Plain text
920 #: build/C/man2/getunwind.2:64
921 msgid "The size of the buffer I<buf> is specified in I<buf_size>.  The data is copied only if I<buf_size> is greater than or equal to the size of the unwind data and I<buf> is not NULL; otherwise, no data is copied, and the call succeeds, returning the size that would be needed to store the unwind data."
922 msgstr ""
923
924 #. type: Plain text
925 #: build/C/man2/getunwind.2:68
926 msgid "The first part of the unwind data contains an unwind table.  The rest contains the associated unwind information, in no particular order.  The unwind table contains entries of the following form:"
927 msgstr ""
928
929 #. type: Plain text
930 #: build/C/man2/getunwind.2:73
931 #, no-wrap
932 msgid ""
933 "    u64 start;      (64-bit address of start of function)\n"
934 "    u64 end;        (64-bit address of end of function)\n"
935 "    u64 info;       (BUF-relative offset to unwind info)\n"
936 msgstr ""
937
938 #. type: Plain text
939 #: build/C/man2/getunwind.2:81
940 msgid "An entry whose I<start> value is zero indicates the end of the table.  For more information about the format, see the I<IA-64 Software Conventions and Runtime Architecture> manual."
941 msgstr ""
942
943 #. type: Plain text
944 #: build/C/man2/getunwind.2:88
945 msgid "On success, B<getunwind>()  returns the size of the unwind data.  On error, -1 is returned and I<errno> is set to indicate the error."
946 msgstr "成功すると、 B<getunwind> は unwind されたデータのサイズを返す。 エラーの場合、 -1 が返り、 I<errno> にエラーを示す値が設定される。"
947
948 #. type: Plain text
949 #: build/C/man2/getunwind.2:94
950 msgid "B<getunwind>()  fails with the error B<EFAULT> if the unwind info can't be stored in the space specified by I<buf>."
951 msgstr ""
952
953 #. type: Plain text
954 #: build/C/man2/getunwind.2:96
955 msgid "This system call is available since Linux 2.4."
956 msgstr ""
957
958 #. type: Plain text
959 #: build/C/man2/getunwind.2:99
960 msgid "This system call is Linux-specific, and is available only on the IA-64 architecture."
961 msgstr ""
962
963 #. type: Plain text
964 #: build/C/man2/getunwind.2:107
965 msgid "This system call has been deprecated.  The modern way to obtain the kernel's unwind data is via the gate DSO.  The address of the ELF header for this DSO is passed to user level via B<AT_SYSINFO_EHDR> (see B<getauxval>(3))."
966 msgstr ""
967
968 #. type: Plain text
969 #: build/C/man2/getunwind.2:111
970 msgid "Glibc does not provide a wrapper for this system call; in the unlikely event that you want to call it, use B<syscall>(2)."
971 msgstr "glibc はこのシステムコールに対するラッパー関数を提供していない。おそらくないと思うが、このシステムコールを呼び出したい場合は B<syscall>(2) を使うこと。"
972
973 #. type: Plain text
974 #: build/C/man2/getunwind.2:113
975 msgid "B<getauxval>(3)"
976 msgstr "B<getauxval>(3)"
977
978 #. type: TH
979 #: build/C/man2/kexec_load.2:26
980 #, no-wrap
981 msgid "KEXEC_LOAD"
982 msgstr "KEXEC_LOAD"
983
984 #. type: TH
985 #: build/C/man2/kexec_load.2:26 build/C/man2/process_vm_readv.2:29
986 #, no-wrap
987 msgid "2014-08-19"
988 msgstr "2014-08-19"
989
990 #. type: Plain text
991 #: build/C/man2/kexec_load.2:29
992 msgid "kexec_load - load a new kernel for later execution"
993 msgstr "kexec_load - 新しいカーネルを後で実行するためにロードする"
994
995 #. type: Plain text
996 #: build/C/man2/kexec_load.2:31
997 msgid "B<#include E<lt>linux/kexec.hE<gt>>"
998 msgstr "B<#include E<lt>linux/kexec.hE<gt>>"
999
1000 #. type: Plain text
1001 #: build/C/man2/kexec_load.2:33
1002 msgid "B<long kexec_load(unsigned long >I<entry>B<, unsigned long >I<nr_segments>B<,>"
1003 msgstr "B<long kexec_load(unsigned long >I<entry>B<, unsigned long >I<nr_segments>B<,>"
1004
1005 #. type: Plain text
1006 #: build/C/man2/kexec_load.2:36
1007 msgid "B< struct kexec_segment *>I<segments>B<, unsigned long >I<flags>B<);>"
1008 msgstr "B< struct kexec_segment *>I<segments>B<, unsigned long >I<flags>B<);>"
1009
1010 #. type: Plain text
1011 #: build/C/man2/kexec_load.2:44
1012 msgid "The B<kexec_load>()  system call loads a new kernel that can be executed later by B<reboot>(2)."
1013 msgstr ""
1014 "B<kexec_load>() システムコールは、新しいカーネルをロードし、\n"
1015 "その後の B<reboot>(2) で実行できるようにする。"
1016
1017 #. type: Plain text
1018 #: build/C/man2/kexec_load.2:50
1019 msgid "The I<flags> argument is a bit mask that controls the operation of the call.  The following values can be specified in I<flags>:"
1020 msgstr "I<flags> 引き数は、システムコールの呼び出しの動作を制御するマスクビットである。 I<flags> には以下の値を指定できる。"
1021
1022 #. type: TP
1023 #: build/C/man2/kexec_load.2:50
1024 #, no-wrap
1025 msgid "B<KEXEC_ON_CRASH> (since Linux 2.6.13)"
1026 msgstr "B<KEXEC_ON_CRASH> (Linux 2.6.13 以降)"
1027
1028 #.  FIXME Explain in more detail how KEXEC_ON_CRASH is actually used
1029 #. type: Plain text
1030 #: build/C/man2/kexec_load.2:54
1031 msgid "Execute the new kernel automatically on a system crash."
1032 msgstr "システムのクラッシュ時に、新しいカーネルを自動的に実行する。"
1033
1034 #. type: TP
1035 #: build/C/man2/kexec_load.2:54
1036 #, no-wrap
1037 msgid "B<KEXEC_PRESERVE_CONTEXT> (since Linux 2.6.27)"
1038 msgstr "B<KEXEC_PRESERVE_CONTEXT> (Linux 2.6.27 以降)"
1039
1040 #. type: Plain text
1041 #: build/C/man2/kexec_load.2:64
1042 msgid "Preserve the system hardware and software states before executing the new kernel.  This could be used for system suspend.  This flag is available only if the kernel was configured with B<CONFIG_KEXEC_JUMP>, and is effective only if I<nr_segments> is greater than 0."
1043 msgstr ""
1044 "新しいカーネルを実行する前に、\n"
1045 "システムのハードウェアとソフトウェアの状態を保存する。\n"
1046 "システムの中断時 (suspend) などで使用できる。\n"
1047 "このフラグは、カーネルの設定で B<CONFIG_KEXEC_JUMP> が有効の場合のみ\n"
1048 "利用可能であり、 I<nr_segments> が 0 より大きい場合のみ効果がある。"
1049
1050 #. type: Plain text
1051 #: build/C/man2/kexec_load.2:85
1052 msgid "The high-order bits (corresponding to the mask 0xffff0000) of I<flags> contain the architecture of the to-be-executed kernel.  Specify (OR) the constant B<KEXEC_ARCH_DEFAULT> to use the current architecture, or one of the following architecture constants B<KEXEC_ARCH_386>, B<KEXEC_ARCH_68K>, B<KEXEC_ARCH_X86_64>, B<KEXEC_ARCH_PPC>, B<KEXEC_ARCH_PPC64>, B<KEXEC_ARCH_IA_64>, B<KEXEC_ARCH_ARM>, B<KEXEC_ARCH_S390>, B<KEXEC_ARCH_SH>, B<KEXEC_ARCH_MIPS>, and B<KEXEC_ARCH_MIPS_LE>.  The architecture must be executable on the CPU of the system."
1053 msgstr ""
1054 "I<flags> の上位ビット (マスク 0xffff0000 に対応) には、\n"
1055 "実行されるカーネルのアーキテクチャが入る。\n"
1056 "現在のアーキテクチャを使うことを意味する定数 B<KEXEC_ARCH_DEFAULT> か、\n"
1057 "アーキテクチャ定数 B<KEXEC_ARCH_386>, B<KEXEC_ARCH_68K>, B<KEXEC_ARCH_X86_64>,\n"
1058 "B<KEXEC_ARCH_PPC>, B<KEXEC_ARCH_PPC64>, B<KEXEC_ARCH_IA_64>,\n"
1059 "B<KEXEC_ARCH_ARM>, B<KEXEC_ARCH_S390>, B<KEXEC_ARCH_SH>,\n"
1060 "B<KEXEC_ARCH_MIPS>, B<KEXEC_ARCH_MIPS_LE> の\n"
1061 "いずれか一つを (OR で) 指定する。指定するアーキテクチャは、\n"
1062 "システムの CPU で実行可能なものでなければならない。"
1063
1064 #. type: Plain text
1065 #: build/C/man2/kexec_load.2:100
1066 msgid "The I<entry> argument is the physical entry address in the kernel image.  The I<nr_segments> argument is the number of segments pointed to by the I<segments> pointer; the kernel imposes an (arbitrary) limit of 16 on the number of segments.  The I<segments> argument is an array of I<kexec_segment> structures which define the kernel layout:"
1067 msgstr "I<entry> 引き数は、カーネルイメージの物理エントリーアドレスである。 I<nr_segments> 引き数は、 I<segments> ポインタが指すセグメントの数である。 なお、セグメント数には、カーネルにより 16 という (強制的な) 上限が課される。 I<segments> 引き数は I<kexec_segment> 構造体の配列で、 この構造体によりカーネルの配置が定義される。"
1068
1069 #. type: Plain text
1070 #: build/C/man2/kexec_load.2:109
1071 #, no-wrap
1072 msgid ""
1073 "struct kexec_segment {\n"
1074 "    void   *buf;        /* Buffer in user space */\n"
1075 "    size_t  bufsz;      /* Buffer length in user space */\n"
1076 "    void   *mem;        /* Physical address of kernel */\n"
1077 "    size_t  memsz;      /* Physical address length */\n"
1078 "};\n"
1079 msgstr ""
1080 "struct kexec_segment {\n"
1081 "    void   *buf;        /* Buffer in user space */\n"
1082 "    size_t  bufsz;      /* Buffer length in user space */\n"
1083 "    void   *mem;        /* Physical address of kernel */\n"
1084 "    size_t  memsz;      /* Physical address length */\n"
1085 "};\n"
1086
1087 #.  FIXME Explain the details of how the kernel image defined by segments
1088 #.  is copied from the calling process into previously reserved memory.
1089 #. type: Plain text
1090 #: build/C/man2/kexec_load.2:117
1091 msgid "The kernel image defined by I<segments> is copied from the calling process into previously reserved memory."
1092 msgstr ""
1093 "I<segments> で定義されたカーネルイメージは、\n"
1094 "呼び出したプロセスから予約済みメモリにコピーされる。"
1095
1096 #. type: Plain text
1097 #: build/C/man2/kexec_load.2:124
1098 msgid "On success, B<kexec_load>()  returns 0.  On error, -1 is returned and I<errno> is set to indicate the error."
1099 msgstr ""
1100 "成功すると、 B<kexec_load> は 0 を返す。\n"
1101 "エラーの場合、 -1 が返り、 I<errno> にエラーを示す値が設定される。"
1102
1103 #. type: TP
1104 #: build/C/man2/kexec_load.2:125 build/C/man2/pivot_root.2:110
1105 #: build/C/man2/ptrace.2:1912 build/C/man2/quotactl.2:495
1106 #, no-wrap
1107 msgid "B<EBUSY>"
1108 msgstr "B<EBUSY>"
1109
1110 #. type: Plain text
1111 #: build/C/man2/kexec_load.2:129
1112 msgid "Another crash kernel is already being loaded or a crash kernel is already in use."
1113 msgstr ""
1114 "別のクラッシュカーネルがすでにロードされているか、\n"
1115 "クラッシュカーネルがすでに使用されている。"
1116
1117 #.  KEXEC_SEGMENT_MAX == 16
1118 #. type: Plain text
1119 #: build/C/man2/kexec_load.2:136
1120 msgid "I<flags> is invalid; or I<nr_segments> is too large"
1121 msgstr "I<flags> が無効である。 I<nr_segments> が大きすぎる。"
1122
1123 #. type: Plain text
1124 #: build/C/man2/kexec_load.2:141
1125 msgid "The caller does not have the B<CAP_SYS_BOOT> capability."
1126 msgstr "呼び出し側が B<CAP_SYS_BOOT> ケーパビリティを持っていない。"
1127
1128 #. type: Plain text
1129 #: build/C/man2/kexec_load.2:145
1130 msgid "The B<kexec_load>()  system call first appeared in Linux 2.6.13."
1131 msgstr "B<kexec_load>() システムコールは Linux 2.6.13 で初めて登場した。"
1132
1133 #. type: Plain text
1134 #: build/C/man2/kexec_load.2:152
1135 msgid "Currently, there is no glibc support for B<kexec_load>().  Call it using B<syscall>(2)."
1136 msgstr ""
1137 "現在のところ、 B<kexec_load>() は glibc ではサポートされていない。\n"
1138 "B<syscall>(2) を使って呼び出すこと。"
1139
1140 #.  FIXME . Andi submitted a patch for this.
1141 #.  Check if it got accepted later.
1142 #. type: Plain text
1143 #: build/C/man2/kexec_load.2:159
1144 msgid "The required constants are in the Linux kernel source file I<linux/kexec.h>, which is not currently exported to glibc.  Therefore, these constants must be defined manually."
1145 msgstr ""
1146 "必要な定数は Linux カーネルのソースファイル I<linux/kexec.h> で定義されている\n"
1147 "が、現在のところ glibc には公開されていない。\n"
1148 "そのため、これらの定数は手動で定義しなければならない。"
1149
1150 #. type: Plain text
1151 #: build/C/man2/kexec_load.2:162
1152 msgid "This system call is available only if the kernel was configured with B<CONFIG_KEXEC>."
1153 msgstr ""
1154 "このシステムコールは、カーネルの設定で B<CONFIG_KEXEC> が有効になって\n"
1155 "いる場合にのみ利用できる。"
1156
1157 #. type: Plain text
1158 #: build/C/man2/kexec_load.2:165
1159 msgid "B<reboot>(2), B<syscall>(2)"
1160 msgstr "B<reboot>(2), B<syscall>(2)"
1161
1162 #. type: TH
1163 #: build/C/man2/lookup_dcookie.2:27
1164 #, no-wrap
1165 msgid "LOOKUP_DCOOKIE"
1166 msgstr "LOOKUP_DCOOKIE"
1167
1168 #. type: TH
1169 #: build/C/man2/lookup_dcookie.2:27
1170 #, no-wrap
1171 msgid "2004-06-17"
1172 msgstr "2004-06-17"
1173
1174 #. type: Plain text
1175 #: build/C/man2/lookup_dcookie.2:30
1176 msgid "lookup_dcookie - return a directory entry's path"
1177 msgstr "lookup_dcookie - ディレクトリ・エントリのパス名を返す"
1178
1179 #. type: Plain text
1180 #: build/C/man2/lookup_dcookie.2:32
1181 msgid "B<int lookup_dcookie(u64 >I<cookie>B<, char *>I<buffer>B<, size_t >I<len>B<);>"
1182 msgstr "B<int lookup_dcookie(u64 >I<cookie>B<, char *>I<buffer>B<, size_t >I<len>B<);>"
1183
1184 #. type: Plain text
1185 #: build/C/man2/lookup_dcookie.2:38
1186 msgid "Look up the full path of the directory entry specified by the value I<cookie>.  The cookie is an opaque identifier uniquely identifying a particular directory entry.  The buffer given is filled in with the full path of the directory entry."
1187 msgstr "I<cookie> 値で指定されたディレクトリ・エントリのフルパス名を検索する。 cookie は、個々のディレクトリ・エントリを区別する内部識別子 (opaque identifier) である。引き数で指定されたバッファに、ディレクトリ・エントリの フルパス名が格納される。"
1188
1189 #. type: Plain text
1190 #: build/C/man2/lookup_dcookie.2:43
1191 msgid "For B<lookup_dcookie>()  to return successfully, the kernel must still hold a cookie reference to the directory entry."
1192 msgstr "B<lookup_dcookie>()  が正常に値を返すためには、カーネルがディレクトリ・エントリへの cookie 参照を 保持していなければならない。"
1193
1194 #. type: Plain text
1195 #: build/C/man2/lookup_dcookie.2:50
1196 msgid "On success, B<lookup_dcookie>()  returns the length of the path string copied into the buffer.  On error, -1 is returned, and I<errno> is set appropriately."
1197 msgstr "成功した場合、 B<lookup_dcookie>()  はバッファにコピーしたパス文字列の長さを返す。 エラーの場合は -1 を返し、 I<errno> に適切な値を設定する。"
1198
1199 #. type: Plain text
1200 #: build/C/man2/lookup_dcookie.2:54
1201 msgid "The buffer was not valid."
1202 msgstr "バッファが有効でなかった。"
1203
1204 #. type: Plain text
1205 #: build/C/man2/lookup_dcookie.2:58
1206 msgid "The kernel has no registered cookie/directory entry mappings at the time of lookup, or the cookie does not refer to a valid directory entry."
1207 msgstr "検索が行われた時、cookie とディレクトリ・エントリのマッピングがカーネルに 登録されていなかったか、または cookie が有効なディレクトリ・エントリを 参照していない。"
1208
1209 #. type: TP
1210 #: build/C/man2/lookup_dcookie.2:58
1211 #, no-wrap
1212 msgid "B<ENAMETOOLONG>"
1213 msgstr "B<ENAMETOOLONG>"
1214
1215 #. type: Plain text
1216 #: build/C/man2/lookup_dcookie.2:61
1217 msgid "The name could not fit in the buffer."
1218 msgstr "名前がバッファに入り切らなかった。"
1219
1220 #. type: TP
1221 #: build/C/man2/lookup_dcookie.2:61 build/C/man2/process_vm_readv.2:278
1222 #: build/C/man2/sendfile.2:138 build/C/man2/splice.2:169
1223 #: build/C/man2/tee.2:117 build/C/man2/vmsplice.2:145
1224 #, no-wrap
1225 msgid "B<ENOMEM>"
1226 msgstr "B<ENOMEM>"
1227
1228 #. type: Plain text
1229 #: build/C/man2/lookup_dcookie.2:65
1230 msgid "The kernel could not allocate memory for the temporary buffer holding the path."
1231 msgstr "カーネルが、パス名を保持する一時バッファ用のメモリを割り当てることが できなかった。"
1232
1233 #. type: Plain text
1234 #: build/C/man2/lookup_dcookie.2:70
1235 msgid "The process does not have the capability B<CAP_SYS_ADMIN> required to look up cookie values."
1236 msgstr "プロセスが cookie 値を検索するのに必要なケーパビリティ B<CAP_SYS_ADMIN> を持っていない。"
1237
1238 #. type: TP
1239 #: build/C/man2/lookup_dcookie.2:70 build/C/man2/quotactl.2:474
1240 #, no-wrap
1241 msgid "B<ERANGE>"
1242 msgstr "B<ERANGE>"
1243
1244 #. type: Plain text
1245 #: build/C/man2/lookup_dcookie.2:73
1246 msgid "The buffer was not large enough to hold the path of the directory entry."
1247 msgstr "バッファが、ディレクトリ・エントリのパス名を収容するのに 十分な大きさではなかった。"
1248
1249 #. type: Plain text
1250 #: build/C/man2/lookup_dcookie.2:78
1251 msgid "Available since Linux 2.5.43.  The B<ENAMETOOLONG> error return was added in 2.5.70."
1252 msgstr "Linux 2.5.43 以降で利用できる。 エラー B<ENAMETOOLONG> を返す仕様は 2.5.70 で追加された。"
1253
1254 #. type: Plain text
1255 #: build/C/man2/lookup_dcookie.2:81
1256 msgid "B<lookup_dcookie>()  is Linux-specific."
1257 msgstr "B<lookup_dcookie>()  は Linux 独自の関数である。"
1258
1259 #. type: Plain text
1260 #: build/C/man2/lookup_dcookie.2:85
1261 msgid "B<lookup_dcookie>()  is a special-purpose system call, currently used only by the oprofile profiler.  It relies on a kernel driver to register cookies for directory entries."
1262 msgstr "B<lookup_dcookie>()  は特殊な用途に使われるシステムコールで、現在のところ oprofile profiler で 使われているだけである。"
1263
1264 #. type: Plain text
1265 #: build/C/man2/lookup_dcookie.2:88
1266 msgid "The path returned may be suffixed by the string \" (deleted)\" if the directory entry has been removed."
1267 msgstr "指定されたディレクトリ・エントリが削除されていた場合、返されるパス名の最後に \" (deleted)\" という文字列が付加されることがある。"
1268
1269 #. type: TH
1270 #: build/C/man2/modify_ldt.2:24
1271 #, no-wrap
1272 msgid "MODIFY_LDT"
1273 msgstr "MODIFY_LDT"
1274
1275 #. type: TH
1276 #: build/C/man2/modify_ldt.2:24 build/C/man2/pivot_root.2:10
1277 #, no-wrap
1278 msgid "2012-07-13"
1279 msgstr "2012-07-13"
1280
1281 #. type: Plain text
1282 #: build/C/man2/modify_ldt.2:27
1283 msgid "modify_ldt - get or set ldt"
1284 msgstr "modify_ldt - ldt を設定または取得する"
1285
1286 #. type: Plain text
1287 #: build/C/man2/modify_ldt.2:30
1288 #, no-wrap
1289 msgid "B<#include E<lt>sys/types.hE<gt>>\n"
1290 msgstr "B<#include E<lt>sys/types.hE<gt>>\n"
1291
1292 #. type: Plain text
1293 #: build/C/man2/modify_ldt.2:32
1294 #, no-wrap
1295 msgid "B<int modify_ldt(int >I<func>B<, void *>I<ptr>B<, unsigned long >I<bytecount>B<);>\n"
1296 msgstr "B<int modify_ldt(int >I<func>B<, void *>I<ptr>B<, unsigned long >I<bytecount>B<);>\n"
1297
1298 #. type: Plain text
1299 #: build/C/man2/modify_ldt.2:41
1300 msgid "B<modify_ldt>()  reads or writes the local descriptor table (ldt) for a process.  The ldt is a per-process memory management table used by the i386 processor.  For more information on this table, see an Intel 386 processor handbook."
1301 msgstr "B<modify_ldt>()  はプロセスのローカル・ディスクリプタ・テーブル (local descriptor table; ldt)  を読み書きする。 ldt は i386 プロセッサで使用されるプロセスごとのメモリ管理テーブルである。 このテーブルに関してのより詳しい情報は Intel 386 processor handbook を 参照すること。"
1302
1303 #. type: Plain text
1304 #: build/C/man2/modify_ldt.2:51
1305 msgid "When I<func> is 0, B<modify_ldt>()  reads the ldt into the memory pointed to by I<ptr>.  The number of bytes read is the smaller of I<bytecount> and the actual size of the ldt."
1306 msgstr "I<func> が 0 ならば、 B<modify_ldt>()  は ldt を I<ptr> が指しているメモリに読み込む。 読み込むバイト数は実際の ldt のサイズか I<bytecount> より小さい方である。"
1307
1308 #.  FIXME Should this page say something about func == 2 and func == 0x11?
1309 #.  In Linux 2.4, func == 2 returned "the default ldt"
1310 #.  In Linux 2.6, func == 2 is a nop, returning a zeroed out structure.
1311 #.  Linux 2.4 and 2.6 implement an operation for func == 0x11
1312 #. type: Plain text
1313 #: build/C/man2/modify_ldt.2:69
1314 msgid "When I<func> is 1, B<modify_ldt>()  modifies one ldt entry.  I<ptr> points to a I<user_desc> structure and I<bytecount> must equal the size of this structure."
1315 msgstr "I<func> が 1 ならば、 B<modify_ldt>()  は ldt エントリの一つを変更する。 I<ptr> は I<user_desc> 構造体を指し、 I<bytecount> はこの構造体の大きさに等しくなければならない。"
1316
1317 #. type: Plain text
1318 #: build/C/man2/modify_ldt.2:73
1319 msgid "The I<user_desc> structure is defined in I<E<lt>asm/ldt.hE<gt>> as:"
1320 msgstr "I<user_desc> 構造体は I<E<lt>asm/ldt.hE<gt>> で以下のように定義されている:"
1321
1322 #. type: Plain text
1323 #: build/C/man2/modify_ldt.2:87
1324 #, no-wrap
1325 msgid ""
1326 "struct user_desc {\n"
1327 "    unsigned int  entry_number;\n"
1328 "    unsigned long base_addr;\n"
1329 "    unsigned int  limit;\n"
1330 "    unsigned int  seg_32bit:1;\n"
1331 "    unsigned int  contents:2;\n"
1332 "    unsigned int  read_exec_only:1;\n"
1333 "    unsigned int  limit_in_pages:1;\n"
1334 "    unsigned int  seg_not_present:1;\n"
1335 "    unsigned int  useable:1;\n"
1336 "};\n"
1337 msgstr ""
1338 "struct user_desc {\n"
1339 "    unsigned int  entry_number;\n"
1340 "    unsigned long base_addr;\n"
1341 "    unsigned int  limit;\n"
1342 "    unsigned int  seg_32bit:1;\n"
1343 "    unsigned int  contents:2;\n"
1344 "    unsigned int  read_exec_only:1;\n"
1345 "    unsigned int  limit_in_pages:1;\n"
1346 "    unsigned int  seg_not_present:1;\n"
1347 "    unsigned int  useable:1;\n"
1348 "};\n"
1349
1350 #.  .PP
1351 #.  The ldt is specific for the calling process. Any attempts to change
1352 #.  the ldt to include the address space of another process or the kernel
1353 #.  will result in a segmentation violation when trying to access the memory
1354 #.  outside of the process address space. The memory protection is enforced
1355 #.  at the paging layer.
1356 #. type: Plain text
1357 #: build/C/man2/modify_ldt.2:98
1358 msgid "In Linux 2.4 and earlier, this structure was named I<modify_ldt_ldt_s>."
1359 msgstr "Linux 2.4 以前では、この構造体は I<modify_ldt_ldt_s> という名前であった。"
1360
1361 #. type: Plain text
1362 #: build/C/man2/modify_ldt.2:108
1363 msgid "On success, B<modify_ldt>()  returns either the actual number of bytes read (for reading)  or 0 (for writing).  On failure, B<modify_ldt>()  returns -1 and sets I<errno> to indicate the error."
1364 msgstr "成功した場合は、 B<modify_ldt>()  は (読み込みの場合は) 実際に読み込んだバイト数、 または (書き込みの場合は) 0 を返す。 失敗した場合は B<modify_ldt>()  は -1 を返し、 I<errno> をエラーを示す値に設定する。"
1365
1366 #. type: Plain text
1367 #: build/C/man2/modify_ldt.2:113
1368 msgid "I<ptr> points outside the address space."
1369 msgstr "I<ptr> がアドレス空間の外を指している。"
1370
1371 #. type: Plain text
1372 #: build/C/man2/modify_ldt.2:126
1373 msgid "I<ptr> is 0, or I<func> is 1 and I<bytecount> is not equal to the size of the structure I<modify_ldt_ldt_s>, or I<func> is 1 and the new ldt entry has invalid values."
1374 msgstr "I<ptr> が 0 である、 または I<func> が 1 で I<bytecount> が I<modify_ldt_ldt_s> 構造体のサイズと等しくないか、 I<func> が 1 で新しい ldt エントリが無効な値である。"
1375
1376 #. type: Plain text
1377 #: build/C/man2/modify_ldt.2:130
1378 msgid "I<func> is neither 0 nor 1."
1379 msgstr "I<func> が 0 でも 1 でもない。"
1380
1381 #. type: Plain text
1382 #: build/C/man2/modify_ldt.2:133
1383 msgid "This call is Linux-specific and should not be used in programs intended to be portable."
1384 msgstr "このコールは Linux 特有であり、移植を意図したプログラムでは 使用してはいけない。"
1385
1386 #. type: Plain text
1387 #: build/C/man2/modify_ldt.2:136 build/C/man2/perfmonctl.2:205
1388 #: build/C/man2/pivot_root.2:134
1389 msgid "Glibc does not provide a wrapper for this system call; call it using B<syscall>(2)."
1390 msgstr "glibc はこのシステムコールに対するラッパー関数を提供していない。 B<syscall>(2)  を使って呼び出すこと。"
1391
1392 #. type: Plain text
1393 #: build/C/man2/modify_ldt.2:138
1394 msgid "B<vm86>(2)"
1395 msgstr "B<vm86>(2)"
1396
1397 #. type: TH
1398 #: build/C/man2/nfsservctl.2:8
1399 #, no-wrap
1400 msgid "NFSSERVCTL"
1401 msgstr "NFSSERVCTL"
1402
1403 #. type: TH
1404 #: build/C/man2/nfsservctl.2:8
1405 #, no-wrap
1406 msgid "2013-09-17"
1407 msgstr "2013-09-17"
1408
1409 #. type: Plain text
1410 #: build/C/man2/nfsservctl.2:11
1411 msgid "nfsservctl - syscall interface to kernel nfs daemon"
1412 msgstr "nfsservctl - カーネル nfs デーモンのためのインターフェース"
1413
1414 #. type: Plain text
1415 #: build/C/man2/nfsservctl.2:14
1416 #, no-wrap
1417 msgid "B<#include E<lt>linux/nfsd/syscall.hE<gt>>\n"
1418 msgstr "B<#include E<lt>linux/nfsd/syscall.hE<gt>>\n"
1419
1420 #. type: Plain text
1421 #: build/C/man2/nfsservctl.2:17
1422 #, no-wrap
1423 msgid ""
1424 "B<long nfsservctl(int >I<cmd>B<, struct nfsctl_arg *>I<argp>B<,>\n"
1425 "B<                union nfsctl_res *>I<resp>B<);>\n"
1426 msgstr ""
1427 "B<long nfsservctl(int >I<cmd>B<, struct nfsctl_arg *>I<argp>B<,>\n"
1428 "B<                union nfsctl_res *>I<resp>B<);>\n"
1429
1430 #. type: Plain text
1431 #: build/C/man2/nfsservctl.2:21
1432 msgid "I<Note>: Since Linux 3.1, this system call no longer exists."
1433 msgstr "I<注意>: Linux 3.1 以降では、このシステムコールはもはや存在しない。"
1434
1435 #. type: Plain text
1436 #: build/C/man2/nfsservctl.2:35
1437 #, no-wrap
1438 msgid ""
1439 "/*\n"
1440 " * These are the commands understood by nfsctl().\n"
1441 " */\n"
1442 "#define NFSCTL_SVC          0    /* This is a server process. */\n"
1443 "#define NFSCTL_ADDCLIENT    1    /* Add an NFS client. */\n"
1444 "#define NFSCTL_DELCLIENT    2    /* Remove an NFS client. */\n"
1445 "#define NFSCTL_EXPORT       3    /* Export a filesystem. */\n"
1446 "#define NFSCTL_UNEXPORT     4    /* Unexport a filesystem. */\n"
1447 "#define NFSCTL_UGIDUPDATE   5    /* Update a client's UID/GID map\n"
1448 "                                    (only in Linux 2.4.x and earlier). */\n"
1449 "#define NFSCTL_GETFH        6    /* Get a file handle (used by mountd)\n"
1450 "                                    (only in Linux 2.4.x and earlier). */\n"
1451 msgstr ""
1452 "/*\n"
1453 " * nfsctl() によって理解されるコマンド\n"
1454 " */\n"
1455 "#define NFSCTL_SVC          0    /* サーバープロセス */\n"
1456 "#define NFSCTL_ADDCLIENT    1    /* NFS クライアントを追加 */\n"
1457 "#define NFSCTL_DELCLIENT    2    /* NFS クライアンドを削除 */\n"
1458 "#define NFSCTL_EXPORT       3    /* ファイルシステムのエクスポート */\n"
1459 "#define NFSCTL_UNEXPORT     4    /* ファイルシステムのアンエクスポート */\n"
1460 "#define NFSCTL_UGIDUPDATE   5    /* UID/GID マップの更新\n"
1461 "                                    (Linux 2.4.x とそれ以前のみ) */\n"
1462 "#define NFSCTL_GETFH        6    /* (mountd で使用される) fh の取得\n"
1463 "                                    (Linux 2.4.x とそれ以前のみ) */\n"
1464
1465 #. type: Plain text
1466 #: build/C/man2/nfsservctl.2:47
1467 #, no-wrap
1468 msgid ""
1469 "struct nfsctl_arg {\n"
1470 "    int                       ca_version;     /* safeguard */\n"
1471 "    union {\n"
1472 "        struct nfsctl_svc     u_svc;\n"
1473 "        struct nfsctl_client  u_client;\n"
1474 "        struct nfsctl_export  u_export;\n"
1475 "        struct nfsctl_uidmap  u_umap;\n"
1476 "        struct nfsctl_fhparm  u_getfh;\n"
1477 "        unsigned int          u_debug;\n"
1478 "    } u;\n"
1479 "}\n"
1480 msgstr ""
1481 "struct nfsctl_arg {\n"
1482 "    int                       ca_version;     /* safeguard */\n"
1483 "    union {\n"
1484 "        struct nfsctl_svc     u_svc;\n"
1485 "        struct nfsctl_client  u_client;\n"
1486 "        struct nfsctl_export  u_export;\n"
1487 "        struct nfsctl_uidmap  u_umap;\n"
1488 "        struct nfsctl_fhparm  u_getfh;\n"
1489 "        unsigned int          u_debug;\n"
1490 "    } u;\n"
1491 "}\n"
1492
1493 #. type: Plain text
1494 #: build/C/man2/nfsservctl.2:52
1495 #, no-wrap
1496 msgid ""
1497 "union nfsctl_res {\n"
1498 "        struct knfs_fh          cr_getfh;\n"
1499 "        unsigned int            cr_debug;\n"
1500 "};\n"
1501 msgstr ""
1502 "union nfsctl_res {\n"
1503 "        struct knfs_fh          cr_getfh;\n"
1504 "        unsigned int            cr_debug;\n"
1505 "};\n"
1506
1507 #. type: Plain text
1508 #: build/C/man2/nfsservctl.2:58 build/C/man2/pivot_root.2:105
1509 #: build/C/man2/vm86.2:59
1510 msgid "On success, zero is returned.  On error, -1 is returned, and I<errno> is set appropriately."
1511 msgstr "成功した場合は 0 が返される。エラーの場合は -1 が返され、 I<errno> が適切に設定される。"
1512
1513 #. type: Plain text
1514 #: build/C/man2/nfsservctl.2:60
1515 msgid "This call is Linux-specific."
1516 msgstr "このコールは Linux 特有である。"
1517
1518 #. type: TH
1519 #: build/C/man2/outb.2:26
1520 #, no-wrap
1521 msgid "OUTB"
1522 msgstr "OUTB"
1523
1524 #. type: TH
1525 #: build/C/man2/outb.2:26
1526 #, no-wrap
1527 msgid "2012-12-31"
1528 msgstr "2012-12-31"
1529
1530 #. type: Plain text
1531 #: build/C/man2/outb.2:31
1532 msgid "outb, outw, outl, outsb, outsw, outsl, inb, inw, inl, insb, insw, insl, outb_p, outw_p, outl_p, inb_p, inw_p, inl_p - port I/O"
1533 msgstr "outb, outw, outl, outsb, outsw, outsl, inb, inw, inl, insb, insw, insl, outb_p, outw_p, outl_p, inb_p, inw_p, inl_p - ポート入出力"
1534
1535 #. type: Plain text
1536 #: build/C/man2/outb.2:34
1537 #, no-wrap
1538 msgid "B<#include E<lt>sys/io.hE<gt>>\n"
1539 msgstr "B<#include E<lt>sys/io.hE<gt>>\n"
1540
1541 #. type: Plain text
1542 #: build/C/man2/outb.2:41
1543 #, no-wrap
1544 msgid ""
1545 "B<unsigned char inb(unsigned short int >I<port>B<);>\n"
1546 "B<unsigned char inb_p(unsigned short int >I<port>B<);>\n"
1547 "B<unsigned short int inw(unsigned short int >I<port>B<);>\n"
1548 "B<unsigned short int inw_p(unsigned short int >I<port>B<);>\n"
1549 "B<unsigned int inl(unsigned short int >I<port>B<);>\n"
1550 "B<unsigned int inl_p(unsigned short int >I<port>B<);>\n"
1551 msgstr ""
1552 "B<unsigned char inb(unsigned short int >I<port>B<);>\n"
1553 "B<unsigned char inb_p(unsigned short int >I<port>B<);>\n"
1554 "B<unsigned short int inw(unsigned short int >I<port>B<);>\n"
1555 "B<unsigned short int inw_p(unsigned short int >I<port>B<);>\n"
1556 "B<unsigned int inl(unsigned short int >I<port>B<);>\n"
1557 "B<unsigned int inl_p(unsigned short int >I<port>B<);>\n"
1558
1559 #. type: Plain text
1560 #: build/C/man2/outb.2:48
1561 #, no-wrap
1562 msgid ""
1563 "B<void outb(unsigned char >I<value>B<, unsigned short int >I<port>B<);>\n"
1564 "B<void outb_p(unsigned char >I<value>B<, unsigned short int >I<port>B<);>\n"
1565 "B<void outw(unsigned short int >I<value>B<, unsigned short int >I<port>B<);>\n"
1566 "B<void outw_p(unsigned short int >I<value>B<, unsigned short int >I<port>B<);>\n"
1567 "B<void outl(unsigned int >I<value>B<, unsigned short int >I<port>B<);>\n"
1568 "B<void outl_p(unsigned int >I<value>B<, unsigned short int >I<port>B<);>\n"
1569 msgstr ""
1570 "B<void outb(unsigned char >I<value>B<, unsigned short int >I<port>B<);>\n"
1571 "B<void outb_p(unsigned char >I<value>B<, unsigned short int >I<port>B<);>\n"
1572 "B<void outw(unsigned short int >I<value>B<, unsigned short int >I<port>B<);>\n"
1573 "B<void outw_p(unsigned short int >I<value>B<, unsigned short int >I<port>B<);>\n"
1574 "B<void outl(unsigned int >I<value>B<, unsigned short int >I<port>B<);>\n"
1575 "B<void outl_p(unsigned int >I<value>B<, unsigned short int >I<port>B<);>\n"
1576
1577 #. type: Plain text
1578 #: build/C/man2/outb.2:61
1579 #, no-wrap
1580 msgid ""
1581 "B<void insb(unsigned short int >I<port>B<, void *>I<addr>B<,>\n"
1582 "B<           unsigned long int >I<count>B<);>\n"
1583 "B<void insw(unsigned short int >I<port>B<, void *>I<addr>B<,>\n"
1584 "B<           unsigned long int >I<count>B<);>\n"
1585 "B<void insl(unsigned short int >I<port>B<, void *>I<addr>B<,>\n"
1586 "B<           unsigned long int >I<count>B<);>\n"
1587 "B<void outsb(unsigned short int >I<port>B<, const void *>I<addr>B<,>\n"
1588 "B<           unsigned long int >I<count>B<);>\n"
1589 "B<void outsw(unsigned short int >I<port>B<, const void *>I<addr>B<,>\n"
1590 "B<           unsigned long int >I<count>B<);>\n"
1591 "B<void outsl(unsigned short int >I<port>B<, const void *>I<addr>B<,>\n"
1592 "B<           unsigned long int >I<count>B<);>\n"
1593 msgstr ""
1594 "B<void insb(unsigned short int >I<port>B<, void *>I<addr>B<,>\n"
1595 "B<           unsigned long int >I<count>B<);>\n"
1596 "B<void insw(unsigned short int >I<port>B<, void *>I<addr>B<,>\n"
1597 "B<           unsigned long int >I<count>B<);>\n"
1598 "B<void insl(unsigned short int >I<port>B<, void *>I<addr>B<,>\n"
1599 "B<           unsigned long int >I<count>B<);>\n"
1600 "B<void outsb(unsigned short int >I<port>B<, const void *>I<addr>B<,>\n"
1601 "B<           unsigned long int >I<count>B<);>\n"
1602 "B<void outsw(unsigned short int >I<port>B<, const void *>I<addr>B<,>\n"
1603 "B<           unsigned long int >I<count>B<);>\n"
1604 "B<void outsl(unsigned short int >I<port>B<, const void *>I<addr>B<,>\n"
1605 "B<           unsigned long int >I<count>B<);>\n"
1606
1607 #. type: Plain text
1608 #: build/C/man2/outb.2:67
1609 msgid "This family of functions is used to do low-level port input and output.  The out* functions do port output, the in* functions do port input; the b-suffix functions are byte-width and the w-suffix functions word-width; the _p-suffix functions pause until the I/O completes."
1610 msgstr "この一連の関数はポートに対する低レベルの入出力に使用する。 out* 関数はポート出力、in* 関数はポート入力を行う。 語尾に b がついている関数はバイト単位、w がついている関数はワード単位である。 _p がついている関数は I/O が終了するまで待つ。"
1611
1612 #.  , given the following information
1613 #.  in addition to that given in
1614 #.  .BR outb (9).
1615 #. type: Plain text
1616 #: build/C/man2/outb.2:73
1617 msgid "They are primarily designed for internal kernel use, but can be used from user space."
1618 msgstr "これらの関数はもともとカーネル内部での使用を想定して設計されているが、 ユーザー空間からでも使用できる。"
1619
1620 #. type: Plain text
1621 #: build/C/man2/outb.2:78
1622 msgid "You must compile with B<-O> or B<-O2> or similar.  The functions are defined as inline macros, and will not be substituted in without optimization enabled, causing unresolved references at link time."
1623 msgstr "B<-O> や B<-O2> などを指定してコンパイルしなければならない。 これらの関数はインライン・マクロとして定義されており、 最適化を行わないと関数の展開が行われず、 リンクの時に「解決できない参照(unresolved reference)」が発生する。"
1624
1625 #. type: Plain text
1626 #: build/C/man2/outb.2:87
1627 msgid "You use B<ioperm>(2)  or alternatively B<iopl>(2)  to tell the kernel to allow the user space application to access the I/O ports in question.  Failure to do this will cause the application to receive a segmentation fault."
1628 msgstr "ユーザー空間のアプリケーションが I/O ポートにアクセスすることを カーネルに教えるために B<ioperm>(2)  もしくは B<iopl>(2)  を使用すること。これを忘れるとアプリケーションはセグメンテーション違反 (segmentation fault) を受けとることになる。"
1629
1630 #. type: Plain text
1631 #: build/C/man2/outb.2:96
1632 msgid "B<outb>()  and friends are hardware-specific.  The I<value> argument is passed first and the I<port> argument is passed second, which is the opposite order from most DOS implementations."
1633 msgstr "B<outb>()  とその仲間はハードウェア特有である。 I<value> 引数が最初に渡され、 I<port> 引数が二番目に渡される。 この順序はほとんどの DOS での実装とは逆である。"
1634
1635 #. type: Plain text
1636 #: build/C/man2/outb.2:99
1637 msgid "B<ioperm>(2), B<iopl>(2)"
1638 msgstr "B<ioperm>(2), B<iopl>(2)"
1639
1640 #. type: TH
1641 #: build/C/man2/pciconfig_read.2:8
1642 #, no-wrap
1643 msgid "PCICONFIG_READ"
1644 msgstr "PCICONFIG_READ"
1645
1646 #. type: TH
1647 #: build/C/man2/pciconfig_read.2:8
1648 #, no-wrap
1649 msgid "2003-07-14"
1650 msgstr "2003-07-14"
1651
1652 #. type: Plain text
1653 #: build/C/man2/pciconfig_read.2:11
1654 msgid "pciconfig_read, pciconfig_write, pciconfig_iobase - pci device information handling"
1655 msgstr "pciconfig_read, pciconfig_write, pciconfig_iobase - pci デバイス情報を扱う"
1656
1657 #. type: Plain text
1658 #: build/C/man2/pciconfig_read.2:14
1659 #, no-wrap
1660 msgid "B<#include E<lt>pci.hE<gt>>\n"
1661 msgstr "B<#include E<lt>pci.hE<gt>>\n"
1662
1663 #. type: Plain text
1664 #: build/C/man2/pciconfig_read.2:21
1665 #, no-wrap
1666 msgid ""
1667 "B<int pciconfig_read(unsigned long >I<bus>B<, unsigned long >I<dfn>B<,>\n"
1668 "B<          unsigned long >I<off>B<, unsigned long >I<len>B<, void *>I<buf>B<);>\n"
1669 "B<int pciconfig_write(unsigned long >I<bus>B<, unsigned long >I<dfn>B<,>\n"
1670 "B<          unsigned long >I<off>B<, unsigned long >I<len>B<, void *>I<buf>B<);>\n"
1671 "B<int pciconfig_iobase(long >I<which>B<, unsigned long >I<bus>B<,>\n"
1672 "B<          unsigned long >I<devfn>B<);>\n"
1673 msgstr ""
1674 "B<int pciconfig_read(unsigned long >I<bus>B<, unsigned long >I<dfn>B<,>\n"
1675 "B<          unsigned long >I<off>B<, unsigned long >I<len>B<, void *>I<buf>B<);>\n"
1676 "B<int pciconfig_write(unsigned long >I<bus>B<, unsigned long >I<dfn>B<,>\n"
1677 "B<          unsigned long >I<off>B<, unsigned long >I<len>B<, void *>I<buf>B<);>\n"
1678 "B<int pciconfig_iobase(long >I<which>B<, unsigned long >I<bus>B<,>\n"
1679 "B<          unsigned long >I<devfn>B<);>\n"
1680
1681 #. type: Plain text
1682 #: build/C/man2/pciconfig_read.2:27
1683 msgid "Most of the interaction with PCI devices is already handled by the kernel PCI layer, and thus these calls should not normally need to be accessed from user space."
1684 msgstr "PCI デバイスとのやり取り (interaction) は カーネル PCI レイヤですでに処理されているので、 通常はこららの関数をユーザ空間からアクセスする必要はない。"
1685
1686 #. type: TP
1687 #: build/C/man2/pciconfig_read.2:27 build/C/man2/pciconfig_read.2:51
1688 #, no-wrap
1689 msgid "B<pciconfig_read>()"
1690 msgstr "B<pciconfig_read>()"
1691
1692 #. type: Plain text
1693 #: build/C/man2/pciconfig_read.2:36
1694 msgid "Reads to I<buf> from device I<dev> at offset I<off> value."
1695 msgstr "デバイス I<dev> のオフセット I<off> の値を I<buf> に読み込む。"
1696
1697 #. type: TP
1698 #: build/C/man2/pciconfig_read.2:36 build/C/man2/pciconfig_read.2:57
1699 #, no-wrap
1700 msgid "B<pciconfig_write>()"
1701 msgstr "B<pciconfig_write>()"
1702
1703 #. type: Plain text
1704 #: build/C/man2/pciconfig_read.2:45
1705 msgid "Writes from I<buf> to device I<dev> at offset I<off> value."
1706 msgstr "デバイス I<dev> のオフセット I<off> に I<buf> の値を書き込む。"
1707
1708 #. type: TP
1709 #: build/C/man2/pciconfig_read.2:45 build/C/man2/pciconfig_read.2:63
1710 #, no-wrap
1711 msgid "B<pciconfig_iobase>()"
1712 msgstr "B<pciconfig_iobase>()"
1713
1714 #. type: Plain text
1715 #: build/C/man2/pciconfig_read.2:50
1716 msgid "You pass it a bus/devfn pair and get a physical address for either the memory offset (for things like prep, this is 0xc0000000), the IO base for PIO cycles, or the ISA holes if any."
1717 msgstr "bus/devfn ペアをこの関数に渡し、 メモリオフセット (prep のようなものでは、この値は 0xc0000000 である) と PIO サイクルの IO ベースの物理アドレスを取得する。 また、もしあるならば ISA hole の物理アドレスを取得する。"
1718
1719 #. type: Plain text
1720 #: build/C/man2/pciconfig_read.2:57 build/C/man2/pciconfig_read.2:63
1721 msgid "On success zero is returned.  On error, -1 is returned and I<errno> is set appropriately."
1722 msgstr "成功した場合、0 が返される。 エラーの場合、-1 が返され、 I<errno> が適切に設定される。"
1723
1724 #. type: Plain text
1725 #: build/C/man2/pciconfig_read.2:77
1726 msgid "Returns information on locations of various I/O regions in physical memory according to the I<which> value.  Values for I<which> are: B<IOBASE_BRIDGE_NUMBER>, B<IOBASE_MEMORY>, B<IOBASE_IO>, B<IOBASE_ISA_IO>, B<IOBASE_ISA_MEM>."
1727 msgstr "I<which> の値に基づいて、物理メモリ内の様々な I/O 領域の位置情報が返される。 I<which> の値は、 B<IOBASE_BRIDGE_NUMBER>, B<IOBASE_MEMORY>, B<IOBASE_IO>, B<IOBASE_ISA_IO>, B<IOBASE_ISA_MEM> である。"
1728
1729 #. type: Plain text
1730 #: build/C/man2/pciconfig_read.2:84
1731 msgid "I<len> value is invalid.  This does not apply to B<pciconfig_iobase>()."
1732 msgstr "I<len> の値が無効である。 このエラーは B<pciconfig_iobase>()  には適用されない。"
1733
1734 #. type: TP
1735 #: build/C/man2/pciconfig_read.2:84 build/C/man2/ptrace.2:1929
1736 #: build/C/man2/sendfile.2:134
1737 #, no-wrap
1738 msgid "B<EIO>"
1739 msgstr "B<EIO>"
1740
1741 #. type: Plain text
1742 #: build/C/man2/pciconfig_read.2:87
1743 msgid "I/O error."
1744 msgstr "I/O エラー。"
1745
1746 #. type: TP
1747 #: build/C/man2/pciconfig_read.2:87 build/C/man2/perf_event_open.2:2640
1748 #, no-wrap
1749 msgid "B<ENODEV>"
1750 msgstr "B<ENODEV>"
1751
1752 #. type: Plain text
1753 #: build/C/man2/pciconfig_read.2:93
1754 msgid "For B<pciconfig_iobase>(), \"hose\" value is NULL.  For the other calls, could not find a slot."
1755 msgstr "B<pciconfig_iobase>()  の場合、でホース (hose) の値が NULL である。 他の呼び出しの場合、スロット (slot) が見つからない。"
1756
1757 #. type: Plain text
1758 #: build/C/man2/pciconfig_read.2:98
1759 msgid "The system has not implemented these calls (B<CONFIG_PCI> not defined)."
1760 msgstr "このシステムはこれらの呼び出しを実装していない。 (B<CONFIG_PCI> が定義されていない)。"
1761
1762 #. type: TP
1763 #: build/C/man2/pciconfig_read.2:98 build/C/man2/perf_event_open.2:2668
1764 #, no-wrap
1765 msgid "B<EOPNOTSUPP>"
1766 msgstr "B<EOPNOTSUPP>"
1767
1768 #. type: Plain text
1769 #: build/C/man2/pciconfig_read.2:105
1770 msgid "This return value is valid only for B<pciconfig_iobase>().  It is returned if the value for I<which> is invalid."
1771 msgstr "この返り値は B<pciconfig_iobase>()  でのみ有効である。 このエラーは I<which> の値が無効であるときに返される。"
1772
1773 #. type: Plain text
1774 #: build/C/man2/pciconfig_read.2:112
1775 msgid "User does not have the B<CAP_SYS_ADMIN> capability.  This does not apply to B<pciconfig_iobase>()."
1776 msgstr "ユーザが B<CAP_SYS_ADMIN> 権限を持っていない。 このエラーは B<pciconfig_iobase>()  には適用されない。"
1777
1778 #. type: Plain text
1779 #: build/C/man2/pciconfig_read.2:114
1780 msgid "These calls are Linux-specific, available since Linux 2.0.26/2.1.11."
1781 msgstr "これらの呼び出しは Linux 特有のものであり、 Linux 2.0.26/2.1.11 から使用可能である。"
1782
1783 #. type: Plain text
1784 #: build/C/man2/pciconfig_read.2:116
1785 msgid "B<capabilities>(7)"
1786 msgstr "B<capabilities>(7)"
1787
1788 #. type: TH
1789 #: build/C/man2/perf_event_open.2:27
1790 #, no-wrap
1791 msgid "PERF_EVENT_OPEN"
1792 msgstr "PERF_EVENT_OPEN"
1793
1794 #. type: TH
1795 #: build/C/man2/perf_event_open.2:27
1796 #, no-wrap
1797 msgid "2015-01-10"
1798 msgstr "2015-01-10"
1799
1800 #. type: Plain text
1801 #: build/C/man2/perf_event_open.2:30
1802 msgid "perf_event_open - set up performance monitoring"
1803 msgstr ""
1804
1805 #. type: Plain text
1806 #: build/C/man2/perf_event_open.2:34
1807 #, no-wrap
1808 msgid ""
1809 "B<#include E<lt>linux/perf_event.hE<gt>>\n"
1810 "B<#include E<lt>linux/hw_breakpoint.hE<gt>>\n"
1811 msgstr ""
1812 "B<#include E<lt>linux/perf_event.hE<gt>>\n"
1813 "B<#include E<lt>linux/hw_breakpoint.hE<gt>>\n"
1814
1815 #. type: Plain text
1816 #: build/C/man2/perf_event_open.2:38
1817 #, no-wrap
1818 msgid ""
1819 "B<int perf_event_open(struct perf_event_attr *>I<attr>B<,>\n"
1820 "B<                    pid_t >I<pid>B<, int >I<cpu>B<, int >I<group_fd>B<,>\n"
1821 "B<                    unsigned long >I<flags>B<);>\n"
1822 msgstr ""
1823 "B<int perf_event_open(struct perf_event_attr *>I<attr>B<,>\n"
1824 "B<                    pid_t >I<pid>B<, int >I<cpu>B<, int >I<group_fd>B<,>\n"
1825 "B<                    unsigned long >I<flags>B<);>\n"
1826
1827 #. type: Plain text
1828 #: build/C/man2/perf_event_open.2:47
1829 msgid "Given a list of parameters, B<perf_event_open>()  returns a file descriptor, for use in subsequent system calls (B<read>(2), B<mmap>(2), B<prctl>(2), B<fcntl>(2), etc.)."
1830 msgstr ""
1831
1832 #. type: Plain text
1833 #: build/C/man2/perf_event_open.2:55
1834 msgid "A call to B<perf_event_open>()  creates a file descriptor that allows measuring performance information.  Each file descriptor corresponds to one event that is measured; these can be grouped together to measure multiple events simultaneously."
1835 msgstr ""
1836
1837 #. type: Plain text
1838 #: build/C/man2/perf_event_open.2:62
1839 msgid "Events can be enabled and disabled in two ways: via B<ioctl>(2)  and via B<prctl>(2).  When an event is disabled it does not count or generate overflows but does continue to exist and maintain its count value."
1840 msgstr ""
1841
1842 #. type: Plain text
1843 #: build/C/man2/perf_event_open.2:76
1844 msgid "Events come in two flavors: counting and sampled.  A I<counting> event is one that is used for counting the aggregate number of events that occur.  In general, counting event results are gathered with a B<read>(2)  call.  A I<sampling> event periodically writes measurements to a buffer that can then be accessed via B<mmap>(2)."
1845 msgstr ""
1846
1847 #. type: SS
1848 #: build/C/man2/perf_event_open.2:76
1849 #, no-wrap
1850 msgid "Arguments"
1851 msgstr ""
1852
1853 #. type: Plain text
1854 #: build/C/man2/perf_event_open.2:83
1855 msgid "The I<pid> and I<cpu> arguments allow specifying which process and CPU to monitor:"
1856 msgstr ""
1857
1858 #. type: TP
1859 #: build/C/man2/perf_event_open.2:83
1860 #, no-wrap
1861 msgid "B<pid == 0> and B<cpu == -1>"
1862 msgstr ""
1863
1864 #. type: Plain text
1865 #: build/C/man2/perf_event_open.2:86
1866 msgid "This measures the calling process/thread on any CPU."
1867 msgstr ""
1868
1869 #. type: TP
1870 #: build/C/man2/perf_event_open.2:86
1871 #, no-wrap
1872 msgid "B<pid == 0> and B<cpu E<gt>= 0>"
1873 msgstr ""
1874
1875 #. type: Plain text
1876 #: build/C/man2/perf_event_open.2:90
1877 msgid "This measures the calling process/thread only when running on the specified CPU."
1878 msgstr ""
1879
1880 #. type: TP
1881 #: build/C/man2/perf_event_open.2:90
1882 #, no-wrap
1883 msgid "B<pid E<gt> 0> and B<cpu == -1>"
1884 msgstr ""
1885
1886 #. type: Plain text
1887 #: build/C/man2/perf_event_open.2:93
1888 msgid "This measures the specified process/thread on any CPU."
1889 msgstr ""
1890
1891 #. type: TP
1892 #: build/C/man2/perf_event_open.2:93
1893 #, no-wrap
1894 msgid "B<pid E<gt> 0> and B<cpu E<gt>= 0>"
1895 msgstr ""
1896
1897 #. type: Plain text
1898 #: build/C/man2/perf_event_open.2:97
1899 msgid "This measures the specified process/thread only when running on the specified CPU."
1900 msgstr ""
1901
1902 #. type: TP
1903 #: build/C/man2/perf_event_open.2:97
1904 #, no-wrap
1905 msgid "B<pid == -1> and B<cpu E<gt>= 0>"
1906 msgstr ""
1907
1908 #. type: Plain text
1909 #: build/C/man2/perf_event_open.2:105
1910 msgid "This measures all processes/threads on the specified CPU.  This requires B<CAP_SYS_ADMIN> capability or a I</proc/sys/kernel/perf_event_paranoid> value of less than 1."
1911 msgstr ""
1912
1913 #. type: TP
1914 #: build/C/man2/perf_event_open.2:105
1915 #, no-wrap
1916 msgid "B<pid == -1> and B<cpu == -1>"
1917 msgstr ""
1918
1919 #. type: Plain text
1920 #: build/C/man2/perf_event_open.2:108
1921 msgid "This setting is invalid and will return an error."
1922 msgstr ""
1923
1924 #. type: Plain text
1925 #: build/C/man2/perf_event_open.2:130
1926 msgid "The I<group_fd> argument allows event groups to be created.  An event group has one event which is the group leader.  The leader is created first, with I<group_fd> = -1.  The rest of the group members are created with subsequent B<perf_event_open>()  calls with I<group_fd> being set to the file descriptor of the group leader.  (A single event on its own is created with I<group_fd> = -1 and is considered to be a group with only 1 member.)  An event group is scheduled onto the CPU as a unit: it will be put onto the CPU only if all of the events in the group can be put onto the CPU.  This means that the values of the member events can be meaningfully compared\\(emadded, divided (to get ratios), and so on\\(emwith each other, since they have counted events for the same set of executed instructions."
1927 msgstr ""
1928
1929 #. type: Plain text
1930 #: build/C/man2/perf_event_open.2:134
1931 msgid "The I<flags> argument is formed by ORing together zero or more of the following values:"
1932 msgstr "I<flags> 引き数には、以下の値の 0 個以上をビット毎の論理和の形で指定する。"
1933
1934 #. type: TP
1935 #: build/C/man2/perf_event_open.2:134
1936 #, no-wrap
1937 msgid "B<PERF_FLAG_FD_CLOEXEC> (since Linux 3.14)"
1938 msgstr "B<PERF_FLAG_FD_CLOEXEC> (Linux 3.14 以降)"
1939
1940 #.  commit a21b0b354d4ac39be691f51c53562e2c24443d9e
1941 #. type: Plain text
1942 #: build/C/man2/perf_event_open.2:151
1943 msgid "This flag enables the close-on-exec flag for the created event file descriptor, so that the file descriptor is automatically closed on B<execve>(2).  Setting the close-on-exec flags at creation time, rather than later with B<fcntl>(2), avoids potential race conditions where the calling thread invokes B<perf_event_open>()  and B<fcntl>(2)  at the same time as another thread calls B<fork>(2)  then B<execve>(2)."
1944 msgstr ""
1945
1946 #. type: TP
1947 #: build/C/man2/perf_event_open.2:151
1948 #, no-wrap
1949 msgid "B<PERF_FLAG_FD_NO_GROUP>"
1950 msgstr "B<PERF_FLAG_FD_NO_GROUP>"
1951
1952 #. type: Plain text
1953 #: build/C/man2/perf_event_open.2:159
1954 msgid "This flag tells the event to ignore the I<group_fd> parameter except for the purpose of setting up output redirection using the B<PERF_FLAG_FD_OUTPUT> flag."
1955 msgstr ""
1956
1957 #. type: TP
1958 #: build/C/man2/perf_event_open.2:159
1959 #, no-wrap
1960 msgid "B<PERF_FLAG_FD_OUTPUT> (broken since Linux 2.6.35)"
1961 msgstr "B<PERF_FLAG_FD_OUTPUT> (Linux 2.6.35 以降では正しく動作しない)"
1962
1963 #. type: Plain text
1964 #: build/C/man2/perf_event_open.2:164
1965 msgid "This flag re-routes the event's sampled output to instead be included in the mmap buffer of the event specified by I<group_fd>."
1966 msgstr ""
1967
1968 #. type: TP
1969 #: build/C/man2/perf_event_open.2:164
1970 #, no-wrap
1971 msgid "B<PERF_FLAG_PID_CGROUP> (since Linux 2.6.39)"
1972 msgstr "B<PERF_FLAG_PID_CGROUP> (Linux 2.6.39 以降)"
1973
1974 #.  commit e5d1367f17ba6a6fed5fd8b74e4d5720923e0c25
1975 #. type: Plain text
1976 #: build/C/man2/perf_event_open.2:188
1977 msgid "This flag activates per-container system-wide monitoring.  A container is an abstraction that isolates a set of resources for finer-grained control (CPUs, memory, etc.).  In this mode, the event is measured only if the thread running on the monitored CPU belongs to the designated container (cgroup).  The cgroup is identified by passing a file descriptor opened on its directory in the cgroupfs filesystem.  For instance, if the cgroup to monitor is called I<test>, then a file descriptor opened on I</dev/cgroup/test> (assuming cgroupfs is mounted on I</dev/cgroup>)  must be passed as the I<pid> parameter.  cgroup monitoring is available only for system-wide events and may therefore require extra permissions."
1978 msgstr ""
1979
1980 #. type: Plain text
1981 #: build/C/man2/perf_event_open.2:193
1982 msgid "The I<perf_event_attr> structure provides detailed configuration information for the event being created."
1983 msgstr ""
1984
1985 #. type: Plain text
1986 #: build/C/man2/perf_event_open.2:200
1987 #, no-wrap
1988 msgid ""
1989 "struct perf_event_attr {\n"
1990 "    __u32 type;         /* Type of event */\n"
1991 "    __u32 size;         /* Size of attribute structure */\n"
1992 "    __u64 config;       /* Type-specific configuration */\n"
1993 msgstr ""
1994 "struct perf_event_attr {\n"
1995 "    __u32 type;         /* Type of event */\n"
1996 "    __u32 size;         /* Size of attribute structure */\n"
1997 "    __u64 config;       /* Type-specific configuration */\n"
1998
1999 #. type: Plain text
2000 #: build/C/man2/perf_event_open.2:205
2001 #, no-wrap
2002 msgid ""
2003 "    union {\n"
2004 "        __u64 sample_period;    /* Period of sampling */\n"
2005 "        __u64 sample_freq;      /* Frequency of sampling */\n"
2006 "    };\n"
2007 msgstr ""
2008 "    union {\n"
2009 "        __u64 sample_period;    /* Period of sampling */\n"
2010 "        __u64 sample_freq;      /* Frequency of sampling */\n"
2011 "    };\n"
2012
2013 #. type: Plain text
2014 #: build/C/man2/perf_event_open.2:208
2015 #, no-wrap
2016 msgid ""
2017 "    __u64 sample_type;  /* Specifies values included in sample */\n"
2018 "    __u64 read_format;  /* Specifies values returned in read */\n"
2019 msgstr ""
2020 "    __u64 sample_type;  /* Specifies values included in sample */\n"
2021 "    __u64 read_format;  /* Specifies values returned in read */\n"
2022
2023 #. type: Plain text
2024 #: build/C/man2/perf_event_open.2:236
2025 #, no-wrap
2026 msgid ""
2027 "    __u64 disabled       : 1,   /* off by default */\n"
2028 "          inherit        : 1,   /* children inherit it */\n"
2029 "          pinned         : 1,   /* must always be on PMU */\n"
2030 "          exclusive      : 1,   /* only group on PMU */\n"
2031 "          exclude_user   : 1,   /* don't count user */\n"
2032 "          exclude_kernel : 1,   /* don't count kernel */\n"
2033 "          exclude_hv     : 1,   /* don't count hypervisor */\n"
2034 "          exclude_idle   : 1,   /* don't count when idle */\n"
2035 "          mmap           : 1,   /* include mmap data */\n"
2036 "          comm           : 1,   /* include comm data */\n"
2037 "          freq           : 1,   /* use freq, not period */\n"
2038 "          inherit_stat   : 1,   /* per task counts */\n"
2039 "          enable_on_exec : 1,   /* next exec enables */\n"
2040 "          task           : 1,   /* trace fork/exit */\n"
2041 "          watermark      : 1,   /* wakeup_watermark */\n"
2042 "          precise_ip     : 2,   /* skid constraint */\n"
2043 "          mmap_data      : 1,   /* non-exec mmap data */\n"
2044 "          sample_id_all  : 1,   /* sample_type all events */\n"
2045 "          exclude_host   : 1,   /* don't count in host */\n"
2046 "          exclude_guest  : 1,   /* don't count in guest */\n"
2047 "          exclude_callchain_kernel : 1,\n"
2048 "                                /* exclude kernel callchains */\n"
2049 "          exclude_callchain_user   : 1,\n"
2050 "                                /* exclude user callchains */\n"
2051 "          mmap2          :  1,  /* include mmap with inode data */\n"
2052 "          comm_exec      :  1,  /* flag comm events that are due to exec */\n"
2053 "          __reserved_1   : 39;\n"
2054 msgstr ""
2055 "    __u64 disabled       : 1,   /* off by default */\n"
2056 "          inherit        : 1,   /* children inherit it */\n"
2057 "          pinned         : 1,   /* must always be on PMU */\n"
2058 "          exclusive      : 1,   /* only group on PMU */\n"
2059 "          exclude_user   : 1,   /* don't count user */\n"
2060 "          exclude_kernel : 1,   /* don't count kernel */\n"
2061 "          exclude_hv     : 1,   /* don't count hypervisor */\n"
2062 "          exclude_idle   : 1,   /* don't count when idle */\n"
2063 "          mmap           : 1,   /* include mmap data */\n"
2064 "          comm           : 1,   /* include comm data */\n"
2065 "          freq           : 1,   /* use freq, not period */\n"
2066 "          inherit_stat   : 1,   /* per task counts */\n"
2067 "          enable_on_exec : 1,   /* next exec enables */\n"
2068 "          task           : 1,   /* trace fork/exit */\n"
2069 "          watermark      : 1,   /* wakeup_watermark */\n"
2070 "          precise_ip     : 2,   /* skid constraint */\n"
2071 "          mmap_data      : 1,   /* non-exec mmap data */\n"
2072 "          sample_id_all  : 1,   /* sample_type all events */\n"
2073 "          exclude_host   : 1,   /* don't count in host */\n"
2074 "          exclude_guest  : 1,   /* don't count in guest */\n"
2075 "          exclude_callchain_kernel : 1,\n"
2076 "                                /* exclude kernel callchains */\n"
2077 "          exclude_callchain_user   : 1,\n"
2078 "                                /* exclude user callchains */\n"
2079 "          mmap2          :  1,  /* include mmap with inode data */\n"
2080 "          comm_exec      :  1,  /* flag comm events that are due to exec */\n"
2081 "          __reserved_1   : 39;\n"
2082
2083 #. type: Plain text
2084 #: build/C/man2/perf_event_open.2:241
2085 #, no-wrap
2086 msgid ""
2087 "    union {\n"
2088 "        __u32 wakeup_events;    /* wakeup every n events */\n"
2089 "        __u32 wakeup_watermark; /* bytes before wakeup */\n"
2090 "    };\n"
2091 msgstr ""
2092 "    union {\n"
2093 "        __u32 wakeup_events;    /* wakeup every n events */\n"
2094 "        __u32 wakeup_watermark; /* bytes before wakeup */\n"
2095 "    };\n"
2096
2097 #. type: Plain text
2098 #: build/C/man2/perf_event_open.2:243
2099 #, no-wrap
2100 msgid "    __u32     bp_type;          /* breakpoint type */\n"
2101 msgstr "    __u32     bp_type;          /* breakpoint type */\n"
2102
2103 #. type: Plain text
2104 #: build/C/man2/perf_event_open.2:248
2105 #, no-wrap
2106 msgid ""
2107 "    union {\n"
2108 "        __u64 bp_addr;          /* breakpoint address */\n"
2109 "        __u64 config1;          /* extension of config */\n"
2110 "    };\n"
2111 msgstr ""
2112 "    union {\n"
2113 "        __u64 bp_addr;          /* breakpoint address */\n"
2114 "        __u64 config1;          /* extension of config */\n"
2115 "    };\n"
2116
2117 #. type: Plain text
2118 #: build/C/man2/perf_event_open.2:258
2119 #, no-wrap
2120 msgid ""
2121 "    union {\n"
2122 "        __u64 bp_len;           /* breakpoint length */\n"
2123 "        __u64 config2;          /* extension of config1 */\n"
2124 "    };\n"
2125 "    __u64 branch_sample_type;   /* enum perf_branch_sample_type */\n"
2126 "    __u64 sample_regs_user;     /* user regs to dump on samples */\n"
2127 "    __u32 sample_stack_user;    /* size of stack to dump on\n"
2128 "                                   samples */\n"
2129 "    __u32 __reserved_2;         /* Align to u64 */\n"
2130 msgstr ""
2131 "    union {\n"
2132 "        __u64 bp_len;           /* breakpoint length */\n"
2133 "        __u64 config2;          /* extension of config1 */\n"
2134 "    };\n"
2135 "    __u64 branch_sample_type;   /* enum perf_branch_sample_type */\n"
2136 "    __u64 sample_regs_user;     /* user regs to dump on samples */\n"
2137 "    __u32 sample_stack_user;    /* size of stack to dump on\n"
2138 "                                   samples */\n"
2139 "    __u32 __reserved_2;         /* Align to u64 */\n"
2140
2141 #. type: Plain text
2142 #: build/C/man2/perf_event_open.2:260
2143 #, no-wrap
2144 msgid "};\n"
2145 msgstr "};\n"
2146
2147 #. type: Plain text
2148 #: build/C/man2/perf_event_open.2:266
2149 msgid "The fields of the I<perf_event_attr> structure are described in more detail below:"
2150 msgstr ""
2151
2152 #. type: TP
2153 #: build/C/man2/perf_event_open.2:266 build/C/man2/perf_event_open.2:1627
2154 #, no-wrap
2155 msgid "I<type>"
2156 msgstr "I<type>"
2157
2158 #. type: Plain text
2159 #: build/C/man2/perf_event_open.2:270
2160 msgid "This field specifies the overall event type.  It has one of the following values:"
2161 msgstr ""
2162
2163 #. type: TP
2164 #: build/C/man2/perf_event_open.2:271
2165 #, no-wrap
2166 msgid "B<PERF_TYPE_HARDWARE>"
2167 msgstr "B<PERF_TYPE_HARDWARE>"
2168
2169 #. type: Plain text
2170 #: build/C/man2/perf_event_open.2:278
2171 msgid "This indicates one of the \"generalized\" hardware events provided by the kernel.  See the I<config> field definition for more details."
2172 msgstr ""
2173
2174 #. type: TP
2175 #: build/C/man2/perf_event_open.2:278
2176 #, no-wrap
2177 msgid "B<PERF_TYPE_SOFTWARE>"
2178 msgstr "B<PERF_TYPE_SOFTWARE>"
2179
2180 #. type: Plain text
2181 #: build/C/man2/perf_event_open.2:282
2182 msgid "This indicates one of the software-defined events provided by the kernel (even if no hardware support is available)."
2183 msgstr ""
2184
2185 #. type: TP
2186 #: build/C/man2/perf_event_open.2:282
2187 #, no-wrap
2188 msgid "B<PERF_TYPE_TRACEPOINT>"
2189 msgstr "B<PERF_TYPE_TRACEPOINT>"
2190
2191 #. type: Plain text
2192 #: build/C/man2/perf_event_open.2:286
2193 msgid "This indicates a tracepoint provided by the kernel tracepoint infrastructure."
2194 msgstr ""
2195
2196 #. type: TP
2197 #: build/C/man2/perf_event_open.2:286
2198 #, no-wrap
2199 msgid "B<PERF_TYPE_HW_CACHE>"
2200 msgstr "B<PERF_TYPE_HW_CACHE>"
2201
2202 #. type: Plain text
2203 #: build/C/man2/perf_event_open.2:292
2204 msgid "This indicates a hardware cache event.  This has a special encoding, described in the I<config> field definition."
2205 msgstr ""
2206
2207 #. type: TP
2208 #: build/C/man2/perf_event_open.2:292
2209 #, no-wrap
2210 msgid "B<PERF_TYPE_RAW>"
2211 msgstr "B<PERF_TYPE_RAW>"
2212
2213 #. type: Plain text
2214 #: build/C/man2/perf_event_open.2:296
2215 msgid "This indicates a \"raw\" implementation-specific event in the I<config> field."
2216 msgstr ""
2217
2218 #. type: TP
2219 #: build/C/man2/perf_event_open.2:296
2220 #, no-wrap
2221 msgid "B<PERF_TYPE_BREAKPOINT> (since Linux 2.6.33)"
2222 msgstr "B<PERF_TYPE_BREAKPOINT> (Linux 2.6.33 以降)"
2223
2224 #.  commit 24f1e32c60c45c89a997c73395b69c8af6f0a84e
2225 #. type: Plain text
2226 #: build/C/man2/perf_event_open.2:302
2227 msgid "This indicates a hardware breakpoint as provided by the CPU.  Breakpoints can be read/write accesses to an address as well as execution of an instruction address."
2228 msgstr ""
2229
2230 #. type: TP
2231 #: build/C/man2/perf_event_open.2:302
2232 #, no-wrap
2233 msgid "dynamic PMU"
2234 msgstr ""
2235
2236 #. type: Plain text
2237 #: build/C/man2/perf_event_open.2:321
2238 msgid "Since Linux 2.6.39, B<perf_event_open>()  can support multiple PMUs.  To enable this, a value exported by the kernel can be used in the I<type> field to indicate which PMU to use.  The value to use can be found in the sysfs filesystem: there is a subdirectory per PMU instance under I</sys/bus/event_source/devices>.  In each subdirectory there is a I<type> file whose content is an integer that can be used in the I<type> field.  For instance, I</sys/bus/event_source/devices/cpu/type> contains the value for the core CPU PMU, which is usually 4."
2239 msgstr ""
2240
2241 #. type: TP
2242 #: build/C/man2/perf_event_open.2:322 build/C/man2/perf_event_open.2:1559
2243 #, no-wrap
2244 msgid "I<size>"
2245 msgstr "I<size>"
2246
2247 #. type: Plain text
2248 #: build/C/man2/perf_event_open.2:331
2249 msgid "The size of the I<perf_event_attr> structure for forward/backward compatibility.  Set this using I<sizeof(struct perf_event_attr)> to allow the kernel to see the struct size at the time of compilation."
2250 msgstr ""
2251
2252 #. type: Plain text
2253 #: build/C/man2/perf_event_open.2:346
2254 msgid "The related define B<PERF_ATTR_SIZE_VER0> is set to 64; this was the size of the first published struct.  B<PERF_ATTR_SIZE_VER1> is 72, corresponding to the addition of breakpoints in Linux 2.6.33.  B<PERF_ATTR_SIZE_VER2> is 80 corresponding to the addition of branch sampling in Linux 3.4.  B<PERF_ATTR_SIZE_VER3> is 96 corresponding to the addition of I<sample_regs_user> and I<sample_stack_user> in Linux 3.7."
2255 msgstr ""
2256
2257 #. type: TP
2258 #: build/C/man2/perf_event_open.2:346
2259 #, no-wrap
2260 msgid "I<config>"
2261 msgstr "I<config>"
2262
2263 #. type: Plain text
2264 #: build/C/man2/perf_event_open.2:357
2265 msgid "This specifies which event you want, in conjunction with the I<type> field.  The I<config1> and I<config2> fields are also taken into account in cases where 64 bits is not enough to fully specify the event.  The encoding of these fields are event dependent."
2266 msgstr ""
2267
2268 #. type: Plain text
2269 #: build/C/man2/perf_event_open.2:368
2270 msgid "There are various ways to set the I<config> field that are dependent on the value of the previously described I<type> field.  What follows are various possible settings for I<config> separated out by I<type>."
2271 msgstr ""
2272
2273 #. type: Plain text
2274 #: build/C/man2/perf_event_open.2:378
2275 msgid "If I<type> is B<PERF_TYPE_HARDWARE>, we are measuring one of the generalized hardware CPU events.  Not all of these are available on all platforms.  Set I<config> to one of the following:"
2276 msgstr ""
2277
2278 #. type: TP
2279 #: build/C/man2/perf_event_open.2:379
2280 #, no-wrap
2281 msgid "B<PERF_COUNT_HW_CPU_CYCLES>"
2282 msgstr "B<PERF_COUNT_HW_CPU_CYCLES>"
2283
2284 #. type: Plain text
2285 #: build/C/man2/perf_event_open.2:383
2286 msgid "Total cycles.  Be wary of what happens during CPU frequency scaling."
2287 msgstr ""
2288
2289 #. type: TP
2290 #: build/C/man2/perf_event_open.2:383
2291 #, no-wrap
2292 msgid "B<PERF_COUNT_HW_INSTRUCTIONS>"
2293 msgstr "B<PERF_COUNT_HW_INSTRUCTIONS>"
2294
2295 #. type: Plain text
2296 #: build/C/man2/perf_event_open.2:388
2297 msgid "Retired instructions.  Be careful, these can be affected by various issues, most notably hardware interrupt counts."
2298 msgstr ""
2299
2300 #. type: TP
2301 #: build/C/man2/perf_event_open.2:388
2302 #, no-wrap
2303 msgid "B<PERF_COUNT_HW_CACHE_REFERENCES>"
2304 msgstr "B<PERF_COUNT_HW_CACHE_REFERENCES>"
2305
2306 #. type: Plain text
2307 #: build/C/man2/perf_event_open.2:395
2308 msgid "Cache accesses.  Usually this indicates Last Level Cache accesses but this may vary depending on your CPU.  This may include prefetches and coherency messages; again this depends on the design of your CPU."
2309 msgstr ""
2310
2311 #. type: TP
2312 #: build/C/man2/perf_event_open.2:395
2313 #, no-wrap
2314 msgid "B<PERF_COUNT_HW_CACHE_MISSES>"
2315 msgstr "B<PERF_COUNT_HW_CACHE_MISSES>"
2316
2317 #. type: Plain text
2318 #: build/C/man2/perf_event_open.2:402
2319 msgid "Cache misses.  Usually this indicates Last Level Cache misses; this is intended to be used in conjunction with the B<PERF_COUNT_HW_CACHE_REFERENCES> event to calculate cache miss rates."
2320 msgstr ""
2321
2322 #. type: TP
2323 #: build/C/man2/perf_event_open.2:402
2324 #, no-wrap
2325 msgid "B<PERF_COUNT_HW_BRANCH_INSTRUCTIONS>"
2326 msgstr "B<PERF_COUNT_HW_BRANCH_INSTRUCTIONS>"
2327
2328 #. type: Plain text
2329 #: build/C/man2/perf_event_open.2:407
2330 msgid "Retired branch instructions.  Prior to Linux 2.6.34, this used the wrong event on AMD processors."
2331 msgstr ""
2332
2333 #. type: TP
2334 #: build/C/man2/perf_event_open.2:407
2335 #, no-wrap
2336 msgid "B<PERF_COUNT_HW_BRANCH_MISSES>"
2337 msgstr "B<PERF_COUNT_HW_BRANCH_MISSES>"
2338
2339 #. type: Plain text
2340 #: build/C/man2/perf_event_open.2:410
2341 msgid "Mispredicted branch instructions."
2342 msgstr ""
2343
2344 #. type: TP
2345 #: build/C/man2/perf_event_open.2:410
2346 #, no-wrap
2347 msgid "B<PERF_COUNT_HW_BUS_CYCLES>"
2348 msgstr "B<PERF_COUNT_HW_BUS_CYCLES>"
2349
2350 #. type: Plain text
2351 #: build/C/man2/perf_event_open.2:413
2352 msgid "Bus cycles, which can be different from total cycles."
2353 msgstr ""
2354
2355 #. type: TP
2356 #: build/C/man2/perf_event_open.2:413
2357 #, no-wrap
2358 msgid "B<PERF_COUNT_HW_STALLED_CYCLES_FRONTEND> (since Linux 3.0)"
2359 msgstr "B<PERF_COUNT_HW_STALLED_CYCLES_FRONTEND> (Linux 3.0 以降)"
2360
2361 #. type: Plain text
2362 #: build/C/man2/perf_event_open.2:416
2363 msgid "Stalled cycles during issue."
2364 msgstr ""
2365
2366 #. type: TP
2367 #: build/C/man2/perf_event_open.2:416
2368 #, no-wrap
2369 msgid "B<PERF_COUNT_HW_STALLED_CYCLES_BACKEND> (since Linux 3.0)"
2370 msgstr "B<PERF_COUNT_HW_STALLED_CYCLES_BACKEND> (Linux 3.0 以降)"
2371
2372 #. type: Plain text
2373 #: build/C/man2/perf_event_open.2:419
2374 msgid "Stalled cycles during retirement."
2375 msgstr ""
2376
2377 #. type: TP
2378 #: build/C/man2/perf_event_open.2:419
2379 #, no-wrap
2380 msgid "B<PERF_COUNT_HW_REF_CPU_CYCLES> (since Linux 3.3)"
2381 msgstr "B<PERF_COUNT_HW_REF_CPU_CYCLES> (Linux 3.3 以降)"
2382
2383 #.  commit c37e17497e01fc0f5d2d6feb5723b210b3ab8890
2384 #. type: Plain text
2385 #: build/C/man2/perf_event_open.2:423
2386 msgid "Total cycles; not affected by CPU frequency scaling."
2387 msgstr ""
2388
2389 #. type: Plain text
2390 #: build/C/man2/perf_event_open.2:433
2391 msgid "If I<type> is B<PERF_TYPE_SOFTWARE>, we are measuring software events provided by the kernel.  Set I<config> to one of the following:"
2392 msgstr ""
2393
2394 #. type: TP
2395 #: build/C/man2/perf_event_open.2:434
2396 #, no-wrap
2397 msgid "B<PERF_COUNT_SW_CPU_CLOCK>"
2398 msgstr "B<PERF_COUNT_SW_CPU_CLOCK>"
2399
2400 #. type: Plain text
2401 #: build/C/man2/perf_event_open.2:437
2402 msgid "This reports the CPU clock, a high-resolution per-CPU timer."
2403 msgstr ""
2404
2405 #. type: TP
2406 #: build/C/man2/perf_event_open.2:437
2407 #, no-wrap
2408 msgid "B<PERF_COUNT_SW_TASK_CLOCK>"
2409 msgstr "B<PERF_COUNT_SW_TASK_CLOCK>"
2410
2411 #. type: Plain text
2412 #: build/C/man2/perf_event_open.2:440
2413 msgid "This reports a clock count specific to the task that is running."
2414 msgstr ""
2415
2416 #. type: TP
2417 #: build/C/man2/perf_event_open.2:440
2418 #, no-wrap
2419 msgid "B<PERF_COUNT_SW_PAGE_FAULTS>"
2420 msgstr "B<PERF_COUNT_SW_PAGE_FAULTS>"
2421
2422 #. type: Plain text
2423 #: build/C/man2/perf_event_open.2:443
2424 msgid "This reports the number of page faults."
2425 msgstr ""
2426
2427 #. type: TP
2428 #: build/C/man2/perf_event_open.2:443
2429 #, no-wrap
2430 msgid "B<PERF_COUNT_SW_CONTEXT_SWITCHES>"
2431 msgstr "B<PERF_COUNT_SW_CONTEXT_SWITCHES>"
2432
2433 #. type: Plain text
2434 #: build/C/man2/perf_event_open.2:448
2435 msgid "This counts context switches.  Until Linux 2.6.34, these were all reported as user-space events, after that they are reported as happening in the kernel."
2436 msgstr ""
2437
2438 #. type: TP
2439 #: build/C/man2/perf_event_open.2:448
2440 #, no-wrap
2441 msgid "B<PERF_COUNT_SW_CPU_MIGRATIONS>"
2442 msgstr "B<PERF_COUNT_SW_CPU_MIGRATIONS>"
2443
2444 #. type: Plain text
2445 #: build/C/man2/perf_event_open.2:452
2446 msgid "This reports the number of times the process has migrated to a new CPU."
2447 msgstr ""
2448
2449 #. type: TP
2450 #: build/C/man2/perf_event_open.2:452
2451 #, no-wrap
2452 msgid "B<PERF_COUNT_SW_PAGE_FAULTS_MIN>"
2453 msgstr "B<PERF_COUNT_SW_PAGE_FAULTS_MIN>"
2454
2455 #. type: Plain text
2456 #: build/C/man2/perf_event_open.2:456
2457 msgid "This counts the number of minor page faults.  These did not require disk I/O to handle."
2458 msgstr ""
2459
2460 #. type: TP
2461 #: build/C/man2/perf_event_open.2:456
2462 #, no-wrap
2463 msgid "B<PERF_COUNT_SW_PAGE_FAULTS_MAJ>"
2464 msgstr "B<PERF_COUNT_SW_PAGE_FAULTS_MAJ>"
2465
2466 #. type: Plain text
2467 #: build/C/man2/perf_event_open.2:460
2468 msgid "This counts the number of major page faults.  These required disk I/O to handle."
2469 msgstr ""
2470
2471 #. type: TP
2472 #: build/C/man2/perf_event_open.2:460
2473 #, no-wrap
2474 msgid "B<PERF_COUNT_SW_ALIGNMENT_FAULTS> (since Linux 2.6.33)"
2475 msgstr "B<PERF_COUNT_SW_ALIGNMENT_FAULTS> (Linux 2.6.33 以降)"
2476
2477 #.  commit f7d7986060b2890fc26db6ab5203efbd33aa2497
2478 #. type: Plain text
2479 #: build/C/man2/perf_event_open.2:467
2480 msgid "This counts the number of alignment faults.  These happen when unaligned memory accesses happen; the kernel can handle these but it reduces performance.  This happens only on some architectures (never on x86)."
2481 msgstr ""
2482
2483 #. type: TP
2484 #: build/C/man2/perf_event_open.2:467
2485 #, no-wrap
2486 msgid "B<PERF_COUNT_SW_EMULATION_FAULTS> (since Linux 2.6.33)"
2487 msgstr "B<PERF_COUNT_SW_EMULATION_FAULTS> (Linux 2.6.33 以降)"
2488
2489 #.  commit f7d7986060b2890fc26db6ab5203efbd33aa2497
2490 #. type: Plain text
2491 #: build/C/man2/perf_event_open.2:474
2492 msgid "This counts the number of emulation faults.  The kernel sometimes traps on unimplemented instructions and emulates them for user space.  This can negatively impact performance."
2493 msgstr ""
2494
2495 #. type: TP
2496 #: build/C/man2/perf_event_open.2:474
2497 #, no-wrap
2498 msgid "B<PERF_COUNT_SW_DUMMY> (since Linux 3.12)"
2499 msgstr "B<PERF_COUNT_SW_DUMMY> (Linux 3.12 以降)"
2500
2501 #.  commit fa0097ee690693006ab1aea6c01ad3c851b65c77
2502 #. type: Plain text
2503 #: build/C/man2/perf_event_open.2:482
2504 msgid "This is a placeholder event that counts nothing.  Informational sample record types such as mmap or comm must be associated with an active event.  This dummy event allows gathering such records without requiring a counting event."
2505 msgstr ""
2506
2507 #. type: Plain text
2508 #: build/C/man2/perf_event_open.2:495
2509 msgid "If I<type> is B<PERF_TYPE_TRACEPOINT>, then we are measuring kernel tracepoints.  The value to use in I<config> can be obtained from under debugfs I<tracing/events/*/*/id> if ftrace is enabled in the kernel."
2510 msgstr ""
2511
2512 #. type: Plain text
2513 #: build/C/man2/perf_event_open.2:506
2514 msgid "If I<type> is B<PERF_TYPE_HW_CACHE>, then we are measuring a hardware CPU cache event.  To calculate the appropriate I<config> value use the following equation:"
2515 msgstr ""
2516
2517 #. type: Plain text
2518 #: build/C/man2/perf_event_open.2:511
2519 #, no-wrap
2520 msgid ""
2521 "    (perf_hw_cache_id) | (perf_hw_cache_op_id E<lt>E<lt> 8) |\n"
2522 "    (perf_hw_cache_op_result_id E<lt>E<lt> 16)\n"
2523 msgstr ""
2524 "    (perf_hw_cache_id) | (perf_hw_cache_op_id E<lt>E<lt> 8) |\n"
2525 "    (perf_hw_cache_op_result_id E<lt>E<lt> 16)\n"
2526
2527 #. type: Plain text
2528 #: build/C/man2/perf_event_open.2:516
2529 msgid "where I<perf_hw_cache_id> is one of:"
2530 msgstr ""
2531
2532 #. type: TP
2533 #: build/C/man2/perf_event_open.2:517
2534 #, no-wrap
2535 msgid "B<PERF_COUNT_HW_CACHE_L1D>"
2536 msgstr "B<PERF_COUNT_HW_CACHE_L1D>"
2537
2538 #. type: Plain text
2539 #: build/C/man2/perf_event_open.2:520
2540 msgid "for measuring Level 1 Data Cache"
2541 msgstr ""
2542
2543 #. type: TP
2544 #: build/C/man2/perf_event_open.2:520
2545 #, no-wrap
2546 msgid "B<PERF_COUNT_HW_CACHE_L1I>"
2547 msgstr "B<PERF_COUNT_HW_CACHE_L1I>"
2548
2549 #. type: Plain text
2550 #: build/C/man2/perf_event_open.2:523
2551 msgid "for measuring Level 1 Instruction Cache"
2552 msgstr ""
2553
2554 #. type: TP
2555 #: build/C/man2/perf_event_open.2:523
2556 #, no-wrap
2557 msgid "B<PERF_COUNT_HW_CACHE_LL>"
2558 msgstr "B<PERF_COUNT_HW_CACHE_LL>"
2559
2560 #. type: Plain text
2561 #: build/C/man2/perf_event_open.2:526
2562 msgid "for measuring Last-Level Cache"
2563 msgstr ""
2564
2565 #. type: TP
2566 #: build/C/man2/perf_event_open.2:526
2567 #, no-wrap
2568 msgid "B<PERF_COUNT_HW_CACHE_DTLB>"
2569 msgstr "B<PERF_COUNT_HW_CACHE_DTLB>"
2570
2571 #. type: Plain text
2572 #: build/C/man2/perf_event_open.2:529
2573 msgid "for measuring the Data TLB"
2574 msgstr ""
2575
2576 #. type: TP
2577 #: build/C/man2/perf_event_open.2:529
2578 #, no-wrap
2579 msgid "B<PERF_COUNT_HW_CACHE_ITLB>"
2580 msgstr "B<PERF_COUNT_HW_CACHE_ITLB>"
2581
2582 #. type: Plain text
2583 #: build/C/man2/perf_event_open.2:532
2584 msgid "for measuring the Instruction TLB"
2585 msgstr ""
2586
2587 #. type: TP
2588 #: build/C/man2/perf_event_open.2:532
2589 #, no-wrap
2590 msgid "B<PERF_COUNT_HW_CACHE_BPU>"
2591 msgstr "B<PERF_COUNT_HW_CACHE_BPU>"
2592
2593 #. type: Plain text
2594 #: build/C/man2/perf_event_open.2:535
2595 msgid "for measuring the branch prediction unit"
2596 msgstr ""
2597
2598 #. type: TP
2599 #: build/C/man2/perf_event_open.2:535
2600 #, no-wrap
2601 msgid "B<PERF_COUNT_HW_CACHE_NODE> (since Linux 3.1)"
2602 msgstr "B<PERF_COUNT_HW_CACHE_NODE> (Linux 3.1 以降)"
2603
2604 #.  commit 89d6c0b5bdbb1927775584dcf532d98b3efe1477
2605 #. type: Plain text
2606 #: build/C/man2/perf_event_open.2:539
2607 msgid "for measuring local memory accesses"
2608 msgstr ""
2609
2610 #. type: Plain text
2611 #: build/C/man2/perf_event_open.2:544
2612 msgid "and I<perf_hw_cache_op_id> is one of"
2613 msgstr ""
2614
2615 #. type: TP
2616 #: build/C/man2/perf_event_open.2:545
2617 #, no-wrap
2618 msgid "B<PERF_COUNT_HW_CACHE_OP_READ>"
2619 msgstr "B<PERF_COUNT_HW_CACHE_OP_READ>"
2620
2621 #. type: Plain text
2622 #: build/C/man2/perf_event_open.2:548
2623 msgid "for read accesses"
2624 msgstr ""
2625
2626 #. type: TP
2627 #: build/C/man2/perf_event_open.2:548
2628 #, no-wrap
2629 msgid "B<PERF_COUNT_HW_CACHE_OP_WRITE>"
2630 msgstr "B<PERF_COUNT_HW_CACHE_OP_WRITE>"
2631
2632 #. type: Plain text
2633 #: build/C/man2/perf_event_open.2:551
2634 msgid "for write accesses"
2635 msgstr ""
2636
2637 #. type: TP
2638 #: build/C/man2/perf_event_open.2:551
2639 #, no-wrap
2640 msgid "B<PERF_COUNT_HW_CACHE_OP_PREFETCH>"
2641 msgstr "B<PERF_COUNT_HW_CACHE_OP_PREFETCH>"
2642
2643 #. type: Plain text
2644 #: build/C/man2/perf_event_open.2:554
2645 msgid "for prefetch accesses"
2646 msgstr ""
2647
2648 #. type: Plain text
2649 #: build/C/man2/perf_event_open.2:559
2650 msgid "and I<perf_hw_cache_op_result_id> is one of"
2651 msgstr ""
2652
2653 #. type: TP
2654 #: build/C/man2/perf_event_open.2:560
2655 #, no-wrap
2656 msgid "B<PERF_COUNT_HW_CACHE_RESULT_ACCESS>"
2657 msgstr "B<PERF_COUNT_HW_CACHE_RESULT_ACCESS>"
2658
2659 #. type: Plain text
2660 #: build/C/man2/perf_event_open.2:563
2661 msgid "to measure accesses"
2662 msgstr ""
2663
2664 #. type: TP
2665 #: build/C/man2/perf_event_open.2:563
2666 #, no-wrap
2667 msgid "B<PERF_COUNT_HW_CACHE_RESULT_MISS>"
2668 msgstr "B<PERF_COUNT_HW_CACHE_RESULT_MISS>"
2669
2670 #. type: Plain text
2671 #: build/C/man2/perf_event_open.2:566
2672 msgid "to measure misses"
2673 msgstr ""
2674
2675 #. type: Plain text
2676 #: build/C/man2/perf_event_open.2:584
2677 msgid "If I<type> is B<PERF_TYPE_RAW>, then a custom \"raw\" I<config> value is needed.  Most CPUs support events that are not covered by the \"generalized\" events.  These are implementation defined; see your CPU manual (for example the Intel Volume 3B documentation or the AMD BIOS and Kernel Developer Guide).  The libpfm4 library can be used to translate from the name in the architectural manuals to the raw hex value B<perf_event_open>()  expects in this field."
2678 msgstr ""
2679
2680 #. type: Plain text
2681 #: build/C/man2/perf_event_open.2:593
2682 msgid "If I<type> is B<PERF_TYPE_BREAKPOINT>, then leave I<config> set to zero.  Its parameters are set in other places."
2683 msgstr ""
2684
2685 #. type: TP
2686 #: build/C/man2/perf_event_open.2:594
2687 #, no-wrap
2688 msgid "I<sample_period>, I<sample_freq>"
2689 msgstr "I<sample_period>, I<sample_freq>"
2690
2691 #. type: Plain text
2692 #: build/C/man2/perf_event_open.2:606
2693 msgid "A \"sampling\" event is one that generates an overflow notification every N events, where N is given by I<sample_period>.  A sampling event has I<sample_period> E<gt> 0.  When an overflow occurs, requested data is recorded in the mmap buffer.  The I<sample_type> field controls what data is recorded on each overflow."
2694 msgstr ""
2695
2696 #. type: Plain text
2697 #: build/C/man2/perf_event_open.2:616
2698 msgid "I<sample_freq> can be used if you wish to use frequency rather than period.  In this case, you set the I<freq> flag.  The kernel will adjust the sampling period to try and achieve the desired rate.  The rate of adjustment is a timer tick."
2699 msgstr ""
2700
2701 #. type: TP
2702 #: build/C/man2/perf_event_open.2:616
2703 #, no-wrap
2704 msgid "I<sample_type>"
2705 msgstr "I<sample_type>"
2706
2707 #. type: Plain text
2708 #: build/C/man2/perf_event_open.2:628
2709 msgid "The various bits in this field specify which values to include in the sample.  They will be recorded in a ring-buffer, which is available to user space using B<mmap>(2).  The order in which the values are saved in the sample are documented in the MMAP Layout subsection below; it is not the I<enum perf_event_sample_format> order."
2710 msgstr ""
2711
2712 #. type: TP
2713 #: build/C/man2/perf_event_open.2:629
2714 #, no-wrap
2715 msgid "B<PERF_SAMPLE_IP>"
2716 msgstr "B<PERF_SAMPLE_IP>"
2717
2718 #. type: Plain text
2719 #: build/C/man2/perf_event_open.2:632
2720 msgid "Records instruction pointer."
2721 msgstr ""
2722
2723 #. type: TP
2724 #: build/C/man2/perf_event_open.2:632
2725 #, no-wrap
2726 msgid "B<PERF_SAMPLE_TID>"
2727 msgstr "B<PERF_SAMPLE_TID>"
2728
2729 #. type: Plain text
2730 #: build/C/man2/perf_event_open.2:635
2731 msgid "Records the process and thread IDs."
2732 msgstr ""
2733
2734 #. type: TP
2735 #: build/C/man2/perf_event_open.2:635
2736 #, no-wrap
2737 msgid "B<PERF_SAMPLE_TIME>"
2738 msgstr "B<PERF_SAMPLE_TIME>"
2739
2740 #. type: Plain text
2741 #: build/C/man2/perf_event_open.2:638
2742 msgid "Records a timestamp."
2743 msgstr ""
2744
2745 #. type: TP
2746 #: build/C/man2/perf_event_open.2:638
2747 #, no-wrap
2748 msgid "B<PERF_SAMPLE_ADDR>"
2749 msgstr "B<PERF_SAMPLE_ADDR>"
2750
2751 #. type: Plain text
2752 #: build/C/man2/perf_event_open.2:641
2753 msgid "Records an address, if applicable."
2754 msgstr ""
2755
2756 #. type: TP
2757 #: build/C/man2/perf_event_open.2:641
2758 #, no-wrap
2759 msgid "B<PERF_SAMPLE_READ>"
2760 msgstr "B<PERF_SAMPLE_READ>"
2761
2762 #. type: Plain text
2763 #: build/C/man2/perf_event_open.2:644
2764 msgid "Record counter values for all events in a group, not just the group leader."
2765 msgstr ""
2766
2767 #. type: TP
2768 #: build/C/man2/perf_event_open.2:644
2769 #, no-wrap
2770 msgid "B<PERF_SAMPLE_CALLCHAIN>"
2771 msgstr "B<PERF_SAMPLE_CALLCHAIN>"
2772
2773 #. type: Plain text
2774 #: build/C/man2/perf_event_open.2:647
2775 msgid "Records the callchain (stack backtrace)."
2776 msgstr ""
2777
2778 #. type: TP
2779 #: build/C/man2/perf_event_open.2:647
2780 #, no-wrap
2781 msgid "B<PERF_SAMPLE_ID>"
2782 msgstr "B<PERF_SAMPLE_ID>"
2783
2784 #. type: Plain text
2785 #: build/C/man2/perf_event_open.2:650
2786 msgid "Records a unique ID for the opened event's group leader."
2787 msgstr ""
2788
2789 #. type: TP
2790 #: build/C/man2/perf_event_open.2:650
2791 #, no-wrap
2792 msgid "B<PERF_SAMPLE_CPU>"
2793 msgstr "B<PERF_SAMPLE_CPU>"
2794
2795 #. type: Plain text
2796 #: build/C/man2/perf_event_open.2:653
2797 msgid "Records CPU number."
2798 msgstr ""
2799
2800 #. type: TP
2801 #: build/C/man2/perf_event_open.2:653
2802 #, no-wrap
2803 msgid "B<PERF_SAMPLE_PERIOD>"
2804 msgstr "B<PERF_SAMPLE_PERIOD>"
2805
2806 #. type: Plain text
2807 #: build/C/man2/perf_event_open.2:656
2808 msgid "Records the current sampling period."
2809 msgstr ""
2810
2811 #. type: TP
2812 #: build/C/man2/perf_event_open.2:656
2813 #, no-wrap
2814 msgid "B<PERF_SAMPLE_STREAM_ID>"
2815 msgstr "B<PERF_SAMPLE_STREAM_ID>"
2816
2817 #. type: Plain text
2818 #: build/C/man2/perf_event_open.2:664
2819 msgid "Records a unique ID for the opened event.  Unlike B<PERF_SAMPLE_ID> the actual ID is returned, not the group leader.  This ID is the same as the one returned by B<PERF_FORMAT_ID>."
2820 msgstr ""
2821
2822 #. type: TP
2823 #: build/C/man2/perf_event_open.2:664
2824 #, no-wrap
2825 msgid "B<PERF_SAMPLE_RAW>"
2826 msgstr "B<PERF_SAMPLE_RAW>"
2827
2828 #. type: Plain text
2829 #: build/C/man2/perf_event_open.2:668
2830 msgid "Records additional data, if applicable.  Usually returned by tracepoint events."
2831 msgstr ""
2832
2833 #. type: TP
2834 #: build/C/man2/perf_event_open.2:668
2835 #, no-wrap
2836 msgid "B<PERF_SAMPLE_BRANCH_STACK> (since Linux 3.4)"
2837 msgstr "B<PERF_SAMPLE_BRANCH_STACK> (Linux 3.4 以降)"
2838
2839 #.  commit bce38cd53e5ddba9cb6d708c4ef3d04a4016ec7e
2840 #. type: Plain text
2841 #: build/C/man2/perf_event_open.2:674
2842 msgid "This provides a record of recent branches, as provided by CPU branch sampling hardware (such as Intel Last Branch Record).  Not all hardware supports this feature."
2843 msgstr ""
2844
2845 #. type: Plain text
2846 #: build/C/man2/perf_event_open.2:678
2847 msgid "See the I<branch_sample_type> field for how to filter which branches are reported."
2848 msgstr ""
2849
2850 #. type: TP
2851 #: build/C/man2/perf_event_open.2:678
2852 #, no-wrap
2853 msgid "B<PERF_SAMPLE_REGS_USER> (since Linux 3.7)"
2854 msgstr "B<PERF_SAMPLE_REGS_USER> (Linux 3.7 以降)"
2855
2856 #.  commit 4018994f3d8785275ef0e7391b75c3462c029e56
2857 #. type: Plain text
2858 #: build/C/man2/perf_event_open.2:683
2859 msgid "Records the current user-level CPU register state (the values in the process before the kernel was called)."
2860 msgstr ""
2861
2862 #. type: TP
2863 #: build/C/man2/perf_event_open.2:683
2864 #, no-wrap
2865 msgid "B<PERF_SAMPLE_STACK_USER> (since Linux 3.7)"
2866 msgstr "B<PERF_SAMPLE_STACK_USER> (Linux 3.7 以降)"
2867
2868 #.  commit c5ebcedb566ef17bda7b02686e0d658a7bb42ee7
2869 #. type: Plain text
2870 #: build/C/man2/perf_event_open.2:687
2871 msgid "Records the user level stack, allowing stack unwinding."
2872 msgstr ""
2873
2874 #. type: TP
2875 #: build/C/man2/perf_event_open.2:687
2876 #, no-wrap
2877 msgid "B<PERF_SAMPLE_WEIGHT> (since Linux 3.10)"
2878 msgstr "B<PERF_SAMPLE_WEIGHT> (Linux 3.10 以降)"
2879
2880 #.  commit c3feedf2aaf9ac8bad6f19f5d21e4ee0b4b87e9c
2881 #. type: Plain text
2882 #: build/C/man2/perf_event_open.2:694
2883 msgid "Records a hardware provided weight value that expresses how costly the sampled event was.  This allows the hardware to highlight expensive events in a profile."
2884 msgstr ""
2885
2886 #. type: TP
2887 #: build/C/man2/perf_event_open.2:694
2888 #, no-wrap
2889 msgid "B<PERF_SAMPLE_DATA_SRC> (since Linux 3.10)"
2890 msgstr "B<PERF_SAMPLE_DATA_SRC> (Linux 3.10 以降)"
2891
2892 #.  commit d6be9ad6c960f43800a6f118932bc8a5a4eadcd1
2893 #. type: Plain text
2894 #: build/C/man2/perf_event_open.2:701
2895 msgid "Records the data source: where in the memory hierarchy the data associated with the sampled instruction came from.  This is only available if the underlying hardware supports this feature."
2896 msgstr ""
2897
2898 #. type: TP
2899 #: build/C/man2/perf_event_open.2:701
2900 #, no-wrap
2901 msgid "B<PERF_SAMPLE_IDENTIFIER> (since Linux 3.12)"
2902 msgstr "B<PERF_SAMPLE_IDENTIFIER> (Linux 3.12 以降)"
2903
2904 #.  commit ff3d527cebc1fa3707c617bfe9e74f53fcfb0955
2905 #. type: Plain text
2906 #: build/C/man2/perf_event_open.2:709
2907 msgid "Places the B<SAMPLE_ID> value in a fixed position in the record, either at the beginning (for sample events) or at the end (if a non-sample event)."
2908 msgstr ""
2909
2910 #. type: Plain text
2911 #: build/C/man2/perf_event_open.2:721
2912 msgid "This was necessary because a sample stream may have records from various different event sources with different I<sample_type> settings.  Parsing the event stream properly was not possible because the format of the record was needed to find B<SAMPLE_ID>, but the format could not be found without knowing what event the sample belonged to (causing a circular dependency)."
2913 msgstr ""
2914
2915 #. type: Plain text
2916 #: build/C/man2/perf_event_open.2:731
2917 msgid "The B<PERF_SAMPLE_IDENTIFIER> setting makes the event stream always parsable by putting B<SAMPLE_ID> in a fixed location, even though it means having duplicate B<SAMPLE_ID> values in records."
2918 msgstr ""
2919
2920 #. type: TP
2921 #: build/C/man2/perf_event_open.2:731
2922 #, no-wrap
2923 msgid "B<PERF_SAMPLE_TRANSACTION> (since Linux 3.13)"
2924 msgstr "B<PERF_SAMPLE_TRANSACTION> (Linux 3.13 以降)"
2925
2926 #.  commit fdfbbd07e91f8fe387140776f3fd94605f0c89e5
2927 #. type: Plain text
2928 #: build/C/man2/perf_event_open.2:736
2929 msgid "Records reasons for transactional memory abort events (for example, from Intel TSX transactional memory support)."
2930 msgstr ""
2931
2932 #. type: Plain text
2933 #: build/C/man2/perf_event_open.2:744
2934 msgid "The I<precise_ip> setting must be greater than 0 and a transactional memory abort event must be measured or no values will be recorded.  Also note that some perf_event measurements, such as sampled cycle counting, may cause extraneous aborts (by causing an interrupt during a transaction)."
2935 msgstr ""
2936
2937 #. type: TP
2938 #: build/C/man2/perf_event_open.2:745
2939 #, no-wrap
2940 msgid "I<read_format>"
2941 msgstr "I<read_format>"
2942
2943 #. type: Plain text
2944 #: build/C/man2/perf_event_open.2:752
2945 msgid "This field specifies the format of the data returned by B<read>(2)  on a B<perf_event_open>()  file descriptor."
2946 msgstr ""
2947
2948 #. type: TP
2949 #: build/C/man2/perf_event_open.2:753
2950 #, no-wrap
2951 msgid "B<PERF_FORMAT_TOTAL_TIME_ENABLED>"
2952 msgstr "B<PERF_FORMAT_TOTAL_TIME_ENABLED>"
2953
2954 #. type: Plain text
2955 #: build/C/man2/perf_event_open.2:760
2956 msgid "Adds the 64-bit I<time_enabled> field.  This can be used to calculate estimated totals if the PMU is overcommitted and multiplexing is happening."
2957 msgstr ""
2958
2959 #. type: TP
2960 #: build/C/man2/perf_event_open.2:760
2961 #, no-wrap
2962 msgid "B<PERF_FORMAT_TOTAL_TIME_RUNNING>"
2963 msgstr "B<PERF_FORMAT_TOTAL_TIME_RUNNING>"
2964
2965 #. type: Plain text
2966 #: build/C/man2/perf_event_open.2:767
2967 msgid "Adds the 64-bit I<time_running> field.  This can be used to calculate estimated totals if the PMU is overcommitted and multiplexing is happening."
2968 msgstr ""
2969
2970 #. type: TP
2971 #: build/C/man2/perf_event_open.2:767
2972 #, no-wrap
2973 msgid "B<PERF_FORMAT_ID>"
2974 msgstr "B<PERF_FORMAT_ID>"
2975
2976 #. type: Plain text
2977 #: build/C/man2/perf_event_open.2:770
2978 msgid "Adds a 64-bit unique value that corresponds to the event group."
2979 msgstr ""
2980
2981 #. type: TP
2982 #: build/C/man2/perf_event_open.2:770
2983 #, no-wrap
2984 msgid "B<PERF_FORMAT_GROUP>"
2985 msgstr "B<PERF_FORMAT_GROUP>"
2986
2987 #. type: Plain text
2988 #: build/C/man2/perf_event_open.2:773
2989 msgid "Allows all counter values in an event group to be read with one read."
2990 msgstr ""
2991
2992 #. type: TP
2993 #: build/C/man2/perf_event_open.2:774
2994 #, no-wrap
2995 msgid "I<disabled>"
2996 msgstr "I<disabled>"
2997
2998 #. type: Plain text
2999 #: build/C/man2/perf_event_open.2:784
3000 msgid "The I<disabled> bit specifies whether the counter starts out disabled or enabled.  If disabled, the event can later be enabled by B<ioctl>(2), B<prctl>(2), or I<enable_on_exec>."
3001 msgstr ""
3002
3003 #. type: Plain text
3004 #: build/C/man2/perf_event_open.2:795
3005 msgid "When creating an event group, typically the group leader is initialized with I<disabled> set to 1 and any child events are initialized with I<disabled> set to 0.  Despite I<disabled> being 0, the child events will not start until the group leader is enabled."
3006 msgstr ""
3007
3008 #. type: TP
3009 #: build/C/man2/perf_event_open.2:795
3010 #, no-wrap
3011 msgid "I<inherit>"
3012 msgstr "I<inherit>"
3013
3014 #. type: Plain text
3015 #: build/C/man2/perf_event_open.2:804
3016 msgid "The I<inherit> bit specifies that this counter should count events of child tasks as well as the task specified.  This applies only to new children, not to any existing children at the time the counter is created (nor to any new children of existing children)."
3017 msgstr ""
3018
3019 #. type: Plain text
3020 #: build/C/man2/perf_event_open.2:809
3021 msgid "Inherit does not work for some combinations of I<read_format>s, such as B<PERF_FORMAT_GROUP>."
3022 msgstr ""
3023
3024 #. type: TP
3025 #: build/C/man2/perf_event_open.2:809
3026 #, no-wrap
3027 msgid "I<pinned>"
3028 msgstr "I<pinned>"
3029
3030 #. type: Plain text
3031 #: build/C/man2/perf_event_open.2:822
3032 msgid "The I<pinned> bit specifies that the counter should always be on the CPU if at all possible.  It applies only to hardware counters and only to group leaders.  If a pinned counter cannot be put onto the CPU (e.g., because there are not enough hardware counters or because of a conflict with some other event), then the counter goes into an 'error' state, where reads return end-of-file (i.e., B<read>(2)  returns 0) until the counter is subsequently enabled or disabled."
3033 msgstr ""
3034
3035 #. type: TP
3036 #: build/C/man2/perf_event_open.2:822
3037 #, no-wrap
3038 msgid "I<exclusive>"
3039 msgstr "I<exclusive>"
3040
3041 #. type: Plain text
3042 #: build/C/man2/perf_event_open.2:831
3043 msgid "The I<exclusive> bit specifies that when this counter's group is on the CPU, it should be the only group using the CPU's counters.  In the future this may allow monitoring programs to support PMU features that need to run alone so that they do not disrupt other hardware counters."
3044 msgstr ""
3045
3046 #. type: Plain text
3047 #: build/C/man2/perf_event_open.2:838
3048 msgid "Note that many unexpected situations may prevent events with the I<exclusive> bit set from ever running.  This includes any users running a system-wide measurement as well as any kernel use of the performance counters (including the commonly enabled NMI Watchdog Timer interface)."
3049 msgstr ""
3050
3051 #. type: TP
3052 #: build/C/man2/perf_event_open.2:838
3053 #, no-wrap
3054 msgid "I<exclude_user>"
3055 msgstr "I<exclude_user>"
3056
3057 #. type: Plain text
3058 #: build/C/man2/perf_event_open.2:841
3059 msgid "If this bit is set, the count excludes events that happen in user space."
3060 msgstr ""
3061
3062 #. type: TP
3063 #: build/C/man2/perf_event_open.2:841
3064 #, no-wrap
3065 msgid "I<exclude_kernel>"
3066 msgstr "I<exclude_kernel>"
3067
3068 #. type: Plain text
3069 #: build/C/man2/perf_event_open.2:844
3070 msgid "If this bit is set, the count excludes events that happen in kernel-space."
3071 msgstr ""
3072
3073 #. type: TP
3074 #: build/C/man2/perf_event_open.2:844
3075 #, no-wrap
3076 msgid "I<exclude_hv>"
3077 msgstr "I<exclude_hv>"
3078
3079 #. type: Plain text
3080 #: build/C/man2/perf_event_open.2:852
3081 msgid "If this bit is set, the count excludes events that happen in the hypervisor.  This is mainly for PMUs that have built-in support for handling this (such as POWER).  Extra support is needed for handling hypervisor measurements on most machines."
3082 msgstr ""
3083
3084 #. type: TP
3085 #: build/C/man2/perf_event_open.2:852
3086 #, no-wrap
3087 msgid "I<exclude_idle>"
3088 msgstr "I<exclude_idle>"
3089
3090 #. type: Plain text
3091 #: build/C/man2/perf_event_open.2:855
3092 msgid "If set, don't count when the CPU is idle."
3093 msgstr ""
3094
3095 #. type: TP
3096 #: build/C/man2/perf_event_open.2:855
3097 #, no-wrap
3098 msgid "I<mmap>"
3099 msgstr "I<mmap>"
3100
3101 #. type: Plain text
3102 #: build/C/man2/perf_event_open.2:869
3103 msgid "The I<mmap> bit enables generation of B<PERF_RECORD_MMAP> samples for every B<mmap>(2)  call that has B<PROT_EXEC> set.  This allows tools to notice new executable code being mapped into a program (dynamic shared libraries for example)  so that addresses can be mapped back to the original code."
3104 msgstr ""
3105
3106 #. type: TP
3107 #: build/C/man2/perf_event_open.2:869 build/C/man2/perf_event_open.2:1719
3108 #, no-wrap
3109 msgid "I<comm>"
3110 msgstr "I<comm>"
3111
3112 #. type: Plain text
3113 #: build/C/man2/perf_event_open.2:887
3114 msgid "The I<comm> bit enables tracking of process command name as modified by the B<exec>(2)  and B<prctl>(PR_SET_NAME)  system calls as well as writing to I</proc/self/comm>.  If the I<comm_exec> flag is also successfully set (possible since Linux 3.16), then the misc flag B<PERF_RECORD_MISC_COMM_EXEC> can be used to differentiate the B<exec>(2)  case from the others."
3115 msgstr ""
3116
3117 #. type: TP
3118 #: build/C/man2/perf_event_open.2:887
3119 #, no-wrap
3120 msgid "I<freq>"
3121 msgstr "I<freq>"
3122
3123 #. type: Plain text
3124 #: build/C/man2/perf_event_open.2:894
3125 msgid "If this bit is set, then I<sample_frequency> not I<sample_period> is used when setting up the sampling interval."
3126 msgstr ""
3127
3128 #. type: TP
3129 #: build/C/man2/perf_event_open.2:894
3130 #, no-wrap
3131 msgid "I<inherit_stat>"
3132 msgstr "I<inherit_stat>"
3133
3134 #. type: Plain text
3135 #: build/C/man2/perf_event_open.2:901
3136 msgid "This bit enables saving of event counts on context switch for inherited tasks.  This is meaningful only if the I<inherit> field is set."
3137 msgstr ""
3138
3139 #. type: TP
3140 #: build/C/man2/perf_event_open.2:901
3141 #, no-wrap
3142 msgid "I<enable_on_exec>"
3143 msgstr "I<enable_on_exec>"
3144
3145 #. type: Plain text
3146 #: build/C/man2/perf_event_open.2:906
3147 msgid "If this bit is set, a counter is automatically enabled after a call to B<exec>(2)."
3148 msgstr ""
3149
3150 #. type: TP
3151 #: build/C/man2/perf_event_open.2:906
3152 #, no-wrap
3153 msgid "I<task>"
3154 msgstr "I<task>"
3155
3156 #. type: Plain text
3157 #: build/C/man2/perf_event_open.2:910
3158 msgid "If this bit is set, then fork/exit notifications are included in the ring buffer."
3159 msgstr ""
3160
3161 #. type: TP
3162 #: build/C/man2/perf_event_open.2:910
3163 #, no-wrap
3164 msgid "I<watermark>"
3165 msgstr "I<watermark>"
3166
3167 #. type: Plain text
3168 #: build/C/man2/perf_event_open.2:918
3169 msgid "If set, have an overflow notification happen when we cross the I<wakeup_watermark> boundary.  Otherwise, overflow notifications happen after I<wakeup_events> samples."
3170 msgstr ""
3171
3172 #. type: TP
3173 #: build/C/man2/perf_event_open.2:918
3174 #, no-wrap
3175 msgid "I<precise_ip> (since Linux 2.6.35)"
3176 msgstr "I<precise_ip> (Linux 2.6.35 以降)"
3177
3178 #. type: Plain text
3179 #: build/C/man2/perf_event_open.2:928
3180 msgid "This controls the amount of skid.  Skid is how many instructions execute between an event of interest happening and the kernel being able to stop and record the event.  Smaller skid is better and allows more accurate reporting of which events correspond to which instructions, but hardware is often limited with how small this can be."
3181 msgstr ""
3182
3183 #. type: Plain text
3184 #: build/C/man2/perf_event_open.2:930
3185 msgid "The values of this are the following:"
3186 msgstr ""
3187
3188 #. type: TP
3189 #: build/C/man2/perf_event_open.2:931
3190 #, no-wrap
3191 msgid "0 -"
3192 msgstr "0 -"
3193
3194 #. type: Plain text
3195 #: build/C/man2/perf_event_open.2:935
3196 msgid "B<SAMPLE_IP> can have arbitrary skid."
3197 msgstr ""
3198
3199 #. type: TP
3200 #: build/C/man2/perf_event_open.2:935
3201 #, no-wrap
3202 msgid "1 -"
3203 msgstr "1 -"
3204
3205 #. type: Plain text
3206 #: build/C/man2/perf_event_open.2:939
3207 msgid "B<SAMPLE_IP> must have constant skid."
3208 msgstr ""
3209
3210 #. type: TP
3211 #: build/C/man2/perf_event_open.2:939
3212 #, no-wrap
3213 msgid "2 -"
3214 msgstr "2 -"
3215
3216 #. type: Plain text
3217 #: build/C/man2/perf_event_open.2:943
3218 msgid "B<SAMPLE_IP> requested to have 0 skid."
3219 msgstr ""
3220
3221 #. type: TP
3222 #: build/C/man2/perf_event_open.2:943
3223 #, no-wrap
3224 msgid "3 -"
3225 msgstr "3 -"
3226
3227 #. type: Plain text
3228 #: build/C/man2/perf_event_open.2:949
3229 msgid "B<SAMPLE_IP> must have 0 skid.  See also B<PERF_RECORD_MISC_EXACT_IP>."
3230 msgstr ""
3231
3232 #. type: TP
3233 #: build/C/man2/perf_event_open.2:950
3234 #, no-wrap
3235 msgid "I<mmap_data> (since Linux 2.6.36)"
3236 msgstr "I<mmap_data> (Linux 2.6.36 以降)"
3237
3238 #. type: Plain text
3239 #: build/C/man2/perf_event_open.2:962
3240 msgid "The counterpart of the I<mmap> field.  This enables generation of B<PERF_RECORD_MMAP> samples for B<mmap>(2)  calls that do not have B<PROT_EXEC> set (for example data and SysV shared memory)."
3241 msgstr ""
3242
3243 #. type: TP
3244 #: build/C/man2/perf_event_open.2:962
3245 #, no-wrap
3246 msgid "I<sample_id_all> (since Linux 2.6.38)"
3247 msgstr "I<sample_id_all> (Linux 2.6.38 以降)"
3248
3249 #. type: Plain text
3250 #: build/C/man2/perf_event_open.2:970
3251 msgid "If set, then TID, TIME, ID, STREAM_ID, and CPU can additionally be included in non-B<PERF_RECORD_SAMPLE>s if the corresponding I<sample_type> is selected."
3252 msgstr ""
3253
3254 #. type: Plain text
3255 #: build/C/man2/perf_event_open.2:978
3256 msgid "If B<PERF_SAMPLE_IDENTIFIER> is specified, then an additional ID value is included as the last value to ease parsing the record stream.  This may lead to the I<id> value appearing twice."
3257 msgstr ""
3258
3259 #. type: Plain text
3260 #: build/C/man2/perf_event_open.2:980
3261 msgid "The layout is described by this pseudo-structure:"
3262 msgstr ""
3263
3264 #. type: Plain text
3265 #: build/C/man2/perf_event_open.2:990
3266 #, no-wrap
3267 msgid ""
3268 "struct sample_id {\n"
3269 "    { u32 pid, tid; } /* if PERF_SAMPLE_TID set        */\n"
3270 "    { u64 time;     } /* if PERF_SAMPLE_TIME set       */\n"
3271 "    { u64 id;       } /* if PERF_SAMPLE_ID set         */\n"
3272 "    { u64 stream_id;} /* if PERF_SAMPLE_STREAM_ID set  */\n"
3273 "    { u32 cpu, res; } /* if PERF_SAMPLE_CPU set        */\n"
3274 "    { u64 id;       } /* if PERF_SAMPLE_IDENTIFIER set */\n"
3275 "};\n"
3276 msgstr ""
3277 "struct sample_id {\n"
3278 "    { u32 pid, tid; } /* if PERF_SAMPLE_TID set        */\n"
3279 "    { u64 time;     } /* if PERF_SAMPLE_TIME set       */\n"
3280 "    { u64 id;       } /* if PERF_SAMPLE_ID set         */\n"
3281 "    { u64 stream_id;} /* if PERF_SAMPLE_STREAM_ID set  */\n"
3282 "    { u32 cpu, res; } /* if PERF_SAMPLE_CPU set        */\n"
3283 "    { u64 id;       } /* if PERF_SAMPLE_IDENTIFIER set */\n"
3284 "};\n"
3285
3286 #. type: TP
3287 #: build/C/man2/perf_event_open.2:991
3288 #, no-wrap
3289 msgid "I<exclude_host> (since Linux 3.2)"
3290 msgstr "I<exclude_host> (Linux 3.2 以降)"
3291
3292 #. type: Plain text
3293 #: build/C/man2/perf_event_open.2:994
3294 msgid "Do not measure time spent in VM host."
3295 msgstr ""
3296
3297 #. type: TP
3298 #: build/C/man2/perf_event_open.2:994
3299 #, no-wrap
3300 msgid "I<exclude_guest> (since Linux 3.2)"
3301 msgstr "I<exclude_guest> (Linux 3.2 以降)"
3302
3303 #. type: Plain text
3304 #: build/C/man2/perf_event_open.2:997
3305 msgid "Do not measure time spent in VM guest."
3306 msgstr ""
3307
3308 #. type: TP
3309 #: build/C/man2/perf_event_open.2:997
3310 #, no-wrap
3311 msgid "I<exclude_callchain_kernel> (since Linux 3.7)"
3312 msgstr "I<exclude_callchain_kernel> (Linux 3.7 以降)"
3313
3314 #. type: Plain text
3315 #: build/C/man2/perf_event_open.2:1000
3316 msgid "Do not include kernel callchains."
3317 msgstr ""
3318
3319 #. type: TP
3320 #: build/C/man2/perf_event_open.2:1000
3321 #, no-wrap
3322 msgid "I<exclude_callchain_user> (since Linux 3.7)"
3323 msgstr "I<exclude_callchain_user> (Linux 3.7 以降)"
3324
3325 #. type: Plain text
3326 #: build/C/man2/perf_event_open.2:1003
3327 msgid "Do not include user callchains."
3328 msgstr ""
3329
3330 #. type: TP
3331 #: build/C/man2/perf_event_open.2:1003
3332 #, no-wrap
3333 msgid "I<mmap2> (since Linux 3.16)"
3334 msgstr "I<mmap2> (Linux 3.16 以降)"
3335
3336 #. type: Plain text
3337 #: build/C/man2/perf_event_open.2:1010
3338 msgid "Generate an extended executable mmap record that contains enough additional information to uniquely identify shared mappings.  The I<mmap> flag must also be set for this to work."
3339 msgstr ""
3340
3341 #. type: TP
3342 #: build/C/man2/perf_event_open.2:1010
3343 #, no-wrap
3344 msgid "I<comm_exec> (since Linux 3.16)"
3345 msgstr "I<comm_exec> (Linux 3.16 以降)"
3346
3347 #. type: Plain text
3348 #: build/C/man2/perf_event_open.2:1025
3349 msgid "This is purely a feature-detection flag, it does not change kernel behavior.  If this flag can successfully be set, then, when I<comm> is enabled, the B<PERF_RECORD_MISC_COMM_EXEC> flag will be set in the I<misc> field of a comm record header if the rename event being reported was caused by a call to B<exec>(2).  This allows tools to distinguish between the various types of process renaming."
3350 msgstr ""
3351
3352 #. type: TP
3353 #: build/C/man2/perf_event_open.2:1025
3354 #, no-wrap
3355 msgid "I<wakeup_events>, I<wakeup_watermark>"
3356 msgstr "I<wakeup_events>, I<wakeup_watermark>"
3357
3358 #. type: Plain text
3359 #: build/C/man2/perf_event_open.2:1035
3360 msgid "This union sets how many samples (I<wakeup_events>)  or bytes (I<wakeup_watermark>)  happen before an overflow notification happens.  Which one is used is selected by the I<watermark> bit flag."
3361 msgstr ""
3362
3363 #. type: Plain text
3364 #: build/C/man2/perf_event_open.2:1045
3365 msgid "I<wakeup_events> only counts B<PERF_RECORD_SAMPLE> record types.  To receive overflow notification for all B<PERF_RECORD> types choose watermark and set I<wakeup_watermark> to 1."
3366 msgstr ""
3367
3368 #. type: Plain text
3369 #: build/C/man2/perf_event_open.2:1050
3370 msgid "Prior to Linux 3.0 setting I<wakeup_events> to 0 resulted in no overflow notifications; more recent kernels treat 0 the same as 1."
3371 msgstr ""
3372
3373 #. type: TP
3374 #: build/C/man2/perf_event_open.2:1050
3375 #, no-wrap
3376 msgid "I<bp_type> (since Linux 2.6.33)"
3377 msgstr "I<bp_type> (Linux 2.6.33 以降)"
3378
3379 #. type: Plain text
3380 #: build/C/man2/perf_event_open.2:1054
3381 msgid "This chooses the breakpoint type.  It is one of:"
3382 msgstr ""
3383
3384 #. type: TP
3385 #: build/C/man2/perf_event_open.2:1055
3386 #, no-wrap
3387 msgid "B<HW_BREAKPOINT_EMPTY>"
3388 msgstr "B<HW_BREAKPOINT_EMPTY>"
3389
3390 #. type: Plain text
3391 #: build/C/man2/perf_event_open.2:1058
3392 msgid "No breakpoint."
3393 msgstr ""
3394
3395 #. type: TP
3396 #: build/C/man2/perf_event_open.2:1058
3397 #, no-wrap
3398 msgid "B<HW_BREAKPOINT_R>"
3399 msgstr "B<HW_BREAKPOINT_R>"
3400
3401 #. type: Plain text
3402 #: build/C/man2/perf_event_open.2:1061
3403 msgid "Count when we read the memory location."
3404 msgstr ""
3405
3406 #. type: TP
3407 #: build/C/man2/perf_event_open.2:1061
3408 #, no-wrap
3409 msgid "B<HW_BREAKPOINT_W>"
3410 msgstr "B<HW_BREAKPOINT_W>"
3411
3412 #. type: Plain text
3413 #: build/C/man2/perf_event_open.2:1064
3414 msgid "Count when we write the memory location."
3415 msgstr ""
3416
3417 #. type: TP
3418 #: build/C/man2/perf_event_open.2:1064
3419 #, no-wrap
3420 msgid "B<HW_BREAKPOINT_RW>"
3421 msgstr "B<HW_BREAKPOINT_RW>"
3422
3423 #. type: Plain text
3424 #: build/C/man2/perf_event_open.2:1067
3425 msgid "Count when we read or write the memory location."
3426 msgstr ""
3427
3428 #. type: TP
3429 #: build/C/man2/perf_event_open.2:1067
3430 #, no-wrap
3431 msgid "B<HW_BREAKPOINT_X>"
3432 msgstr "B<HW_BREAKPOINT_X>"
3433
3434 #. type: Plain text
3435 #: build/C/man2/perf_event_open.2:1070
3436 msgid "Count when we execute code at the memory location."
3437 msgstr ""
3438
3439 #. type: Plain text
3440 #: build/C/man2/perf_event_open.2:1079
3441 msgid "The values can be combined via a bitwise or, but the combination of B<HW_BREAKPOINT_R> or B<HW_BREAKPOINT_W> with B<HW_BREAKPOINT_X> is not allowed."
3442 msgstr ""
3443
3444 #. type: TP
3445 #: build/C/man2/perf_event_open.2:1080
3446 #, no-wrap
3447 msgid "I<bp_addr> (since Linux 2.6.33)"
3448 msgstr "I<bp_addr> (Linux 2.6.33 以降)"
3449
3450 #. type: Plain text
3451 #: build/C/man2/perf_event_open.2:1087
3452 msgid "I<bp_addr> address of the breakpoint.  For execution breakpoints this is the memory address of the instruction of interest; for read and write breakpoints it is the memory address of the memory location of interest."
3453 msgstr ""
3454
3455 #. type: TP
3456 #: build/C/man2/perf_event_open.2:1087
3457 #, no-wrap
3458 msgid "I<config1> (since Linux 2.6.39)"
3459 msgstr "I<config1> (Linux 2.6.39 以降)"
3460
3461 #. type: Plain text
3462 #: build/C/man2/perf_event_open.2:1094
3463 msgid "I<config1> is used for setting events that need an extra register or otherwise do not fit in the regular config field.  Raw OFFCORE_EVENTS on Nehalem/Westmere/SandyBridge use this field on 3.3 and later kernels."
3464 msgstr ""
3465
3466 #. type: TP
3467 #: build/C/man2/perf_event_open.2:1094
3468 #, no-wrap
3469 msgid "I<bp_len> (since Linux 2.6.33)"
3470 msgstr "I<bp_len> (Linux 2.6.33 以降)"
3471
3472 #. type: Plain text
3473 #: build/C/man2/perf_event_open.2:1108
3474 msgid "I<bp_len> is the length of the breakpoint being measured if I<type> is B<PERF_TYPE_BREAKPOINT>.  Options are B<HW_BREAKPOINT_LEN_1>, B<HW_BREAKPOINT_LEN_2>, B<HW_BREAKPOINT_LEN_4>, B<HW_BREAKPOINT_LEN_8>.  For an execution breakpoint, set this to I<sizeof(long)>."
3475 msgstr ""
3476
3477 #. type: TP
3478 #: build/C/man2/perf_event_open.2:1108
3479 #, no-wrap
3480 msgid "I<config2> (since Linux 2.6.39)"
3481 msgstr "I<config2> (Linux 2.6.39 以降)"
3482
3483 #. type: Plain text
3484 #: build/C/man2/perf_event_open.2:1115
3485 msgid "I<config2> is a further extension of the I<config1> field."
3486 msgstr ""
3487
3488 #. type: TP
3489 #: build/C/man2/perf_event_open.2:1115
3490 #, no-wrap
3491 msgid "I<branch_sample_type> (since Linux 3.4)"
3492 msgstr "I<branch_sample_type> (Linux 3.4 以降)"
3493
3494 #. type: Plain text
3495 #: build/C/man2/perf_event_open.2:1121
3496 msgid "If B<PERF_SAMPLE_BRANCH_STACK> is enabled, then this specifies what branches to include in the branch record."
3497 msgstr ""
3498
3499 #. type: Plain text
3500 #: build/C/man2/perf_event_open.2:1127
3501 msgid "The first part of the value is the privilege level, which is a combination of one of the following values.  If the user does not set privilege level explicitly, the kernel will use the event's privilege level.  Event and branch privilege levels do not have to match."
3502 msgstr ""
3503
3504 #. type: TP
3505 #: build/C/man2/perf_event_open.2:1128
3506 #, no-wrap
3507 msgid "B<PERF_SAMPLE_BRANCH_USER>"
3508 msgstr ""
3509
3510 #. type: Plain text
3511 #: build/C/man2/perf_event_open.2:1131
3512 msgid "Branch target is in user space."
3513 msgstr ""
3514
3515 #. type: TP
3516 #: build/C/man2/perf_event_open.2:1131
3517 #, no-wrap
3518 msgid "B<PERF_SAMPLE_BRANCH_KERNEL>"
3519 msgstr ""
3520
3521 #. type: Plain text
3522 #: build/C/man2/perf_event_open.2:1134
3523 msgid "Branch target is in kernel space."
3524 msgstr ""
3525
3526 #. type: TP
3527 #: build/C/man2/perf_event_open.2:1134
3528 #, no-wrap
3529 msgid "B<PERF_SAMPLE_BRANCH_HV>"
3530 msgstr ""
3531
3532 #. type: Plain text
3533 #: build/C/man2/perf_event_open.2:1137
3534 msgid "Branch target is in hypervisor."
3535 msgstr ""
3536
3537 #. type: TP
3538 #: build/C/man2/perf_event_open.2:1137
3539 #, no-wrap
3540 msgid "B<PERF_SAMPLE_BRANCH_PLM_ALL>"
3541 msgstr ""
3542
3543 #. type: Plain text
3544 #: build/C/man2/perf_event_open.2:1140
3545 msgid "A convenience value that is the three preceding values ORed together."
3546 msgstr ""
3547
3548 #. type: Plain text
3549 #: build/C/man2/perf_event_open.2:1144
3550 msgid "In addition to the privilege value, at least one or more of the following bits must be set."
3551 msgstr ""
3552
3553 #. type: TP
3554 #: build/C/man2/perf_event_open.2:1145
3555 #, no-wrap
3556 msgid "B<PERF_SAMPLE_BRANCH_ANY>"
3557 msgstr ""
3558
3559 #. type: Plain text
3560 #: build/C/man2/perf_event_open.2:1148
3561 msgid "Any branch type."
3562 msgstr ""
3563
3564 #. type: TP
3565 #: build/C/man2/perf_event_open.2:1148
3566 #, no-wrap
3567 msgid "B<PERF_SAMPLE_BRANCH_ANY_CALL>"
3568 msgstr ""
3569
3570 #. type: Plain text
3571 #: build/C/man2/perf_event_open.2:1151
3572 msgid "Any call branch."
3573 msgstr ""
3574
3575 #. type: TP
3576 #: build/C/man2/perf_event_open.2:1151
3577 #, no-wrap
3578 msgid "B<PERF_SAMPLE_BRANCH_ANY_RETURN>"
3579 msgstr ""
3580
3581 #. type: Plain text
3582 #: build/C/man2/perf_event_open.2:1154
3583 msgid "Any return branch."
3584 msgstr ""
3585
3586 #. type: TP
3587 #: build/C/man2/perf_event_open.2:1154
3588 #, no-wrap
3589 msgid "B<PERF_SAMPLE_BRANCH_IND_CALL>"
3590 msgstr ""
3591
3592 #. type: Plain text
3593 #: build/C/man2/perf_event_open.2:1157
3594 msgid "Indirect calls."
3595 msgstr ""
3596
3597 #. type: TP
3598 #: build/C/man2/perf_event_open.2:1157
3599 #, no-wrap
3600 msgid "B<PERF_SAMPLE_BRANCH_COND> (since Linux 3.16)"
3601 msgstr "B<PERF_SAMPLE_BRANCH_COND> (Linux 3.16 以降)"
3602
3603 #.  commit bac52139f0b7ab31330e98fd87fc5a2664951050
3604 #. type: Plain text
3605 #: build/C/man2/perf_event_open.2:1161
3606 msgid "Conditional branches."
3607 msgstr ""
3608
3609 #. type: TP
3610 #: build/C/man2/perf_event_open.2:1161
3611 #, no-wrap
3612 msgid "B<PERF_SAMPLE_BRANCH_ABORT_TX> (since Linux 3.11)"
3613 msgstr "B<PERF_SAMPLE_BRANCH_ABORT_TX> (Linux 3.11 以降)"
3614
3615 #.  commit 135c5612c460f89657c4698fe2ea753f6f667963
3616 #. type: Plain text
3617 #: build/C/man2/perf_event_open.2:1165
3618 msgid "Transactional memory aborts."
3619 msgstr ""
3620
3621 #. type: TP
3622 #: build/C/man2/perf_event_open.2:1165
3623 #, no-wrap
3624 msgid "B<PERF_SAMPLE_BRANCH_IN_TX> (since Linux 3.11)"
3625 msgstr "B<PERF_SAMPLE_BRANCH_IN_TX> (Linux 3.11 以降)"
3626
3627 #.  commit 135c5612c460f89657c4698fe2ea753f6f667963
3628 #. type: Plain text
3629 #: build/C/man2/perf_event_open.2:1169
3630 msgid "Branch in transactional memory transaction."
3631 msgstr ""
3632
3633 #. type: TP
3634 #: build/C/man2/perf_event_open.2:1169
3635 #, no-wrap
3636 msgid "B<PERF_SAMPLE_BRANCH_NO_TX> (since Linux 3.11)"
3637 msgstr "B<PERF_SAMPLE_BRANCH_NO_TX> (Linux 3.11 以降)"
3638
3639 #.  commit 135c5612c460f89657c4698fe2ea753f6f667963
3640 #. type: Plain text
3641 #: build/C/man2/perf_event_open.2:1173
3642 msgid "Branch not in transactional memory transaction."
3643 msgstr ""
3644
3645 #. type: TP
3646 #: build/C/man2/perf_event_open.2:1175
3647 #, no-wrap
3648 msgid "I<sample_regs_user> (since Linux 3.7)"
3649 msgstr "I<sample_regs_user> (Linux 3.7 以降)"
3650
3651 #. type: Plain text
3652 #: build/C/man2/perf_event_open.2:1181
3653 msgid "This bit mask defines the set of user CPU registers to dump on samples.  The layout of the register mask is architecture-specific and described in the kernel header I<arch/ARCH/include/uapi/asm/perf_regs.h>."
3654 msgstr ""
3655
3656 #. type: TP
3657 #: build/C/man2/perf_event_open.2:1181
3658 #, no-wrap
3659 msgid "I<sample_stack_user> (since Linux 3.7)"
3660 msgstr "I<sample_stack_user> (Linux 3.7 以降)"
3661
3662 #. type: Plain text
3663 #: build/C/man2/perf_event_open.2:1186
3664 msgid "This defines the size of the user stack to dump if B<PERF_SAMPLE_STACK_USER> is specified."
3665 msgstr ""
3666
3667 #. type: SS
3668 #: build/C/man2/perf_event_open.2:1186
3669 #, no-wrap
3670 msgid "Reading results"
3671 msgstr ""
3672
3673 #. type: Plain text
3674 #: build/C/man2/perf_event_open.2:1196
3675 msgid "Once a B<perf_event_open>()  file descriptor has been opened, the values of the events can be read from the file descriptor.  The values that are there are specified by the I<read_format> field in the I<attr> structure at open time."
3676 msgstr ""
3677
3678 #. type: Plain text
3679 #: build/C/man2/perf_event_open.2:1201
3680 msgid "If you attempt to read into a buffer that is not big enough to hold the data B<ENOSPC> is returned"
3681 msgstr ""
3682
3683 #. type: Plain text
3684 #: build/C/man2/perf_event_open.2:1203
3685 msgid "Here is the layout of the data returned by a read:"
3686 msgstr ""
3687
3688 #. type: IP
3689 #: build/C/man2/perf_event_open.2:1203 build/C/man2/perf_event_open.2:1221
3690 #: build/C/man2/ptrace.2:1735 build/C/man2/ptrace.2:1745
3691 #: build/C/man2/ptrace.2:1753 build/C/man2/ptrace.2:1759
3692 #: build/C/man2/ptrace.2:1888 build/C/man2/splice.2:55
3693 #: build/C/man2/splice.2:61 build/C/man2/splice.2:70
3694 #, no-wrap
3695 msgid "*"
3696 msgstr "*"
3697
3698 #. type: Plain text
3699 #: build/C/man2/perf_event_open.2:1207
3700 msgid "If B<PERF_FORMAT_GROUP> was specified to allow reading all events in a group at once:"
3701 msgstr ""
3702
3703 #. type: Plain text
3704 #: build/C/man2/perf_event_open.2:1219
3705 #, no-wrap
3706 msgid ""
3707 "struct read_format {\n"
3708 "    u64 nr;            /* The number of events */\n"
3709 "    u64 time_enabled;  /* if PERF_FORMAT_TOTAL_TIME_ENABLED */\n"
3710 "    u64 time_running;  /* if PERF_FORMAT_TOTAL_TIME_RUNNING */\n"
3711 "    struct {\n"
3712 "        u64 value;     /* The value of the event */\n"
3713 "        u64 id;        /* if PERF_FORMAT_ID */\n"
3714 "    } values[nr];\n"
3715 "};\n"
3716 msgstr ""
3717
3718 #. type: Plain text
3719 #: build/C/man2/perf_event_open.2:1227
3720 msgid "If B<PERF_FORMAT_GROUP> was I<not> specified:"
3721 msgstr ""
3722
3723 #. type: Plain text
3724 #: build/C/man2/perf_event_open.2:1236
3725 #, no-wrap
3726 msgid ""
3727 "struct read_format {\n"
3728 "    u64 value;         /* The value of the event */\n"
3729 "    u64 time_enabled;  /* if PERF_FORMAT_TOTAL_TIME_ENABLED */\n"
3730 "    u64 time_running;  /* if PERF_FORMAT_TOTAL_TIME_RUNNING */\n"
3731 "    u64 id;            /* if PERF_FORMAT_ID */\n"
3732 "};\n"
3733 msgstr ""
3734
3735 #. type: Plain text
3736 #: build/C/man2/perf_event_open.2:1240
3737 msgid "The values read are as follows:"
3738 msgstr ""
3739
3740 #. type: TP
3741 #: build/C/man2/perf_event_open.2:1240
3742 #, no-wrap
3743 msgid "I<nr>"
3744 msgstr ""
3745
3746 #. type: Plain text
3747 #: build/C/man2/perf_event_open.2:1246
3748 msgid "The number of events in this file descriptor.  Only available if B<PERF_FORMAT_GROUP> was specified."
3749 msgstr ""
3750
3751 #. type: TP
3752 #: build/C/man2/perf_event_open.2:1246
3753 #, no-wrap
3754 msgid "I<time_enabled>, I<time_running>"
3755 msgstr ""
3756
3757 #. type: Plain text
3758 #: build/C/man2/perf_event_open.2:1258
3759 msgid "Total time the event was enabled and running.  Normally these are the same.  If more events are started, then available counter slots on the PMU, then multiplexing happens and events run only part of the time.  In that case, the I<time_enabled> and I<time running> values can be used to scale an estimated value for the count."
3760 msgstr ""
3761
3762 #. type: TP
3763 #: build/C/man2/perf_event_open.2:1258
3764 #, no-wrap
3765 msgid "I<value>"
3766 msgstr ""
3767
3768 #. type: Plain text
3769 #: build/C/man2/perf_event_open.2:1261
3770 msgid "An unsigned 64-bit value containing the counter result."
3771 msgstr ""
3772
3773 #. type: TP
3774 #: build/C/man2/perf_event_open.2:1261 build/C/man2/perf_event_open.2:1690
3775 #: build/C/man2/perf_event_open.2:1856
3776 #, no-wrap
3777 msgid "I<id>"
3778 msgstr ""
3779
3780 #. type: Plain text
3781 #: build/C/man2/perf_event_open.2:1267
3782 msgid "A globally unique value for this particular event, only there if B<PERF_FORMAT_ID> was specified in I<read_format>."
3783 msgstr ""
3784
3785 #. type: SS
3786 #: build/C/man2/perf_event_open.2:1267
3787 #, no-wrap
3788 msgid "MMAP layout"
3789 msgstr ""
3790
3791 #. type: Plain text
3792 #: build/C/man2/perf_event_open.2:1277
3793 msgid "When using B<perf_event_open>()  in sampled mode, asynchronous events (like counter overflow or B<PROT_EXEC> mmap tracking)  are logged into a ring-buffer.  This ring-buffer is created and accessed through B<mmap>(2)."
3794 msgstr ""
3795
3796 #. type: Plain text
3797 #: build/C/man2/perf_event_open.2:1283
3798 msgid "The mmap size should be 1+2^n pages, where the first page is a metadata page (I<struct perf_event_mmap_page>)  that contains various bits of information such as where the ring-buffer head is."
3799 msgstr ""
3800
3801 #. type: Plain text
3802 #: build/C/man2/perf_event_open.2:1286
3803 msgid "Before kernel 2.6.39, there is a bug that means you must allocate a mmap ring buffer when sampling even if you do not plan to access it."
3804 msgstr ""
3805
3806 #. type: Plain text
3807 #: build/C/man2/perf_event_open.2:1288
3808 msgid "The structure of the first metadata mmap page is as follows:"
3809 msgstr ""
3810
3811 #. type: Plain text
3812 #: build/C/man2/perf_event_open.2:1317
3813 #, no-wrap
3814 msgid ""
3815 "struct perf_event_mmap_page {\n"
3816 "    __u32 version;        /* version number of this structure */\n"
3817 "    __u32 compat_version; /* lowest version this is compat with */\n"
3818 "    __u32 lock;           /* seqlock for synchronization */\n"
3819 "    __u32 index;          /* hardware counter identifier */\n"
3820 "    __s64 offset;         /* add to hardware counter value */\n"
3821 "    __u64 time_enabled;   /* time event active */\n"
3822 "    __u64 time_running;   /* time event on CPU */\n"
3823 "    union {\n"
3824 "        __u64   capabilities;\n"
3825 "        struct {\n"
3826 "            __u64 cap_usr_time / cap_usr_rdpmc / cap_bit0 : 1,\n"
3827 "                  cap_bit0_is_deprecated : 1,\n"
3828 "                  cap_user_rdpmc         : 1,\n"
3829 "                  cap_user_time          : 1,\n"
3830 "                  cap_user_time_zero     : 1,\n"
3831 "        };\n"
3832 "    };\n"
3833 "    __u16 pmc_width;\n"
3834 "    __u16 time_shift;\n"
3835 "    __u32 time_mult;\n"
3836 "    __u64 time_offset;\n"
3837 "    __u64 __reserved[120];   /* Pad to 1k */\n"
3838 "    __u64 data_head;         /* head in the data section */\n"
3839 "    __u64 data_tail;         /* user-space written tail */\n"
3840 "}\n"
3841 msgstr ""
3842
3843 #. type: Plain text
3844 #: build/C/man2/perf_event_open.2:1323
3845 msgid "The following list describes the fields in the I<perf_event_mmap_page> structure in more detail:"
3846 msgstr ""
3847
3848 #. type: TP
3849 #: build/C/man2/perf_event_open.2:1323
3850 #, no-wrap
3851 msgid "I<version>"
3852 msgstr ""
3853
3854 #. type: Plain text
3855 #: build/C/man2/perf_event_open.2:1326
3856 msgid "Version number of this structure."
3857 msgstr ""
3858
3859 #. type: TP
3860 #: build/C/man2/perf_event_open.2:1326
3861 #, no-wrap
3862 msgid "I<compat_version>"
3863 msgstr ""
3864
3865 #. type: Plain text
3866 #: build/C/man2/perf_event_open.2:1329
3867 msgid "The lowest version this is compatible with."
3868 msgstr ""
3869
3870 #. type: TP
3871 #: build/C/man2/perf_event_open.2:1329
3872 #, no-wrap
3873 msgid "I<lock>"
3874 msgstr ""
3875
3876 #. type: Plain text
3877 #: build/C/man2/perf_event_open.2:1332
3878 msgid "A seqlock for synchronization."
3879 msgstr ""
3880
3881 #. type: TP
3882 #: build/C/man2/perf_event_open.2:1332
3883 #, no-wrap
3884 msgid "I<index>"
3885 msgstr ""
3886
3887 #. type: Plain text
3888 #: build/C/man2/perf_event_open.2:1335
3889 msgid "A unique hardware counter identifier."
3890 msgstr ""
3891
3892 #. type: TP
3893 #: build/C/man2/perf_event_open.2:1335
3894 #, no-wrap
3895 msgid "I<offset>"
3896 msgstr ""
3897
3898 #. type: Plain text
3899 #: build/C/man2/perf_event_open.2:1340
3900 msgid "When using rdpmc for reads this offset value must be added to the one returned by rdpmc to get the current total event count."
3901 msgstr ""
3902
3903 #. type: TP
3904 #: build/C/man2/perf_event_open.2:1340
3905 #, no-wrap
3906 msgid "I<time_enabled>"
3907 msgstr ""
3908
3909 #. type: Plain text
3910 #: build/C/man2/perf_event_open.2:1343
3911 msgid "Time the event was active."
3912 msgstr ""
3913
3914 #. type: TP
3915 #: build/C/man2/perf_event_open.2:1343
3916 #, no-wrap
3917 msgid "I<time_running>"
3918 msgstr ""
3919
3920 #. type: Plain text
3921 #: build/C/man2/perf_event_open.2:1346
3922 msgid "Time the event was running."
3923 msgstr ""
3924
3925 #. type: TP
3926 #: build/C/man2/perf_event_open.2:1346
3927 #, no-wrap
3928 msgid "I<cap_usr_time> / I<cap_usr_rdpmc> / I<cap_bit0> (since Linux 3.4)"
3929 msgstr ""
3930
3931 #. type: Plain text
3932 #: build/C/man2/perf_event_open.2:1359
3933 msgid "There was a bug in the definition of I<cap_usr_time> and I<cap_usr_rdpmc> from Linux 3.4 until Linux 3.11.  Both bits were defined to point to the same location, so it was impossible to know if I<cap_usr_time> or I<cap_usr_rdpmc> were actually set."
3934 msgstr ""
3935
3936 #. type: Plain text
3937 #: build/C/man2/perf_event_open.2:1367
3938 msgid "Starting with Linux 3.12, these are renamed to I<cap_bit0> and you should use the I<cap_user_time> and I<cap_user_rdpmc> fields instead."
3939 msgstr ""
3940
3941 #. type: TP
3942 #: build/C/man2/perf_event_open.2:1368
3943 #, no-wrap
3944 msgid "I<cap_bit0_is_deprecated> (since Linux 3.12)"
3945 msgstr "I<cap_bit0_is_deprecated> (Linux 3.12 以降)"
3946
3947 #. type: Plain text
3948 #: build/C/man2/perf_event_open.2:1376
3949 msgid "If set, this bit indicates that the kernel supports the properly separated I<cap_user_time> and I<cap_user_rdpmc> bits."
3950 msgstr ""
3951
3952 #. type: Plain text
3953 #: build/C/man2/perf_event_open.2:1383
3954 msgid "If not-set, it indicates an older kernel where I<cap_usr_time> and I<cap_usr_rdpmc> map to the same bit and thus both features should be used with caution."
3955 msgstr ""
3956
3957 #. type: TP
3958 #: build/C/man2/perf_event_open.2:1384
3959 #, no-wrap
3960 msgid "I<cap_user_rdpmc> (since Linux 3.12)"
3961 msgstr "I<cap_user_rdpmc> (Linux 3.12 以降)"
3962
3963 #. type: Plain text
3964 #: build/C/man2/perf_event_open.2:1389
3965 msgid "If the hardware supports user-space read of performance counters without syscall (this is the \"rdpmc\" instruction on x86), then the following code can be used to do a read:"
3966 msgstr ""
3967
3968 #. type: Plain text
3969 #: build/C/man2/perf_event_open.2:1395
3970 #, no-wrap
3971 msgid ""
3972 "u32 seq, time_mult, time_shift, idx, width;\n"
3973 "u64 count, enabled, running;\n"
3974 "u64 cyc, time_offset;\n"
3975 msgstr ""
3976 "u32 seq, time_mult, time_shift, idx, width;\n"
3977 "u64 count, enabled, running;\n"
3978 "u64 cyc, time_offset;\n"
3979
3980 #. type: Plain text
3981 #: build/C/man2/perf_event_open.2:1401
3982 #, no-wrap
3983 msgid ""
3984 "do {\n"
3985 "    seq = pc-E<gt>lock;\n"
3986 "    barrier();\n"
3987 "    enabled = pc-E<gt>time_enabled;\n"
3988 "    running = pc-E<gt>time_running;\n"
3989 msgstr ""
3990 "do {\n"
3991 "    seq = pc-E<gt>lock;\n"
3992 "    barrier();\n"
3993 "    enabled = pc-E<gt>time_enabled;\n"
3994 "    running = pc-E<gt>time_running;\n"
3995
3996 #. type: Plain text
3997 #: build/C/man2/perf_event_open.2:1408
3998 #, no-wrap
3999 msgid ""
4000 "    if (pc-E<gt>cap_usr_time && enabled != running) {\n"
4001 "        cyc = rdtsc();\n"
4002 "        time_offset = pc-E<gt>time_offset;\n"
4003 "        time_mult   = pc-E<gt>time_mult;\n"
4004 "        time_shift  = pc-E<gt>time_shift;\n"
4005 "    }\n"
4006 msgstr ""
4007 "    if (pc-E<gt>cap_usr_time && enabled != running) {\n"
4008 "        cyc = rdtsc();\n"
4009 "        time_offset = pc-E<gt>time_offset;\n"
4010 "        time_mult   = pc-E<gt>time_mult;\n"
4011 "        time_shift  = pc-E<gt>time_shift;\n"
4012 "    }\n"
4013
4014 #. type: Plain text
4015 #: build/C/man2/perf_event_open.2:1411
4016 #, no-wrap
4017 msgid ""
4018 "    idx = pc-E<gt>index;\n"
4019 "    count = pc-E<gt>offset;\n"
4020 msgstr ""
4021 "    idx = pc-E<gt>index;\n"
4022 "    count = pc-E<gt>offset;\n"
4023
4024 #. type: Plain text
4025 #: build/C/man2/perf_event_open.2:1416
4026 #, no-wrap
4027 msgid ""
4028 "    if (pc-E<gt>cap_usr_rdpmc && idx) {\n"
4029 "        width = pc-E<gt>pmc_width;\n"
4030 "        count += rdpmc(idx - 1);\n"
4031 "    }\n"
4032 msgstr ""
4033 "    if (pc-E<gt>cap_usr_rdpmc && idx) {\n"
4034 "        width = pc-E<gt>pmc_width;\n"
4035 "        count += rdpmc(idx - 1);\n"
4036 "    }\n"
4037
4038 #. type: Plain text
4039 #: build/C/man2/perf_event_open.2:1419
4040 #, no-wrap
4041 msgid ""
4042 "    barrier();\n"
4043 "} while (pc-E<gt>lock != seq);\n"
4044 msgstr ""
4045 "    barrier();\n"
4046 "} while (pc-E<gt>lock != seq);\n"
4047
4048 #. type: TP
4049 #: build/C/man2/perf_event_open.2:1421
4050 #, no-wrap
4051 msgid "I<cap_user_time> (since Linux 3.12)"
4052 msgstr "I<cap_user_time> (Linux 3.12 以降)"
4053
4054 #. type: Plain text
4055 #: build/C/man2/perf_event_open.2:1425
4056 msgid "This bit indicates the hardware has a constant, nonstop timestamp counter (TSC on x86)."
4057 msgstr ""
4058
4059 #. type: TP
4060 #: build/C/man2/perf_event_open.2:1425
4061 #, no-wrap
4062 msgid "I<cap_user_time_zero> (since Linux 3.12)"
4063 msgstr "I<cap_user_time_zero> (Linux 3.12 以降)"
4064
4065 #. type: Plain text
4066 #: build/C/man2/perf_event_open.2:1431
4067 msgid "Indicates the presence of I<time_zero> which allows mapping timestamp values to the hardware clock."
4068 msgstr ""
4069
4070 #. type: TP
4071 #: build/C/man2/perf_event_open.2:1431
4072 #, no-wrap
4073 msgid "I<pmc_width>"
4074 msgstr "I<pmc_width>"
4075
4076 #. type: Plain text
4077 #: build/C/man2/perf_event_open.2:1438
4078 msgid "If I<cap_usr_rdpmc>, this field provides the bit-width of the value read using the rdpmc or equivalent instruction.  This can be used to sign extend the result like:"
4079 msgstr ""
4080
4081 #. type: Plain text
4082 #: build/C/man2/perf_event_open.2:1444
4083 #, no-wrap
4084 msgid ""
4085 "pmc E<lt>E<lt>= 64 - pmc_width;\n"
4086 "pmc E<gt>E<gt>= 64 - pmc_width; // signed shift right\n"
4087 "count += pmc;\n"
4088 msgstr ""
4089 "pmc E<lt>E<lt>= 64 - pmc_width;\n"
4090 "pmc E<gt>E<gt>= 64 - pmc_width; // signed shift right\n"
4091 "count += pmc;\n"
4092
4093 #. type: TP
4094 #: build/C/man2/perf_event_open.2:1446
4095 #, no-wrap
4096 msgid "I<time_shift>, I<time_mult>, I<time_offset>"
4097 msgstr "I<time_shift>, I<time_mult>, I<time_offset>"
4098
4099 #. type: Plain text
4100 #: build/C/man2/perf_event_open.2:1453
4101 msgid "If I<cap_usr_time>, these fields can be used to compute the time delta since time_enabled (in nanoseconds) using rdtsc or similar."
4102 msgstr ""
4103
4104 #. type: Plain text
4105 #: build/C/man2/perf_event_open.2:1461
4106 #, no-wrap
4107 msgid ""
4108 "    u64 quot, rem;\n"
4109 "    u64 delta;\n"
4110 "    quot = (cyc E<gt>E<gt> time_shift);\n"
4111 "    rem = cyc & ((1 E<lt>E<lt> time_shift) - 1);\n"
4112 "    delta = time_offset + quot * time_mult +\n"
4113 "            ((rem * time_mult) E<gt>E<gt> time_shift);\n"
4114 msgstr ""
4115 "    u64 quot, rem;\n"
4116 "    u64 delta;\n"
4117 "    quot = (cyc E<gt>E<gt> time_shift);\n"
4118 "    rem = cyc & ((1 E<lt>E<lt> time_shift) - 1);\n"
4119 "    delta = time_offset + quot * time_mult +\n"
4120 "            ((rem * time_mult) E<gt>E<gt> time_shift);\n"
4121
4122 #. type: Plain text
4123 #: build/C/man2/perf_event_open.2:1473
4124 msgid "Where I<time_offset>, I<time_mult>, I<time_shift>, and I<cyc> are read in the seqcount loop described above.  This delta can then be added to enabled and possible running (if idx), improving the scaling:"
4125 msgstr ""
4126
4127 #. type: Plain text
4128 #: build/C/man2/perf_event_open.2:1481
4129 #, no-wrap
4130 msgid ""
4131 "    enabled += delta;\n"
4132 "    if (idx)\n"
4133 "        running += delta;\n"
4134 "    quot = count / running;\n"
4135 "    rem  = count % running;\n"
4136 "    count = quot * enabled + (rem * enabled) / running;\n"
4137 msgstr ""
4138 "    enabled += delta;\n"
4139 "    if (idx)\n"
4140 "        running += delta;\n"
4141 "    quot = count / running;\n"
4142 "    rem  = count % running;\n"
4143 "    count = quot * enabled + (rem * enabled) / running;\n"
4144
4145 #. type: TP
4146 #: build/C/man2/perf_event_open.2:1482
4147 #, no-wrap
4148 msgid "I<time_zero> (since Linux 3.12)"
4149 msgstr "I<time_zero> (Linux 3.12 以降)"
4150
4151 #. type: Plain text
4152 #: build/C/man2/perf_event_open.2:1490
4153 msgid "If I<cap_usr_time_zero> is set, then the hardware clock (the TSC timestamp counter on x86)  can be calculated from the I<time_zero>, I<time_mult>, and I<time_shift> values:"
4154 msgstr ""
4155
4156 #. type: Plain text
4157 #: build/C/man2/perf_event_open.2:1496
4158 #, no-wrap
4159 msgid ""
4160 "    time = timestamp - time_zero;\n"
4161 "    quot = time / time_mult;\n"
4162 "    rem  = time % time_mult;\n"
4163 "    cyc = (quot E<lt>E<lt> time_shift) + (rem E<lt>E<lt> time_shift) / time_mult;\n"
4164 msgstr ""
4165 "    time = timestamp - time_zero;\n"
4166 "    quot = time / time_mult;\n"
4167 "    rem  = time % time_mult;\n"
4168 "    cyc = (quot E<lt>E<lt> time_shift) + (rem E<lt>E<lt> time_shift) / time_mult;\n"
4169
4170 #. type: Plain text
4171 #: build/C/man2/perf_event_open.2:1499
4172 msgid "And vice versa:"
4173 msgstr ""
4174
4175 #. type: Plain text
4176 #: build/C/man2/perf_event_open.2:1505
4177 #, no-wrap
4178 msgid ""
4179 "    quot = cyc E<gt>E<gt> time_shift;\n"
4180 "    rem  = cyc & ((1 E<lt>E<lt> time_shift) - 1);\n"
4181 "    timestamp = time_zero + quot * time_mult +\n"
4182 "        ((rem * time_mult) E<gt>E<gt> time_shift);\n"
4183 msgstr ""
4184 "    quot = cyc E<gt>E<gt> time_shift;\n"
4185 "    rem  = cyc & ((1 E<lt>E<lt> time_shift) - 1);\n"
4186 "    timestamp = time_zero + quot * time_mult +\n"
4187 "        ((rem * time_mult) E<gt>E<gt> time_shift);\n"
4188
4189 #. type: TP
4190 #: build/C/man2/perf_event_open.2:1506
4191 #, no-wrap
4192 msgid "I<data_head>"
4193 msgstr "I<data_head>"
4194
4195 #. type: Plain text
4196 #: build/C/man2/perf_event_open.2:1512
4197 msgid "This points to the head of the data section.  The value continuously increases, it does not wrap.  The value needs to be manually wrapped by the size of the mmap buffer before accessing the samples."
4198 msgstr ""
4199
4200 #. type: Plain text
4201 #: build/C/man2/perf_event_open.2:1517
4202 msgid "On SMP-capable platforms, after reading the I<data_head> value, user space should issue an rmb()."
4203 msgstr ""
4204
4205 #. type: TP
4206 #: build/C/man2/perf_event_open.2:1517
4207 #, no-wrap
4208 msgid "I<data_tail>"
4209 msgstr "I<data_tail>"
4210
4211 #. type: Plain text
4212 #: build/C/man2/perf_event_open.2:1525
4213 msgid "When the mapping is B<PROT_WRITE>, the I<data_tail> value should be written by user space to reflect the last read data.  In this case, the kernel will not overwrite unread data."
4214 msgstr ""
4215
4216 #. type: Plain text
4217 #: build/C/man2/perf_event_open.2:1527
4218 msgid "The following 2^n ring-buffer pages have the layout described below."
4219 msgstr ""
4220
4221 #. type: Plain text
4222 #: build/C/man2/perf_event_open.2:1541
4223 msgid "If I<perf_event_attr.sample_id_all> is set, then all event types will have the sample_type selected fields related to where/when (identity)  an event took place (TID, TIME, ID, CPU, STREAM_ID) described in B<PERF_RECORD_SAMPLE> below, it will be stashed just after the I<perf_event_header> and the fields already present for the existing fields, that is, at the end of the payload.  That way a newer perf.data file will be supported by older perf tools, with these new optional fields being ignored."
4224 msgstr ""
4225
4226 #. type: Plain text
4227 #: build/C/man2/perf_event_open.2:1543
4228 msgid "The mmap values start with a header:"
4229 msgstr ""
4230
4231 #. type: Plain text
4232 #: build/C/man2/perf_event_open.2:1551
4233 #, no-wrap
4234 msgid ""
4235 "struct perf_event_header {\n"
4236 "    __u32   type;\n"
4237 "    __u16   misc;\n"
4238 "    __u16   size;\n"
4239 "};\n"
4240 msgstr ""
4241 "struct perf_event_header {\n"
4242 "    __u32   type;\n"
4243 "    __u16   misc;\n"
4244 "    __u16   size;\n"
4245 "};\n"
4246
4247 #. type: Plain text
4248 #: build/C/man2/perf_event_open.2:1559
4249 msgid "Below, we describe the I<perf_event_header> fields in more detail.  For ease of reading, the fields with shorter descriptions are presented first."
4250 msgstr ""
4251
4252 #. type: Plain text
4253 #: build/C/man2/perf_event_open.2:1562
4254 msgid "This indicates the size of the record."
4255 msgstr ""
4256
4257 #. type: TP
4258 #: build/C/man2/perf_event_open.2:1562
4259 #, no-wrap
4260 msgid "I<misc>"
4261 msgstr "I<misc>"
4262
4263 #. type: Plain text
4264 #: build/C/man2/perf_event_open.2:1567
4265 msgid "The I<misc> field contains additional information about the sample."
4266 msgstr ""
4267
4268 #. type: Plain text
4269 #: build/C/man2/perf_event_open.2:1572
4270 msgid "The CPU mode can be determined from this value by masking with B<PERF_RECORD_MISC_CPUMODE_MASK> and looking for one of the following (note these are not bit masks, only one can be set at a time):"
4271 msgstr ""
4272
4273 #. type: TP
4274 #: build/C/man2/perf_event_open.2:1573
4275 #, no-wrap
4276 msgid "B<PERF_RECORD_MISC_CPUMODE_UNKNOWN>"
4277 msgstr "B<PERF_RECORD_MISC_CPUMODE_UNKNOWN>"
4278
4279 #. type: Plain text
4280 #: build/C/man2/perf_event_open.2:1576
4281 msgid "Unknown CPU mode."
4282 msgstr ""
4283
4284 #. type: TP
4285 #: build/C/man2/perf_event_open.2:1576
4286 #, no-wrap
4287 msgid "B<PERF_RECORD_MISC_KERNEL>"
4288 msgstr "B<PERF_RECORD_MISC_KERNEL>"
4289
4290 #. type: Plain text
4291 #: build/C/man2/perf_event_open.2:1579
4292 msgid "Sample happened in the kernel."
4293 msgstr ""
4294
4295 #. type: TP
4296 #: build/C/man2/perf_event_open.2:1579
4297 #, no-wrap
4298 msgid "B<PERF_RECORD_MISC_USER>"
4299 msgstr "B<PERF_RECORD_MISC_USER>"
4300
4301 #. type: Plain text
4302 #: build/C/man2/perf_event_open.2:1582
4303 msgid "Sample happened in user code."
4304 msgstr ""
4305
4306 #. type: TP
4307 #: build/C/man2/perf_event_open.2:1582
4308 #, no-wrap
4309 msgid "B<PERF_RECORD_MISC_HYPERVISOR>"
4310 msgstr "B<PERF_RECORD_MISC_HYPERVISOR>"
4311
4312 #. type: Plain text
4313 #: build/C/man2/perf_event_open.2:1585
4314 msgid "Sample happened in the hypervisor."
4315 msgstr ""
4316
4317 #. type: TP
4318 #: build/C/man2/perf_event_open.2:1585
4319 #, no-wrap
4320 msgid "B<PERF_RECORD_MISC_GUEST_KERNEL> (since Linux2.6.35)"
4321 msgstr "B<PERF_RECORD_MISC_GUEST_KERNEL> (Linux 2.6.35 以降)"
4322
4323 #.  commit 39447b386c846bbf1c56f6403c5282837486200f
4324 #. type: Plain text
4325 #: build/C/man2/perf_event_open.2:1589
4326 msgid "Sample happened in the guest kernel."
4327 msgstr ""
4328
4329 #. type: TP
4330 #: build/C/man2/perf_event_open.2:1589
4331 #, no-wrap
4332 msgid "B<PERF_RECORD_MISC_GUEST_USER  (since Linux2.6.35)>"
4333 msgstr "B<PERF_RECORD_MISC_GUEST_USER  (Linux 2.6.35 以降)>"
4334
4335 #.  commit 39447b386c846bbf1c56f6403c5282837486200f
4336 #. type: Plain text
4337 #: build/C/man2/perf_event_open.2:1593
4338 msgid "Sample happened in guest user code."
4339 msgstr ""
4340
4341 #. type: Plain text
4342 #: build/C/man2/perf_event_open.2:1597
4343 msgid "In addition, one of the following bits can be set:"
4344 msgstr ""
4345
4346 #. type: TP
4347 #: build/C/man2/perf_event_open.2:1597
4348 #, no-wrap
4349 msgid "B<PERF_RECORD_MISC_MMAP_DATA> (since Linux 3.10)"
4350 msgstr "B<PERF_RECORD_MISC_MMAP_DATA> (Linux 3.10 以降)"
4351
4352 #.  commit 2fe85427e3bf65d791700d065132772fc26e4d75
4353 #. type: Plain text
4354 #: build/C/man2/perf_event_open.2:1602
4355 msgid "This is set when the mapping is not executable; otherwise the mapping is executable."
4356 msgstr ""
4357
4358 #. type: TP
4359 #: build/C/man2/perf_event_open.2:1602
4360 #, no-wrap
4361 msgid "B<PERF_RECORD_MISC_COMM_EXEC> (since Linux 3.16)"
4362 msgstr "B<PERF_RECORD_MISC_COMM_EXEC> (Linux 3.16 以降)"
4363
4364 #.  commit 82b897782d10fcc4930c9d4a15b175348fdd2871
4365 #. type: Plain text
4366 #: build/C/man2/perf_event_open.2:1614
4367 msgid "This is set for a B<PERF_RECORD_COMM> record on kernels more recent than Linux 3.16 if a process name change was caused by an B<exec>(2)  system call.  It is an alias for B<PERF_RECORD_MISC_MMAP_DATA> since the two values would not be set in the same record."
4368 msgstr ""
4369
4370 #. type: TP
4371 #: build/C/man2/perf_event_open.2:1614
4372 #, no-wrap
4373 msgid "B<PERF_RECORD_MISC_EXACT_IP>"
4374 msgstr "B<PERF_RECORD_MISC_EXACT_IP>"
4375
4376 #. type: Plain text
4377 #: build/C/man2/perf_event_open.2:1622
4378 msgid "This indicates that the content of B<PERF_SAMPLE_IP> points to the actual instruction that triggered the event.  See also I<perf_event_attr.precise_ip>."
4379 msgstr ""
4380
4381 #. type: TP
4382 #: build/C/man2/perf_event_open.2:1622
4383 #, no-wrap
4384 msgid "B<PERF_RECORD_MISC_EXT_RESERVED> (since Linux 2.6.35)"
4385 msgstr "B<PERF_RECORD_MISC_EXT_RESERVED> (Linux 2.6.35 以降)"
4386
4387 #.  commit 1676b8a077c352085d52578fb4f29350b58b6e74
4388 #. type: Plain text
4389 #: build/C/man2/perf_event_open.2:1626
4390 msgid "This indicates there is extended data available (currently not used)."
4391 msgstr ""
4392
4393 #. type: Plain text
4394 #: build/C/man2/perf_event_open.2:1636
4395 msgid "The I<type> value is one of the below.  The values in the corresponding record (that follows the header)  depend on the I<type> selected as shown."
4396 msgstr ""
4397
4398 #. type: TP
4399 #: build/C/man2/perf_event_open.2:1638
4400 #, no-wrap
4401 msgid "B<PERF_RECORD_MMAP>"
4402 msgstr "B<PERF_RECORD_MMAP>"
4403
4404 #. type: Plain text
4405 #: build/C/man2/perf_event_open.2:1645
4406 msgid "The MMAP events record the B<PROT_EXEC> mappings so that we can correlate user-space IPs to code.  They have the following structure:"
4407 msgstr ""
4408
4409 #. type: Plain text
4410 #: build/C/man2/perf_event_open.2:1656
4411 #, no-wrap
4412 msgid ""
4413 "struct {\n"
4414 "    struct perf_event_header header;\n"
4415 "    u32    pid, tid;\n"
4416 "    u64    addr;\n"
4417 "    u64    len;\n"
4418 "    u64    pgoff;\n"
4419 "    char   filename[];\n"
4420 "};\n"
4421 msgstr ""
4422 "struct {\n"
4423 "    struct perf_event_header header;\n"
4424 "    u32    pid, tid;\n"
4425 "    u64    addr;\n"
4426 "    u64    len;\n"
4427 "    u64    pgoff;\n"
4428 "    char   filename[];\n"
4429 "};\n"
4430
4431 #. type: TP
4432 #: build/C/man2/perf_event_open.2:1659 build/C/man2/perf_event_open.2:1713
4433 #: build/C/man2/perf_event_open.2:2232
4434 #, no-wrap
4435 msgid "I<pid>"
4436 msgstr "I<pid>"
4437
4438 #. type: Plain text
4439 #: build/C/man2/perf_event_open.2:1662 build/C/man2/perf_event_open.2:1716
4440 #: build/C/man2/perf_event_open.2:2235
4441 msgid "is the process ID."
4442 msgstr ""
4443
4444 #. type: TP
4445 #: build/C/man2/perf_event_open.2:1662 build/C/man2/perf_event_open.2:1716
4446 #: build/C/man2/perf_event_open.2:2235
4447 #, no-wrap
4448 msgid "I<tid>"
4449 msgstr "I<tid>"
4450
4451 #. type: Plain text
4452 #: build/C/man2/perf_event_open.2:1665 build/C/man2/perf_event_open.2:1719
4453 #: build/C/man2/perf_event_open.2:2238
4454 msgid "is the thread ID."
4455 msgstr ""
4456
4457 #. type: TP
4458 #: build/C/man2/perf_event_open.2:1665 build/C/man2/perf_event_open.2:1849
4459 #: build/C/man2/perf_event_open.2:2238
4460 #, no-wrap
4461 msgid "I<addr>"
4462 msgstr "I<addr>"
4463
4464 #. type: Plain text
4465 #: build/C/man2/perf_event_open.2:1674
4466 msgid "is the address of the allocated memory.  I<len> is the length of the allocated memory.  I<pgoff> is the page offset of the allocated memory.  I<filename> is a string describing the backing of the allocated memory."
4467 msgstr ""
4468
4469 #. type: TP
4470 #: build/C/man2/perf_event_open.2:1675
4471 #, no-wrap
4472 msgid "B<PERF_RECORD_LOST>"
4473 msgstr "B<PERF_RECORD_LOST>"
4474
4475 #. type: Plain text
4476 #: build/C/man2/perf_event_open.2:1678
4477 msgid "This record indicates when events are lost."
4478 msgstr ""
4479
4480 #. type: Plain text
4481 #: build/C/man2/perf_event_open.2:1687
4482 #, no-wrap
4483 msgid ""
4484 "struct {\n"
4485 "    struct perf_event_header header;\n"
4486 "    u64 id;\n"
4487 "    u64 lost;\n"
4488 "    struct sample_id sample_id;\n"
4489 "};\n"
4490 msgstr ""
4491 "struct {\n"
4492 "    struct perf_event_header header;\n"
4493 "    u64 id;\n"
4494 "    u64 lost;\n"
4495 "    struct sample_id sample_id;\n"
4496 "};\n"
4497
4498 #. type: Plain text
4499 #: build/C/man2/perf_event_open.2:1693
4500 msgid "is the unique event ID for the samples that were lost."
4501 msgstr ""
4502
4503 #. type: TP
4504 #: build/C/man2/perf_event_open.2:1693
4505 #, no-wrap
4506 msgid "I<lost>"
4507 msgstr "I<lost>"
4508
4509 #. type: Plain text
4510 #: build/C/man2/perf_event_open.2:1696
4511 msgid "is the number of events that were lost."
4512 msgstr ""
4513
4514 #. type: TP
4515 #: build/C/man2/perf_event_open.2:1697
4516 #, no-wrap
4517 msgid "B<PERF_RECORD_COMM>"
4518 msgstr "B<PERF_RECORD_COMM>"
4519
4520 #. type: Plain text
4521 #: build/C/man2/perf_event_open.2:1700
4522 msgid "This record indicates a change in the process name."
4523 msgstr ""
4524
4525 #. type: Plain text
4526 #: build/C/man2/perf_event_open.2:1710
4527 #, no-wrap
4528 msgid ""
4529 "struct {\n"
4530 "    struct perf_event_header header;\n"
4531 "    u32 pid;\n"
4532 "    u32 tid;\n"
4533 "    char comm[];\n"
4534 "    struct sample_id sample_id;\n"
4535 "};\n"
4536 msgstr ""
4537 "struct {\n"
4538 "    struct perf_event_header header;\n"
4539 "    u32 pid;\n"
4540 "    u32 tid;\n"
4541 "    char comm[];\n"
4542 "    struct sample_id sample_id;\n"
4543 "};\n"
4544
4545 #. type: Plain text
4546 #: build/C/man2/perf_event_open.2:1722
4547 msgid "is a string containing the new name of the process."
4548 msgstr ""
4549
4550 #. type: TP
4551 #: build/C/man2/perf_event_open.2:1723
4552 #, no-wrap
4553 msgid "B<PERF_RECORD_EXIT>"
4554 msgstr "B<PERF_RECORD_EXIT>"
4555
4556 #. type: Plain text
4557 #: build/C/man2/perf_event_open.2:1726
4558 msgid "This record indicates a process exit event."
4559 msgstr ""
4560
4561 #. type: Plain text
4562 #: build/C/man2/perf_event_open.2:1736 build/C/man2/perf_event_open.2:1766
4563 #, no-wrap
4564 msgid ""
4565 "struct {\n"
4566 "    struct perf_event_header header;\n"
4567 "    u32 pid, ppid;\n"
4568 "    u32 tid, ptid;\n"
4569 "    u64 time;\n"
4570 "    struct sample_id sample_id;\n"
4571 "};\n"
4572 msgstr ""
4573 "struct {\n"
4574 "    struct perf_event_header header;\n"
4575 "    u32 pid, ppid;\n"
4576 "    u32 tid, ptid;\n"
4577 "    u64 time;\n"
4578 "    struct sample_id sample_id;\n"
4579 "};\n"
4580
4581 #. type: TP
4582 #: build/C/man2/perf_event_open.2:1738
4583 #, no-wrap
4584 msgid "B<PERF_RECORD_THROTTLE>, B<PERF_RECORD_UNTHROTTLE>"
4585 msgstr "B<PERF_RECORD_THROTTLE>, B<PERF_RECORD_UNTHROTTLE>"
4586
4587 #. type: Plain text
4588 #: build/C/man2/perf_event_open.2:1741
4589 msgid "This record indicates a throttle/unthrottle event."
4590 msgstr ""
4591
4592 #. type: Plain text
4593 #: build/C/man2/perf_event_open.2:1751
4594 #, no-wrap
4595 msgid ""
4596 "struct {\n"
4597 "    struct perf_event_header header;\n"
4598 "    u64 time;\n"
4599 "    u64 id;\n"
4600 "    u64 stream_id;\n"
4601 "    struct sample_id sample_id;\n"
4602 "};\n"
4603 msgstr ""
4604 "struct {\n"
4605 "    struct perf_event_header header;\n"
4606 "    u64 time;\n"
4607 "    u64 id;\n"
4608 "    u64 stream_id;\n"
4609 "    struct sample_id sample_id;\n"
4610 "};\n"
4611
4612 #. type: TP
4613 #: build/C/man2/perf_event_open.2:1753
4614 #, no-wrap
4615 msgid "B<PERF_RECORD_FORK>"
4616 msgstr "B<PERF_RECORD_FORK>"
4617
4618 #. type: Plain text
4619 #: build/C/man2/perf_event_open.2:1756
4620 msgid "This record indicates a fork event."
4621 msgstr ""
4622
4623 #. type: TP
4624 #: build/C/man2/perf_event_open.2:1768
4625 #, no-wrap
4626 msgid "B<PERF_RECORD_READ>"
4627 msgstr "B<PERF_RECORD_READ>"
4628
4629 #. type: Plain text
4630 #: build/C/man2/perf_event_open.2:1771
4631 msgid "This record indicates a read event."
4632 msgstr ""
4633
4634 #. type: Plain text
4635 #: build/C/man2/perf_event_open.2:1780
4636 #, no-wrap
4637 msgid ""
4638 "struct {\n"
4639 "    struct perf_event_header header;\n"
4640 "    u32 pid, tid;\n"
4641 "    struct read_format values;\n"
4642 "    struct sample_id sample_id;\n"
4643 "};\n"
4644 msgstr ""
4645 "struct {\n"
4646 "    struct perf_event_header header;\n"
4647 "    u32 pid, tid;\n"
4648 "    struct read_format values;\n"
4649 "    struct sample_id sample_id;\n"
4650 "};\n"
4651
4652 #. type: TP
4653 #: build/C/man2/perf_event_open.2:1782
4654 #, no-wrap
4655 msgid "B<PERF_RECORD_SAMPLE>"
4656 msgstr "B<PERF_RECORD_SAMPLE>"
4657
4658 #. type: Plain text
4659 #: build/C/man2/perf_event_open.2:1785
4660 msgid "This record indicates a sample."
4661 msgstr ""
4662
4663 #. type: Plain text
4664 #: build/C/man2/perf_event_open.2:1817
4665 #, no-wrap
4666 msgid ""
4667 "struct {\n"
4668 "    struct perf_event_header header;\n"
4669 "    u64   sample_id;  /* if PERF_SAMPLE_IDENTIFIER */\n"
4670 "    u64   ip;         /* if PERF_SAMPLE_IP */\n"
4671 "    u32   pid, tid;   /* if PERF_SAMPLE_TID */\n"
4672 "    u64   time;       /* if PERF_SAMPLE_TIME */\n"
4673 "    u64   addr;       /* if PERF_SAMPLE_ADDR */\n"
4674 "    u64   id;         /* if PERF_SAMPLE_ID */\n"
4675 "    u64   stream_id;  /* if PERF_SAMPLE_STREAM_ID */\n"
4676 "    u32   cpu, res;   /* if PERF_SAMPLE_CPU */\n"
4677 "    u64   period;     /* if PERF_SAMPLE_PERIOD */\n"
4678 "    struct read_format v; /* if PERF_SAMPLE_READ */\n"
4679 "    u64   nr;         /* if PERF_SAMPLE_CALLCHAIN */\n"
4680 "    u64   ips[nr];    /* if PERF_SAMPLE_CALLCHAIN */\n"
4681 "    u32   size;       /* if PERF_SAMPLE_RAW */\n"
4682 "    char  data[size]; /* if PERF_SAMPLE_RAW */\n"
4683 "    u64   bnr;        /* if PERF_SAMPLE_BRANCH_STACK */\n"
4684 "    struct perf_branch_entry lbr[bnr];\n"
4685 "                      /* if PERF_SAMPLE_BRANCH_STACK */\n"
4686 "    u64   abi;        /* if PERF_SAMPLE_REGS_USER */\n"
4687 "    u64   regs[weight(mask)];\n"
4688 "                      /* if PERF_SAMPLE_REGS_USER */\n"
4689 "    u64   size;       /* if PERF_SAMPLE_STACK_USER */\n"
4690 "    char  data[size]; /* if PERF_SAMPLE_STACK_USER */\n"
4691 "    u64   dyn_size;   /* if PERF_SAMPLE_STACK_USER */\n"
4692 "    u64   weight;     /* if PERF_SAMPLE_WEIGHT */\n"
4693 "    u64   data_src;   /* if PERF_SAMPLE_DATA_SRC */\n"
4694 "    u64   transaction;/* if PERF_SAMPLE_TRANSACTION */\n"
4695 "};\n"
4696 msgstr ""
4697 "struct {\n"
4698 "    struct perf_event_header header;\n"
4699 "    u64   sample_id;  /* if PERF_SAMPLE_IDENTIFIER */\n"
4700 "    u64   ip;         /* if PERF_SAMPLE_IP */\n"
4701 "    u32   pid, tid;   /* if PERF_SAMPLE_TID */\n"
4702 "    u64   time;       /* if PERF_SAMPLE_TIME */\n"
4703 "    u64   addr;       /* if PERF_SAMPLE_ADDR */\n"
4704 "    u64   id;         /* if PERF_SAMPLE_ID */\n"
4705 "    u64   stream_id;  /* if PERF_SAMPLE_STREAM_ID */\n"
4706 "    u32   cpu, res;   /* if PERF_SAMPLE_CPU */\n"
4707 "    u64   period;     /* if PERF_SAMPLE_PERIOD */\n"
4708 "    struct read_format v; /* if PERF_SAMPLE_READ */\n"
4709 "    u64   nr;         /* if PERF_SAMPLE_CALLCHAIN */\n"
4710 "    u64   ips[nr];    /* if PERF_SAMPLE_CALLCHAIN */\n"
4711 "    u32   size;       /* if PERF_SAMPLE_RAW */\n"
4712 "    char  data[size]; /* if PERF_SAMPLE_RAW */\n"
4713 "    u64   bnr;        /* if PERF_SAMPLE_BRANCH_STACK */\n"
4714 "    struct perf_branch_entry lbr[bnr];\n"
4715 "                      /* if PERF_SAMPLE_BRANCH_STACK */\n"
4716 "    u64   abi;        /* if PERF_SAMPLE_REGS_USER */\n"
4717 "    u64   regs[weight(mask)];\n"
4718 "                      /* if PERF_SAMPLE_REGS_USER */\n"
4719 "    u64   size;       /* if PERF_SAMPLE_STACK_USER */\n"
4720 "    char  data[size]; /* if PERF_SAMPLE_STACK_USER */\n"
4721 "    u64   dyn_size;   /* if PERF_SAMPLE_STACK_USER */\n"
4722 "    u64   weight;     /* if PERF_SAMPLE_WEIGHT */\n"
4723 "    u64   data_src;   /* if PERF_SAMPLE_DATA_SRC */\n"
4724 "    u64   transaction;/* if PERF_SAMPLE_TRANSACTION */\n"
4725 "};\n"
4726
4727 #. type: TP
4728 #: build/C/man2/perf_event_open.2:1819
4729 #, no-wrap
4730 msgid "I<sample_id>"
4731 msgstr "I<sample_id>"
4732
4733 #. type: Plain text
4734 #: build/C/man2/perf_event_open.2:1829
4735 msgid "If B<PERF_SAMPLE_IDENTIFIER> is enabled, a 64-bit unique ID is included.  This is a duplication of the B<PERF_SAMPLE_ID> I<id> value, but included at the beginning of the sample so parsers can easily obtain the value."
4736 msgstr ""
4737
4738 #. type: TP
4739 #: build/C/man2/perf_event_open.2:1829
4740 #, no-wrap
4741 msgid "I<ip>"
4742 msgstr "I<ip>"
4743
4744 #. type: Plain text
4745 #: build/C/man2/perf_event_open.2:1835
4746 msgid "If B<PERF_SAMPLE_IP> is enabled, then a 64-bit instruction pointer value is included."
4747 msgstr ""
4748
4749 #. type: TP
4750 #: build/C/man2/perf_event_open.2:1835
4751 #, no-wrap
4752 msgid "I<pid>, I<tid>"
4753 msgstr "I<pid>, I<tid>"
4754
4755 #. type: Plain text
4756 #: build/C/man2/perf_event_open.2:1841
4757 msgid "If B<PERF_SAMPLE_TID> is enabled, then a 32-bit process ID and 32-bit thread ID are included."
4758 msgstr ""
4759
4760 #. type: TP
4761 #: build/C/man2/perf_event_open.2:1841
4762 #, no-wrap
4763 msgid "I<time>"
4764 msgstr "I<time>"
4765
4766 #. type: Plain text
4767 #: build/C/man2/perf_event_open.2:1849
4768 msgid "If B<PERF_SAMPLE_TIME> is enabled, then a 64-bit timestamp is included.  This is obtained via local_clock() which is a hardware timestamp if available and the jiffies value if not."
4769 msgstr ""
4770
4771 #. type: Plain text
4772 #: build/C/man2/perf_event_open.2:1856
4773 msgid "If B<PERF_SAMPLE_ADDR> is enabled, then a 64-bit address is included.  This is usually the address of a tracepoint, breakpoint, or software event; otherwise the value is 0."
4774 msgstr ""
4775
4776 #. type: Plain text
4777 #: build/C/man2/perf_event_open.2:1864
4778 msgid "If B<PERF_SAMPLE_ID> is enabled, a 64-bit unique ID is included.  If the event is a member of an event group, the group leader ID is returned.  This ID is the same as the one returned by B<PERF_FORMAT_ID>."
4779 msgstr ""
4780
4781 #. type: TP
4782 #: build/C/man2/perf_event_open.2:1864
4783 #, no-wrap
4784 msgid "I<stream_id>"
4785 msgstr "I<stream_id>"
4786
4787 #. type: Plain text
4788 #: build/C/man2/perf_event_open.2:1874
4789 msgid "If B<PERF_SAMPLE_STREAM_ID> is enabled, a 64-bit unique ID is included.  Unlike B<PERF_SAMPLE_ID> the actual ID is returned, not the group leader.  This ID is the same as the one returned by B<PERF_FORMAT_ID>."
4790 msgstr ""
4791
4792 #. type: TP
4793 #: build/C/man2/perf_event_open.2:1874
4794 #, no-wrap
4795 msgid "I<cpu>, I<res>"
4796 msgstr "I<cpu>, I<res>"
4797
4798 #. type: Plain text
4799 #: build/C/man2/perf_event_open.2:1881
4800 msgid "If B<PERF_SAMPLE_CPU> is enabled, this is a 32-bit value indicating which CPU was being used, in addition to a reserved (unused)  32-bit value."
4801 msgstr ""
4802
4803 #. type: TP
4804 #: build/C/man2/perf_event_open.2:1881
4805 #, no-wrap
4806 msgid "I<period>"
4807 msgstr "I<period>"
4808
4809 #. type: Plain text
4810 #: build/C/man2/perf_event_open.2:1887
4811 msgid "If B<PERF_SAMPLE_PERIOD> is enabled, a 64-bit value indicating the current sampling period is written."
4812 msgstr ""
4813
4814 #. type: TP
4815 #: build/C/man2/perf_event_open.2:1887
4816 #, no-wrap
4817 msgid "I<v>"
4818 msgstr "I<v>"
4819
4820 #. type: Plain text
4821 #: build/C/man2/perf_event_open.2:1898
4822 msgid "If B<PERF_SAMPLE_READ> is enabled, a structure of type read_format is included which has values for all events in the event group.  The values included depend on the I<read_format> value used at B<perf_event_open>()  time."
4823 msgstr ""
4824
4825 #. type: TP
4826 #: build/C/man2/perf_event_open.2:1898
4827 #, no-wrap
4828 msgid "I<nr>, I<ips[nr]>"
4829 msgstr "I<nr>, I<ips[nr]>"
4830
4831 #. type: Plain text
4832 #: build/C/man2/perf_event_open.2:1906
4833 msgid "If B<PERF_SAMPLE_CALLCHAIN> is enabled, then a 64-bit number is included which indicates how many following 64-bit instruction pointers will follow.  This is the current callchain."
4834 msgstr ""
4835
4836 #. type: TP
4837 #: build/C/man2/perf_event_open.2:1906
4838 #, no-wrap
4839 msgid "I<size>, I<data[size]>"
4840 msgstr "I<size>, I<data[size]>"
4841
4842 #. type: Plain text
4843 #: build/C/man2/perf_event_open.2:1913
4844 msgid "If B<PERF_SAMPLE_RAW> is enabled, then a 32-bit value indicating size is included followed by an array of 8-bit values of length size.  The values are padded with 0 to have 64-bit alignment."
4845 msgstr ""
4846
4847 #. type: Plain text
4848 #: build/C/man2/perf_event_open.2:1918
4849 msgid "This RAW record data is opaque with respect to the ABI.  The ABI doesn't make any promises with respect to the stability of its content, it may vary depending on event, hardware, and kernel version."
4850 msgstr ""
4851
4852 #. type: TP
4853 #: build/C/man2/perf_event_open.2:1918
4854 #, no-wrap
4855 msgid "I<bnr>, I<lbr[bnr]>"
4856 msgstr "I<bnr>, I<lbr[bnr]>"
4857
4858 #. type: Plain text
4859 #: build/C/man2/perf_event_open.2:1927
4860 msgid "If B<PERF_SAMPLE_BRANCH_STACK> is enabled, then a 64-bit value indicating the number of records is included, followed by I<bnr> I<perf_branch_entry> structures which each include the fields:"
4861 msgstr ""
4862
4863 #. type: TP
4864 #: build/C/man2/perf_event_open.2:1928
4865 #, no-wrap
4866 msgid "I<from>"
4867 msgstr "I<from>"
4868
4869 #. type: Plain text
4870 #: build/C/man2/perf_event_open.2:1931
4871 msgid "This indicates the source instruction (may not be a branch)."
4872 msgstr ""
4873
4874 #. type: TP
4875 #: build/C/man2/perf_event_open.2:1931
4876 #, no-wrap
4877 msgid "I<to>"
4878 msgstr "I<to>"
4879
4880 #. type: Plain text
4881 #: build/C/man2/perf_event_open.2:1934
4882 msgid "The branch target."
4883 msgstr ""
4884
4885 #. type: TP
4886 #: build/C/man2/perf_event_open.2:1934
4887 #, no-wrap
4888 msgid "I<mispred>"
4889 msgstr "I<mispred>"
4890
4891 #. type: Plain text
4892 #: build/C/man2/perf_event_open.2:1937
4893 msgid "The branch target was mispredicted."
4894 msgstr ""
4895
4896 #. type: TP
4897 #: build/C/man2/perf_event_open.2:1937
4898 #, no-wrap
4899 msgid "I<predicted>"
4900 msgstr "I<predicted>"
4901
4902 #. type: Plain text
4903 #: build/C/man2/perf_event_open.2:1940
4904 msgid "The branch target was predicted."
4905 msgstr ""
4906
4907 #. type: TP
4908 #: build/C/man2/perf_event_open.2:1940
4909 #, no-wrap
4910 msgid "I<in_tx> (since Linux 3.11)"
4911 msgstr "I<in_tx> (Linux 3.11 以降)"
4912
4913 #. type: Plain text
4914 #: build/C/man2/perf_event_open.2:1943
4915 msgid "The branch was in a transactional memory transaction."
4916 msgstr ""
4917
4918 #. type: TP
4919 #: build/C/man2/perf_event_open.2:1943
4920 #, no-wrap
4921 msgid "I<abort> (since Linux 3.11)"
4922 msgstr "I<abort> (Linux 3.11 以降)"
4923
4924 #. type: Plain text
4925 #: build/C/man2/perf_event_open.2:1946
4926 msgid "The branch was in an aborted transactional memory transaction."
4927 msgstr ""
4928
4929 #. type: Plain text
4930 #: build/C/man2/perf_event_open.2:1950
4931 msgid "The entries are from most to least recent, so the first entry has the most recent branch."
4932 msgstr ""
4933
4934 #. type: Plain text
4935 #: build/C/man2/perf_event_open.2:1957
4936 msgid "Support for I<mispred> and I<predicted> is optional; if not supported, both values will be 0."
4937 msgstr ""
4938
4939 #. type: Plain text
4940 #: build/C/man2/perf_event_open.2:1961
4941 msgid "The type of branches recorded is specified by the I<branch_sample_type> field."
4942 msgstr ""
4943
4944 #. type: TP
4945 #: build/C/man2/perf_event_open.2:1963
4946 #, no-wrap
4947 msgid "I<abi>, I<regs[weight(mask)]>"
4948 msgstr "I<abi>, I<regs[weight(mask)]>"
4949
4950 #. type: Plain text
4951 #: build/C/man2/perf_event_open.2:1968
4952 msgid "If B<PERF_SAMPLE_REGS_USER> is enabled, then the user CPU registers are recorded."
4953 msgstr ""
4954
4955 #. type: Plain text
4956 #: build/C/man2/perf_event_open.2:1974
4957 msgid "The I<abi> field is one of B<PERF_SAMPLE_REGS_ABI_NONE>, B<PERF_SAMPLE_REGS_ABI_32> or B<PERF_SAMPLE_REGS_ABI_64>."
4958 msgstr ""
4959
4960 #. type: Plain text
4961 #: build/C/man2/perf_event_open.2:1984
4962 msgid "The I<regs> field is an array of the CPU registers that were specified by the I<sample_regs_user> attr field.  The number of values is the number of bits set in the I<sample_regs_user> bit mask."
4963 msgstr ""
4964
4965 #. type: TP
4966 #: build/C/man2/perf_event_open.2:1984
4967 #, no-wrap
4968 msgid "I<size>, I<data[size]>, I<dyn_size>"
4969 msgstr "I<size>, I<data[size]>, I<dyn_size>"
4970
4971 #. type: Plain text
4972 #: build/C/man2/perf_event_open.2:2000
4973 msgid "If B<PERF_SAMPLE_STACK_USER> is enabled, then the user stack is recorded.  This can be used to generate stack backtraces.  I<size> is the size requested by the user in I<sample_stack_user> or else the maximum record size.  I<data> is the stack data (a raw dump of the memory pointed to by the stack pointer at the time of sampling).  I<dyn_size> is the amount of data actually dumped (can be less than I<size>)."
4974 msgstr ""
4975
4976 #. type: TP
4977 #: build/C/man2/perf_event_open.2:2000
4978 #, no-wrap
4979 msgid "I<weight>"
4980 msgstr "I<weight>"
4981
4982 #. type: Plain text
4983 #: build/C/man2/perf_event_open.2:2008
4984 msgid "If B<PERF_SAMPLE_WEIGHT> is enabled, then a 64-bit value provided by the hardware is recorded that indicates how costly the event was.  This allows expensive events to stand out more clearly in profiles."
4985 msgstr ""
4986
4987 #. type: TP
4988 #: build/C/man2/perf_event_open.2:2008
4989 #, no-wrap
4990 msgid "I<data_src>"
4991 msgstr "I<data_src>"
4992
4993 #. type: Plain text
4994 #: build/C/man2/perf_event_open.2:2014
4995 msgid "If B<PERF_SAMPLE_DATA_SRC> is enabled, then a 64-bit value is recorded that is made up of the following fields:"
4996 msgstr ""
4997
4998 #. type: TP
4999 #: build/C/man2/perf_event_open.2:2015
5000 #, no-wrap
5001 msgid "I<mem_op>"
5002 msgstr "I<mem_op>"
5003
5004 #. type: Plain text
5005 #: build/C/man2/perf_event_open.2:2018
5006 msgid "Type of opcode, a bitwise combination of:"
5007 msgstr ""
5008
5009 #. type: TP
5010 #: build/C/man2/perf_event_open.2:2021
5011 #, no-wrap
5012 msgid "B<PERF_MEM_OP_NA>"
5013 msgstr "B<PERF_MEM_OP_NA>"
5014
5015 #. type: Plain text
5016 #: build/C/man2/perf_event_open.2:2024 build/C/man2/perf_event_open.2:2049
5017 #: build/C/man2/perf_event_open.2:2100 build/C/man2/perf_event_open.2:2124
5018 #: build/C/man2/perf_event_open.2:2140
5019 msgid "Not available"
5020 msgstr ""
5021
5022 #. type: TP
5023 #: build/C/man2/perf_event_open.2:2024
5024 #, no-wrap
5025 msgid "B<PERF_MEM_OP_LOAD>"
5026 msgstr "B<PERF_MEM_OP_LOAD>"
5027
5028 #. type: Plain text
5029 #: build/C/man2/perf_event_open.2:2027
5030 msgid "Load instruction"
5031 msgstr ""
5032
5033 #. type: TP
5034 #: build/C/man2/perf_event_open.2:2027
5035 #, no-wrap
5036 msgid "B<PERF_MEM_OP_STORE>"
5037 msgstr "B<PERF_MEM_OP_STORE>"
5038
5039 #. type: Plain text
5040 #: build/C/man2/perf_event_open.2:2030
5041 msgid "Store instruction"
5042 msgstr ""
5043
5044 #. type: TP
5045 #: build/C/man2/perf_event_open.2:2030
5046 #, no-wrap
5047 msgid "B<PERF_MEM_OP_PFETCH>"
5048 msgstr "B<PERF_MEM_OP_PFETCH>"
5049
5050 #. type: Plain text
5051 #: build/C/man2/perf_event_open.2:2033
5052 msgid "Prefetch"
5053 msgstr ""
5054
5055 #. type: TP
5056 #: build/C/man2/perf_event_open.2:2033
5057 #, no-wrap
5058 msgid "B<PERF_MEM_OP_EXEC>"
5059 msgstr "B<PERF_MEM_OP_EXEC>"
5060
5061 #. type: Plain text
5062 #: build/C/man2/perf_event_open.2:2036
5063 msgid "Executable code"
5064 msgstr ""
5065
5066 #. type: TP
5067 #: build/C/man2/perf_event_open.2:2038
5068 #, no-wrap
5069 msgid "I<mem_lvl>"
5070 msgstr "I<mem_lvl>"
5071
5072 #. type: Plain text
5073 #: build/C/man2/perf_event_open.2:2043
5074 msgid "Memory hierarchy level hit or miss, a bitwise combination of the following, shifted left by B<PERF_MEM_LVL_SHIFT>:"
5075 msgstr ""
5076
5077 #. type: TP
5078 #: build/C/man2/perf_event_open.2:2046
5079 #, no-wrap
5080 msgid "B<PERF_MEM_LVL_NA>"
5081 msgstr "B<PERF_MEM_LVL_NA>"
5082
5083 #. type: TP
5084 #: build/C/man2/perf_event_open.2:2049
5085 #, no-wrap
5086 msgid "B<PERF_MEM_LVL_HIT>"
5087 msgstr "B<PERF_MEM_LVL_HIT>"
5088
5089 #. type: Plain text
5090 #: build/C/man2/perf_event_open.2:2052 build/C/man2/perf_event_open.2:2143
5091 msgid "Hit"
5092 msgstr ""
5093
5094 #. type: TP
5095 #: build/C/man2/perf_event_open.2:2052
5096 #, no-wrap
5097 msgid "B<PERF_MEM_LVL_MISS>"
5098 msgstr "B<PERF_MEM_LVL_MISS>"
5099
5100 #. type: Plain text
5101 #: build/C/man2/perf_event_open.2:2055 build/C/man2/perf_event_open.2:2146
5102 msgid "Miss"
5103 msgstr ""
5104
5105 #. type: TP
5106 #: build/C/man2/perf_event_open.2:2055
5107 #, no-wrap
5108 msgid "B<PERF_MEM_LVL_L1>"
5109 msgstr "B<PERF_MEM_LVL_L1>"
5110
5111 #. type: Plain text
5112 #: build/C/man2/perf_event_open.2:2058
5113 msgid "Level 1 cache"
5114 msgstr ""
5115
5116 #. type: TP
5117 #: build/C/man2/perf_event_open.2:2058
5118 #, no-wrap
5119 msgid "B<PERF_MEM_LVL_LFB>"
5120 msgstr "B<PERF_MEM_LVL_LFB>"
5121
5122 #. type: Plain text
5123 #: build/C/man2/perf_event_open.2:2061
5124 msgid "Line fill buffer"
5125 msgstr ""
5126
5127 #. type: TP
5128 #: build/C/man2/perf_event_open.2:2061
5129 #, no-wrap
5130 msgid "B<PERF_MEM_LVL_L2>"
5131 msgstr "B<PERF_MEM_LVL_L2>"
5132
5133 #. type: Plain text
5134 #: build/C/man2/perf_event_open.2:2064
5135 msgid "Level 2 cache"
5136 msgstr ""
5137
5138 #. type: TP
5139 #: build/C/man2/perf_event_open.2:2064
5140 #, no-wrap
5141 msgid "B<PERF_MEM_LVL_L3>"
5142 msgstr "B<PERF_MEM_LVL_L3>"
5143
5144 #. type: Plain text
5145 #: build/C/man2/perf_event_open.2:2067
5146 msgid "Level 3 cache"
5147 msgstr ""
5148
5149 #. type: TP
5150 #: build/C/man2/perf_event_open.2:2067
5151 #, no-wrap
5152 msgid "B<PERF_MEM_LVL_LOC_RAM>"
5153 msgstr "B<PERF_MEM_LVL_LOC_RAM>"
5154
5155 #. type: Plain text
5156 #: build/C/man2/perf_event_open.2:2070
5157 msgid "Local DRAM"
5158 msgstr ""
5159
5160 #. type: TP
5161 #: build/C/man2/perf_event_open.2:2070
5162 #, no-wrap
5163 msgid "B<PERF_MEM_LVL_REM_RAM1>"
5164 msgstr "B<PERF_MEM_LVL_REM_RAM1>"
5165
5166 #. type: Plain text
5167 #: build/C/man2/perf_event_open.2:2073
5168 msgid "Remote DRAM 1 hop"
5169 msgstr ""
5170
5171 #. type: TP
5172 #: build/C/man2/perf_event_open.2:2073
5173 #, no-wrap
5174 msgid "B<PERF_MEM_LVL_REM_RAM2>"
5175 msgstr "B<PERF_MEM_LVL_REM_RAM2>"
5176
5177 #. type: Plain text
5178 #: build/C/man2/perf_event_open.2:2076
5179 msgid "Remote DRAM 2 hops"
5180 msgstr ""
5181
5182 #. type: TP
5183 #: build/C/man2/perf_event_open.2:2076
5184 #, no-wrap
5185 msgid "B<PERF_MEM_LVL_REM_CCE1>"
5186 msgstr "B<PERF_MEM_LVL_REM_CCE1>"
5187
5188 #. type: Plain text
5189 #: build/C/man2/perf_event_open.2:2079
5190 msgid "Remote cache 1 hop"
5191 msgstr ""
5192
5193 #. type: TP
5194 #: build/C/man2/perf_event_open.2:2079
5195 #, no-wrap
5196 msgid "B<PERF_MEM_LVL_REM_CCE2>"
5197 msgstr "B<PERF_MEM_LVL_REM_CCE2>"
5198
5199 #. type: Plain text
5200 #: build/C/man2/perf_event_open.2:2082
5201 msgid "Remote cache 2 hops"
5202 msgstr ""
5203
5204 #. type: TP
5205 #: build/C/man2/perf_event_open.2:2082
5206 #, no-wrap
5207 msgid "B<PERF_MEM_LVL_IO>"
5208 msgstr "B<PERF_MEM_LVL_IO>"
5209
5210 #. type: Plain text
5211 #: build/C/man2/perf_event_open.2:2085
5212 msgid "I/O memory"
5213 msgstr ""
5214
5215 #. type: TP
5216 #: build/C/man2/perf_event_open.2:2085
5217 #, no-wrap
5218 msgid "B<PERF_MEM_LVL_UNC>"
5219 msgstr "B<PERF_MEM_LVL_UNC>"
5220
5221 #. type: Plain text
5222 #: build/C/man2/perf_event_open.2:2088
5223 msgid "Uncached memory"
5224 msgstr ""
5225
5226 #. type: TP
5227 #: build/C/man2/perf_event_open.2:2090
5228 #, no-wrap
5229 msgid "I<mem_snoop>"
5230 msgstr "I<mem_snoop>"
5231
5232 #. type: Plain text
5233 #: build/C/man2/perf_event_open.2:2094
5234 msgid "Snoop mode, a bitwise combination of the following, shifted left by B<PERF_MEM_SNOOP_SHIFT>:"
5235 msgstr ""
5236
5237 #. type: TP
5238 #: build/C/man2/perf_event_open.2:2097
5239 #, no-wrap
5240 msgid "B<PERF_MEM_SNOOP_NA>"
5241 msgstr "B<PERF_MEM_SNOOP_NA>"
5242
5243 #. type: TP
5244 #: build/C/man2/perf_event_open.2:2100
5245 #, no-wrap
5246 msgid "B<PERF_MEM_SNOOP_NONE>"
5247 msgstr "B<PERF_MEM_SNOOP_NONE>"
5248
5249 #. type: Plain text
5250 #: build/C/man2/perf_event_open.2:2103
5251 msgid "No snoop"
5252 msgstr ""
5253
5254 #. type: TP
5255 #: build/C/man2/perf_event_open.2:2103
5256 #, no-wrap
5257 msgid "B<PERF_MEM_SNOOP_HIT>"
5258 msgstr "B<PERF_MEM_SNOOP_HIT>"
5259
5260 #. type: Plain text
5261 #: build/C/man2/perf_event_open.2:2106
5262 msgid "Snoop hit"
5263 msgstr ""
5264
5265 #. type: TP
5266 #: build/C/man2/perf_event_open.2:2106
5267 #, no-wrap
5268 msgid "B<PERF_MEM_SNOOP_MISS>"
5269 msgstr "B<PERF_MEM_SNOOP_MISS>"
5270
5271 #. type: Plain text
5272 #: build/C/man2/perf_event_open.2:2109
5273 msgid "Snoop miss"
5274 msgstr ""
5275
5276 #. type: TP
5277 #: build/C/man2/perf_event_open.2:2109
5278 #, no-wrap
5279 msgid "B<PERF_MEM_SNOOP_HITM>"
5280 msgstr "B<PERF_MEM_SNOOP_HITM>"
5281
5282 #. type: Plain text
5283 #: build/C/man2/perf_event_open.2:2112
5284 msgid "Snoop hit modified"
5285 msgstr ""
5286
5287 #. type: TP
5288 #: build/C/man2/perf_event_open.2:2114
5289 #, no-wrap
5290 msgid "I<mem_lock>"
5291 msgstr "I<mem_lock>"
5292
5293 #. type: Plain text
5294 #: build/C/man2/perf_event_open.2:2118
5295 msgid "Lock instruction, a bitwise combination of the following, shifted left by B<PERF_MEM_LOCK_SHIFT>:"
5296 msgstr ""
5297
5298 #. type: TP
5299 #: build/C/man2/perf_event_open.2:2121
5300 #, no-wrap
5301 msgid "B<PERF_MEM_LOCK_NA>"
5302 msgstr "B<PERF_MEM_LOCK_NA>"
5303
5304 #. type: TP
5305 #: build/C/man2/perf_event_open.2:2124
5306 #, no-wrap
5307 msgid "B<PERF_MEM_LOCK_LOCKED>"
5308 msgstr "B<PERF_MEM_LOCK_LOCKED>"
5309
5310 #. type: Plain text
5311 #: build/C/man2/perf_event_open.2:2127
5312 msgid "Locked transaction"
5313 msgstr ""
5314
5315 #. type: TP
5316 #: build/C/man2/perf_event_open.2:2129
5317 #, no-wrap
5318 msgid "I<mem_dtlb>"
5319 msgstr "I<mem_dtlb>"
5320
5321 #. type: Plain text
5322 #: build/C/man2/perf_event_open.2:2134
5323 msgid "TLB access hit or miss, a bitwise combination of the following, shifted left by B<PERF_MEM_TLB_SHIFT>:"
5324 msgstr ""
5325
5326 #. type: TP
5327 #: build/C/man2/perf_event_open.2:2137
5328 #, no-wrap
5329 msgid "B<PERF_MEM_TLB_NA>"
5330 msgstr "B<PERF_MEM_TLB_NA>"
5331
5332 #. type: TP
5333 #: build/C/man2/perf_event_open.2:2140
5334 #, no-wrap
5335 msgid "B<PERF_MEM_TLB_HIT>"
5336 msgstr "B<PERF_MEM_TLB_HIT>"
5337
5338 #. type: TP
5339 #: build/C/man2/perf_event_open.2:2143
5340 #, no-wrap
5341 msgid "B<PERF_MEM_TLB_MISS>"
5342 msgstr "B<PERF_MEM_TLB_MISS>"
5343
5344 #. type: TP
5345 #: build/C/man2/perf_event_open.2:2146
5346 #, no-wrap
5347 msgid "B<PERF_MEM_TLB_L1>"
5348 msgstr "B<PERF_MEM_TLB_L1>"
5349
5350 #. type: Plain text
5351 #: build/C/man2/perf_event_open.2:2149
5352 msgid "Level 1 TLB"
5353 msgstr ""
5354
5355 #. type: TP
5356 #: build/C/man2/perf_event_open.2:2149
5357 #, no-wrap
5358 msgid "B<PERF_MEM_TLB_L2>"
5359 msgstr "B<PERF_MEM_TLB_L2>"
5360
5361 #. type: Plain text
5362 #: build/C/man2/perf_event_open.2:2152
5363 msgid "Level 2 TLB"
5364 msgstr ""
5365
5366 #. type: TP
5367 #: build/C/man2/perf_event_open.2:2152
5368 #, no-wrap
5369 msgid "B<PERF_MEM_TLB_WK>"
5370 msgstr "B<PERF_MEM_TLB_WK>"
5371
5372 #. type: Plain text
5373 #: build/C/man2/perf_event_open.2:2155
5374 msgid "Hardware walker"
5375 msgstr ""
5376
5377 #. type: TP
5378 #: build/C/man2/perf_event_open.2:2155
5379 #, no-wrap
5380 msgid "B<PERF_MEM_TLB_OS>"
5381 msgstr "B<PERF_MEM_TLB_OS>"
5382
5383 #. type: Plain text
5384 #: build/C/man2/perf_event_open.2:2158
5385 msgid "OS fault handler"
5386 msgstr ""
5387
5388 #. type: TP
5389 #: build/C/man2/perf_event_open.2:2161
5390 #, no-wrap
5391 msgid "I<transaction>"
5392 msgstr "I<transaction>"
5393
5394 #. type: Plain text
5395 #: build/C/man2/perf_event_open.2:2167
5396 msgid "If the B<PERF_SAMPLE_TRANSACTION> flag is set, then a 64-bit field is recorded describing the sources of any transactional memory aborts."
5397 msgstr ""
5398
5399 #. type: Plain text
5400 #: build/C/man2/perf_event_open.2:2169
5401 msgid "The field is a bitwise combination of the following values:"
5402 msgstr ""
5403
5404 #. type: TP
5405 #: build/C/man2/perf_event_open.2:2170
5406 #, no-wrap
5407 msgid "B<PERF_TXN_ELISION>"
5408 msgstr "B<PERF_TXN_ELISION>"
5409
5410 #. type: Plain text
5411 #: build/C/man2/perf_event_open.2:2173
5412 msgid "Abort from an elision type transaction (Intel-CPU-specific)."
5413 msgstr ""
5414
5415 #. type: TP
5416 #: build/C/man2/perf_event_open.2:2173
5417 #, no-wrap
5418 msgid "B<PERF_TXN_TRANSACTION>"
5419 msgstr "B<PERF_TXN_TRANSACTION>"
5420
5421 #. type: Plain text
5422 #: build/C/man2/perf_event_open.2:2176
5423 msgid "Abort from a generic transaction."
5424 msgstr ""
5425
5426 #. type: TP
5427 #: build/C/man2/perf_event_open.2:2176
5428 #, no-wrap
5429 msgid "B<PERF_TXN_SYNC>"
5430 msgstr "B<PERF_TXN_SYNC>"
5431
5432 #. type: Plain text
5433 #: build/C/man2/perf_event_open.2:2179
5434 msgid "Synchronous abort (related to the reported instruction)."
5435 msgstr ""
5436
5437 #. type: TP
5438 #: build/C/man2/perf_event_open.2:2179
5439 #, no-wrap
5440 msgid "B<PERF_TXN_ASYNC>"
5441 msgstr "B<PERF_TXN_ASYNC>"
5442
5443 #. type: Plain text
5444 #: build/C/man2/perf_event_open.2:2182
5445 msgid "Asynchronous abort (not related to the reported instruction)."
5446 msgstr ""
5447
5448 #. type: TP
5449 #: build/C/man2/perf_event_open.2:2182
5450 #, no-wrap
5451 msgid "B<PERF_TXN_RETRY>"
5452 msgstr "B<PERF_TXN_RETRY>"
5453
5454 #. type: Plain text
5455 #: build/C/man2/perf_event_open.2:2185
5456 msgid "Retryable abort (retrying the transaction may have succeeded)."
5457 msgstr ""
5458
5459 #. type: TP
5460 #: build/C/man2/perf_event_open.2:2185
5461 #, no-wrap
5462 msgid "B<PERF_TXN_CONFLICT>"
5463 msgstr "B<PERF_TXN_CONFLICT>"
5464
5465 #. type: Plain text
5466 #: build/C/man2/perf_event_open.2:2188
5467 msgid "Abort due to memory conflicts with other threads."
5468 msgstr ""
5469
5470 #. type: TP
5471 #: build/C/man2/perf_event_open.2:2188
5472 #, no-wrap
5473 msgid "B<PERF_TXN_CAPACITY_WRITE>"
5474 msgstr ""
5475
5476 #. type: Plain text
5477 #: build/C/man2/perf_event_open.2:2191
5478 msgid "Abort due to write capacity overflow."
5479 msgstr ""
5480
5481 #. type: TP
5482 #: build/C/man2/perf_event_open.2:2191
5483 #, no-wrap
5484 msgid "B<PERF_TXN_CAPACITY_READ>"
5485 msgstr ""
5486
5487 #. type: Plain text
5488 #: build/C/man2/perf_event_open.2:2194
5489 msgid "Abort due to read capacity overflow."
5490 msgstr ""
5491
5492 #. type: Plain text
5493 #: build/C/man2/perf_event_open.2:2201
5494 msgid "In addition, a user-specified abort code can be obtained from the high 32 bits of the field by shifting right by B<PERF_TXN_ABORT_SHIFT> and masking with B<PERF_TXN_ABORT_MASK>."
5495 msgstr ""
5496
5497 #. type: TP
5498 #: build/C/man2/perf_event_open.2:2202
5499 #, no-wrap
5500 msgid "B<PERF_RECORD_MMAP2>"
5501 msgstr "B<PERF_RECORD_MMAP2>"
5502
5503 #. type: Plain text
5504 #: build/C/man2/perf_event_open.2:2211
5505 msgid "This record includes extended information on B<mmap>(2)  calls returning executable mappings.  The format is similar to that of the B<PERF_RECORD_MMAP> record, but includes extra values that allow uniquely identifying shared mappings."
5506 msgstr ""
5507
5508 #. type: Plain text
5509 #: build/C/man2/perf_event_open.2:2230
5510 #, no-wrap
5511 msgid ""
5512 "struct {\n"
5513 "    struct perf_event_header header;\n"
5514 "    u32 pid;\n"
5515 "    u32 tid;\n"
5516 "    u64 addr;\n"
5517 "    u64 len;\n"
5518 "    u64 pgoff;\n"
5519 "    u32 maj;\n"
5520 "    u32 min;\n"
5521 "    u64 ino;\n"
5522 "    u64 ino_generation;\n"
5523 "    u32 prot;\n"
5524 "    u32 flags;\n"
5525 "    char filename[];\n"
5526 "    struct sample_id sample_id;\n"
5527 "};\n"
5528 msgstr ""
5529 "struct {\n"
5530 "    struct perf_event_header header;\n"
5531 "    u32 pid;\n"
5532 "    u32 tid;\n"
5533 "    u64 addr;\n"
5534 "    u64 len;\n"
5535 "    u64 pgoff;\n"
5536 "    u32 maj;\n"
5537 "    u32 min;\n"
5538 "    u64 ino;\n"
5539 "    u64 ino_generation;\n"
5540 "    u32 prot;\n"
5541 "    u32 flags;\n"
5542 "    char filename[];\n"
5543 "    struct sample_id sample_id;\n"
5544 "};\n"
5545
5546 #. type: Plain text
5547 #: build/C/man2/perf_event_open.2:2241
5548 msgid "is the address of the allocated memory."
5549 msgstr ""
5550
5551 #. type: TP
5552 #: build/C/man2/perf_event_open.2:2241
5553 #, no-wrap
5554 msgid "I<len>"
5555 msgstr "I<len>"
5556
5557 #. type: Plain text
5558 #: build/C/man2/perf_event_open.2:2244
5559 msgid "is the length of the allocated memory."
5560 msgstr ""
5561
5562 #. type: TP
5563 #: build/C/man2/perf_event_open.2:2244
5564 #, no-wrap
5565 msgid "I<pgoff>"
5566 msgstr "I<pgoff>"
5567
5568 #. type: Plain text
5569 #: build/C/man2/perf_event_open.2:2247
5570 msgid "is the page offset of the allocated memory."
5571 msgstr ""
5572
5573 #. type: TP
5574 #: build/C/man2/perf_event_open.2:2247
5575 #, no-wrap
5576 msgid "I<maj>"
5577 msgstr "I<maj>"
5578
5579 #. type: Plain text
5580 #: build/C/man2/perf_event_open.2:2250
5581 msgid "is the major ID of the underlying device."
5582 msgstr ""
5583
5584 #. type: TP
5585 #: build/C/man2/perf_event_open.2:2250
5586 #, no-wrap
5587 msgid "I<min>"
5588 msgstr "I<min>"
5589
5590 #. type: Plain text
5591 #: build/C/man2/perf_event_open.2:2253
5592 msgid "is the minor ID of the underlying device."
5593 msgstr ""
5594
5595 #. type: TP
5596 #: build/C/man2/perf_event_open.2:2253
5597 #, no-wrap
5598 msgid "I<ino>"
5599 msgstr "I<ino>"
5600
5601 #. type: Plain text
5602 #: build/C/man2/perf_event_open.2:2256
5603 msgid "is the inode number."
5604 msgstr ""
5605
5606 #. type: TP
5607 #: build/C/man2/perf_event_open.2:2256
5608 #, no-wrap
5609 msgid "I<ino_generation>"
5610 msgstr "I<ino_generation>"
5611
5612 #. type: Plain text
5613 #: build/C/man2/perf_event_open.2:2259
5614 msgid "is the inode generation."
5615 msgstr ""
5616
5617 #. type: TP
5618 #: build/C/man2/perf_event_open.2:2259
5619 #, no-wrap
5620 msgid "I<prot>"
5621 msgstr "I<prot>"
5622
5623 #. type: Plain text
5624 #: build/C/man2/perf_event_open.2:2262
5625 msgid "is the protection information."
5626 msgstr ""
5627
5628 #. type: TP
5629 #: build/C/man2/perf_event_open.2:2262
5630 #, no-wrap
5631 msgid "I<flags>"
5632 msgstr "I<flags>"
5633
5634 #. type: Plain text
5635 #: build/C/man2/perf_event_open.2:2265
5636 msgid "is the flags information."
5637 msgstr ""
5638
5639 #. type: TP
5640 #: build/C/man2/perf_event_open.2:2265
5641 #, no-wrap
5642 msgid "I<filename>"
5643 msgstr "I<filename>"
5644
5645 #. type: Plain text
5646 #: build/C/man2/perf_event_open.2:2268
5647 msgid "is a string describing the backing of the allocated memory."
5648 msgstr ""
5649
5650 #. type: SS
5651 #: build/C/man2/perf_event_open.2:2270
5652 #, no-wrap
5653 msgid "Overflow handling"
5654 msgstr ""
5655
5656 #. type: Plain text
5657 #: build/C/man2/perf_event_open.2:2283
5658 msgid "Events can be set to notify when a threshold is crossed, indicating an overflow.  Overflow conditions can be captured by monitoring the event file descriptor with B<poll>(2), B<select>(2), or B<epoll>(2).  Alternately, a SIGIO signal handler can be created and the event configured with B<fcntl>(2)  to generate SIGIO signals."
5659 msgstr ""
5660
5661 #. type: Plain text
5662 #: build/C/man2/perf_event_open.2:2287
5663 msgid "Overflows are only generated by sampling events (I<sample_period> must have a nonzero value)."
5664 msgstr ""
5665
5666 #. type: Plain text
5667 #: build/C/man2/perf_event_open.2:2289
5668 msgid "There are two ways to generate overflow notifications."
5669 msgstr ""
5670
5671 #. type: Plain text
5672 #: build/C/man2/perf_event_open.2:2299
5673 msgid "The first is to set a I<wakeup_events> or I<wakeup_watermark> value that will trigger if a certain number of samples or bytes have been written to the mmap ring buffer.  In this case B<POLL_IN> is indicated."
5674 msgstr ""
5675
5676 #. type: Plain text
5677 #: build/C/man2/perf_event_open.2:2311
5678 msgid "The other way is by use of the B<PERF_EVENT_IOC_REFRESH> ioctl.  This ioctl adds to a counter that decrements each time the event overflows.  When nonzero, B<POLL_IN> is indicated, but once the counter reaches 0 B<POLL_HUP> is indicated and the underlying event is disabled."
5679 msgstr ""
5680
5681 #. type: Plain text
5682 #: build/C/man2/perf_event_open.2:2316
5683 msgid "Starting with Linux 3.18, B<POLL_HUP> is indicated if the event being monitored is attached to a different process and that process exits."
5684 msgstr ""
5685
5686 #. type: SS
5687 #: build/C/man2/perf_event_open.2:2316
5688 #, no-wrap
5689 msgid "rdpmc instruction"
5690 msgstr ""
5691
5692 #. type: Plain text
5693 #: build/C/man2/perf_event_open.2:2323
5694 msgid "Starting with Linux 3.4 on x86, you can use the I<rdpmc> instruction to get low-latency reads without having to enter the kernel.  Note that using I<rdpmc> is not necessarily faster than other methods for reading event values."
5695 msgstr ""
5696
5697 #. type: Plain text
5698 #: build/C/man2/perf_event_open.2:2328
5699 msgid "Support for this can be detected with the I<cap_usr_rdpmc> field in the mmap page; documentation on how to calculate event values can be found in that section."
5700 msgstr ""
5701
5702 #. type: SS
5703 #: build/C/man2/perf_event_open.2:2328
5704 #, no-wrap
5705 msgid "perf_event ioctl calls"
5706 msgstr ""
5707
5708 #. type: Plain text
5709 #: build/C/man2/perf_event_open.2:2333
5710 msgid "Various ioctls act on B<perf_event_open>()  file descriptors:"
5711 msgstr ""
5712
5713 #. type: TP
5714 #: build/C/man2/perf_event_open.2:2333
5715 #, no-wrap
5716 msgid "B<PERF_EVENT_IOC_ENABLE>"
5717 msgstr "B<PERF_EVENT_IOC_ENABLE>"
5718
5719 #. type: Plain text
5720 #: build/C/man2/perf_event_open.2:2337
5721 msgid "This enables the individual event or event group specified by the file descriptor argument."
5722 msgstr ""
5723
5724 #. type: Plain text
5725 #: build/C/man2/perf_event_open.2:2343
5726 msgid "If the B<PERF_IOC_FLAG_GROUP> bit is set in the ioctl argument, then all events in a group are enabled, even if the event specified is not the group leader (but see BUGS)."
5727 msgstr ""
5728
5729 #. type: TP
5730 #: build/C/man2/perf_event_open.2:2343
5731 #, no-wrap
5732 msgid "B<PERF_EVENT_IOC_DISABLE>"
5733 msgstr "B<PERF_EVENT_IOC_DISABLE>"
5734
5735 #. type: Plain text
5736 #: build/C/man2/perf_event_open.2:2347
5737 msgid "This disables the individual counter or event group specified by the file descriptor argument."
5738 msgstr ""
5739
5740 #. type: Plain text
5741 #: build/C/man2/perf_event_open.2:2354
5742 msgid "Enabling or disabling the leader of a group enables or disables the entire group; that is, while the group leader is disabled, none of the counters in the group will count.  Enabling or disabling a member of a group other than the leader affects only that counter; disabling a non-leader stops that counter from counting but doesn't affect any other counter."
5743 msgstr ""
5744
5745 #. type: Plain text
5746 #: build/C/man2/perf_event_open.2:2360
5747 msgid "If the B<PERF_IOC_FLAG_GROUP> bit is set in the ioctl argument, then all events in a group are disabled, even if the event specified is not the group leader (but see BUGS)."
5748 msgstr ""
5749
5750 #. type: TP
5751 #: build/C/man2/perf_event_open.2:2360
5752 #, no-wrap
5753 msgid "B<PERF_EVENT_IOC_REFRESH>"
5754 msgstr "B<PERF_EVENT_IOC_REFRESH>"
5755
5756 #. type: Plain text
5757 #: build/C/man2/perf_event_open.2:2374
5758 msgid "Non-inherited overflow counters can use this to enable a counter for a number of overflows specified by the argument, after which it is disabled.  Subsequent calls of this ioctl add the argument value to the current count.  An overflow notification with B<POLL_IN> set will happen on each overflow until the count reaches 0; when that happens a notification with B<POLL_HUP> set is sent and the event is disabled.  Using an argument of 0 is considered undefined behavior."
5759 msgstr ""
5760
5761 #. type: TP
5762 #: build/C/man2/perf_event_open.2:2374
5763 #, no-wrap
5764 msgid "B<PERF_EVENT_IOC_RESET>"
5765 msgstr "B<PERF_EVENT_IOC_RESET>"
5766
5767 #. type: Plain text
5768 #: build/C/man2/perf_event_open.2:2384
5769 msgid "Reset the event count specified by the file descriptor argument to zero.  This resets only the counts; there is no way to reset the multiplexing I<time_enabled> or I<time_running> values."
5770 msgstr ""
5771
5772 #. type: Plain text
5773 #: build/C/man2/perf_event_open.2:2390
5774 msgid "If the B<PERF_IOC_FLAG_GROUP> bit is set in the ioctl argument, then all events in a group are reset, even if the event specified is not the group leader (but see BUGS)."
5775 msgstr ""
5776
5777 #. type: TP
5778 #: build/C/man2/perf_event_open.2:2390
5779 #, no-wrap
5780 msgid "B<PERF_EVENT_IOC_PERIOD>"
5781 msgstr "B<PERF_EVENT_IOC_PERIOD>"
5782
5783 #. type: Plain text
5784 #: build/C/man2/perf_event_open.2:2393
5785 msgid "This updates the overflow period for the event."
5786 msgstr ""
5787
5788 #. type: Plain text
5789 #: build/C/man2/perf_event_open.2:2398
5790 msgid "Since Linux 3.7 (on ARM) and Linux 3.14 (all other architectures), the new period takes effect immediately.  On older kernels, the new period did not take effect until after the next overflow."
5791 msgstr ""
5792
5793 #. type: Plain text
5794 #: build/C/man2/perf_event_open.2:2401
5795 msgid "The argument is a pointer to a 64-bit value containing the desired new period."
5796 msgstr ""
5797
5798 #. type: Plain text
5799 #: build/C/man2/perf_event_open.2:2404
5800 msgid "Prior to Linux 2.6.36 this ioctl always failed due to a bug in the kernel."
5801 msgstr ""
5802
5803 #. type: TP
5804 #: build/C/man2/perf_event_open.2:2405
5805 #, no-wrap
5806 msgid "B<PERF_EVENT_IOC_SET_OUTPUT>"
5807 msgstr ""
5808
5809 #. type: Plain text
5810 #: build/C/man2/perf_event_open.2:2410
5811 msgid "This tells the kernel to report event notifications to the specified file descriptor rather than the default one.  The file descriptors must all be on the same CPU."
5812 msgstr ""
5813
5814 #. type: Plain text
5815 #: build/C/man2/perf_event_open.2:2413
5816 msgid "The argument specifies the desired file descriptor, or -1 if output should be ignored."
5817 msgstr ""
5818
5819 #. type: TP
5820 #: build/C/man2/perf_event_open.2:2413
5821 #, no-wrap
5822 msgid "B<PERF_EVENT_IOC_SET_FILTER> (since Linux 2.6.33)"
5823 msgstr "B<PERF_EVENT_IOC_SET_FILTER> (Linux 2.6.33 以降)"
5824
5825 #.  commit 6fb2915df7f0747d9044da9dbff5b46dc2e20830
5826 #. type: Plain text
5827 #: build/C/man2/perf_event_open.2:2417
5828 msgid "This adds an ftrace filter to this event."
5829 msgstr ""
5830
5831 #. type: Plain text
5832 #: build/C/man2/perf_event_open.2:2419
5833 msgid "The argument is a pointer to the desired ftrace filter."
5834 msgstr ""
5835
5836 #. type: TP
5837 #: build/C/man2/perf_event_open.2:2419
5838 #, no-wrap
5839 msgid "B<PERF_EVENT_IOC_ID> (since Linux 3.12)"
5840 msgstr "B<PERF_EVENT_IOC_ID> (Linux 3.12 以降)"
5841
5842 #.  commit cf4957f17f2a89984915ea808876d9c82225b862
5843 #. type: Plain text
5844 #: build/C/man2/perf_event_open.2:2423
5845 msgid "This returns the event ID value for the given event file descriptor."
5846 msgstr ""
5847
5848 #. type: Plain text
5849 #: build/C/man2/perf_event_open.2:2426
5850 msgid "The argument is a pointer to a 64-bit unsigned integer to hold the result."
5851 msgstr ""
5852
5853 #. type: SS
5854 #: build/C/man2/perf_event_open.2:2426
5855 #, no-wrap
5856 msgid "Using prctl"
5857 msgstr ""
5858
5859 #. type: Plain text
5860 #: build/C/man2/perf_event_open.2:2439
5861 msgid "A process can enable or disable all the event groups that are attached to it using the B<prctl>(2)  B<PR_TASK_PERF_EVENTS_ENABLE> and B<PR_TASK_PERF_EVENTS_DISABLE> operations.  This applies to all counters on the calling process, whether created by this process or by another, and does not affect any counters that this process has created on other processes.  It enables or disables only the group leaders, not any other members in the groups."
5862 msgstr ""
5863
5864 #. type: SS
5865 #: build/C/man2/perf_event_open.2:2439
5866 #, no-wrap
5867 msgid "perf_event related configuration files"
5868 msgstr ""
5869
5870 #. type: Plain text
5871 #: build/C/man2/perf_event_open.2:2442
5872 msgid "Files in I</proc/sys/kernel/>"
5873 msgstr ""
5874
5875 #. type: TP
5876 #: build/C/man2/perf_event_open.2:2443
5877 #, no-wrap
5878 msgid "I</proc/sys/kernel/perf_event_paranoid>"
5879 msgstr ""
5880
5881 #. type: Plain text
5882 #: build/C/man2/perf_event_open.2:2449
5883 msgid "The I<perf_event_paranoid> file can be set to restrict access to the performance counters."
5884 msgstr ""
5885
5886 #. type: IP
5887 #: build/C/man2/perf_event_open.2:2450
5888 #, no-wrap
5889 msgid "2"
5890 msgstr ""
5891
5892 #. type: Plain text
5893 #: build/C/man2/perf_event_open.2:2452
5894 msgid "only allow user-space measurements."
5895 msgstr ""
5896
5897 #. type: IP
5898 #: build/C/man2/perf_event_open.2:2452
5899 #, no-wrap
5900 msgid "1"
5901 msgstr ""
5902
5903 #. type: Plain text
5904 #: build/C/man2/perf_event_open.2:2454
5905 msgid "allow both kernel and user measurements (default)."
5906 msgstr ""
5907
5908 #. type: IP
5909 #: build/C/man2/perf_event_open.2:2454
5910 #, no-wrap
5911 msgid "0"
5912 msgstr ""
5913
5914 #. type: Plain text
5915 #: build/C/man2/perf_event_open.2:2456
5916 msgid "allow access to CPU-specific data but not raw tracepoint samples."
5917 msgstr ""
5918
5919 #. type: IP
5920 #: build/C/man2/perf_event_open.2:2456
5921 #, no-wrap
5922 msgid "-1"
5923 msgstr "-1"
5924
5925 #. type: Plain text
5926 #: build/C/man2/perf_event_open.2:2458
5927 msgid "no restrictions."
5928 msgstr ""
5929
5930 #. type: Plain text
5931 #: build/C/man2/perf_event_open.2:2464
5932 msgid "The existence of the I<perf_event_paranoid> file is the official method for determining if a kernel supports B<perf_event_open>()."
5933 msgstr ""
5934
5935 #. type: TP
5936 #: build/C/man2/perf_event_open.2:2464
5937 #, no-wrap
5938 msgid "I</proc/sys/kernel/perf_event_max_sample_rate>"
5939 msgstr ""
5940
5941 #. type: Plain text
5942 #: build/C/man2/perf_event_open.2:2473
5943 msgid "This sets the maximum sample rate.  Setting this too high can allow users to sample at a rate that impacts overall machine performance and potentially lock up the machine.  The default value is 100000 (samples per second)."
5944 msgstr ""
5945
5946 #. type: TP
5947 #: build/C/man2/perf_event_open.2:2473
5948 #, no-wrap
5949 msgid "I</proc/sys/kernel/perf_event_mlock_kb>"
5950 msgstr ""
5951
5952 #. type: Plain text
5953 #: build/C/man2/perf_event_open.2:2479
5954 msgid "Maximum number of pages an unprivileged user can B<mlock>(2).  The default is 516 (kB)."
5955 msgstr ""
5956
5957 #. type: Plain text
5958 #: build/C/man2/perf_event_open.2:2483
5959 msgid "Files in I</sys/bus/event_source/devices/>"
5960 msgstr ""
5961
5962 #. type: Plain text
5963 #: build/C/man2/perf_event_open.2:2489
5964 msgid "Since Linux 2.6.34, the kernel supports having multiple PMUs available for monitoring.  Information on how to program these PMUs can be found under I</sys/bus/event_source/devices/>.  Each subdirectory corresponds to a different PMU."
5965 msgstr ""
5966
5967 #. type: TP
5968 #: build/C/man2/perf_event_open.2:2489
5969 #, no-wrap
5970 msgid "I</sys/bus/event_source/devices/*/type> (since Linux 2.6.38)"
5971 msgstr "I</sys/bus/event_source/devices/*/type> (Linux 2.6.38 以降)"
5972
5973 #. type: Plain text
5974 #: build/C/man2/perf_event_open.2:2496
5975 msgid "This contains an integer that can be used in the I<type> field of I<perf_event_attr> to indicate that you wish to use this PMU."
5976 msgstr ""
5977
5978 #. type: TP
5979 #: build/C/man2/perf_event_open.2:2496
5980 #, no-wrap
5981 msgid "I</sys/bus/event_source/devices/*/rdpmc> (since Linux 3.4)"
5982 msgstr "I</sys/bus/event_source/devices/*/rdpmc> (Linux 3.4 以降)"
5983
5984 #. type: Plain text
5985 #: build/C/man2/perf_event_open.2:2501
5986 msgid "If this file is 1, then direct user-space access to the performance counter registers is allowed via the rdpmc instruction.  This can be disabled by echoing 0 to the file."
5987 msgstr ""
5988
5989 #. type: TP
5990 #: build/C/man2/perf_event_open.2:2501
5991 #, no-wrap
5992 msgid "I</sys/bus/event_source/devices/*/format/> (since Linux 3.4)"
5993 msgstr "I</sys/bus/event_source/devices/*/format/> (Linux 3.4 以降)"
5994
5995 #. type: Plain text
5996 #: build/C/man2/perf_event_open.2:2509
5997 msgid "This subdirectory contains information on the architecture-specific subfields available for programming the various I<config> fields in the I<perf_event_attr> struct."
5998 msgstr ""
5999
6000 #. type: Plain text
6001 #: build/C/man2/perf_event_open.2:2520
6002 msgid "The content of each file is the name of the config field, followed by a colon, followed by a series of integer bit ranges separated by commas.  For example, the file I<event> may contain the value I<config1:1,6-10,44> which indicates that event is an attribute that occupies bits 1,6-10, and 44 of I<perf_event_attr::config1>."
6003 msgstr ""
6004
6005 #. type: TP
6006 #: build/C/man2/perf_event_open.2:2520
6007 #, no-wrap
6008 msgid "I</sys/bus/event_source/devices/*/events/> (since Linux 3.4)"
6009 msgstr "I</sys/bus/event_source/devices/*/events/> (Linux 3.4 以降)"
6010
6011 #. type: Plain text
6012 #: build/C/man2/perf_event_open.2:2529
6013 msgid "This subdirectory contains files with predefined events.  The contents are strings describing the event settings expressed in terms of the fields found in the previously mentioned I<./format/> directory.  These are not necessarily complete lists of all events supported by a PMU, but usually a subset of events deemed useful or interesting."
6014 msgstr ""
6015
6016 #. type: Plain text
6017 #: build/C/man2/perf_event_open.2:2537
6018 msgid "The content of each file is a list of attribute names separated by commas.  Each entry has an optional value (either hex or decimal).  If no value is specified, then it is assumed to be a single-bit field with a value of 1.  An example entry may look like this: I<event=0x2,inv,ldlat=3>."
6019 msgstr ""
6020
6021 #. type: TP
6022 #: build/C/man2/perf_event_open.2:2537
6023 #, no-wrap
6024 msgid "I</sys/bus/event_source/devices/*/uevent>"
6025 msgstr "I</sys/bus/event_source/devices/*/uevent>"
6026
6027 #. type: Plain text
6028 #: build/C/man2/perf_event_open.2:2541
6029 msgid "This file is the standard kernel device interface for injecting hotplug events."
6030 msgstr ""
6031
6032 #. type: TP
6033 #: build/C/man2/perf_event_open.2:2541
6034 #, no-wrap
6035 msgid "I</sys/bus/event_source/devices/*/cpumask> (since Linux 3.7)"
6036 msgstr "I</sys/bus/event_source/devices/*/cpumask> (Linux 3.7 以降)"
6037
6038 #. type: Plain text
6039 #: build/C/man2/perf_event_open.2:2550
6040 msgid "The I<cpumask> file contains a comma-separated list of integers that indicate a representative CPU number for each socket (package)  on the motherboard.  This is needed when setting up uncore or northbridge events, as those PMUs present socket-wide events."
6041 msgstr ""
6042
6043 #. type: Plain text
6044 #: build/C/man2/perf_event_open.2:2557
6045 msgid "B<perf_event_open>()  returns the new file descriptor, or -1 if an error occurred (in which case, I<errno> is set appropriately)."
6046 msgstr ""
6047
6048 #. type: Plain text
6049 #: build/C/man2/perf_event_open.2:2562
6050 msgid "The errors returned by B<perf_event_open>()  can be inconsistent, and may vary across processor architectures and performance monitoring units."
6051 msgstr ""
6052
6053 #. type: TP
6054 #: build/C/man2/perf_event_open.2:2562
6055 #, no-wrap
6056 msgid "B<E2BIG>"
6057 msgstr "B<E2BIG>"
6058
6059 #. type: Plain text
6060 #: build/C/man2/perf_event_open.2:2579
6061 msgid "Returned if the I<perf_event_attr> I<size> value is too small (smaller than B<PERF_ATTR_SIZE_VER0>), too big (larger than the page size), or larger than the kernel supports and the extra bytes are not zero.  When B<E2BIG> is returned, the I<perf_event_attr> I<size> field is overwritten by the kernel to be the size of the structure it was expecting."
6062 msgstr ""
6063
6064 #. type: Plain text
6065 #: build/C/man2/perf_event_open.2:2593
6066 msgid "Returned when the requested event requires B<CAP_SYS_ADMIN> permissions (or a more permissive perf_event paranoid setting).  Some common cases where an unprivileged process may encounter this error: attaching to a process owned by a different user; monitoring all processes on a given CPU (i.e., specifying the I<pid> argument as -1); and not setting I<exclude_kernel> when the paranoid setting requires it."
6067 msgstr ""
6068
6069 #. type: TP
6070 #: build/C/man2/perf_event_open.2:2593 build/C/man2/sendfile.2:121
6071 #: build/C/man2/splice.2:157 build/C/man2/vmsplice.2:133
6072 #, no-wrap
6073 msgid "B<EBADF>"
6074 msgstr "B<EBADF>"
6075
6076 #. type: Plain text
6077 #: build/C/man2/perf_event_open.2:2603
6078 msgid "Returned if the I<group_fd> file descriptor is not valid, or, if B<PERF_FLAG_PID_CGROUP> is set, the cgroup file descriptor in I<pid> is not valid."
6079 msgstr ""
6080
6081 #. type: Plain text
6082 #: build/C/man2/perf_event_open.2:2608
6083 msgid "Returned if the I<attr> pointer points at an invalid memory address."
6084 msgstr ""
6085
6086 #. type: Plain text
6087 #: build/C/man2/perf_event_open.2:2634
6088 msgid "Returned if the specified event is invalid.  There are many possible reasons for this.  A not-exhaustive list: I<sample_freq> is higher than the maximum setting; the I<cpu> to monitor does not exist; I<read_format> is out of range; I<sample_type> is out of range; the I<flags> value is out of range; I<exclusive> or I<pinned> set and the event is not a group leader; the event I<config> values are out of range or set reserved bits; the generic event selected is not supported; or there is not enough room to add the selected event."
6089 msgstr ""
6090
6091 #. type: TP
6092 #: build/C/man2/perf_event_open.2:2634
6093 #, no-wrap
6094 msgid "B<EMFILE>"
6095 msgstr "B<EMFILE>"
6096
6097 #. type: Plain text
6098 #: build/C/man2/perf_event_open.2:2640
6099 msgid "Each opened event uses one file descriptor.  If a large number of events are opened the per-user file descriptor limit (often 1024) will be hit and no more events can be created."
6100 msgstr ""
6101
6102 #. type: Plain text
6103 #: build/C/man2/perf_event_open.2:2644
6104 msgid "Returned when the event involves a feature not supported by the current CPU."
6105 msgstr ""
6106
6107 #. type: TP
6108 #: build/C/man2/perf_event_open.2:2644 build/C/man2/quotactl.2:440
6109 #, no-wrap
6110 msgid "B<ENOENT>"
6111 msgstr "B<ENOENT>"
6112
6113 #. type: Plain text
6114 #: build/C/man2/perf_event_open.2:2651
6115 msgid "Returned if the I<type> setting is not valid.  This error is also returned for some unsupported generic events."
6116 msgstr ""
6117
6118 #. type: TP
6119 #: build/C/man2/perf_event_open.2:2651
6120 #, no-wrap
6121 msgid "B<ENOSPC>"
6122 msgstr "B<ENOSPC>"
6123
6124 #. type: Plain text
6125 #: build/C/man2/perf_event_open.2:2661
6126 msgid "Prior to Linux 3.3, if there was not enough room for the event, B<ENOSPC> was returned.  In Linux 3.3, this was changed to B<EINVAL>.  B<ENOSPC> is still returned if you try to add more breakpoint events than supported by the hardware."
6127 msgstr ""
6128
6129 #. type: Plain text
6130 #: build/C/man2/perf_event_open.2:2668
6131 msgid "Returned if B<PERF_SAMPLE_STACK_USER> is set in I<sample_type> and it is not supported by hardware."
6132 msgstr ""
6133
6134 #. type: Plain text
6135 #: build/C/man2/perf_event_open.2:2675
6136 msgid "Returned if an event requiring a specific hardware feature is requested but there is no hardware support.  This includes requesting low-skid events if not supported, branch tracing if it is not available, sampling if no PMU interrupt is available, and branch stacks for software events."
6137 msgstr ""
6138
6139 #. type: Plain text
6140 #: build/C/man2/perf_event_open.2:2680
6141 msgid "Returned on many (but not all) architectures when an unsupported I<exclude_hv>, I<exclude_idle>, I<exclude_user>, or I<exclude_kernel> setting is specified."
6142 msgstr ""
6143
6144 #. type: Plain text
6145 #: build/C/man2/perf_event_open.2:2688
6146 msgid "It can also happen, as with B<EACCES>, when the requested event requires B<CAP_SYS_ADMIN> permissions (or a more permissive perf_event paranoid setting).  This includes setting a breakpoint on a kernel address, and (since Linux 3.13) setting a kernel function-trace tracepoint."
6147 msgstr ""
6148
6149 #. type: Plain text
6150 #: build/C/man2/perf_event_open.2:2691
6151 msgid "Returned if attempting to attach to a process that does not exist."
6152 msgstr ""
6153
6154 #. type: SH
6155 #: build/C/man2/perf_event_open.2:2691
6156 #, no-wrap
6157 msgid "VERSION"
6158 msgstr "バージョン"
6159
6160 #. type: Plain text
6161 #: build/C/man2/perf_event_open.2:2696
6162 msgid "B<perf_event_open>()  was introduced in Linux 2.6.31 but was called B<perf_counter_open>().  It was renamed in Linux 2.6.32."
6163 msgstr ""
6164
6165 #. type: Plain text
6166 #: build/C/man2/perf_event_open.2:2701
6167 msgid "This B<perf_event_open>()  system call Linux- specific and should not be used in programs intended to be portable."
6168 msgstr "B<perf_event_open>() システムコールは Linux 固有であり、 移植を意図したプログラムで使用すべきではない。"
6169
6170 #. type: Plain text
6171 #: build/C/man2/perf_event_open.2:2705
6172 msgid "Glibc does not provide a wrapper for this system call; call it using B<syscall>(2).  See the example below."
6173 msgstr "glibc はこのシステムコールに対するラッパー関数を提供していない。 B<syscall>(2)  を使って呼び出すこと。 以下の例を参照。"
6174
6175 #. type: Plain text
6176 #: build/C/man2/perf_event_open.2:2711
6177 msgid "The official way of knowing if B<perf_event_open>()  support is enabled is checking for the existence of the file I</proc/sys/kernel/perf_event_paranoid>."
6178 msgstr ""
6179
6180 #. type: SH
6181 #: build/C/man2/perf_event_open.2:2711 build/C/man2/pivot_root.2:134
6182 #: build/C/man2/ptrace.2:2006
6183 #, no-wrap
6184 msgid "BUGS"
6185 msgstr "バグ"
6186
6187 #. type: Plain text
6188 #: build/C/man2/perf_event_open.2:2718
6189 msgid "The B<F_SETOWN_EX> option to B<fcntl>(2)  is needed to properly get overflow signals in threads.  This was introduced in Linux 2.6.32."
6190 msgstr ""
6191
6192 #. type: Plain text
6193 #: build/C/man2/perf_event_open.2:2726
6194 msgid "Prior to Linux 2.6.33 (at least for x86), the kernel did not check if events could be scheduled together until read time.  The same happens on all known kernels if the NMI watchdog is enabled.  This means to see if a given set of events works you have to B<perf_event_open>(), start, then read before you know for sure you can get valid measurements."
6195 msgstr ""
6196
6197 #. type: Plain text
6198 #: build/C/man2/perf_event_open.2:2730
6199 msgid "Prior to Linux 2.6.34, event constraints were not enforced by the kernel.  In that case, some events would silently return \"0\" if the kernel scheduled them in an improper counter slot."
6200 msgstr ""
6201
6202 #. type: Plain text
6203 #: build/C/man2/perf_event_open.2:2733
6204 msgid "Prior to Linux 2.6.34, there was a bug when multiplexing where the wrong results could be returned."
6205 msgstr ""
6206
6207 #. type: Plain text
6208 #: build/C/man2/perf_event_open.2:2736
6209 msgid "Kernels from Linux 2.6.35 to Linux 2.6.39 can quickly crash the kernel if \"inherit\" is enabled and many threads are started."
6210 msgstr ""
6211
6212 #. type: Plain text
6213 #: build/C/man2/perf_event_open.2:2740
6214 msgid "Prior to Linux 2.6.35, B<PERF_FORMAT_GROUP> did not work with attached processes."
6215 msgstr ""
6216
6217 #. type: Plain text
6218 #: build/C/man2/perf_event_open.2:2745
6219 msgid "In older Linux 2.6 versions, refreshing an event group leader refreshed all siblings, and refreshing with a parameter of 0 enabled infinite refresh.  This behavior is unsupported and should not be relied on."
6220 msgstr ""
6221
6222 #. type: Plain text
6223 #: build/C/man2/perf_event_open.2:2751
6224 msgid "There is a bug in the kernel code between Linux 2.6.36 and Linux 3.0 that ignores the \"watermark\" field and acts as if a wakeup_event was chosen if the union has a nonzero value in it."
6225 msgstr ""
6226
6227 #. type: Plain text
6228 #: build/C/man2/perf_event_open.2:2757
6229 msgid "From Linux 2.6.31 to Linux 3.4, the B<PERF_IOC_FLAG_GROUP> ioctl argument was broken and would repeatedly operate on the event specified rather than iterating across all sibling events in a group."
6230 msgstr ""
6231
6232 #. type: Plain text
6233 #: build/C/man2/perf_event_open.2:2768
6234 msgid "From Linux 3.4 to Linux 3.11, the mmap I<cap_usr_rdpmc> and I<cap_usr_time> bits mapped to the same location.  Code should migrate to the new I<cap_user_rdpmc> and I<cap_user_time> fields instead."
6235 msgstr ""
6236
6237 #. type: Plain text
6238 #: build/C/man2/perf_event_open.2:2773
6239 msgid "Always double-check your results! Various generalized events have had wrong values.  For example, retired branches measured the wrong thing on AMD machines until Linux 2.6.35."
6240 msgstr ""
6241
6242 #. type: SH
6243 #: build/C/man2/perf_event_open.2:2773 build/C/man2/process_vm_readv.2:311
6244 #: build/C/man2/splice.2:237 build/C/man2/tee.2:136
6245 #, no-wrap
6246 msgid "EXAMPLE"
6247 msgstr "例"
6248
6249 #. type: Plain text
6250 #: build/C/man2/perf_event_open.2:2777
6251 msgid "The following is a short example that measures the total instruction count of a call to B<printf>(3)."
6252 msgstr ""
6253
6254 #. type: Plain text
6255 #: build/C/man2/perf_event_open.2:2786
6256 #, no-wrap
6257 msgid ""
6258 "#include E<lt>stdlib.hE<gt>\n"
6259 "#include E<lt>stdio.hE<gt>\n"
6260 "#include E<lt>unistd.hE<gt>\n"
6261 "#include E<lt>string.hE<gt>\n"
6262 "#include E<lt>sys/ioctl.hE<gt>\n"
6263 "#include E<lt>linux/perf_event.hE<gt>\n"
6264 "#include E<lt>asm/unistd.hE<gt>\n"
6265 msgstr ""
6266 "#include E<lt>stdlib.hE<gt>\n"
6267 "#include E<lt>stdio.hE<gt>\n"
6268 "#include E<lt>unistd.hE<gt>\n"
6269 "#include E<lt>string.hE<gt>\n"
6270 "#include E<lt>sys/ioctl.hE<gt>\n"
6271 "#include E<lt>linux/perf_event.hE<gt>\n"
6272 "#include E<lt>asm/unistd.hE<gt>\n"
6273
6274 #. type: Plain text
6275 #: build/C/man2/perf_event_open.2:2792
6276 #, no-wrap
6277 msgid ""
6278 "static long\n"
6279 "perf_event_open(struct perf_event_attr *hw_event, pid_t pid,\n"
6280 "                int cpu, int group_fd, unsigned long flags)\n"
6281 "{\n"
6282 "    int ret;\n"
6283 msgstr ""
6284 "static long\n"
6285 "perf_event_open(struct perf_event_attr *hw_event, pid_t pid,\n"
6286 "                int cpu, int group_fd, unsigned long flags)\n"
6287 "{\n"
6288 "    int ret;\n"
6289
6290 #. type: Plain text
6291 #: build/C/man2/perf_event_open.2:2797
6292 #, no-wrap
6293 msgid ""
6294 "    ret = syscall(__NR_perf_event_open, hw_event, pid, cpu,\n"
6295 "                   group_fd, flags);\n"
6296 "    return ret;\n"
6297 "}\n"
6298 msgstr ""
6299 "    ret = syscall(__NR_perf_event_open, hw_event, pid, cpu,\n"
6300 "                   group_fd, flags);\n"
6301 "    return ret;\n"
6302 "}\n"
6303
6304 #. type: Plain text
6305 #: build/C/man2/perf_event_open.2:2804
6306 #, no-wrap
6307 msgid ""
6308 "int\n"
6309 "main(int argc, char **argv)\n"
6310 "{\n"
6311 "    struct perf_event_attr pe;\n"
6312 "    long long count;\n"
6313 "    int fd;\n"
6314 msgstr ""
6315 "int\n"
6316 "main(int argc, char **argv)\n"
6317 "{\n"
6318 "    struct perf_event_attr pe;\n"
6319 "    long long count;\n"
6320 "    int fd;\n"
6321
6322 #. type: Plain text
6323 #: build/C/man2/perf_event_open.2:2812
6324 #, no-wrap
6325 msgid ""
6326 "    memset(&pe, 0, sizeof(struct perf_event_attr));\n"
6327 "    pe.type = PERF_TYPE_HARDWARE;\n"
6328 "    pe.size = sizeof(struct perf_event_attr);\n"
6329 "    pe.config = PERF_COUNT_HW_INSTRUCTIONS;\n"
6330 "    pe.disabled = 1;\n"
6331 "    pe.exclude_kernel = 1;\n"
6332 "    pe.exclude_hv = 1;\n"
6333 msgstr ""
6334 "    memset(&pe, 0, sizeof(struct perf_event_attr));\n"
6335 "    pe.type = PERF_TYPE_HARDWARE;\n"
6336 "    pe.size = sizeof(struct perf_event_attr);\n"
6337 "    pe.config = PERF_COUNT_HW_INSTRUCTIONS;\n"
6338 "    pe.disabled = 1;\n"
6339 "    pe.exclude_kernel = 1;\n"
6340 "    pe.exclude_hv = 1;\n"
6341
6342 #. type: Plain text
6343 #: build/C/man2/perf_event_open.2:2818
6344 #, no-wrap
6345 msgid ""
6346 "    fd = perf_event_open(&pe, 0, -1, -1, 0);\n"
6347 "    if (fd == -1) {\n"
6348 "       fprintf(stderr, \"Error opening leader %llx\\en\", pe.config);\n"
6349 "       exit(EXIT_FAILURE);\n"
6350 "    }\n"
6351 msgstr ""
6352 "    fd = perf_event_open(&pe, 0, -1, -1, 0);\n"
6353 "    if (fd == -1) {\n"
6354 "       fprintf(stderr, \"Error opening leader %llx\\en\", pe.config);\n"
6355 "       exit(EXIT_FAILURE);\n"
6356 "    }\n"
6357
6358 #. type: Plain text
6359 #: build/C/man2/perf_event_open.2:2821
6360 #, no-wrap
6361 msgid ""
6362 "    ioctl(fd, PERF_EVENT_IOC_RESET, 0);\n"
6363 "    ioctl(fd, PERF_EVENT_IOC_ENABLE, 0);\n"
6364 msgstr ""
6365 "    ioctl(fd, PERF_EVENT_IOC_RESET, 0);\n"
6366 "    ioctl(fd, PERF_EVENT_IOC_ENABLE, 0);\n"
6367
6368 #. type: Plain text
6369 #: build/C/man2/perf_event_open.2:2823
6370 #, no-wrap
6371 msgid "    printf(\"Measuring instruction count for this printf\\en\");\n"
6372 msgstr "    printf(\"Measuring instruction count for this printf\\en\");\n"
6373
6374 #. type: Plain text
6375 #: build/C/man2/perf_event_open.2:2826
6376 #, no-wrap
6377 msgid ""
6378 "    ioctl(fd, PERF_EVENT_IOC_DISABLE, 0);\n"
6379 "    read(fd, &count, sizeof(long long));\n"
6380 msgstr ""
6381 "    ioctl(fd, PERF_EVENT_IOC_DISABLE, 0);\n"
6382 "    read(fd, &count, sizeof(long long));\n"
6383
6384 #. type: Plain text
6385 #: build/C/man2/perf_event_open.2:2828
6386 #, no-wrap
6387 msgid "    printf(\"Used %lld instructions\\en\", count);\n"
6388 msgstr "    printf(\"Used %lld instructions\\en\", count);\n"
6389
6390 #. type: Plain text
6391 #: build/C/man2/perf_event_open.2:2831
6392 #, no-wrap
6393 msgid ""
6394 "    close(fd);\n"
6395 "}\n"
6396 msgstr ""
6397 "    close(fd);\n"
6398 "}\n"
6399
6400 #. type: Plain text
6401 #: build/C/man2/perf_event_open.2:2838
6402 msgid "B<fcntl>(2), B<mmap>(2), B<open>(2), B<prctl>(2), B<read>(2)"
6403 msgstr "B<fcntl>(2), B<mmap>(2), B<open>(2), B<prctl>(2), B<read>(2)"
6404
6405 #. type: TH
6406 #: build/C/man2/perfmonctl.2:27
6407 #, no-wrap
6408 msgid "PERFMONCTL"
6409 msgstr "PERFMONCTL"
6410
6411 #. type: TH
6412 #: build/C/man2/perfmonctl.2:27
6413 #, no-wrap
6414 msgid "2013-02-13"
6415 msgstr "2013-02-13"
6416
6417 #. type: Plain text
6418 #: build/C/man2/perfmonctl.2:30
6419 msgid "perfmonctl - interface to IA-64 performance monitoring unit"
6420 msgstr ""
6421
6422 #. type: Plain text
6423 #: build/C/man2/perfmonctl.2:34
6424 #, no-wrap
6425 msgid ""
6426 "B<#include E<lt>syscall.hE<gt>>\n"
6427 "B<#include E<lt>perfmon.hE<gt>>\n"
6428 msgstr ""
6429 "B<#include E<lt>syscall.hE<gt>>\n"
6430 "B<#include E<lt>perfmon.hE<gt>>\n"
6431
6432 #. type: Plain text
6433 #: build/C/man2/perfmonctl.2:36
6434 #, no-wrap
6435 msgid "B<long perfmonctl(int >I<fd>B<, int >I<cmd>B<, void *>I<arg>B<, int >I<narg>B<);>\n"
6436 msgstr "B<long perfmonctl(int >I<fd>B<, int >I<cmd>B<, void *>I<arg>B<, int >I<narg>B<);>\n"
6437
6438 #. type: Plain text
6439 #: build/C/man2/perfmonctl.2:47
6440 msgid "The IA-64-specific B<perfmonctl>()  system call provides an interface to the PMU (performance monitoring unit).  The PMU consists of PMD (performance monitoring data) registers and PMC (performance monitoring control) registers, which gather hardware statistics."
6441 msgstr ""
6442
6443 #. type: Plain text
6444 #: build/C/man2/perfmonctl.2:57
6445 msgid "B<perfmonctl>()  applies the operation I<cmd> to the input arguments specified by I<arg>.  The number of arguments is defined by I<narg>.  The I<fd> argument specifies the perfmon context to operate on."
6446 msgstr ""
6447
6448 #. type: Plain text
6449 #: build/C/man2/perfmonctl.2:61
6450 msgid "Supported values for I<cmd> are:"
6451 msgstr ""
6452
6453 #. type: TP
6454 #: build/C/man2/perfmonctl.2:61
6455 #, no-wrap
6456 msgid "B<PFM_CREATE_CONTEXT>"
6457 msgstr "B<PFM_CREATE_CONTEXT>"
6458
6459 #. type: Plain text
6460 #: build/C/man2/perfmonctl.2:65
6461 #, no-wrap
6462 msgid "B<perfmonctl(int >I<fd>B<, PFM_CREATE_CONTEXT, pfarg_context_t *>I<ctxt>B<, 1);>\n"
6463 msgstr ""
6464
6465 #. type: Plain text
6466 #: build/C/man2/perfmonctl.2:67
6467 msgid "Set up a context."
6468 msgstr ""
6469
6470 #. type: Plain text
6471 #: build/C/man2/perfmonctl.2:74
6472 msgid "The I<fd> parameter is ignored.  A new perfmon context is created as specified in I<ctxt> and its file descriptor is returned in I<ctxt-E<gt>ctx_fd>."
6473 msgstr ""
6474
6475 #. type: Plain text
6476 #: build/C/man2/perfmonctl.2:86
6477 msgid "The file descriptor can be used in subsequent calls to B<perfmonctl>()  and can be used to read event notifications (type I<pfm_msg_t>)  using B<read>(2).  The file descriptor is pollable using B<select>(2), B<poll>(2), and B<epoll>(7)."
6478 msgstr ""
6479
6480 #. type: Plain text
6481 #: build/C/man2/perfmonctl.2:90
6482 msgid "The context can be destroyed by calling B<close>(2)  on the file descriptor."
6483 msgstr ""
6484
6485 #. type: TP
6486 #: build/C/man2/perfmonctl.2:90
6487 #, no-wrap
6488 msgid "B<PFM_WRITE_PMCS>"
6489 msgstr "B<PFM_WRITE_PMCS>"
6490
6491 #. type: Plain text
6492 #: build/C/man2/perfmonctl.2:95
6493 #, no-wrap
6494 msgid "B<perfmonctl(int >I<fd>B<, PFM_WRITE_PMCS, pfarg_reg_t *>I<pmcs>B<, n);>\n"
6495 msgstr "B<perfmonctl(int >I<fd>B<, PFM_WRITE_PMCS, pfarg_reg_t *>I<pmcs>B<, n);>\n"
6496
6497 #. type: Plain text
6498 #: build/C/man2/perfmonctl.2:97
6499 msgid "Set PMC registers."
6500 msgstr ""
6501
6502 #. type: TP
6503 #: build/C/man2/perfmonctl.2:97
6504 #, no-wrap
6505 msgid "B<PFM_WRITE_PMDS>"
6506 msgstr "B<PFM_WRITE_PMDS>"
6507
6508 #. type: Plain text
6509 #: build/C/man2/perfmonctl.2:101
6510 #, no-wrap
6511 msgid "B<perfmonctl(int >I<fd>B<, PFM_WRITE_PMDS, pfarg_reg_t *>I<pmds>B<, n);>\n"
6512 msgstr "B<perfmonctl(int >I<fd>B<, PFM_WRITE_PMDS, pfarg_reg_t *>I<pmds>B<, n);>\n"
6513
6514 #.  pfm_write_pmds()
6515 #. type: Plain text
6516 #: build/C/man2/perfmonctl.2:104
6517 msgid "Set PMD registers."
6518 msgstr ""
6519
6520 #. type: TP
6521 #: build/C/man2/perfmonctl.2:104
6522 #, no-wrap
6523 msgid "B<PFM_READ_PMDS>"
6524 msgstr "B<PFM_READ_PMDS>"
6525
6526 #. type: Plain text
6527 #: build/C/man2/perfmonctl.2:109
6528 #, no-wrap
6529 msgid "B<perfmonctl(int >I<fd>B<, PFM_READ_PMDS, pfarg_reg_t *>I<pmds>B<, n);>\n"
6530 msgstr "B<perfmonctl(int >I<fd>B<, PFM_READ_PMDS, pfarg_reg_t *>I<pmds>B<, n);>\n"
6531
6532 #. type: Plain text
6533 #: build/C/man2/perfmonctl.2:111
6534 msgid "Read PMD registers."
6535 msgstr ""
6536
6537 #. type: TP
6538 #: build/C/man2/perfmonctl.2:111
6539 #, no-wrap
6540 msgid "B<PFM_START>"
6541 msgstr "B<PFM_START>"
6542
6543 #.  .BI  "perfmonctl(int " fd ", PFM_START, arg, 1);
6544 #. type: Plain text
6545 #: build/C/man2/perfmonctl.2:117
6546 #, no-wrap
6547 msgid "B<perfmonctl(int >I<fd>B<, PFM_START, NULL, 0);>\n"
6548 msgstr "B<perfmonctl(int >I<fd>B<, PFM_START, NULL, 0);>\n"
6549
6550 #. type: Plain text
6551 #: build/C/man2/perfmonctl.2:119
6552 msgid "Start monitoring."
6553 msgstr ""
6554
6555 #. type: TP
6556 #: build/C/man2/perfmonctl.2:119
6557 #, no-wrap
6558 msgid "B<PFM_STOP>"
6559 msgstr "B<PFM_STOP>"
6560
6561 #. type: Plain text
6562 #: build/C/man2/perfmonctl.2:124
6563 #, no-wrap
6564 msgid "B<perfmonctl(int >I<fd>B<, PFM_STOP, NULL, 0);>\n"
6565 msgstr "B<perfmonctl(int >I<fd>B<, PFM_STOP, NULL, 0);>\n"
6566
6567 #. type: Plain text
6568 #: build/C/man2/perfmonctl.2:126
6569 msgid "Stop monitoring."
6570 msgstr ""
6571
6572 #. type: TP
6573 #: build/C/man2/perfmonctl.2:126
6574 #, no-wrap
6575 msgid "B<PFM_LOAD_CONTEXT>"
6576 msgstr "B<PFM_LOAD_CONTEXT>"
6577
6578 #. type: Plain text
6579 #: build/C/man2/perfmonctl.2:131
6580 #, no-wrap
6581 msgid "B<perfmonctl(int >I<fd>B<, PFM_LOAD_CONTEXT, pfarg_load_t *>I<largs>B<, 1);>\n"
6582 msgstr "B<perfmonctl(int >I<fd>B<, PFM_LOAD_CONTEXT, pfarg_load_t *>I<largs>B<, 1);>\n"
6583
6584 #. type: Plain text
6585 #: build/C/man2/perfmonctl.2:133
6586 msgid "Attach the context to a thread."
6587 msgstr ""
6588
6589 #. type: TP
6590 #: build/C/man2/perfmonctl.2:133
6591 #, no-wrap
6592 msgid "B<PFM_UNLOAD_CONTEXT>"
6593 msgstr "B<PFM_UNLOAD_CONTEXT>"
6594
6595 #. type: Plain text
6596 #: build/C/man2/perfmonctl.2:138
6597 #, no-wrap
6598 msgid "B<perfmonctl(int >I<fd>B<, PFM_UNLOAD_CONTEXT, NULL, 0);>\n"
6599 msgstr "B<perfmonctl(int >I<fd>B<, PFM_UNLOAD_CONTEXT, NULL, 0);>\n"
6600
6601 #. type: Plain text
6602 #: build/C/man2/perfmonctl.2:140
6603 msgid "Detach the context from a thread."
6604 msgstr ""
6605
6606 #. type: TP
6607 #: build/C/man2/perfmonctl.2:140
6608 #, no-wrap
6609 msgid "B<PFM_RESTART>"
6610 msgstr "B<PFM_RESTART>"
6611
6612 #. type: Plain text
6613 #: build/C/man2/perfmonctl.2:145
6614 #, no-wrap
6615 msgid "B<perfmonctl(int >I<fd>B<, PFM_RESTART, NULL, 0);>\n"
6616 msgstr "B<perfmonctl(int >I<fd>B<, PFM_RESTART, NULL, 0);>\n"
6617
6618 #. type: Plain text
6619 #: build/C/man2/perfmonctl.2:147
6620 msgid "Restart monitoring after receiving an overflow notification."
6621 msgstr ""
6622
6623 #. type: TP
6624 #: build/C/man2/perfmonctl.2:147
6625 #, no-wrap
6626 msgid "B<PFM_GET_FEATURES>"
6627 msgstr "B<PFM_GET_FEATURES>"
6628
6629 #. type: Plain text
6630 #: build/C/man2/perfmonctl.2:152
6631 #, no-wrap
6632 msgid "B<perfmonctl(int >I<fd>B<, PFM_GET_FEARURES, pfarg_features_t *>I<arg>B<, 1);>\n"
6633 msgstr "B<perfmonctl(int >I<fd>B<, PFM_GET_FEARURES, pfarg_features_t *>I<arg>B<, 1);>\n"
6634
6635 #. type: TP
6636 #: build/C/man2/perfmonctl.2:153
6637 #, no-wrap
6638 msgid "B<PFM_DEBUG>"
6639 msgstr "B<PFM_DEBUG>"
6640
6641 #. type: Plain text
6642 #: build/C/man2/perfmonctl.2:158
6643 #, no-wrap
6644 msgid "B<perfmonctl(int >I<fd>B<, PFM_DEBUG, >I<val>B<, 0);>\n"
6645 msgstr "B<perfmonctl(int >I<fd>B<, PFM_DEBUG, >I<val>B<, 0);>\n"
6646
6647 #. type: Plain text
6648 #: build/C/man2/perfmonctl.2:162
6649 msgid "If I<val> is nonzero, enable debugging mode, otherwise disable."
6650 msgstr ""
6651
6652 #. type: TP
6653 #: build/C/man2/perfmonctl.2:162
6654 #, no-wrap
6655 msgid "B<PFM_GET_PMC_RESET_VAL>"
6656 msgstr "B<PFM_GET_PMC_RESET_VAL>"
6657
6658 #. type: Plain text
6659 #: build/C/man2/perfmonctl.2:167
6660 #, no-wrap
6661 msgid "B<perfmonctl(int >I<fd>B<, PFM_GET_PMC_RESET_VAL, pfarg_reg_t * >I<req>B<, n);>\n"
6662 msgstr "B<perfmonctl(int >I<fd>B<, PFM_GET_PMC_RESET_VAL, pfarg_reg_t * >I<req>B<, n);>\n"
6663
6664 #
6665 #
6666 #
6667 #.  .TP
6668 #.  .B PFM_CREATE_EVTSETS
6669 #.  create or modify event sets
6670 #.  .nf
6671 #.  .BI  "perfmonctl(int " fd ", PFM_CREATE_EVTSETS, pfarg_setdesc_t *desc , n);
6672 #.  .fi
6673 #.  .TP
6674 #.  .B PFM_DELETE_EVTSETS
6675 #.  delete event sets
6676 #.  .nf
6677 #.  .BI  "perfmonctl(int " fd ", PFM_DELETE_EVTSET, pfarg_setdesc_t *desc , n);
6678 #.  .fi
6679 #.  .TP
6680 #.  .B PFM_GETINFO_EVTSETS
6681 #.  get information about event sets
6682 #.  .nf
6683 #.  .BI  "perfmonctl(int " fd ", PFM_GETINFO_EVTSETS, pfarg_setinfo_t *info, n);
6684 #.  .fi
6685 #. type: Plain text
6686 #: build/C/man2/perfmonctl.2:190
6687 msgid "Reset PMC registers to default values."
6688 msgstr ""
6689
6690 #. type: Plain text
6691 #: build/C/man2/perfmonctl.2:196
6692 msgid "B<perfmonctl>()  returns zero when the operation is successful.  On error, -1 is returned and I<errno> is set to indicate the cause of the error."
6693 msgstr ""
6694
6695 #. type: Plain text
6696 #: build/C/man2/perfmonctl.2:199
6697 msgid "B<perfmonctl>()  is available since Linux 2.4."
6698 msgstr ""
6699
6700 #. type: Plain text
6701 #: build/C/man2/perfmonctl.2:202
6702 msgid "B<perfmonctl>()  is Linux-specific and is available only on the IA-64 architecture."
6703 msgstr ""
6704
6705 #. type: Plain text
6706 #: build/C/man2/perfmonctl.2:207
6707 msgid "B<gprof>(1)"
6708 msgstr "B<gprof>(1)"
6709
6710 #. type: Plain text
6711 #: build/C/man2/perfmonctl.2:209
6712 msgid "The perfmon2 interface specification"
6713 msgstr ""
6714
6715 #. type: TH
6716 #: build/C/man2/personality.2:32
6717 #, no-wrap
6718 msgid "PERSONALITY"
6719 msgstr "PERSONALITY"
6720
6721 #. type: TH
6722 #: build/C/man2/personality.2:32
6723 #, no-wrap
6724 msgid "2014-04-15"
6725 msgstr "2014-04-15"
6726
6727 #. type: Plain text
6728 #: build/C/man2/personality.2:35
6729 msgid "personality - set the process execution domain"
6730 msgstr "personality - プロセスを実行するドメインを設定する"
6731
6732 #. type: Plain text
6733 #: build/C/man2/personality.2:37
6734 msgid "B<#include E<lt>sys/personality.hE<gt>>"
6735 msgstr "B<#include E<lt>sys/personality.hE<gt>>"
6736
6737 #. type: Plain text
6738 #: build/C/man2/personality.2:39
6739 msgid "B<int personality(unsigned long >I<persona>B<);>"
6740 msgstr "B<int personality(unsigned long >I<persona>B<);>"
6741
6742 #. type: Plain text
6743 #: build/C/man2/personality.2:47
6744 msgid "Linux supports different execution domains, or personalities, for each process.  Among other things, execution domains tell Linux how to map signal numbers into signal actions.  The execution domain system allows Linux to provide limited support for binaries compiled under other UNIX-like operating systems."
6745 msgstr "Linux は、プロセス毎の異なる実行ドメイン、すなわち パーソナリティ (personality) をサポートしている。 実行ドメインは Linux にシグナル番号にどのシグナルを割り付けるかを 教えたりする。また、実行ドメイン・システムにより、 Linux は、 他の UNIX 風のオペレーティングシステムでコンパイルされたバイナリに対する限定的なサポートを提供している。"
6746
6747 #. type: Plain text
6748 #: build/C/man2/personality.2:59
6749 msgid "If I<persona> is not 0xffffffff, then B<personality>()  sets the caller's execution domain to the value specified by I<persona>.  Specifying I<persona> as 0xffffffff provides a way of retrieving the current persona without changing it."
6750 msgstr "I<persona> が 0xffffffff 以外の場合、 B<personality>() は呼び出し元の実行ドメインを I<persona> で指定された値に設定する。 I<persona> に 0xffffffff を指定すると、変更を行わず、現在の persona 値を取得できる。"
6751
6752 #. type: Plain text
6753 #: build/C/man2/personality.2:62
6754 msgid "A list of the available execution domains can be found in I<E<lt>sys/personality.hE<gt>>."
6755 msgstr "利用可能な実行ドメインのリストは I<E<lt>sys/personality.hE<gt>> にある。"
6756
6757 #. type: Plain text
6758 #: build/C/man2/personality.2:69
6759 msgid "On success, the previous I<persona> is returned.  On error, -1 is returned, and I<errno> is set appropriately."
6760 msgstr "成功した場合、以前の I<persona> が返される。エラーの場合は、-1 が返され、 I<errno> が適切に設定される。"
6761
6762 #. type: Plain text
6763 #: build/C/man2/personality.2:73
6764 msgid "The kernel was unable to change the personality."
6765 msgstr "カーネルがパーソナリティを変更できなかった。"
6766
6767 #. type: Plain text
6768 #: build/C/man2/personality.2:77
6769 msgid "B<personality>()  is Linux-specific and should not be used in programs intended to be portable."
6770 msgstr "B<personality>()  は Linux 固有であり、移植を意図したプログラムで使用すべきではない。"
6771
6772 #. type: TH
6773 #: build/C/man2/pivot_root.2:10
6774 #, no-wrap
6775 msgid "PIVOT_ROOT"
6776 msgstr "PIVOT_ROOT"
6777
6778 #. type: Plain text
6779 #: build/C/man2/pivot_root.2:13
6780 msgid "pivot_root - change the root filesystem"
6781 msgstr "pivot_root - root ファイルシステムを変更する"
6782
6783 #. type: Plain text
6784 #: build/C/man2/pivot_root.2:15
6785 msgid "B<int pivot_root(const char *>I<new_root>B<, const char *>I<put_old>B<);>"
6786 msgstr "B<int pivot_root(const char *>I<new_root>B<, const char *>I<put_old>B<);>"
6787
6788 #.  The
6789 #.  .B CAP_SYS_ADMIN
6790 #.  capability is required.
6791 #. type: Plain text
6792 #: build/C/man2/pivot_root.2:27
6793 msgid "B<pivot_root>()  moves the root filesystem of the calling process to the directory I<put_old> and makes I<new_root> the new root filesystem of the calling process."
6794 msgstr "B<pivot_root>()  は呼び出し元のプロセスの root ファイルシステムを I<put_old> ディレクトリに移動し、 I<new_root> を呼び出し元のプロセスの新しい root ファイルシステムにする。"
6795
6796 #. type: Plain text
6797 #: build/C/man2/pivot_root.2:34
6798 msgid "The typical use of B<pivot_root>()  is during system startup, when the system mounts a temporary root filesystem (e.g., an B<initrd>), then mounts the real root filesystem, and eventually turns the latter into the current root of all relevant processes or threads."
6799 msgstr "B<pivot_root>()  の典型的な利用法は、システムの起動中にシステムが一時的な root ファイルシステム (例えば B<initrd>)  をマウントし、これに続いて本当の root ファイルシステムをマウントし、 後者を必要な全てのプロセス・スレッドの カレント root に変更するような場合である。"
6800
6801 #. type: Plain text
6802 #: build/C/man2/pivot_root.2:46
6803 msgid "B<pivot_root>()  may or may not change the current root and the current working directory of any processes or threads which use the old root directory.  The caller of B<pivot_root>()  must ensure that processes with root or current working directory at the old root operate correctly in either case.  An easy way to ensure this is to change their root and current working directory to I<new_root> before invoking B<pivot_root>()."
6804 msgstr "古い root ディレクトリを使っていた全てのプロセスやスレッドの カレント root とカレントワーキングディレクトリを、 B<pivot_root>()  が変更するかどうかはわからない。 B<pivot_root>()  の呼びだしプロセスは、古い root やカレントワーキングディレクトリを使っていた プロセスが、いずれの場合でも正しく動作することを保証しなければならない。 これを簡単に行うには、それらのプロセスの root と カレントワーキングディレクトリを B<pivot_root>()  を呼び出す前に I<new_root> に変更しておくことである。"
6805
6806 #. type: Plain text
6807 #: build/C/man2/pivot_root.2:64
6808 msgid "The paragraph above is intentionally vague because the implementation of B<pivot_root>()  may change in the future.  At the time of writing, B<pivot_root>()  changes root and current working directory of each process or thread to I<new_root> if they point to the old root directory.  This is necessary in order to prevent kernel threads from keeping the old root directory busy with their root and current working directory, even if they never access the filesystem in any way.  In the future, there may be a mechanism for kernel threads to explicitly relinquish any access to the filesystem, such that this fairly intrusive mechanism can be removed from B<pivot_root>()."
6809 msgstr "上記の段落は、将来 B<pivot_root>()  が変更されるかも知れないことを鑑みて、わざと曖昧に書いてある。 本ページを記述している時点では、 B<pivot_root>()  は古い root ディレクトリを用いている全てのプロセス・スレッドの root と カレントワーキングディレクトリを I<new_root> に変更する。これはカーネルのスレッドが古い root ディレクトリを busy 状態にしないために必要である。これらのスレッドが 古いディレクトリを root やカレントワーキングディレクトリとしていると、 ファイルシステムに一切アクセスしない場合でも 古い root が busy になってしまうからである。 将来は、カーネルスレッドがあらゆるファイルシステムへのアクセスを 明示的に放棄するメカニズムができ、このでしゃばりな機能は B<pivot_root>()  から削除されるかもしれない。"
6810
6811 #. type: Plain text
6812 #: build/C/man2/pivot_root.2:72
6813 msgid "Note that this also applies to the calling process: B<pivot_root>()  may or may not affect its current working directory.  It is therefore recommended to call B<chdir(\"/\")> immediately after B<pivot_root>()."
6814 msgstr "これは呼び出し元のプロセスについても当てはまることに注意。 B<pivot_root>()  がカレントプロセスのカレントワーキングディレクトリに影響するかどうかは 分からない。したがって B<pivot_root>()  の直後に B<chdir(\"/\")> を呼び出すとよい。"
6815
6816 #. type: Plain text
6817 #: build/C/man2/pivot_root.2:74
6818 msgid "The following restrictions apply to I<new_root> and I<put_old>:"
6819 msgstr "I<new_root> および I<put_old> には以下の制限がある:"
6820
6821 #. type: IP
6822 #: build/C/man2/pivot_root.2:74 build/C/man2/pivot_root.2:76
6823 #: build/C/man2/pivot_root.2:79 build/C/man2/pivot_root.2:83
6824 #, no-wrap
6825 msgid "-"
6826 msgstr "-"
6827
6828 #. type: Plain text
6829 #: build/C/man2/pivot_root.2:76
6830 msgid "They must be directories."
6831 msgstr "ディレクトリでなければならない。"
6832
6833 #. type: Plain text
6834 #: build/C/man2/pivot_root.2:79
6835 msgid "I<new_root> and I<put_old> must not be on the same filesystem as the current root."
6836 msgstr "I<new_root> と I<put_old> は現在の root と同じファイルシステムにあってはならない。"
6837
6838 #. type: Plain text
6839 #: build/C/man2/pivot_root.2:83
6840 msgid "I<put_old> must be underneath I<new_root>, that is, adding a nonzero number of I</..> to the string pointed to by I<put_old> must yield the same directory as I<new_root>."
6841 msgstr "I<put_old> は I<new_root> 以下になければならない。すなわち I<put_old> を差す文字列に 1 個以上の I<../> を付けることによって I<new_root> と同じディレクトリが得られなければならない。"
6842
6843 #. type: Plain text
6844 #: build/C/man2/pivot_root.2:85
6845 msgid "No other filesystem may be mounted on I<put_old>."
6846 msgstr "他のファイルシステムが I<put_old> にマウントされていてはならない。"
6847
6848 #. type: Plain text
6849 #: build/C/man2/pivot_root.2:89
6850 msgid "See also B<pivot_root>(8)  for additional usage examples."
6851 msgstr "利用例については B<pivot_root>(8)  を参照のこと。"
6852
6853 #. type: Plain text
6854 #: build/C/man2/pivot_root.2:96
6855 msgid "If the current root is not a mount point (e.g., after B<chroot>(2)  or B<pivot_root>(), see also below), not the old root directory, but the mount point of that filesystem is mounted on I<put_old>."
6856 msgstr "現在の root がマウントポイントではない (B<chroot>(2)  や B<pivot_root>()  の後など。以下も参照) 場合、 古い root ディレクトリではなく、 そのファイルシステムのマウントポイントが I<put_old> にマウントされる。"
6857
6858 #. type: Plain text
6859 #: build/C/man2/pivot_root.2:101
6860 msgid "I<new_root> does not have to be a mount point.  In this case, I</proc/mounts> will show the mount point of the filesystem containing I<new_root> as root (I</>)."
6861 msgstr "I<new_root> はマウントポイントでなくてもよい。 この場合 I</proc/mounts> は、 I<new_root> を root (I</>)  とするファイルシステムのマウントポイントを表示する。"
6862
6863 #. type: Plain text
6864 #: build/C/man2/pivot_root.2:110
6865 msgid "B<pivot_root>()  may return (in I<errno>) any of the errors returned by B<stat>(2).  Additionally, it may return:"
6866 msgstr "B<pivot_root>()  は B<stat>(2)  の返すあらゆるエラーを (I<errno> に) 返す可能性がある。さらに以下を返すことがある:"
6867
6868 #. type: Plain text
6869 #: build/C/man2/pivot_root.2:114
6870 msgid "I<new_root> or I<put_old> are on the current root filesystem, or a filesystem is already mounted on I<put_old>."
6871 msgstr "I<new_root> または I<put_old> が、現在の root ファイルシステム上にあるか、既に I<put_old> になんらかのファイルシステムがマウントされている。"
6872
6873 #. type: Plain text
6874 #: build/C/man2/pivot_root.2:117
6875 msgid "I<put_old> is not underneath I<new_root>."
6876 msgstr "I<put_old> が I<new_root> の下層にない。"
6877
6878 #. type: TP
6879 #: build/C/man2/pivot_root.2:117
6880 #, no-wrap
6881 msgid "B<ENOTDIR>"
6882 msgstr "B<ENOTDIR>"
6883
6884 #. type: Plain text
6885 #: build/C/man2/pivot_root.2:120
6886 msgid "I<new_root> or I<put_old> is not a directory."
6887 msgstr "I<new_root> または I<put_old> がディレクトリでない。"
6888
6889 #. type: Plain text
6890 #: build/C/man2/pivot_root.2:125
6891 msgid "The calling process does not have the B<CAP_SYS_ADMIN> capability."
6892 msgstr "呼び出し元のプロセスが B<CAP_SYS_ADMIN> ケーパビリティを持っていない。"
6893
6894 #. type: Plain text
6895 #: build/C/man2/pivot_root.2:128
6896 msgid "B<pivot_root>()  was introduced in Linux 2.3.41."
6897 msgstr "B<pivot_root>()  は Linux 2.3.41 で導入された。"
6898
6899 #. type: Plain text
6900 #: build/C/man2/pivot_root.2:131
6901 msgid "B<pivot_root>()  is Linux-specific and hence is not portable."
6902 msgstr "B<pivot_root>()  は Linux に固有のものなので、移植性はない。"
6903
6904 #. type: Plain text
6905 #: build/C/man2/pivot_root.2:138
6906 msgid "B<pivot_root>()  should not have to change root and current working directory of all other processes in the system."
6907 msgstr "B<pivot_root>()  はシステムの他のプロセス全ての root と カレントワーキングディレクトリとを変更しなくてもよいはずである。"
6908
6909 #. type: Plain text
6910 #: build/C/man2/pivot_root.2:143
6911 msgid "Some of the more obscure uses of B<pivot_root>()  may quickly lead to insanity."
6912 msgstr "B<pivot_root>()  の使い方がもうちょっと曖昧になると、 あっという間にわけのわからない状態になってしまうだろう"
6913
6914 #. type: Plain text
6915 #: build/C/man2/pivot_root.2:149
6916 msgid "B<chdir>(2), B<chroot>(2), B<stat>(2), B<initrd>(4), B<pivot_root>(8)"
6917 msgstr "B<chdir>(2), B<chroot>(2), B<stat>(2), B<initrd>(4), B<pivot_root>(8)"
6918
6919 #. type: TH
6920 #: build/C/man2/process_vm_readv.2:29
6921 #, no-wrap
6922 msgid "PROCESS_VM_READV"
6923 msgstr "PROCESS_VM_READV"
6924
6925 #. type: Plain text
6926 #: build/C/man2/process_vm_readv.2:32
6927 msgid "process_vm_readv, process_vm_writev - transfer data between process address spaces"
6928 msgstr "process_vm_readv, process_vm_writev - プロセスのアドレス空間間でデータを転送する"
6929
6930 #. type: Plain text
6931 #: build/C/man2/process_vm_readv.2:35
6932 #, no-wrap
6933 msgid "B<#include E<lt>sys/uio.hE<gt>>\n"
6934 msgstr "B<#include E<lt>sys/uio.hE<gt>>\n"
6935
6936 #. type: Plain text
6937 #: build/C/man2/process_vm_readv.2:42
6938 #, no-wrap
6939 msgid ""
6940 "B<ssize_t process_vm_readv(pid_t >I<pid>B<,>\n"
6941 "B<                         const struct iovec *>I<local_iov>B<,>\n"
6942 "B<                         unsigned long >I<liovcnt>B<,>\n"
6943 "B<                         const struct iovec *>I<remote_iov>B<,>\n"
6944 "B<                         unsigned long >I<riovcnt>B<,>\n"
6945 "B<                         unsigned long >I<flags>B<);>\n"
6946 msgstr ""
6947 "B<ssize_t process_vm_readv(pid_t >I<pid>B<,>\n"
6948 "B<                         const struct iovec *>I<local_iov>B<,>\n"
6949 "B<                         unsigned long >I<liovcnt>B<,>\n"
6950 "B<                         const struct iovec *>I<remote_iov>B<,>\n"
6951 "B<                         unsigned long >I<riovcnt>B<,>\n"
6952 "B<                         unsigned long >I<flags>B<);>\n"
6953
6954 #. type: Plain text
6955 #: build/C/man2/process_vm_readv.2:49
6956 #, no-wrap
6957 msgid ""
6958 "B<ssize_t process_vm_writev(pid_t >I<pid>B<,>\n"
6959 "B<                          const struct iovec *>I<local_iov>B<,>\n"
6960 "B<                          unsigned long >I<liovcnt>B<,>\n"
6961 "B<                          const struct iovec *>I<remote_iov>B<,>\n"
6962 "B<                          unsigned long >I<riovcnt>B<,>\n"
6963 "B<                          unsigned long >I<flags>B<);>\n"
6964 msgstr ""
6965 "B<ssize_t process_vm_writev(pid_t >I<pid>B<,>\n"
6966 "B<                          const struct iovec *>I<local_iov>B<,>\n"
6967 "B<                          unsigned long >I<liovcnt>B<,>\n"
6968 "B<                          const struct iovec *>I<remote_iov>B<,>\n"
6969 "B<                          unsigned long >I<riovcnt>B<,>\n"
6970 "B<                          unsigned long >I<flags>B<);>\n"
6971
6972 #. type: Plain text
6973 #: build/C/man2/process_vm_readv.2:54
6974 msgid "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
6975 msgstr ""
6976
6977 #. type: Plain text
6978 #: build/C/man2/process_vm_readv.2:58
6979 msgid "B<process_vm_readv>(), B<process_vm_writev>():"
6980 msgstr "B<process_vm_readv>(), B<process_vm_writev>():"
6981
6982 #. type: Plain text
6983 #: build/C/man2/process_vm_readv.2:62
6984 msgid "B<_GNU_SOURCE>"
6985 msgstr "B<_GNU_SOURCE>"
6986
6987 #. type: Plain text
6988 #: build/C/man2/process_vm_readv.2:73
6989 msgid "These system calls transfer data between the address space of the calling process (\"the local process\") and the process identified by I<pid> (\"the remote process\").  The data moves directly between the address spaces of the two processes, without passing through kernel space."
6990 msgstr ""
6991
6992 #. type: Plain text
6993 #: build/C/man2/process_vm_readv.2:98
6994 msgid "The B<process_vm_readv>()  system call transfers data from the remote process to the local process.  The data to be transferred is identified by I<remote_iov> and I<riovcnt>: I<remote_iov> is a pointer to an array describing address ranges in the process I<pid>, and I<riovcnt> specifies the number of elements in I<remote_iov>.  The data is transferred to the locations specified by I<local_iov> and I<liovcnt>: I<local_iov> is a pointer to an array describing address ranges in the calling process, and I<liovcnt> specifies the number of elements in I<local_iov>."
6995 msgstr ""
6996
6997 #. type: Plain text
6998 #: build/C/man2/process_vm_readv.2:112
6999 msgid "The B<process_vm_writev>()  system call is the converse of B<process_vm_readv>()\\(emit transfers data from the local process to the remote process.  Other than the direction of the transfer, the arguments I<liovcnt>, I<local_iov>, I<riovcnt>, and I<remote_iov> have the same meaning as for B<process_vm_readv>()."
7000 msgstr ""
7001
7002 #. type: Plain text
7003 #: build/C/man2/process_vm_readv.2:122
7004 msgid "The I<local_iov> and I<remote_iov> arguments point to an array of I<iovec> structures, defined in I<E<lt>sys/uio.hE<gt>> as:"
7005 msgstr ""
7006 "引き数 I<local_iov> と I<remote_iov> は I<iovec> 構造体の配列へのポイン\n"
7007 "タである。 I<iovec> 構造体は I<E<lt>sys/uio.hE<gt>> で以下のように定義\n"
7008 "されている:"
7009
7010 #. type: Plain text
7011 #: build/C/man2/process_vm_readv.2:129
7012 #, no-wrap
7013 msgid ""
7014 "struct iovec {\n"
7015 "    void  *iov_base;    /* Starting address */\n"
7016 "    size_t iov_len;     /* Number of bytes to transfer */\n"
7017 "};\n"
7018 msgstr ""
7019 "struct iovec {\n"
7020 "    void  *iov_base;    /* Starting address */\n"
7021 "    size_t iov_len;     /* Number of bytes to transfer */\n"
7022 "};\n"
7023
7024 #. type: Plain text
7025 #: build/C/man2/process_vm_readv.2:145
7026 msgid "Buffers are processed in array order.  This means that B<process_vm_readv>()  completely fills I<local_iov[0]> before proceeding to I<local_iov[1]>, and so on.  Likewise, I<remote_iov[0]> is completely read before proceeding to I<remote_iov[1]>, and so on."
7027 msgstr ""
7028 "バッファは配列の順序で処理される。これは、 B<process_vm_readv>() が\n"
7029 "I<local_iov>[0] が完全に一杯になるまでデータを詰めてから、\n"
7030 "I<local_iov>[1] に進むといったことを意味する。同様に、\n"
7031 "I<remote_iov>[0] を完全に読み出してから I<remote_iov>[1] に進み、\n"
7032 "以降も同様である。"
7033
7034 #. type: Plain text
7035 #: build/C/man2/process_vm_readv.2:156
7036 msgid "Similarly, B<process_vm_writev>()  writes out the entire contents of I<local_iov[0]> before proceeding to I<local_iov[1]>, and it completely fills I<remote_iov[0]> before proceeding to I<remote_iov[1]>."
7037 msgstr ""
7038
7039 #. type: Plain text
7040 #: build/C/man2/process_vm_readv.2:164
7041 msgid "The lengths of I<remote_iov[i].iov_len> and I<local_iov[i].iov_len> do not have to be the same.  Thus, it is possible to split a single local buffer into multiple remote buffers, or vice versa."
7042 msgstr ""
7043
7044 #. type: Plain text
7045 #: build/C/man2/process_vm_readv.2:168
7046 msgid "The I<flags> argument is currently unused and must be set to 0."
7047 msgstr "I<flags> 引き数は現在使用されておらず、 0 を設定しなければならない。"
7048
7049 #.  In time, glibc might provide a wrapper that works around this limit,
7050 #.  as is done for readv()/writev()
7051 #. type: Plain text
7052 #: build/C/man2/process_vm_readv.2:181
7053 msgid "The values specified in the I<liovcnt> and I<riovcnt> arguments must be less than or equal to B<IOV_MAX> (defined in I<E<lt>limits.hE<gt>> or accessible via the call I<sysconf(_SC_IOV_MAX)>)."
7054 msgstr ""
7055
7056 #. type: Plain text
7057 #: build/C/man2/process_vm_readv.2:191
7058 msgid "The count arguments and I<local_iov> are checked before doing any transfers.  If the counts are too big, or I<local_iov> is invalid, or the addresses refer to regions that are inaccessible to the local process, none of the vectors will be processed and an error will be returned immediately."
7059 msgstr ""
7060
7061 #. type: Plain text
7062 #: build/C/man2/process_vm_readv.2:211
7063 msgid "Note, however, that these system calls do not check the memory regions in the remote process until just before doing the read/write.  Consequently, a partial read/write (see RETURN VALUE)  may result if one of the I<remote_iov> elements points to an invalid memory region in the remote process.  No further reads/writes will be attempted beyond that point.  Keep this in mind when attempting to read data of unknown length (such as C strings that are null-terminated) from a remote process, by avoiding spanning memory pages (typically 4KiB) in a single remote I<iovec> element.  (Instead, split the remote read into two I<remote_iov> elements and have them merge back into a single write I<local_iov> entry.  The first read entry goes up to the page boundary, while the second starts on the next page boundary.)"
7064 msgstr ""
7065
7066 #. type: Plain text
7067 #: build/C/man2/process_vm_readv.2:225
7068 msgid "In order to read from or write to another process, either the caller must have the capability B<CAP_SYS_PTRACE>, or the real user ID, effective user ID, and saved set-user-ID of the remote process must match the real user ID of the caller I<and> the real group ID, effective group ID, and saved set-group-ID of the remote process must match the real group ID of the caller.  (The permission required is exactly the same as that required to perform a B<ptrace>(2)  B<PTRACE_ATTACH> on the remote process.)"
7069 msgstr ""
7070
7071 #. type: Plain text
7072 #: build/C/man2/process_vm_readv.2:241
7073 msgid "On success, B<process_vm_readv>()  returns the number of bytes read and B<process_vm_writev>()  returns the number of bytes written.  This return value may be less than the total number of requested bytes, if a partial read/write occurred.  (Partial transfers apply at the granularity of I<iovec> elements.  These system calls won't perform a partial transfer that splits a single I<iovec> element.)  The caller should check the return value to determine whether a partial read/write occurred."
7074 msgstr ""
7075
7076 #. type: Plain text
7077 #: build/C/man2/process_vm_readv.2:245
7078 msgid "On error, -1 is returned and I<errno> is set appropriately."
7079 msgstr "エラーの場合は -1 が返され、 I<errno> が適切に設定される。"
7080
7081 #. type: Plain text
7082 #: build/C/man2/process_vm_readv.2:257
7083 msgid "The sum of the I<iov_len> values of either I<local_iov> or I<remote_iov> overflows a I<ssize_t> value."
7084 msgstr ""
7085
7086 #. type: Plain text
7087 #: build/C/man2/process_vm_readv.2:261
7088 msgid "I<flags> is not 0."
7089 msgstr "I<flags> が 0 でない。"
7090
7091 #. type: Plain text
7092 #: build/C/man2/process_vm_readv.2:267
7093 msgid "I<liovcnt> or I<riovcnt> is too large."
7094 msgstr "I<liovcnt> か I<riovcnt> が大きすぎる。"
7095
7096 #. type: Plain text
7097 #: build/C/man2/process_vm_readv.2:272
7098 msgid "The memory described by I<local_iov> is outside the caller's accessible address space."
7099 msgstr ""
7100 "I<local_iov> が示すメモリが呼び出し側がアクセス可能な\n"
7101 "アドレス空間の外にある。"
7102
7103 #. type: Plain text
7104 #: build/C/man2/process_vm_readv.2:278
7105 msgid "The memory described by I<remote_iov> is outside the accessible address space of the process I<pid>."
7106 msgstr ""
7107
7108 #. type: Plain text
7109 #: build/C/man2/process_vm_readv.2:283
7110 msgid "Could not allocate memory for internal copies of the I<iovec> structures."
7111 msgstr ""
7112
7113 #. type: Plain text
7114 #: build/C/man2/process_vm_readv.2:287
7115 msgid "The caller does not have permission to access the address space of the process I<pid>."
7116 msgstr ""
7117 "呼び出し側がプロセス I<pid> のアドレス空間に対するアクセス許可を\n"
7118 "持っていない。"
7119
7120 #. type: Plain text
7121 #: build/C/man2/process_vm_readv.2:292
7122 msgid "No process with ID I<pid> exists."
7123 msgstr "ID が I<pid> のプロセスが存在しない。"
7124
7125 #. type: Plain text
7126 #: build/C/man2/process_vm_readv.2:295
7127 msgid "These system calls were added in Linux 3.2.  Support is provided in glibc since version 2.15."
7128 msgstr ""
7129 "これらのシステムコールは Linux 3.2 で追加された。ライブラリによる\n"
7130 "サポートは glibc バージョン 2.15 以降で提供されている。"
7131
7132 #. type: Plain text
7133 #: build/C/man2/process_vm_readv.2:297
7134 msgid "These system calls are nonstandard Linux extensions."
7135 msgstr "これらのシステムコールは非標準で Linux による拡張である。"
7136
7137 #. type: Plain text
7138 #: build/C/man2/process_vm_readv.2:303
7139 msgid "The data transfers performed by B<process_vm_readv>()  and B<process_vm_writev>()  are not guaranteed to be atomic in any way."
7140 msgstr ""
7141
7142 #.  Original user is MPI, http://www.mcs.anl.gov/research/projects/mpi/
7143 #.  See also some benchmarks at http://lwn.net/Articles/405284/
7144 #.  and http://marc.info/?l=linux-mm&m=130105930902915&w=2
7145 #. type: Plain text
7146 #: build/C/man2/process_vm_readv.2:311
7147 msgid "These system calls were designed to permit fast message passing by allowing messages to be exchanged with a single copy operation (rather than the double copy that would be required when using, for example, shared memory or pipes)."
7148 msgstr ""
7149
7150 #. type: Plain text
7151 #: build/C/man2/process_vm_readv.2:319
7152 msgid "The following code sample demonstrates the use of B<process_vm_readv>().  It reads 20 bytes at the address 0x10000 from the process with PID 10 and writes the first 10 bytes into I<buf1> and the second 10 bytes into I<buf2>."
7153 msgstr ""
7154
7155 #. type: Plain text
7156 #: build/C/man2/process_vm_readv.2:322
7157 #, no-wrap
7158 msgid "#include E<lt>sys/uio.hE<gt>\n"
7159 msgstr "#include E<lt>sys/uio.hE<gt>\n"
7160
7161 #. type: Plain text
7162 #: build/C/man2/process_vm_readv.2:332
7163 #, no-wrap
7164 msgid ""
7165 "int\n"
7166 "main(void)\n"
7167 "{\n"
7168 "    struct iovec local[2];\n"
7169 "    struct iovec remote[1];\n"
7170 "    char buf1[10];\n"
7171 "    char buf2[10];\n"
7172 "    ssize_t nread;\n"
7173 "    pid_t pid = 10;             /* PID of remote process */\n"
7174 msgstr ""
7175 "int\n"
7176 "main(void)\n"
7177 "{\n"
7178 "    struct iovec local[2];\n"
7179 "    struct iovec remote[1];\n"
7180 "    char buf1[10];\n"
7181 "    char buf2[10];\n"
7182 "    ssize_t nread;\n"
7183 "    pid_t pid = 10;             /* PID of remote process */\n"
7184
7185 #. type: Plain text
7186 #: build/C/man2/process_vm_readv.2:339
7187 #, no-wrap
7188 msgid ""
7189 "    local[0].iov_base = buf1;\n"
7190 "    local[0].iov_len = 10;\n"
7191 "    local[1].iov_base = buf2;\n"
7192 "    local[1].iov_len = 10;\n"
7193 "    remote[0].iov_base = (void *) 0x10000;\n"
7194 "    remote[0].iov_len = 20;\n"
7195 msgstr ""
7196 "    local[0].iov_base = buf1;\n"
7197 "    local[0].iov_len = 10;\n"
7198 "    local[1].iov_base = buf2;\n"
7199 "    local[1].iov_len = 10;\n"
7200 "    remote[0].iov_base = (void *) 0x10000;\n"
7201 "    remote[0].iov_len = 20;\n"
7202
7203 #. type: Plain text
7204 #: build/C/man2/process_vm_readv.2:346
7205 #, no-wrap
7206 msgid ""
7207 "    nread = process_vm_readv(pid, local, 2, remote, 1, 0);\n"
7208 "    if (nread != 20)\n"
7209 "        return 1;\n"
7210 "    else\n"
7211 "        return 0;\n"
7212 "}\n"
7213 msgstr ""
7214 "    nread = process_vm_readv(pid, local, 2, remote, 1, 0);\n"
7215 "    if (nread != 20)\n"
7216 "        return 1;\n"
7217 "    else\n"
7218 "        return 0;\n"
7219 "}\n"
7220
7221 #. type: Plain text
7222 #: build/C/man2/process_vm_readv.2:350
7223 msgid "B<readv>(2), B<writev>(2)"
7224 msgstr "B<readv>(2), B<writev>(2)"
7225
7226 #. type: TH
7227 #: build/C/man2/ptrace.2:46
7228 #, no-wrap
7229 msgid "PTRACE"
7230 msgstr "PTRACE"
7231
7232 #. type: Plain text
7233 #: build/C/man2/ptrace.2:49
7234 msgid "ptrace - process trace"
7235 msgstr "ptrace - プロセスのトレース"
7236
7237 #. type: Plain text
7238 #: build/C/man2/ptrace.2:52
7239 #, no-wrap
7240 msgid "B<#include E<lt>sys/ptrace.hE<gt>>\n"
7241 msgstr "B<#include E<lt>sys/ptrace.hE<gt>>\n"
7242
7243 #. type: Plain text
7244 #: build/C/man2/ptrace.2:55
7245 #, no-wrap
7246 msgid ""
7247 "B<long ptrace(enum __ptrace_request >I<request>B<, pid_t >I<pid>B<, >\n"
7248 "B<            void *>I<addr>B<, void *>I<data>B<);>\n"
7249 msgstr ""
7250 "B<long ptrace(enum __ptrace_request >I<request>B<, pid_t >I<pid>B<, >\n"
7251 "B<            void *>I<addr>B<, void *>I<data>B<);>\n"
7252
7253 #. type: Plain text
7254 #: build/C/man2/ptrace.2:64
7255 #, fuzzy
7256 #| msgid "The B<ptrace>()  system call provides a means by which a parent process may observe and control the execution of another process, and examine and change its core image and registers.  It is primarily used to implement breakpoint debugging and system call tracing."
7257 msgid "The B<ptrace>()  system call provides a means by which one process (the \"tracer\")  may observe and control the execution of another process (the \"tracee\"), and examine and change the tracee's memory and registers.  It is primarily used to implement breakpoint debugging and system call tracing."
7258 msgstr "B<ptrace>()  システムコールは、親プロセスが、別のプロセスの実行の監視/制御を 行ったり、コアイメージ (core image) やレジスタの調査/変更を 行ったりする手段を提供する。 B<ptrace>()  は、主にブレークポイントによるデバッグやシステムコールのトレースを 実装するのに用いられる。"
7259
7260 #. type: Plain text
7261 #: build/C/man2/ptrace.2:75
7262 msgid "A tracee first needs to be attached to the tracer.  Attachment and subsequent commands are per thread: in a multithreaded process, every thread can be individually attached to a (potentially different) tracer, or left not attached and thus not debugged.  Therefore, \"tracee\" always means \"(one) thread\", never \"a (possibly multithreaded) process\".  Ptrace commands are always sent to a specific tracee using a call of the form"
7263 msgstr ""
7264
7265 #. type: Plain text
7266 #: build/C/man2/ptrace.2:77
7267 #, no-wrap
7268 msgid "    ptrace(PTRACE_foo, pid, ...)\n"
7269 msgstr "    ptrace(PTRACE_foo, pid, ...)\n"
7270
7271 #. type: Plain text
7272 #: build/C/man2/ptrace.2:81
7273 msgid "where I<pid> is the thread ID of the corresponding Linux thread."
7274 msgstr "ここで I<pid> は対応する Linux スレッドのスレッド ID である。"
7275
7276 #. type: Plain text
7277 #: build/C/man2/ptrace.2:87
7278 msgid "(Note that in this page, a \"multithreaded process\" means a thread group consisting of threads created using the B<clone>(2)  B<CLONE_THREAD> flag.)"
7279 msgstr ""
7280
7281 #. type: Plain text
7282 #: build/C/man2/ptrace.2:98
7283 #, fuzzy
7284 #| msgid "The parent can initiate a trace by calling B<fork>(2)  and having the resulting child do a B<PTRACE_TRACEME>, followed (typically) by an B<exec>(3).  Alternatively, the parent may commence trace of an existing process using B<PTRACE_ATTACH>."
7285 msgid "A process can initiate a trace by calling B<fork>(2)  and having the resulting child do a B<PTRACE_TRACEME>, followed (typically) by an B<execve>(2).  Alternatively, one process may commence tracing another process using B<PTRACE_ATTACH> or B<PTRACE_SEIZE>."
7286 msgstr "トレースを開始するには、まず親プロセスで B<fork>(2)  を呼び出す。生成された子プロセスで B<PTRACE_TRACEME> を行い、続いて (典型的には)  B<exec>(3)  を行なう。 別の方法としては、 親プロセスが既存のプロセスに対して B<PTRACE_ATTACH> を使用し、トレースを開始する。"
7287
7288 #. type: Plain text
7289 #: build/C/man2/ptrace.2:115
7290 #, fuzzy
7291 #| msgid "While being traced, the child will stop each time a signal is delivered, even if the signal is being ignored.  (The exception is B<SIGKILL>, which has its usual effect.)  The parent will be notified at its next B<wait>(2)  and may inspect and modify the child process while it is stopped.  The parent then causes the child to continue, optionally ignoring the delivered signal (or even delivering a different signal instead)."
7292 msgid "While being traced, the tracee will stop each time a signal is delivered, even if the signal is being ignored.  (An exception is B<SIGKILL>, which has its usual effect.)  The tracer will be notified at its next call to B<waitpid>(2)  (or one of the related \"wait\" system calls); that call will return a I<status> value containing information that indicates the cause of the stop in the tracee.  While the tracee is stopped, the tracer can use various ptrace requests to inspect and modify the tracee.  The tracer then causes the tracee to continue, optionally ignoring the delivered signal (or even delivering a different signal instead)."
7293 msgstr "トレースの実行中、子プロセスはシグナルが配送されるたびに、 たとえそのシグナルが無視すべきものであっても停止する (B<SIGKILL> は例外で、通常どおりの効果をもたらす)。 親プロセスには次の B<wait>(2)  で通知され、停止している間に子プロセスを調べたり修正したりすることができる。 そして親プロセスは子プロセスの実行を再開させるが、配送された シグナルを無視することもできる (あるいは代わりに別のシグナルを 配送することもできる) 。"
7294
7295 #. type: Plain text
7296 #: build/C/man2/ptrace.2:125
7297 msgid "If the B<PTRACE_O_TRACEEXEC> option is not in effect, all successful calls to B<execve>(2)  by the traced process will cause it to be sent a B<SIGTRAP> signal, giving the parent a chance to gain control before the new program begins execution."
7298 msgstr ""
7299
7300 #. type: Plain text
7301 #: build/C/man2/ptrace.2:129
7302 #, fuzzy
7303 #| msgid "When the parent is finished tracing, it can terminate the child with B<PTRACE_KILL> or cause it to continue executing in a normal, untraced mode via B<PTRACE_DETACH>."
7304 msgid "When the tracer is finished tracing, it can cause the tracee to continue executing in a normal, untraced mode via B<PTRACE_DETACH>."
7305 msgstr "親プロセスがトレースを終了する際には、 B<PTRACE_KILL> を使用して子プロセスを終了させることもできるし、 B<PTRACE_DETACH> を用いて通常のトレースなしのモードにして、 実行を継続させることもできる。"
7306
7307 #. type: Plain text
7308 #: build/C/man2/ptrace.2:133
7309 msgid "The value of I<request> determines the action to be performed:"
7310 msgstr "I<request> の値がこのシステムコールの動作を決定する:"
7311
7312 #. type: TP
7313 #: build/C/man2/ptrace.2:133
7314 #, no-wrap
7315 msgid "B<PTRACE_TRACEME>"
7316 msgstr "B<PTRACE_TRACEME>"
7317
7318 #. type: Plain text
7319 #: build/C/man2/ptrace.2:143
7320 msgid "Indicate that this process is to be traced by its parent.  A process probably shouldn't make this request if its parent isn't expecting to trace it.  (I<pid>, I<addr>, and I<data> are ignored.)"
7321 msgstr "このプロセスが親プロセスによってトレースされることを表す。親プロセスが自プロセスをトレースするつもりがない場合には、 おそらくこのプロセスは本要求を行うべきではないだろう。 (I<pid>, I<addr>, I<data> は無視される。)"
7322
7323 #. type: Plain text
7324 #: build/C/man2/ptrace.2:158
7325 #, fuzzy
7326 #| msgid "The above request is used only by the child process; the rest are used only by the parent.  In the following requests, I<pid> specifies the child process to be acted on.  For requests other than B<PTRACE_KILL>, the child process must be stopped."
7327 msgid "The B<PTRACE_TRACEME> request is used only by the tracee; the remaining requests are used only by the tracer.  In the following requests, I<pid> specifies the thread ID of the tracee to be acted on.  For requests other than B<PTRACE_ATTACH>, B<PTRACE_SEIZE>, B<PTRACE_INTERRUPT>, and B<PTRACE_KILL>, the tracee must be stopped."
7328 msgstr "上記の要求は子プロセスだけが行なうものである。 残りは親プロセスだけが行なうものである。 以下の要求では、I<pid> で操作の対象となる 子プロセスを指定する。 B<PTRACE_KILL> を除き、要求を行なうためには 子プロセスは停止していなければならない。"
7329
7330 #. type: TP
7331 #: build/C/man2/ptrace.2:158
7332 #, no-wrap
7333 msgid "B<PTRACE_PEEKTEXT>, B<PTRACE_PEEKDATA>"
7334 msgstr "B<PTRACE_PEEKTEXT>, B<PTRACE_PEEKDATA>"
7335
7336 #. type: Plain text
7337 #: build/C/man2/ptrace.2:169
7338 #, fuzzy
7339 #| msgid "Reads a word at the location I<addr> in the child's memory, returning the word as the result of the B<ptrace>()  call.  Linux does not have separate text and data address spaces, so the two requests are currently equivalent.  (The argument I<data> is ignored.)"
7340 msgid "Read a word at the address I<addr> in the tracee's memory, returning the word as the result of the B<ptrace>()  call.  Linux does not have separate text and data address spaces, so these two requests are currently equivalent.  (I<data> is ignored; but see NOTES.)"
7341 msgstr "子プロセスのメモリの I<addr> の位置から 1 ワードを読み出す。読み出したワードは B<ptrace>()  の返り値として返される。 Linux ではテキスト (text) とデータ (data) で 同じアドレス空間を使用するため、この 2 つの要求は現在のところ 同じものである。 (引き数 I<data> は無視される。)"
7342
7343 #. type: TP
7344 #: build/C/man2/ptrace.2:169
7345 #, no-wrap
7346 msgid "B<PTRACE_PEEKUSER>"
7347 msgstr "B<PTRACE_PEEKUSER>"
7348
7349 #.  PTRACE_PEEKUSR in kernel source, but glibc uses PTRACE_PEEKUSER,
7350 #.  and that is the name that seems common on other systems.
7351 #. type: Plain text
7352 #: build/C/man2/ptrace.2:187
7353 #, fuzzy
7354 #| msgid "Reads a word at offset I<addr> in the child's USER area, which holds the registers and other information about the process (see I<E<lt>sys/user.hE<gt>>).  The word is returned as the result of the B<ptrace>()  call.  Typically the offset must be word-aligned, though this might vary by architecture.  See NOTES.  (I<data> is ignored.)"
7355 msgid "Read a word at offset I<addr> in the tracee's USER area, which holds the registers and other information about the process (see I<E<lt>sys/user.hE<gt>>).  The word is returned as the result of the B<ptrace>()  call.  Typically, the offset must be word-aligned, though this might vary by architecture.  See NOTES.  (I<data> is ignored; but see NOTES.)"
7356 msgstr "子プロセスの USER 領域のオフセット I<addr> の位置から 1 ワードを読み込む。USER 領域にはそのプロセスの レジスタ (registers) などの情報が保持されている (I<E<lt>sys/user.hE<gt>> を参照)。読み込んだワードは B<ptrace>()  コールの結果として返される。 たいていはオフセットはワード境界になければならないが、 アーキテクチャによってはその必要はない。 「注意」の節を参照。 (I<data> は無視される。 )"
7357
7358 #. type: TP
7359 #: build/C/man2/ptrace.2:187
7360 #, no-wrap
7361 msgid "B<PTRACE_POKETEXT>, B<PTRACE_POKEDATA>"
7362 msgstr "B<PTRACE_POKETEXT>, B<PTRACE_POKEDATA>"
7363
7364 #. type: Plain text
7365 #: build/C/man2/ptrace.2:199
7366 #, fuzzy
7367 #| msgid "Copies the word I<data> to location I<addr> in the child's memory.  As above, the two requests are currently equivalent."
7368 msgid "Copy the word I<data> to the address I<addr> in the tracee's memory.  As for B<PTRACE_PEEKTEXT> and B<PTRACE_PEEKDATA>, these two requests are currently equivalent."
7369 msgstr "ワード I<data> を子プロセスのメモリの I<addr> の位置へコピーする。上と同様に、現在のところ二つの 要求は同じものである。"
7370
7371 #. type: TP
7372 #: build/C/man2/ptrace.2:199
7373 #, no-wrap
7374 msgid "B<PTRACE_POKEUSER>"
7375 msgstr "B<PTRACE_POKEUSER>"
7376
7377 #.  PTRACE_POKEUSR in kernel source, but glibc uses PTRACE_POKEUSER,
7378 #.  and that is the name that seems common on other systems.
7379 #.  FIXME In the preceding sentence, which modifications are disallowed,
7380 #.  and when they are disallowed, how does user space discover that fact?
7381 #. type: Plain text
7382 #: build/C/man2/ptrace.2:215
7383 #, fuzzy
7384 #| msgid "Copies the word I<data> to offset I<addr> in the child's USER area.  As above, the offset must typically be word-aligned.  In order to maintain the integrity of the kernel, some modifications to the USER area are disallowed."
7385 msgid "Copy the word I<data> to offset I<addr> in the tracee's USER area.  As for B<PTRACE_PEEKUSER>, the offset must typically be word-aligned.  In order to maintain the integrity of the kernel, some modifications to the USER area are disallowed."
7386 msgstr "ワード I<data> を子プロセスの USER 領域のオフセット I<addr> の位置にコピーする。 上と同様に、通常、オフセットはワード境界になければならない。 カーネルの完全性 (integrity) を維持するため、 変更内容によっては USER 領域の変更は禁止されている。"
7387
7388 #. type: TP
7389 #: build/C/man2/ptrace.2:215
7390 #, no-wrap
7391 msgid "B<PTRACE_GETREGS>, B<PTRACE_GETFPREGS>"
7392 msgstr "B<PTRACE_GETREGS>, B<PTRACE_GETFPREGS>"
7393
7394 #. type: Plain text
7395 #: build/C/man2/ptrace.2:238
7396 #, fuzzy
7397 #| msgid "Copies the child's general purpose or floating-point registers, respectively, to location I<data> in the parent.  See I<E<lt>sys/user.hE<gt>> for information on the format of this data.  (I<addr> is ignored.)"
7398 msgid "Copy the tracee's general-purpose or floating-point registers, respectively, to the address I<data> in the tracer.  See I<E<lt>sys/user.hE<gt>> for information on the format of this data.  (I<addr> is ignored.)  Note that SPARC systems have the meaning of I<data> and I<addr> reversed; that is, I<data> is ignored and the registers are copied to the address I<addr>.  B<PTRACE_GETREGS> and B<PTRACE_GETFPREGS> are not present on all architectures."
7399 msgstr "それぞれ、子プロセスの汎用レジスタ、浮動小数点レジスタを親プロセスの I<data> の位置にコピーする。この data の書式に関しては I<E<lt>sys/user.hE<gt>> を参照すること。(I<addr> は無視される。)"
7400
7401 #. type: TP
7402 #: build/C/man2/ptrace.2:238
7403 #, no-wrap
7404 msgid "B<PTRACE_GETREGSET> (since Linux 2.6.34)"
7405 msgstr " B<PTRACE_GETREGSET> (since Linux 2.6.34)"
7406
7407 #. type: Plain text
7408 #: build/C/man2/ptrace.2:259
7409 msgid "Read the tracee's registers.  I<addr> specifies, in an architecture-dependent way, the type of registers to be read.  B<NT_PRSTATUS> (with numerical value 1)  usually results in reading of general-purpose registers.  If the CPU has, for example, floating-point and/or vector registers, they can be retrieved by setting I<addr> to the corresponding B<NT_foo> constant.  I<data> points to a B<struct iovec>, which describes the destination buffer's location and length.  On return, the kernel modifies B<iov.len> to indicate the actual number of bytes returned."
7410 msgstr ""
7411
7412 #. type: TP
7413 #: build/C/man2/ptrace.2:259
7414 #, no-wrap
7415 msgid "B<PTRACE_SETREGS>, B<PTRACE_SETFPREGS>"
7416 msgstr "B<PTRACE_SETREGS>, B<PTRACE_SETFPREGS>"
7417
7418 #.  FIXME . In the preceding sentence, which modifications are disallowed,
7419 #.  and when they are disallowed, how does user space discover that fact?
7420 #. type: Plain text
7421 #: build/C/man2/ptrace.2:284
7422 #, fuzzy
7423 #| msgid "Copies the child's general purpose or floating-point registers, respectively, from location I<data> in the parent.  As for B<PTRACE_POKEUSER>, some general purpose register modifications may be disallowed.  (I<addr> is ignored.)"
7424 msgid "Modify the tracee's general-purpose or floating-point registers, respectively, from the address I<data> in the tracer.  As for B<PTRACE_POKEUSER>, some general-purpose register modifications may be disallowed.  (I<addr> is ignored.)  Note that SPARC systems have the meaning of I<data> and I<addr> reversed; that is, I<data> is ignored and the registers are copied from the address I<addr>.  B<PTRACE_SETREGS> and B<PTRACE_SETFPREGS> are not present on all architectures."
7425 msgstr "それぞれ、子プロセスの汎用レジスタ、浮動小数点レジスタに 親プロセスの I<date> の位置からコピーする。 B<PTRACE_POKEUSER> と同様に、汎用レジスタによっては 変更が禁止されている場合がある。 (I<addr> は無視される。)"
7426
7427 #. type: TP
7428 #: build/C/man2/ptrace.2:284
7429 #, no-wrap
7430 msgid "B<PTRACE_SETREGSET> (since Linux 2.6.34)"
7431 msgstr " B<PTRACE_SETREGSET> (since Linux 2.6.34)"
7432
7433 #. type: Plain text
7434 #: build/C/man2/ptrace.2:293
7435 msgid "Modify the tracee's registers.  The meaning of I<addr> and I<data> is analogous to B<PTRACE_GETREGSET>."
7436 msgstr ""
7437
7438 #. type: TP
7439 #: build/C/man2/ptrace.2:293
7440 #, no-wrap
7441 msgid "B<PTRACE_GETSIGINFO> (since Linux 2.3.99-pre6)"
7442 msgstr "B<PTRACE_GETSIGINFO> (Linux 2.3.99-pre6 以降)"
7443
7444 #. type: Plain text
7445 #: build/C/man2/ptrace.2:305
7446 #, fuzzy
7447 #| msgid "Retrieve information about the signal that caused the stop.  Copies a I<siginfo_t> structure (see B<sigaction>(2))  from the child to location I<data> in the parent.  (I<addr> is ignored.)"
7448 msgid "Retrieve information about the signal that caused the stop.  Copy a I<siginfo_t> structure (see B<sigaction>(2))  from the tracee to the address I<data> in the tracer.  (I<addr> is ignored.)"
7449 msgstr "停止の原因となったシグナルに関する情報を取得する。 I<siginfo_t> 構造体 (B<sigaction>(2)  参照) を子プロセスから親プロセスの I<data> の位置にコピーする。 (I<addr> は無視される。)"
7450
7451 #. type: TP
7452 #: build/C/man2/ptrace.2:305
7453 #, no-wrap
7454 msgid "B<PTRACE_SETSIGINFO> (since Linux 2.3.99-pre6)"
7455 msgstr "B<PTRACE_SETSIGINFO> (Linux 2.3.99-pre6 以降)"
7456
7457 #. type: Plain text
7458 #: build/C/man2/ptrace.2:321
7459 #, fuzzy
7460 #| msgid "Set signal information.  Copies a I<siginfo_t> structure from location I<data> in the parent to the child.  This will only affect signals that would normally be delivered to the child and were caught by the tracer.  It may be difficult to tell these normal signals from synthetic signals generated by B<ptrace>()  itself.  (I<addr> is ignored.)"
7461 msgid "Set signal information: copy a I<siginfo_t> structure from the address I<data> in the tracer to the tracee.  This will affect only signals that would normally be delivered to the tracee and were caught by the tracer.  It may be difficult to tell these normal signals from synthetic signals generated by B<ptrace>()  itself.  (I<addr> is ignored.)"
7462 msgstr "シグナル情報を設定する。 I<siginfo_t> 構造体を親プロセスのデータ I<data> の位置から 子プロセスにコピーする。 この処理を行うことができるのは、子プロセスに通常は配送されるはずで トレーサに捕捉されたシグナルについてだけである。 これらの通常のシグナルと B<ptrace>()  自身が発生するシグナルを見分けるのは難しいかもしれない。 (I<addr> は無視される。)"
7463
7464 #. type: TP
7465 #: build/C/man2/ptrace.2:321
7466 #, no-wrap
7467 msgid "B<PTRACE_PEEKSIGINFO> (since Linux 3.10)"
7468 msgstr "B<PTRACE_PEEKSIGINFO> (Linux 3.10 以降)"
7469
7470 #.  commit 84c751bd4aebbaae995fe32279d3dba48327bad4
7471 #. type: Plain text
7472 #: build/C/man2/ptrace.2:347
7473 msgid "Retrieve I<siginfo_t> structures without removing signals from a queue.  I<addr> points to a I<ptrace_peeksiginfo_args> structure that specifies the ordinal position from which copying of signals should start, and the number of signals to copy.  I<siginfo_t> structures are copied into the buffer pointed to by I<data>.  The return value contains the number of copied signals (zero indicates that there is no signal corresponding to the specified ordinal position).  Within the returned I<siginfo> structures, the I<si_code> field includes information (B<__SI_CHLD>, B<__SI_FAULT>, etc.) that are not otherwise exposed to user space."
7474 msgstr ""
7475
7476 #. type: Plain text
7477 #: build/C/man2/ptrace.2:356
7478 #, no-wrap
7479 msgid ""
7480 "struct ptrace_peeksiginfo_args {\n"
7481 "    u64 off;    /* Ordinal position in queue at which\n"
7482 "                   to start copying signals */\n"
7483 "    u32 flags;  /* PTRACE_PEEKSIGINFO_SHARED or 0 */\n"
7484 "    s32 nr;     /* Number of signals to copy */\n"
7485 "};\n"
7486 msgstr ""
7487
7488 #. type: Plain text
7489 #: build/C/man2/ptrace.2:363
7490 msgid "Currently, there is only one flag, B<PTRACE_PEEKSIGINFO_SHARED>, for dumping signals from the process-wide signal queue.  If this flag is not set, signals are read from the per-thread queue of the specified thread."
7491 msgstr ""
7492
7493 #. type: TP
7494 #: build/C/man2/ptrace.2:365
7495 #, no-wrap
7496 msgid "B<PTRACE_GETSIGMASK> (since Linux 3.11)"
7497 msgstr "B<PTRACE_GETSIGMASK> (Linux 3.11 以降)"
7498
7499 #.  commit 29000caecbe87b6b66f144f72111f0d02fbbf0c1
7500 #. type: Plain text
7501 #: build/C/man2/ptrace.2:380
7502 msgid "Place a copy of the mask of blocked signals (see B<sigprocmask>(2))  in the buffer pointed to by I<data>, which should be a pointer to a buffer of type I<sigset_t>.  The I<addr> argument contains the size of the buffer pointed to by I<data> (i.e., I<sizeof(sigset_t)>)."
7503 msgstr ""
7504
7505 #. type: TP
7506 #: build/C/man2/ptrace.2:380
7507 #, no-wrap
7508 msgid "B<PTRACE_SETSIGMASK> (since Linux 3.11)"
7509 msgstr "B<PTRACE_SETSIGMASK> (Linux 3.11 以降)"
7510
7511 #. type: Plain text
7512 #: build/C/man2/ptrace.2:394
7513 msgid "Change the mask of blocked signals (see B<sigprocmask>(2))  to the value specified in the buffer pointed to by I<data>, which should be a pointer to a buffer of type I<sigset_t>.  The I<addr> argument contains the size of the buffer pointed to by I<data> (i.e., I<sizeof(sigset_t)>)."
7514 msgstr ""
7515
7516 #. type: TP
7517 #: build/C/man2/ptrace.2:394
7518 #, no-wrap
7519 msgid "B<PTRACE_SETOPTIONS> (since Linux 2.4.6; see BUGS for caveats)"
7520 msgstr "B<PTRACE_SETOPTIONS> (Linux 2.4.6 以降; バグの章にある警告も参照)"
7521
7522 #. type: Plain text
7523 #: build/C/man2/ptrace.2:403
7524 msgid "Set ptrace options from I<data>.  (I<addr> is ignored.)  I<data> is interpreted as a bit mask of options, which are specified by the following flags:"
7525 msgstr "I<data> に基づいて ptrace のオプションを設定する (I<addr> は無視される)。 I<data> はオプションのビットマスクとして解釈され、 オプションには以下のフラグを指定できる:"
7526
7527 #. type: TP
7528 #: build/C/man2/ptrace.2:404
7529 #, no-wrap
7530 msgid "B<PTRACE_O_EXITKILL> (since Linux 3.8)"
7531 msgstr " B<PTRACE_O_EXITKILL> (since Linux 3.8)"
7532
7533 #.  commit 992fb6e170639b0849bace8e49bf31bd37c4123
7534 #. type: Plain text
7535 #: build/C/man2/ptrace.2:412
7536 msgid "If a tracer sets this flag, a B<SIGKILL> signal will be sent to every tracee if the tracer exits.  This option is useful for ptrace jailers that want to ensure that tracees can never escape the tracer's control."
7537 msgstr ""
7538
7539 #. type: TP
7540 #: build/C/man2/ptrace.2:412
7541 #, no-wrap
7542 msgid "B<PTRACE_O_TRACECLONE> (since Linux 2.5.46)"
7543 msgstr "B<PTRACE_O_TRACECLONE> (Linux 2.5.46 以降)"
7544
7545 #. type: Plain text
7546 #: build/C/man2/ptrace.2:429
7547 #, fuzzy
7548 #| msgid "Stop the child at the next B<fork>(2)  call with I<SIGTRAP | PTRACE_EVENT_FORK\\ E<lt>E<lt>\\ 8> and automatically start tracing the newly forked process, which will start with a B<SIGSTOP>.  The PID for the new process can be retrieved with B<PTRACE_GETEVENTMSG>."
7549 msgid "Stop the tracee at the next B<clone>(2)  and automatically start tracing the newly cloned process, which will start with a B<SIGSTOP>, or B<PTRACE_EVENT_STOP> if B<PTRACE_SEIZE> was used.  A B<waitpid>(2)  by the tracer will return a I<status> value such that"
7550 msgstr "次の B<fork>(2)  呼び出し時に I<SIGTRAP | PTRACE_EVENT_FORK\\ E<lt>E<lt>\\ 8> で 子プロセスの動作を停止させ、 新たに fork されたプロセスのトレースを自動的に開始し、 B<SIGSTOP> でそのプロセスの実行を開始する。 新しいプロセスの PID は B<PTRACE_GETEVENTMSG> で取得できる。"
7551
7552 #. type: Plain text
7553 #: build/C/man2/ptrace.2:432
7554 #, no-wrap
7555 msgid "  statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_CLONEE<lt>E<lt>8))\n"
7556 msgstr "  statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_CLONEE<lt>E<lt>8))\n"
7557
7558 #. type: Plain text
7559 #: build/C/man2/ptrace.2:436 build/C/man2/ptrace.2:522
7560 #: build/C/man2/ptrace.2:555
7561 msgid "The PID of the new process can be retrieved with B<PTRACE_GETEVENTMSG>."
7562 msgstr "新規のプロセスの PID は B<PTRACE_GETEVENTMSG> で取得できる。"
7563
7564 #. type: Plain text
7565 #: build/C/man2/ptrace.2:457
7566 #, fuzzy
7567 #| msgid "Stop the child at the next B<clone>(2)  call with I<SIGTRAP | PTRACE_EVENT_CLONE\\ E<lt>E<lt>\\ 8> and automatically start tracing the newly cloned process, which will start with a B<SIGSTOP>.  The PID for the new process can be retrieved with B<PTRACE_GETEVENTMSG>.  This option may not catch B<clone>(2)  calls in all cases.  If the child calls B<clone>(2)  with the B<CLONE_VFORK> flag, B<PTRACE_EVENT_VFORK> will be delivered instead if B<PTRACE_O_TRACEVFORK> is set; otherwise if the child calls B<clone>(2)  with the exit signal set to B<SIGCHLD>, B<PTRACE_EVENT_FORK> will be delivered if B<PTRACE_O_TRACEFORK> is set."
7568 msgid "This option may not catch B<clone>(2)  calls in all cases.  If the tracee calls B<clone>(2)  with the B<CLONE_VFORK> flag, B<PTRACE_EVENT_VFORK> will be delivered instead if B<PTRACE_O_TRACEVFORK> is set; otherwise if the tracee calls B<clone>(2)  with the exit signal set to B<SIGCHLD>, B<PTRACE_EVENT_FORK> will be delivered if B<PTRACE_O_TRACEFORK> is set."
7569 msgstr "次の B<clone>(2)  呼び出し時に I<SIGTRAP | PTRACE_EVENT_CLONE\\ E<lt>E<lt> \\8> で 子プロセスの動作を停止させ、 新たに clone で作成されたプロセスのトレースを自動的に開始し、 B<SIGSTOP> でプロセスの実行を開始する。 新しいプロセスの PID は B<PTRACE_GETEVENTMSG> で取得できる。 このオプションで全ての B<clone>(2)  コールを捕まえられるわけではない。 子プロセスが B<CLONE_VFORK> フラグ付きで B<clone>(2)  を呼び出した場合、 B<PTRACE_O_TRACEVFORK> が設定されていれば代わりに B<PTRACE_EVENT_VFORK> が配送される。 また、子プロセスが終了シグナルを B<SIGCHLD> に設定して B<clone>(2)  を呼び出した場合は、 B<PTRACE_O_TRACEFORK> が設定されていれば B<PTRACE_EVENT_FORK> が配送される。"
7570
7571 #. type: TP
7572 #: build/C/man2/ptrace.2:457
7573 #, no-wrap
7574 msgid "B<PTRACE_O_TRACEEXEC> (since Linux 2.5.46)"
7575 msgstr "B<PTRACE_O_TRACEEXEC> (Linux 2.5.46 以降)"
7576
7577 #. type: Plain text
7578 #: build/C/man2/ptrace.2:466
7579 msgid "Stop the tracee at the next B<execve>(2).  A B<waitpid>(2)  by the tracer will return a I<status> value such that"
7580 msgstr ""
7581
7582 #. type: Plain text
7583 #: build/C/man2/ptrace.2:469
7584 #, no-wrap
7585 msgid "  statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_EXECE<lt>E<lt>8))\n"
7586 msgstr "  statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_EXECE<lt>E<lt>8))\n"
7587
7588 #. type: Plain text
7589 #: build/C/man2/ptrace.2:475
7590 msgid "If the execing thread is not a thread group leader, the thread ID is reset to thread group leader's ID before this stop.  Since Linux 3.0, the former thread ID can be retrieved with B<PTRACE_GETEVENTMSG>."
7591 msgstr ""
7592
7593 #. type: TP
7594 #: build/C/man2/ptrace.2:475
7595 #, no-wrap
7596 msgid "B<PTRACE_O_TRACEEXIT> (since Linux 2.5.60)"
7597 msgstr "B<PTRACE_O_TRACEEXIT> (Linux 2.5.60 以降)"
7598
7599 #. type: Plain text
7600 #: build/C/man2/ptrace.2:483
7601 msgid "Stop the tracee at exit.  A B<waitpid>(2)  by the tracer will return a I<status> value such that"
7602 msgstr ""
7603
7604 #. type: Plain text
7605 #: build/C/man2/ptrace.2:486
7606 #, no-wrap
7607 msgid "  statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_EXITE<lt>E<lt>8))\n"
7608 msgstr "  statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_EXITE<lt>E<lt>8))\n"
7609
7610 #. type: Plain text
7611 #: build/C/man2/ptrace.2:490
7612 msgid "The tracee's exit status can be retrieved with B<PTRACE_GETEVENTMSG>."
7613 msgstr ""
7614
7615 #. type: Plain text
7616 #: build/C/man2/ptrace.2:498
7617 #, fuzzy
7618 #| msgid "Stop the child at exit with I<SIGTRAP | PTRACE_EVENT_EXIT\\ E<lt>E<lt>\\ 8>.  The child's exit status can be retrieved with B<PTRACE_GETEVENTMSG>.  This stop will be done early during process exit when registers are still available, allowing the tracer to see where the exit occurred, whereas the normal exit notification is done after the process is finished exiting.  Even though context is available, the tracer cannot prevent the exit from happening at this point."
7619 msgid "The tracee is stopped early during process exit, when registers are still available, allowing the tracer to see where the exit occurred, whereas the normal exit notification is done after the process is finished exiting.  Even though context is available, the tracer cannot prevent the exit from happening at this point."
7620 msgstr "終了 (exit) 時に I<SIGTRAP | PTRACE_EVENT_EXIT\\ E<lt>E<lt>\\ 8> で子プロセスの動作を停止させる。子プロセスの終了ステータスは B<PTRACE_GETEVENTMSG> で取得できる。 この停止はレジスタがまだ参照可能であるプロセス終了処理の初期に行われ、 トレーサはどこで終了が発生したかを知ることができる。 通常の終了通知 (exit notification) はプロセスの終了処理が完了した後に 行われる。コンテキストを参照することはできるにも関わらず、 トレーサはこの時点から終了を止めることはできない。"
7621
7622 #. type: TP
7623 #: build/C/man2/ptrace.2:498
7624 #, no-wrap
7625 msgid "B<PTRACE_O_TRACEFORK> (since Linux 2.5.46)"
7626 msgstr "B<PTRACE_O_TRACEFORK> (Linux 2.5.46 以降)"
7627
7628 #. type: Plain text
7629 #: build/C/man2/ptrace.2:515
7630 #, fuzzy
7631 #| msgid "Stop the child at the next B<fork>(2)  call with I<SIGTRAP | PTRACE_EVENT_FORK\\ E<lt>E<lt>\\ 8> and automatically start tracing the newly forked process, which will start with a B<SIGSTOP>.  The PID for the new process can be retrieved with B<PTRACE_GETEVENTMSG>."
7632 msgid "Stop the tracee at the next B<fork>(2)  and automatically start tracing the newly forked process, which will start with a B<SIGSTOP>, or B<PTRACE_EVENT_STOP> if B<PTRACE_SEIZE> was used.  A B<waitpid>(2)  by the tracer will return a I<status> value such that"
7633 msgstr "次の B<fork>(2)  呼び出し時に I<SIGTRAP | PTRACE_EVENT_FORK\\ E<lt>E<lt>\\ 8> で 子プロセスの動作を停止させ、 新たに fork されたプロセスのトレースを自動的に開始し、 B<SIGSTOP> でそのプロセスの実行を開始する。 新しいプロセスの PID は B<PTRACE_GETEVENTMSG> で取得できる。"
7634
7635 #. type: Plain text
7636 #: build/C/man2/ptrace.2:518
7637 #, no-wrap
7638 msgid "  statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_FORKE<lt>E<lt>8))\n"
7639 msgstr "  statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_FORKE<lt>E<lt>8))\n"
7640
7641 #. type: TP
7642 #: build/C/man2/ptrace.2:522
7643 #, no-wrap
7644 msgid "B<PTRACE_O_TRACESYSGOOD> (since Linux 2.4.6)"
7645 msgstr "B<PTRACE_O_TRACESYSGOOD> (Linux 2.4.6 以降)"
7646
7647 #. type: Plain text
7648 #: build/C/man2/ptrace.2:531
7649 #, fuzzy
7650 #| msgid "When delivering syscall traps, set bit 7 in the signal number (i.e., deliver I<SIGTRAP | 0x80>).  This makes it easy for the tracer to tell the difference between normal traps and those caused by a syscall.  (B<PTRACE_O_TRACESYSGOOD> may not work on all architectures.)"
7651 msgid "When delivering system call traps, set bit 7 in the signal number (i.e., deliver I<SIGTRAP|0x80>).  This makes it easy for the tracer to distinguish normal traps from those caused by a system call.  (B<PTRACE_O_TRACESYSGOOD> may not work on all architectures.)"
7652 msgstr "システムコールのトラップが配送されたときに、シグナル番号のビット 7 を設定する (すなわち、I<SIGTRAP | 0x80> を配送する)。 これにより、トレーサが通常のトラップとシステムコールによるトラップを 区別しやすくなる。 (B<PTRACE_O_TRACESYSGOOD> はどのアーキテクチャでも動作しない可能性がある。)"
7653
7654 #. type: TP
7655 #: build/C/man2/ptrace.2:531
7656 #, no-wrap
7657 msgid "B<PTRACE_O_TRACEVFORK> (since Linux 2.5.46)"
7658 msgstr "B<PTRACE_O_TRACEVFORK> (Linux 2.5.46 以降)"
7659
7660 #. type: Plain text
7661 #: build/C/man2/ptrace.2:548
7662 #, fuzzy
7663 #| msgid "Stop the child at the next B<vfork>(2)  call with I<SIGTRAP | PTRACE_EVENT_VFORK\\ E<lt>E<lt>\\ 8> and automatically start tracing the newly vforked process, which will start with a B<SIGSTOP>.  The PID for the new process can be retrieved with B<PTRACE_GETEVENTMSG>."
7664 msgid "Stop the tracee at the next B<vfork>(2)  and automatically start tracing the newly vforked process, which will start with a B<SIGSTOP>, or B<PTRACE_EVENT_STOP> if B<PTRACE_SEIZE> was used.  A B<waitpid>(2)  by the tracer will return a I<status> value such that"
7665 msgstr "次の B<vfork>(2)  呼び出し時に I<SIGTRAP | PTRACE_EVENT_VFORK\\ E<lt>E<lt>\\ 8> で 子プロセスの動作を停止させ、 新たに vfork されたプロセスのトレースを自動的に開始し、 B<SIGSTOP> でそのプロセスの実行を開始する。 新しいプロセスの PID は B<PTRACE_GETEVENTMSG> で取得できる。"
7666
7667 #. type: Plain text
7668 #: build/C/man2/ptrace.2:551
7669 #, no-wrap
7670 msgid "  statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_VFORKE<lt>E<lt>8))\n"
7671 msgstr "  statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_VFORKE<lt>E<lt>8))\n"
7672
7673 #. type: TP
7674 #: build/C/man2/ptrace.2:555
7675 #, no-wrap
7676 msgid "B<PTRACE_O_TRACEVFORKDONE> (since Linux 2.5.60)"
7677 msgstr "B<PTRACE_O_TRACEVFORKDONE> (Linux 2.5.60 以降)"
7678
7679 #. type: Plain text
7680 #: build/C/man2/ptrace.2:564
7681 msgid "Stop the tracee at the completion of the next B<vfork>(2).  A B<waitpid>(2)  by the tracer will return a I<status> value such that"
7682 msgstr ""
7683
7684 #. type: Plain text
7685 #: build/C/man2/ptrace.2:567
7686 #, no-wrap
7687 msgid "  statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_VFORK_DONEE<lt>E<lt>8))\n"
7688 msgstr ""
7689
7690 #. type: Plain text
7691 #: build/C/man2/ptrace.2:571
7692 msgid "The PID of the new process can (since Linux 2.6.18) be retrieved with B<PTRACE_GETEVENTMSG>."
7693 msgstr ""
7694
7695 #. type: TP
7696 #: build/C/man2/ptrace.2:571
7697 #, no-wrap
7698 msgid "B<PTRACE_O_TRACESECCOMP> (since Linux 3.5)"
7699 msgstr "B<PTRACE_O_TRACESECCOMP> (Linux 3.5 以降)"
7700
7701 #. type: Plain text
7702 #: build/C/man2/ptrace.2:582
7703 #, fuzzy
7704 #| msgid "Stop the child at the next B<fork>(2)  call with I<SIGTRAP | PTRACE_EVENT_FORK\\ E<lt>E<lt>\\ 8> and automatically start tracing the newly forked process, which will start with a B<SIGSTOP>.  The PID for the new process can be retrieved with B<PTRACE_GETEVENTMSG>."
7705 msgid "Stop the tracee when a B<seccomp>(2)  B<SECCOMP_RET_TRACE> rule is triggered.  A B<waitpid>(2)  by the tracer will return a I<status> value such that"
7706 msgstr "次の B<fork>(2)  呼び出し時に I<SIGTRAP | PTRACE_EVENT_FORK\\ E<lt>E<lt>\\ 8> で 子プロセスの動作を停止させ、 新たに fork されたプロセスのトレースを自動的に開始し、 B<SIGSTOP> でそのプロセスの実行を開始する。 新しいプロセスの PID は B<PTRACE_GETEVENTMSG> で取得できる。"
7707
7708 #. type: Plain text
7709 #: build/C/man2/ptrace.2:585
7710 #, no-wrap
7711 msgid "  statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_SECCOMPE<lt>E<lt>8))\n"
7712 msgstr "  statusE<gt>E<gt>8 == (SIGTRAP | (PTRACE_EVENT_SECCOMPE<lt>E<lt>8))\n"
7713
7714 #. type: Plain text
7715 #: build/C/man2/ptrace.2:595
7716 msgid "While this triggers a B<PTRACE_EVENT> stop, it is similar to a syscall-enter-stop, in that the tracee has not yet entered the syscall that seccomp triggered on.  The seccomp event message data (from the B<SECCOMP_RET_DATA> portion of the seccomp filter rule) can be retrieved with B<PTRACE_GETEVENTMSG>."
7717 msgstr ""
7718
7719 #. type: TP
7720 #: build/C/man2/ptrace.2:596
7721 #, no-wrap
7722 msgid "B<PTRACE_GETEVENTMSG> (since Linux 2.5.46)"
7723 msgstr "B<PTRACE_GETEVENTMSG> (Linux 2.5.46 以降)"
7724
7725 #. type: Plain text
7726 #: build/C/man2/ptrace.2:623
7727 #, fuzzy
7728 #| msgid "Retrieve a message (as an I<unsigned long>)  about the ptrace event that just happened, placing it in the location I<data> in the parent.  For B<PTRACE_EVENT_EXIT> this is the child's exit status.  For B<PTRACE_EVENT_FORK>, B<PTRACE_EVENT_VFORK> and B<PTRACE_EVENT_CLONE> this is the PID of the new process.  Since Linux 2.6.18, the PID of the new process is also available for B<PTRACE_EVENT_VFORK_DONE>.  (I<addr> is ignored.)"
7729 msgid "Retrieve a message (as an I<unsigned long>)  about the ptrace event that just happened, placing it at the address I<data> in the tracer.  For B<PTRACE_EVENT_EXIT>, this is the tracee's exit status.  For B<PTRACE_EVENT_FORK>, B<PTRACE_EVENT_VFORK>, B<PTRACE_EVENT_VFORK_DONE>, and B<PTRACE_EVENT_CLONE>, this is the PID of the new process.  For B<PTRACE_EVENT_SECCOMP>, this is the B<seccomp>(2)  filter's B<SECCOMP_RET_DATA> associated with the triggered rule.  (I<addr> is ignored.)"
7730 msgstr "発生したばかりの ptrace イベントに関するメッセージを (I<unsigned long> 型で) 取得する。 取得したメッセージは親プロセスの I<data> の位置に格納される。 得られる内容は、 B<PTRACE_EVENT_EXIT> の場合は子プロセスの終了ステータスであり、 B<PTRACE_EVENT_FORK>, B<PTRACE_EVENT_VFORK>, B<PTRACE_EVENT_CLONE> の場合は新しいプロセスの PID である。 Linux 2.6.18 以降では、新しいプロセスの PID は B<PTRACE_EVENT_VFORK_DONE> で入手できる。 (I<addr> は無視される。)"
7731
7732 #. type: TP
7733 #: build/C/man2/ptrace.2:623
7734 #, no-wrap
7735 msgid "B<PTRACE_CONT>"
7736 msgstr "B<PTRACE_CONT>"
7737
7738 #. type: Plain text
7739 #: build/C/man2/ptrace.2:635
7740 #, fuzzy
7741 #| msgid "Restarts the stopped child process.  If I<data> is nonzero and not B<SIGSTOP>, it is interpreted as a signal to be delivered to the child; otherwise, no signal is delivered.  Thus, for example, the parent can control whether a signal sent to the child is delivered or not.  (I<addr> is ignored.)"
7742 msgid "Restart the stopped tracee process.  If I<data> is nonzero, it is interpreted as the number of a signal to be delivered to the tracee; otherwise, no signal is delivered.  Thus, for example, the tracer can control whether a signal sent to the tracee is delivered or not.  (I<addr> is ignored.)"
7743 msgstr "停止した子プロセスの実行を再開させる。 I<data> がゼロでなく、 B<SIGSTOP> でもなければ、 子プロセスに配送されるシグナルと解釈される。 ゼロや B<SIGSTOP> の場合はシグナルは配送されない。 これを使うと、例えば、親プロセスは 子プロセスに送られたシグナルを実際に配送するかどうかを 制御することができる。(I<addr> は無視される。)"
7744
7745 #. type: TP
7746 #: build/C/man2/ptrace.2:635
7747 #, no-wrap
7748 msgid "B<PTRACE_SYSCALL>, B<PTRACE_SINGLESTEP>"
7749 msgstr "B<PTRACE_SYSCALL>, B<PTRACE_SINGLESTEP>"
7750
7751 #. type: Plain text
7752 #: build/C/man2/ptrace.2:659
7753 #, fuzzy
7754 #| msgid "Restarts the stopped child as for B<PTRACE_CONT>, but arranges for the child to be stopped at the next entry to or exit from a system call, or after execution of a single instruction, respectively.  (The child will also, as usual, be stopped upon receipt of a signal.)  From the parent's perspective, the child will appear to have been stopped by receipt of a B<SIGTRAP>.  So, for B<PTRACE_SYSCALL>, for example, the idea is to inspect the arguments to the system call at the first stop, then do another B<PTRACE_SYSCALL> and inspect the return value of the system call at the second stop.  The I<data> argument is treated as for B<PTRACE_CONT>.  (I<addr> is ignored.)"
7755 msgid "Restart the stopped tracee as for B<PTRACE_CONT>, but arrange for the tracee to be stopped at the next entry to or exit from a system call, or after execution of a single instruction, respectively.  (The tracee will also, as usual, be stopped upon receipt of a signal.)  From the tracer's perspective, the tracee will appear to have been stopped by receipt of a B<SIGTRAP>.  So, for B<PTRACE_SYSCALL>, for example, the idea is to inspect the arguments to the system call at the first stop, then do another B<PTRACE_SYSCALL> and inspect the return value of the system call at the second stop.  The I<data> argument is treated as for B<PTRACE_CONT>.  (I<addr> is ignored.)"
7756 msgstr "B<PTRACE_CONT> と同様に停止した子プロセスを再開する。ただし、 B<PTRACE_SYSCALL> の場合は子プロセスが 次にシステムコールに入るかシステムコールから抜けるかする時に、 B<PTRACE_SINGLESTEP> の場合は 1 命令 (instruction) 実行した後に停止させる (通常どおり、子プロセスはシグナルを受け取った場合にも停止する)。 親プロセスから見ると、子プロセスは B<SIGTRAP> を受信して停止したように見える。そのため、例えば B<PTRACE_SYSCALL> を使うと、1回目の停止で引き数を調べて B<PTRACE_SYSCALL> を実行し、 2回目の停止でシステムコールの返り値を調べる、 というようなことができる。 引き数 I<data> は B<PTRACE_CONT> の場合と同じ様に解釈される。 (I<addr> は無視される。)"
7757
7758 #. type: TP
7759 #: build/C/man2/ptrace.2:659
7760 #, no-wrap
7761 msgid "B<PTRACE_SYSEMU>, B<PTRACE_SYSEMU_SINGLESTEP> (since Linux 2.6.14)"
7762 msgstr "B<PTRACE_SYSEMU>, B<PTRACE_SYSEMU_SINGLESTEP> (Linux 2.6.14 以降)"
7763
7764 #.  As at 3.7
7765 #. type: Plain text
7766 #: build/C/man2/ptrace.2:680
7767 #, fuzzy
7768 #| msgid "For B<PTRACE_SYSEMU>, continue and stop on entry to the next syscall, which will not be executed.  For B<PTRACE_SYSEMU_SINGLESTEP>, do the same but also singlestep if not a syscall.  This call is used by programs like User Mode Linux that want to emulate all the child's system calls.  The I<data> argument is treated as for B<PTRACE_CONT>.  (I<addr> is ignored; not supported on all architectures.)"
7769 msgid "For B<PTRACE_SYSEMU>, continue and stop on entry to the next system call, which will not be executed.  For B<PTRACE_SYSEMU_SINGLESTEP>, do the same but also singlestep if not a system call.  This call is used by programs like User Mode Linux that want to emulate all the tracee's system calls.  The I<data> argument is treated as for B<PTRACE_CONT>.  The I<addr> argument is ignored.  These requests are currently supported only on x86."
7770 msgstr "B<PTRACE_SYSEMU> は、実行を再開し、次のシステムコールに入る時に停止させる。 システムコールは実行されない。 B<PTRACE_SYSEMU_SINGLESTEP> も同様だが、システムコールでない場合には 1 命令 (singlestep) だけ実行した時点でも停止させる。 このコールは User Mode Linux のように子プロセスのシステムコールを全て エミュレートしようとするプログラムで使用される。 引き数 I<data> は B<PTRACE_CONT> の場合と同じ様に解釈される。 (I<addr> は無視される。 全てのアーキテクチャでサポートされているわけではない。)"
7771
7772 #. type: TP
7773 #: build/C/man2/ptrace.2:680
7774 #, no-wrap
7775 msgid "B<PTRACE_LISTEN> (since Linux 3.4)"
7776 msgstr " B<PTRACE_LISTEN> (since Linux 3.4)"
7777
7778 #. type: Plain text
7779 #: build/C/man2/ptrace.2:691
7780 msgid "Restart the stopped tracee, but prevent it from executing.  The resulting state of the tracee is similar to a process which has been stopped by a B<SIGSTOP> (or other stopping signal).  See the \"group-stop\" subsection for additional information.  B<PTRACE_LISTEN> works only on tracees attached by B<PTRACE_SEIZE>."
7781 msgstr ""
7782
7783 #. type: TP
7784 #: build/C/man2/ptrace.2:691
7785 #, no-wrap
7786 msgid "B<PTRACE_KILL>"
7787 msgstr "B<PTRACE_KILL>"
7788
7789 #. type: Plain text
7790 #: build/C/man2/ptrace.2:700
7791 #, fuzzy
7792 #| msgid "Sends the child a B<SIGKILL> to terminate it.  (I<addr> and I<data> are ignored.)"
7793 msgid "Send the tracee a B<SIGKILL> to terminate it.  (I<addr> and I<data> are ignored.)"
7794 msgstr "子プロセスに B<SIGKILL> を送り終了させる。(I<addr> と I<data> は無視される。)"
7795
7796 #.  [Note from Denys Vlasenko:
7797 #.      deprecation suggested by Oleg Nesterov. He prefers to deprecate it
7798 #.      instead of describing (and needing to support) PTRACE_KILL's quirks.]
7799 #. type: Plain text
7800 #: build/C/man2/ptrace.2:719
7801 msgid "I<This operation is deprecated; do not use it!> Instead, send a B<SIGKILL> directly using B<kill>(2)  or B<tgkill>(2).  The problem with B<PTRACE_KILL> is that it requires the tracee to be in signal-delivery-stop, otherwise it may not work (i.e., may complete successfully but won't kill the tracee).  By contrast, sending a B<SIGKILL> directly has no such limitation."
7802 msgstr ""
7803
7804 #. type: TP
7805 #: build/C/man2/ptrace.2:719
7806 #, no-wrap
7807 msgid "B<PTRACE_INTERRUPT> (since Linux 3.4)"
7808 msgstr " B<PTRACE_INTERRUPT> (since Linux 3.4)"
7809
7810 #. type: Plain text
7811 #: build/C/man2/ptrace.2:747
7812 msgid "Stop a tracee.  If the tracee is running or sleeping in kernel space and B<PTRACE_SYSCALL> is in effect, the system call is interrupted and syscall-exit-stop is reported.  (The interrupted system call is restarted when the tracee is restarted.)  If the tracee was already stopped by a signal and B<PTRACE_LISTEN> was sent to it, the tracee stops with B<PTRACE_EVENT_STOP> and I<WSTOPSIG(status)> returns the stop signal.  If any other ptrace-stop is generated at the same time (for example, if a signal is sent to the tracee), this ptrace-stop happens.  If none of the above applies (for example, if the tracee is running in user space), it stops with B<PTRACE_EVENT_STOP> with I<WSTOPSIG(status)> == B<SIGTRAP>.  B<PTRACE_INTERRUPT> only works on tracees attached by B<PTRACE_SEIZE>."
7813 msgstr ""
7814
7815 #. type: TP
7816 #: build/C/man2/ptrace.2:747
7817 #, no-wrap
7818 msgid "B<PTRACE_ATTACH>"
7819 msgstr "B<PTRACE_ATTACH>"
7820
7821 #.  No longer true (removed by Denys Vlasenko, 2011, who remarks:
7822 #.         "I think it isn't true in non-ancient 2.4 and in 2.6/3.x.
7823 #.          Basically, it's not true for any Linux in practical use.
7824 #.  ; the behavior of the tracee is as if it had done a
7825 #.  .BR PTRACE_TRACEME .
7826 #.  The calling process actually becomes the parent of the tracee
7827 #.  process for most purposes (e.g., it will receive
7828 #.  notification of tracee events and appears in
7829 #.  .BR ps (1)
7830 #.  output as the tracee's parent), but a
7831 #.  .BR getppid (2)
7832 #.  by the tracee will still return the PID of the original parent.
7833 #. type: Plain text
7834 #: build/C/man2/ptrace.2:775
7835 msgid "Attach to the process specified in I<pid>, making it a tracee of the calling process.  The tracee is sent a B<SIGSTOP>, but will not necessarily have stopped by the completion of this call; use B<waitpid>(2)  to wait for the tracee to stop.  See the \"Attaching and detaching\" subsection for additional information.  (I<addr> and I<data> are ignored.)"
7836 msgstr ""
7837
7838 #. type: TP
7839 #: build/C/man2/ptrace.2:775
7840 #, no-wrap
7841 msgid "B<PTRACE_SEIZE> (since Linux 3.4)"
7842 msgstr " B<PTRACE_SEIZE> (since Linux 3.4)"
7843
7844 #. type: Plain text
7845 #: build/C/man2/ptrace.2:795
7846 msgid "Attach to the process specified in I<pid>, making it a tracee of the calling process.  Unlike B<PTRACE_ATTACH>, B<PTRACE_SEIZE> does not stop the process.  Only a B<PTRACE_SEIZE>d process can accept B<PTRACE_INTERRUPT> and B<PTRACE_LISTEN> commands.  I<addr> must be zero.  I<data> contains a bit mask of ptrace options to activate immediately."
7847 msgstr ""
7848
7849 #. type: TP
7850 #: build/C/man2/ptrace.2:795
7851 #, no-wrap
7852 msgid "B<PTRACE_DETACH>"
7853 msgstr "B<PTRACE_DETACH>"
7854
7855 #. type: Plain text
7856 #: build/C/man2/ptrace.2:804
7857 #, fuzzy
7858 #| msgid "Restarts the stopped child as for B<PTRACE_CONT>, but first detaches from the process, undoing the reparenting effect of B<PTRACE_ATTACH>, and the effects of B<PTRACE_TRACEME>.  Although perhaps not intended, under Linux a traced child can be detached in this way regardless of which method was used to initiate tracing.  (I<addr> is ignored.)"
7859 msgid "Restart the stopped tracee as for B<PTRACE_CONT>, but first detach from it.  Under Linux, a tracee can be detached in this way regardless of which method was used to initiate tracing.  (I<addr> is ignored.)"
7860 msgstr "B<PTRACE_CONT> と同様に停止した子プロセスを再開する。ただし まずそのプロセスからの分離 (detach) を行い、 B<PTRACE_ATTACH> での親の切り換えによる効果と B<PTRACE_TRACEME> の効果を取り消す。意図したものではないだろうが、 Linux では、トレースされている子プロセスはどのような方法でトレースを 開始されたとしても、この方法で分離 (detach) することができる。 (I<addr> は無視される。)"
7861
7862 #. type: SS
7863 #: build/C/man2/ptrace.2:804
7864 #, no-wrap
7865 msgid "Death under ptrace"
7866 msgstr ""
7867
7868 #. type: Plain text
7869 #: build/C/man2/ptrace.2:813
7870 msgid "When a (possibly multithreaded) process receives a killing signal (one whose disposition is set to B<SIG_DFL> and whose default action is to kill the process), all threads exit.  Tracees report their death to their tracer(s).  Notification of this event is delivered via B<waitpid>(2)."
7871 msgstr ""
7872
7873 #. type: Plain text
7874 #: build/C/man2/ptrace.2:822
7875 msgid "Note that the killing signal will first cause signal-delivery-stop (on one tracee only), and only after it is injected by the tracer (or after it was dispatched to a thread which isn't traced), will death from the signal happen on I<all> tracees within a multithreaded process.  (The term \"signal-delivery-stop\" is explained below.)"
7876 msgstr ""
7877
7878 #. type: Plain text
7879 #: build/C/man2/ptrace.2:834
7880 msgid "B<SIGKILL> does not generate signal-delivery-stop and therefore the tracer can't suppress it.  B<SIGKILL> kills even within system calls (syscall-exit-stop is not generated prior to death by B<SIGKILL>).  The net effect is that B<SIGKILL> always kills the process (all its threads), even if some threads of the process are ptraced."
7881 msgstr ""
7882
7883 #. type: Plain text
7884 #: build/C/man2/ptrace.2:839
7885 msgid "When the tracee calls B<_exit>(2), it reports its death to its tracer.  Other threads are not affected."
7886 msgstr ""
7887
7888 #. type: Plain text
7889 #: build/C/man2/ptrace.2:843
7890 msgid "When any thread executes B<exit_group>(2), every tracee in its thread group reports its death to its tracer."
7891 msgstr ""
7892
7893 #. type: Plain text
7894 #: build/C/man2/ptrace.2:857
7895 msgid "If the B<PTRACE_O_TRACEEXIT> option is on, B<PTRACE_EVENT_EXIT> will happen before actual death.  This applies to exits via B<exit>(2), B<exit_group>(2), and signal deaths (except B<SIGKILL>), and when threads are torn down on B<execve>(2)  in a multithreaded process."
7896 msgstr ""
7897
7898 #. type: Plain text
7899 #: build/C/man2/ptrace.2:882
7900 msgid "The tracer cannot assume that the ptrace-stopped tracee exists.  There are many scenarios when the tracee may die while stopped (such as B<SIGKILL>).  Therefore, the tracer must be prepared to handle an B<ESRCH> error on any ptrace operation.  Unfortunately, the same error is returned if the tracee exists but is not ptrace-stopped (for commands which require a stopped tracee), or if it is not traced by the process which issued the ptrace call.  The tracer needs to keep track of the stopped/running state of the tracee, and interpret B<ESRCH> as \"tracee died unexpectedly\" only if it knows that the tracee has been observed to enter ptrace-stop.  Note that there is no guarantee that I<waitpid(WNOHANG)> will reliably report the tracee's death status if a ptrace operation returned B<ESRCH>.  I<waitpid(WNOHANG)> may return 0 instead.  In other words, the tracee may be \"not yet fully dead\", but already refusing ptrace requests."
7901 msgstr ""
7902
7903 #. type: Plain text
7904 #: build/C/man2/ptrace.2:896
7905 msgid "The tracer can't assume that the tracee I<always> ends its life by reporting I<WIFEXITED(status)> or I<WIFSIGNALED(status)>; there are cases where this does not occur.  For example, if a thread other than thread group leader does an B<execve>(2), it disappears; its PID will never be seen again, and any subsequent ptrace stops will be reported under the thread group leader's PID."
7906 msgstr ""
7907
7908 #. type: SS
7909 #: build/C/man2/ptrace.2:896
7910 #, no-wrap
7911 msgid "Stopped states"
7912 msgstr ""
7913
7914 #. type: Plain text
7915 #: build/C/man2/ptrace.2:918
7916 msgid "A tracee can be in two states: running or stopped.  For the purposes of ptrace, a tracee which is blocked in a system call (such as B<read>(2), B<pause>(2), etc.)  is nevertheless considered to be running, even if the tracee is blocked for a long time.  The state of the tracee after B<PTRACE_LISTEN> is somewhat of a gray area: it is not in any ptrace-stop (ptrace commands won't work on it, and it will deliver B<waitpid>(2)  notifications), but it also may be considered \"stopped\" because it is not executing instructions (is not scheduled), and if it was in group-stop before B<PTRACE_LISTEN>, it will not respond to signals until B<SIGCONT> is received."
7917 msgstr ""
7918
7919 #. type: Plain text
7920 #: build/C/man2/ptrace.2:922
7921 msgid "There are many kinds of states when the tracee is stopped, and in ptrace discussions they are often conflated.  Therefore, it is important to use precise terms."
7922 msgstr ""
7923
7924 #. type: Plain text
7925 #: build/C/man2/ptrace.2:933
7926 msgid "In this manual page, any stopped state in which the tracee is ready to accept ptrace commands from the tracer is called I<ptrace-stop>.  Ptrace-stops can be further subdivided into I<signal-delivery-stop>, I<group-stop>, I<syscall-stop>, and so on.  These stopped states are described in detail below."
7927 msgstr ""
7928
7929 #. type: Plain text
7930 #: build/C/man2/ptrace.2:938
7931 msgid "When the running tracee enters ptrace-stop, it notifies its tracer using B<waitpid>(2)  (or one of the other \"wait\" system calls).  Most of this manual page assumes that the tracer waits with:"
7932 msgstr ""
7933
7934 #. type: Plain text
7935 #: build/C/man2/ptrace.2:940
7936 #, no-wrap
7937 msgid "    pid = waitpid(pid_or_minus_1, &status, __WALL);\n"
7938 msgstr ""
7939
7940 #.  Denys Vlasenko:
7941 #.      Do we require __WALL usage, or will just using 0 be ok? (With 0,
7942 #.      I am not 100% sure there aren't ugly corner cases.) Are the
7943 #.      rules different if user wants to use waitid? Will waitid require
7944 #.      WEXITED?
7945 #. type: Plain text
7946 #: build/C/man2/ptrace.2:952
7947 msgid "Ptrace-stopped tracees are reported as returns with I<pid> greater than 0 and I<WIFSTOPPED(status)> true."
7948 msgstr ""
7949
7950 #. type: Plain text
7951 #: build/C/man2/ptrace.2:960
7952 msgid "The B<__WALL> flag does not include the B<WSTOPPED> and B<WEXITED> flags, but implies their functionality."
7953 msgstr ""
7954
7955 #. type: Plain text
7956 #: build/C/man2/ptrace.2:967
7957 msgid "Setting the B<WCONTINUED> flag when calling B<waitpid>(2)  is not recommended: the \"continued\" state is per-process and consuming it can confuse the real parent of the tracee."
7958 msgstr ""
7959
7960 #. type: Plain text
7961 #: build/C/man2/ptrace.2:975
7962 msgid "Use of the B<WNOHANG> flag may cause B<waitpid>(2)  to return 0 (\"no wait results available yet\")  even if the tracer knows there should be a notification.  Example:"
7963 msgstr ""
7964
7965 #. type: Plain text
7966 #: build/C/man2/ptrace.2:984
7967 #, no-wrap
7968 msgid ""
7969 "    errno = 0;\n"
7970 "    ptrace(PTRACE_CONT, pid, 0L, 0L);\n"
7971 "    if (errno == ESRCH) {\n"
7972 "        /* tracee is dead */\n"
7973 "        r = waitpid(tracee, &status, __WALL | WNOHANG);\n"
7974 "        /* r can still be 0 here! */\n"
7975 "    }\n"
7976 msgstr ""
7977
7978 #. type: Plain text
7979 #: build/C/man2/ptrace.2:1007
7980 msgid "The following kinds of ptrace-stops exist: signal-delivery-stops, group-stops, B<PTRACE_EVENT> stops, syscall-stops.  They all are reported by B<waitpid>(2)  with I<WIFSTOPPED(status)> true.  They may be differentiated by examining the value I<statusE<gt>E<gt>8>, and if there is ambiguity in that value, by querying B<PTRACE_GETSIGINFO>.  (Note: the I<WSTOPSIG(status)> macro can't be used to perform this examination, because it returns the value I<(statusE<gt>E<gt>8)\\ &\\ 0xff>.)"
7981 msgstr ""
7982
7983 #. type: SS
7984 #: build/C/man2/ptrace.2:1007
7985 #, no-wrap
7986 msgid "Signal-delivery-stop"
7987 msgstr ""
7988
7989 #. type: Plain text
7990 #: build/C/man2/ptrace.2:1027
7991 msgid "When a (possibly multithreaded) process receives any signal except B<SIGKILL>, the kernel selects an arbitrary thread which handles the signal.  (If the signal is generated with B<tgkill>(2), the target thread can be explicitly selected by the caller.)  If the selected thread is traced, it enters signal-delivery-stop.  At this point, the signal is not yet delivered to the process, and can be suppressed by the tracer.  If the tracer doesn't suppress the signal, it passes the signal to the tracee in the next ptrace restart request.  This second step of signal delivery is called I<signal injection> in this manual page.  Note that if the signal is blocked, signal-delivery-stop doesn't happen until the signal is unblocked, with the usual exception that B<SIGSTOP> can't be blocked."
7992 msgstr ""
7993
7994 #. type: Plain text
7995 #: build/C/man2/ptrace.2:1041
7996 msgid "Signal-delivery-stop is observed by the tracer as B<waitpid>(2)  returning with I<WIFSTOPPED(status)> true, with the signal returned by I<WSTOPSIG(status)>.  If the signal is B<SIGTRAP>, this may be a different kind of ptrace-stop; see the \"Syscall-stops\" and \"execve\" sections below for details.  If I<WSTOPSIG(status)> returns a stopping signal, this may be a group-stop; see below."
7997 msgstr ""
7998
7999 #. type: SS
8000 #: build/C/man2/ptrace.2:1041
8001 #, no-wrap
8002 msgid "Signal injection and suppression"
8003 msgstr ""
8004
8005 #. type: Plain text
8006 #: build/C/man2/ptrace.2:1044
8007 msgid "After signal-delivery-stop is observed by the tracer, the tracer should restart the tracee with the call"
8008 msgstr ""
8009
8010 #. type: Plain text
8011 #: build/C/man2/ptrace.2:1046
8012 #, no-wrap
8013 msgid "    ptrace(PTRACE_restart, pid, 0, sig)\n"
8014 msgstr ""
8015
8016 #. type: Plain text
8017 #: build/C/man2/ptrace.2:1059
8018 msgid "where B<PTRACE_restart> is one of the restarting ptrace requests.  If I<sig> is 0, then a signal is not delivered.  Otherwise, the signal I<sig> is delivered.  This operation is called I<signal injection> in this manual page, to distinguish it from signal-delivery-stop."
8019 msgstr ""
8020
8021 #. type: Plain text
8022 #: build/C/man2/ptrace.2:1065
8023 msgid "The I<sig> value may be different from the I<WSTOPSIG(status)> value: the tracer can cause a different signal to be injected."
8024 msgstr ""
8025
8026 #. type: Plain text
8027 #: build/C/man2/ptrace.2:1081
8028 msgid "Note that a suppressed signal still causes system calls to return prematurely.  In this case, system calls will be restarted: the tracer will observe the tracee to reexecute the interrupted system call (or B<restart_syscall>(2)  system call for a few system calls which use a different mechanism for restarting) if the tracer uses B<PTRACE_SYSCALL>.  Even system calls (such as B<poll>(2))  which are not restartable after signal are restarted after signal is suppressed; however, kernel bugs exist which cause some system calls to fail with B<EINTR> even though no observable signal is injected to the tracee."
8029 msgstr ""
8030
8031 #. type: Plain text
8032 #: build/C/man2/ptrace.2:1092
8033 msgid "Restarting ptrace commands issued in ptrace-stops other than signal-delivery-stop are not guaranteed to inject a signal, even if I<sig> is nonzero.  No error is reported; a nonzero I<sig> may simply be ignored.  Ptrace users should not try to \"create a new signal\" this way: use B<tgkill>(2)  instead."
8034 msgstr ""
8035
8036 #. type: Plain text
8037 #: build/C/man2/ptrace.2:1099
8038 msgid "The fact that signal injection requests may be ignored when restarting the tracee after ptrace stops that are not signal-delivery-stops is a cause of confusion among ptrace users.  One typical scenario is that the tracer observes group-stop, mistakes it for signal-delivery-stop, restarts the tracee with"
8039 msgstr ""
8040
8041 #. type: Plain text
8042 #: build/C/man2/ptrace.2:1101
8043 #, no-wrap
8044 msgid "    ptrace(PTRACE_restart, pid, 0, stopsig)\n"
8045 msgstr ""
8046
8047 #. type: Plain text
8048 #: build/C/man2/ptrace.2:1107
8049 msgid "with the intention of injecting I<stopsig>, but I<stopsig> gets ignored and the tracee continues to run."
8050 msgstr ""
8051
8052 #. type: Plain text
8053 #: build/C/man2/ptrace.2:1127
8054 msgid "The B<SIGCONT> signal has a side effect of waking up (all threads of)  a group-stopped process.  This side effect happens before signal-delivery-stop.  The tracer can't suppress this side effect (it can only suppress signal injection, which only causes the B<SIGCONT> handler to not be executed in the tracee, if such a handler is installed).  In fact, waking up from group-stop may be followed by signal-delivery-stop for signal(s)  I<other than> B<SIGCONT>, if they were pending when B<SIGCONT> was delivered.  In other words, B<SIGCONT> may be not the first signal observed by the tracee after it was sent."
8055 msgstr ""
8056
8057 #. type: Plain text
8058 #: build/C/man2/ptrace.2:1131
8059 msgid "Stopping signals cause (all threads of) a process to enter group-stop.  This side effect happens after signal injection, and therefore can be suppressed by the tracer."
8060 msgstr ""
8061
8062 #
8063 #.  In the Linux 2.4 sources, in arch/i386/kernel/signal.c::do_signal(),
8064 #.  there is:
8065 #.              /* The debugger continued.  Ignore SIGSTOP.  */
8066 #.              if (signr == SIGSTOP)
8067 #.                      continue;
8068 #. type: Plain text
8069 #: build/C/man2/ptrace.2:1141
8070 msgid "In Linux 2.4 and earlier, the B<SIGSTOP> signal can't be injected."
8071 msgstr ""
8072
8073 #. type: Plain text
8074 #: build/C/man2/ptrace.2:1158
8075 msgid "B<PTRACE_GETSIGINFO> can be used to retrieve a I<siginfo_t> structure which corresponds to the delivered signal.  B<PTRACE_SETSIGINFO> may be used to modify it.  If B<PTRACE_SETSIGINFO> has been used to alter I<siginfo_t>, the I<si_signo> field and the I<sig> parameter in the restarting command must match, otherwise the result is undefined."
8076 msgstr ""
8077
8078 #. type: SS
8079 #: build/C/man2/ptrace.2:1158
8080 #, no-wrap
8081 msgid "Group-stop"
8082 msgstr ""
8083
8084 #. type: Plain text
8085 #: build/C/man2/ptrace.2:1170
8086 msgid "When a (possibly multithreaded) process receives a stopping signal, all threads stop.  If some threads are traced, they enter a group-stop.  Note that the stopping signal will first cause signal-delivery-stop (on one tracee only), and only after it is injected by the tracer (or after it was dispatched to a thread which isn't traced), will group-stop be initiated on I<all> tracees within the multithreaded process.  As usual, every tracee reports its group-stop separately to the corresponding tracer."
8087 msgstr ""
8088
8089 #. type: Plain text
8090 #: build/C/man2/ptrace.2:1179
8091 msgid "Group-stop is observed by the tracer as B<waitpid>(2)  returning with I<WIFSTOPPED(status)> true, with the stopping signal available via I<WSTOPSIG(status)>.  The same result is returned by some other classes of ptrace-stops, therefore the recommended practice is to perform the call"
8092 msgstr ""
8093
8094 #. type: Plain text
8095 #: build/C/man2/ptrace.2:1181
8096 #, no-wrap
8097 msgid "    ptrace(PTRACE_GETSIGINFO, pid, 0, &siginfo)\n"
8098 msgstr ""
8099
8100 #. type: Plain text
8101 #: build/C/man2/ptrace.2:1202
8102 msgid "The call can be avoided if the signal is not B<SIGSTOP>, B<SIGTSTP>, B<SIGTTIN>, or B<SIGTTOU>; only these four signals are stopping signals.  If the tracer sees something else, it can't be a group-stop.  Otherwise, the tracer needs to call B<PTRACE_GETSIGINFO>.  If B<PTRACE_GETSIGINFO> fails with B<EINVAL>, then it is definitely a group-stop.  (Other failure codes are possible, such as B<ESRCH> (\"no such process\") if a B<SIGKILL> killed the tracee.)"
8103 msgstr ""
8104
8105 #. type: Plain text
8106 #: build/C/man2/ptrace.2:1212
8107 msgid "If tracee was attached using B<PTRACE_SEIZE>, group-stop is indicated by B<PTRACE_EVENT_STOP>: I<statusE<gt>E<gt>16 == PTRACE_EVENT_STOP>.  This allows detection of group-stops without requiring an extra B<PTRACE_GETSIGINFO> call."
8108 msgstr ""
8109
8110 #. type: Plain text
8111 #: build/C/man2/ptrace.2:1221
8112 msgid "As of Linux 2.6.38, after the tracer sees the tracee ptrace-stop and until it restarts or kills it, the tracee will not run, and will not send notifications (except B<SIGKILL> death) to the tracer, even if the tracer enters into another B<waitpid>(2)  call."
8113 msgstr ""
8114
8115 #. type: Plain text
8116 #: build/C/man2/ptrace.2:1235
8117 msgid "The kernel behavior described in the previous paragraph causes a problem with transparent handling of stopping signals.  If the tracer restarts the tracee after group-stop, the stopping signal is effectively ignored\\(emthe tracee doesn't remain stopped, it runs.  If the tracer doesn't restart the tracee before entering into the next B<waitpid>(2), future B<SIGCONT> signals will not be reported to the tracer; this would cause the B<SIGCONT> signals to have no effect on the tracee."
8118 msgstr ""
8119
8120 #. type: Plain text
8121 #: build/C/man2/ptrace.2:1246
8122 msgid "Since Linux 3.4, there is a method to overcome this problem: instead of B<PTRACE_CONT>, a B<PTRACE_LISTEN> command can be used to restart a tracee in a way where it does not execute, but waits for a new event which it can report via B<waitpid>(2)  (such as when it is restarted by a B<SIGCONT>)."
8123 msgstr ""
8124
8125 #. type: SS
8126 #: build/C/man2/ptrace.2:1246
8127 #, no-wrap
8128 msgid "PTRACE_EVENT stops"
8129 msgstr ""
8130
8131 #. type: Plain text
8132 #: build/C/man2/ptrace.2:1252
8133 msgid "If the tracer sets B<PTRACE_O_TRACE_*> options, the tracee will enter ptrace-stops called B<PTRACE_EVENT> stops."
8134 msgstr ""
8135
8136 #. type: Plain text
8137 #: build/C/man2/ptrace.2:1266
8138 msgid "B<PTRACE_EVENT> stops are observed by the tracer as B<waitpid>(2)  returning with I<WIFSTOPPED(status)>, and I<WSTOPSIG(status)> returns B<SIGTRAP>.  An additional bit is set in the higher byte of the status word: the value I<statusE<gt>E<gt>8> will be"
8139 msgstr ""
8140
8141 #. type: Plain text
8142 #: build/C/man2/ptrace.2:1268
8143 #, no-wrap
8144 msgid "    (SIGTRAP | PTRACE_EVENT_foo E<lt>E<lt> 8).\n"
8145 msgstr ""
8146
8147 #. type: Plain text
8148 #: build/C/man2/ptrace.2:1270
8149 msgid "The following events exist:"
8150 msgstr ""
8151
8152 #. type: TP
8153 #: build/C/man2/ptrace.2:1270
8154 #, no-wrap
8155 msgid "B<PTRACE_EVENT_VFORK>"
8156 msgstr "B<PTRACE_EVENT_VFORK>"
8157
8158 #. type: Plain text
8159 #: build/C/man2/ptrace.2:1283
8160 msgid "Stop before return from B<vfork>(2)  or B<clone>(2)  with the B<CLONE_VFORK> flag.  When the tracee is continued after this stop, it will wait for child to exit/exec before continuing its execution (in other words, the usual behavior on B<vfork>(2))."
8161 msgstr ""
8162
8163 #. type: TP
8164 #: build/C/man2/ptrace.2:1283
8165 #, no-wrap
8166 msgid "B<PTRACE_EVENT_FORK>"
8167 msgstr "B<PTRACE_EVENT_FORK>"
8168
8169 #. type: Plain text
8170 #: build/C/man2/ptrace.2:1291
8171 msgid "Stop before return from B<fork>(2)  or B<clone>(2)  with the exit signal set to B<SIGCHLD>."
8172 msgstr ""
8173
8174 #. type: TP
8175 #: build/C/man2/ptrace.2:1291
8176 #, no-wrap
8177 msgid "B<PTRACE_EVENT_CLONE>"
8178 msgstr "B<PTRACE_EVENT_CLONE>"
8179
8180 #. type: Plain text
8181 #: build/C/man2/ptrace.2:1295
8182 msgid "Stop before return from B<clone>(2)."
8183 msgstr ""
8184
8185 #. type: TP
8186 #: build/C/man2/ptrace.2:1295
8187 #, no-wrap
8188 msgid "B<PTRACE_EVENT_VFORK_DONE>"
8189 msgstr "B<PTRACE_EVENT_VFORK_DONE>"
8190
8191 #. type: Plain text
8192 #: build/C/man2/ptrace.2:1305
8193 msgid "Stop before return from B<vfork>(2)  or B<clone>(2)  with the B<CLONE_VFORK> flag, but after the child unblocked this tracee by exiting or execing."
8194 msgstr ""
8195
8196 #. type: Plain text
8197 #: build/C/man2/ptrace.2:1311
8198 msgid "For all four stops described above, the stop occurs in the parent (i.e., the tracee), not in the newly created thread.  B<PTRACE_GETEVENTMSG> can be used to retrieve the new thread's ID."
8199 msgstr ""
8200
8201 #. type: TP
8202 #: build/C/man2/ptrace.2:1311
8203 #, no-wrap
8204 msgid "B<PTRACE_EVENT_EXEC>"
8205 msgstr "B<PTRACE_EVENT_EXEC>"
8206
8207 #. type: Plain text
8208 #: build/C/man2/ptrace.2:1318
8209 msgid "Stop before return from B<execve>(2).  Since Linux 3.0, B<PTRACE_GETEVENTMSG> returns the former thread ID."
8210 msgstr ""
8211
8212 #. type: TP
8213 #: build/C/man2/ptrace.2:1318
8214 #, no-wrap
8215 msgid "B<PTRACE_EVENT_EXIT>"
8216 msgstr "B<PTRACE_EVENT_EXIT>"
8217
8218 #. type: Plain text
8219 #: build/C/man2/ptrace.2:1334
8220 msgid "Stop before exit (including death from B<exit_group>(2)), signal death, or exit caused by B<execve>(2)  in a multithreaded process.  B<PTRACE_GETEVENTMSG> returns the exit status.  Registers can be examined (unlike when \"real\" exit happens).  The tracee is still alive; it needs to be B<PTRACE_CONT>ed or B<PTRACE_DETACH>ed to finish exiting."
8221 msgstr ""
8222
8223 #. type: TP
8224 #: build/C/man2/ptrace.2:1334
8225 #, no-wrap
8226 msgid "B<PTRACE_EVENT_STOP>"
8227 msgstr "B<PTRACE_EVENT_STOP>"
8228
8229 #. type: Plain text
8230 #: build/C/man2/ptrace.2:1346
8231 msgid "Stop induced by B<PTRACE_INTERRUPT> command, or group-stop, or initial ptrace-stop when a new child is attached (only if attached using B<PTRACE_SEIZE>), or B<PTRACE_EVENT_STOP> if B<PTRACE_SEIZE> was used."
8232 msgstr ""
8233
8234 #. type: TP
8235 #: build/C/man2/ptrace.2:1346
8236 #, no-wrap
8237 msgid "B<PTRACE_EVENT_SECCOMP>"
8238 msgstr "B<PTRACE_EVENT_SECCOMP>"
8239
8240 #. type: Plain text
8241 #: build/C/man2/ptrace.2:1357
8242 msgid "Stop triggered by a B<seccomp>(2)  rule on tracee syscall entry when B<PTRACE_O_TRACESECCOMP> has been set by the tracer.  The seccomp event message data (from the B<SECCOMP_RET_DATA> portion of the seccomp filter rule) can be retrieved with B<PTRACE_GETEVENTMSG>."
8243 msgstr ""
8244
8245 #. type: Plain text
8246 #: build/C/man2/ptrace.2:1369
8247 msgid "B<PTRACE_GETSIGINFO> on B<PTRACE_EVENT> stops returns B<SIGTRAP> in I<si_signo>, with I<si_code> set to I<(eventE<lt>E<lt>8)\\ |\\ SIGTRAP>."
8248 msgstr ""
8249
8250 #. type: SS
8251 #: build/C/man2/ptrace.2:1369
8252 #, no-wrap
8253 msgid "Syscall-stops"
8254 msgstr ""
8255
8256 #. type: Plain text
8257 #: build/C/man2/ptrace.2:1382
8258 msgid "If the tracee was restarted by B<PTRACE_SYSCALL>, the tracee enters syscall-enter-stop just prior to entering any system call.  If the tracer restarts the tracee with B<PTRACE_SYSCALL>, the tracee enters syscall-exit-stop when the system call is finished, or if it is interrupted by a signal.  (That is, signal-delivery-stop never happens between syscall-enter-stop and syscall-exit-stop; it happens I<after> syscall-exit-stop.)"
8259 msgstr ""
8260
8261 #. type: Plain text
8262 #: build/C/man2/ptrace.2:1396
8263 msgid "Other possibilities are that the tracee may stop in a B<PTRACE_EVENT> stop, exit (if it entered B<_exit>(2)  or B<exit_group>(2)), be killed by B<SIGKILL>, or die silently (if it is a thread group leader, the B<execve>(2)  happened in another thread, and that thread is not traced by the same tracer; this situation is discussed later)."
8264 msgstr ""
8265
8266 #. type: Plain text
8267 #: build/C/man2/ptrace.2:1411
8268 msgid "Syscall-enter-stop and syscall-exit-stop are observed by the tracer as B<waitpid>(2)  returning with I<WIFSTOPPED(status)> true, and I<WSTOPSIG(status)> giving B<SIGTRAP>.  If the B<PTRACE_O_TRACESYSGOOD> option was set by the tracer, then I<WSTOPSIG(status)> will give the value I<(SIGTRAP\\ |\\ 0x80)>."
8269 msgstr ""
8270
8271 #. type: Plain text
8272 #: build/C/man2/ptrace.2:1417
8273 msgid "Syscall-stops can be distinguished from signal-delivery-stop with B<SIGTRAP> by querying B<PTRACE_GETSIGINFO> for the following cases:"
8274 msgstr ""
8275
8276 #. type: TP
8277 #: build/C/man2/ptrace.2:1417
8278 #, no-wrap
8279 msgid "I<si_code> E<lt>= 0"
8280 msgstr ""
8281
8282 #. type: Plain text
8283 #: build/C/man2/ptrace.2:1429
8284 msgid "B<SIGTRAP> was delivered as a result of a user-space action, for example, a system call (B<tgkill>(2), B<kill>(2), B<sigqueue>(3), etc.), expiration of a POSIX timer, change of state on a POSIX message queue, or completion of an asynchronous I/O request."
8285 msgstr ""
8286
8287 #. type: TP
8288 #: build/C/man2/ptrace.2:1429
8289 #, no-wrap
8290 msgid "I<si_code> == SI_KERNEL (0x80)"
8291 msgstr ""
8292
8293 #. type: Plain text
8294 #: build/C/man2/ptrace.2:1433
8295 msgid "B<SIGTRAP> was sent by the kernel."
8296 msgstr ""
8297
8298 #. type: TP
8299 #: build/C/man2/ptrace.2:1433
8300 #, no-wrap
8301 msgid "I<si_code> == SIGTRAP or I<si_code> == (SIGTRAP|0x80)"
8302 msgstr ""
8303
8304 #. type: Plain text
8305 #: build/C/man2/ptrace.2:1436
8306 msgid "This is a syscall-stop."
8307 msgstr ""
8308
8309 #. type: Plain text
8310 #: build/C/man2/ptrace.2:1441
8311 msgid "However, syscall-stops happen very often (twice per system call), and performing B<PTRACE_GETSIGINFO> for every syscall-stop may be somewhat expensive."
8312 msgstr ""
8313
8314 #. type: Plain text
8315 #: build/C/man2/ptrace.2:1464
8316 msgid "Some architectures allow the cases to be distinguished by examining registers.  For example, on x86, I<rax> == -B<ENOSYS> in syscall-enter-stop.  Since B<SIGTRAP> (like any other signal) always happens I<after> syscall-exit-stop, and at this point I<rax> almost never contains -B<ENOSYS>, the B<SIGTRAP> looks like \"syscall-stop which is not syscall-enter-stop\"; in other words, it looks like a \"stray syscall-exit-stop\" and can be detected this way.  But such detection is fragile and is best avoided."
8317 msgstr ""
8318
8319 #. type: Plain text
8320 #: build/C/man2/ptrace.2:1470
8321 msgid "Using the B<PTRACE_O_TRACESYSGOOD> option is the recommended method to distinguish syscall-stops from other kinds of ptrace-stops, since it is reliable and does not incur a performance penalty."
8322 msgstr ""
8323
8324 #. type: Plain text
8325 #: build/C/man2/ptrace.2:1481
8326 msgid "Syscall-enter-stop and syscall-exit-stop are indistinguishable from each other by the tracer.  The tracer needs to keep track of the sequence of ptrace-stops in order to not misinterpret syscall-enter-stop as syscall-exit-stop or vice versa.  The rule is that syscall-enter-stop is always followed by syscall-exit-stop, B<PTRACE_EVENT> stop or the tracee's death; no other kinds of ptrace-stop can occur in between."
8327 msgstr ""
8328
8329 #. type: Plain text
8330 #: build/C/man2/ptrace.2:1486
8331 msgid "If after syscall-enter-stop, the tracer uses a restarting command other than B<PTRACE_SYSCALL>, syscall-exit-stop is not generated."
8332 msgstr ""
8333
8334 #. type: Plain text
8335 #: build/C/man2/ptrace.2:1498
8336 msgid "B<PTRACE_GETSIGINFO> on syscall-stops returns B<SIGTRAP> in I<si_signo>, with I<si_code> set to B<SIGTRAP> or I<(SIGTRAP|0x80)>."
8337 msgstr ""
8338
8339 #. type: SS
8340 #: build/C/man2/ptrace.2:1498
8341 #, no-wrap
8342 msgid "PTRACE_SINGLESTEP, PTRACE_SYSEMU, PTRACE_SYSEMU_SINGLESTEP stops"
8343 msgstr ""
8344
8345 #
8346 #.  FIXME .
8347 #.  document stops occurring with PTRACE_SINGLESTEP, PTRACE_SYSEMU,
8348 #.  PTRACE_SYSEMU_SINGLESTEP
8349 #. type: Plain text
8350 #: build/C/man2/ptrace.2:1504
8351 msgid "[Details of these kinds of stops are yet to be documented.]"
8352 msgstr ""
8353
8354 #. type: SS
8355 #: build/C/man2/ptrace.2:1504
8356 #, no-wrap
8357 msgid "Informational and restarting ptrace commands"
8358 msgstr ""
8359
8360 #. type: Plain text
8361 #: build/C/man2/ptrace.2:1514
8362 msgid "Most ptrace commands (all except B<PTRACE_ATTACH>, B<PTRACE_SEIZE>, B<PTRACE_TRACEME>, B<PTRACE_INTERRUPT>, and B<PTRACE_KILL>)  require the tracee to be in a ptrace-stop, otherwise they fail with B<ESRCH>."
8363 msgstr ""
8364
8365 #. type: Plain text
8366 #: build/C/man2/ptrace.2:1519
8367 msgid "When the tracee is in ptrace-stop, the tracer can read and write data to the tracee using informational commands.  These commands leave the tracee in ptrace-stopped state:"
8368 msgstr ""
8369
8370 #. type: Plain text
8371 #: build/C/man2/ptrace.2:1531
8372 #, no-wrap
8373 msgid ""
8374 "    ptrace(PTRACE_PEEKTEXT/PEEKDATA/PEEKUSER, pid, addr, 0);\n"
8375 "    ptrace(PTRACE_POKETEXT/POKEDATA/POKEUSER, pid, addr, long_val);\n"
8376 "    ptrace(PTRACE_GETREGS/GETFPREGS, pid, 0, &struct);\n"
8377 "    ptrace(PTRACE_SETREGS/SETFPREGS, pid, 0, &struct);\n"
8378 "    ptrace(PTRACE_GETREGSET, pid, NT_foo, &iov);\n"
8379 "    ptrace(PTRACE_SETREGSET, pid, NT_foo, &iov);\n"
8380 "    ptrace(PTRACE_GETSIGINFO, pid, 0, &siginfo);\n"
8381 "    ptrace(PTRACE_SETSIGINFO, pid, 0, &siginfo);\n"
8382 "    ptrace(PTRACE_GETEVENTMSG, pid, 0, &long_var);\n"
8383 "    ptrace(PTRACE_SETOPTIONS, pid, 0, PTRACE_O_flags);\n"
8384 msgstr ""
8385
8386 #. type: Plain text
8387 #: build/C/man2/ptrace.2:1543
8388 msgid "Note that some errors are not reported.  For example, setting signal information (I<siginfo>)  may have no effect in some ptrace-stops, yet the call may succeed (return 0 and not set I<errno>); querying B<PTRACE_GETEVENTMSG> may succeed and return some random value if current ptrace-stop is not documented as returning a meaningful event message."
8389 msgstr ""
8390
8391 #. type: Plain text
8392 #: build/C/man2/ptrace.2:1545
8393 msgid "The call"
8394 msgstr ""
8395
8396 #. type: Plain text
8397 #: build/C/man2/ptrace.2:1547
8398 #, no-wrap
8399 msgid "    ptrace(PTRACE_SETOPTIONS, pid, 0, PTRACE_O_flags);\n"
8400 msgstr ""
8401
8402 #. type: Plain text
8403 #: build/C/man2/ptrace.2:1556
8404 msgid "affects one tracee.  The tracee's current flags are replaced.  Flags are inherited by new tracees created and \"auto-attached\" via active B<PTRACE_O_TRACEFORK>, B<PTRACE_O_TRACEVFORK>, or B<PTRACE_O_TRACECLONE> options."
8405 msgstr ""
8406
8407 #. type: Plain text
8408 #: build/C/man2/ptrace.2:1559
8409 msgid "Another group of commands makes the ptrace-stopped tracee run.  They have the form:"
8410 msgstr ""
8411
8412 #. type: Plain text
8413 #: build/C/man2/ptrace.2:1561
8414 #, no-wrap
8415 msgid "    ptrace(cmd, pid, 0, sig);\n"
8416 msgstr ""
8417
8418 #. type: Plain text
8419 #: build/C/man2/ptrace.2:1582
8420 msgid "where I<cmd> is B<PTRACE_CONT>, B<PTRACE_LISTEN>, B<PTRACE_DETACH>, B<PTRACE_SYSCALL>, B<PTRACE_SINGLESTEP>, B<PTRACE_SYSEMU>, or B<PTRACE_SYSEMU_SINGLESTEP>.  If the tracee is in signal-delivery-stop, I<sig> is the signal to be injected (if it is nonzero).  Otherwise, I<sig> may be ignored.  (When restarting a tracee from a ptrace-stop other than signal-delivery-stop, recommended practice is to always pass 0 in I<sig>.)"
8421 msgstr ""
8422
8423 #. type: SS
8424 #: build/C/man2/ptrace.2:1582
8425 #, no-wrap
8426 msgid "Attaching and detaching"
8427 msgstr ""
8428
8429 #. type: Plain text
8430 #: build/C/man2/ptrace.2:1584
8431 msgid "A thread can be attached to the tracer using the call"
8432 msgstr ""
8433
8434 #. type: Plain text
8435 #: build/C/man2/ptrace.2:1586
8436 #, no-wrap
8437 msgid "    ptrace(PTRACE_ATTACH, pid, 0, 0);\n"
8438 msgstr ""
8439
8440 #. type: Plain text
8441 #: build/C/man2/ptrace.2:1588 build/C/man2/ptrace.2:2090
8442 msgid "or"
8443 msgstr ""
8444
8445 #. type: Plain text
8446 #: build/C/man2/ptrace.2:1590
8447 #, no-wrap
8448 msgid "    ptrace(PTRACE_SEIZE, pid, 0, PTRACE_O_flags);\n"
8449 msgstr ""
8450
8451 #
8452 #.  FIXME . Describe how to attach to a thread which is already group-stopped.
8453 #. type: Plain text
8454 #: build/C/man2/ptrace.2:1614
8455 msgid "B<PTRACE_ATTACH> sends B<SIGSTOP> to this thread.  If the tracer wants this B<SIGSTOP> to have no effect, it needs to suppress it.  Note that if other signals are concurrently sent to this thread during attach, the tracer may see the tracee enter signal-delivery-stop with other signal(s) first! The usual practice is to reinject these signals until B<SIGSTOP> is seen, then suppress B<SIGSTOP> injection.  The design bug here is that a ptrace attach and a concurrently delivered B<SIGSTOP> may race and the concurrent B<SIGSTOP> may be lost."
8456 msgstr ""
8457
8458 #. type: Plain text
8459 #: build/C/man2/ptrace.2:1621
8460 msgid "Since attaching sends B<SIGSTOP> and the tracer usually suppresses it, this may cause a stray B<EINTR> return from the currently executing system call in the tracee, as described in the \"Signal injection and suppression\" section."
8461 msgstr ""
8462
8463 #. type: Plain text
8464 #: build/C/man2/ptrace.2:1633
8465 msgid "Since Linux 3.4, B<PTRACE_SEIZE> can be used instead of B<PTRACE_ATTACH>.  B<PTRACE_SEIZE> does not stop the attached process.  If you need to stop it after attach (or at any other time) without sending it any signals, use B<PTRACE_INTERRUPT> command."
8466 msgstr ""
8467
8468 #. type: Plain text
8469 #: build/C/man2/ptrace.2:1635
8470 msgid "The request"
8471 msgstr ""
8472
8473 #. type: Plain text
8474 #: build/C/man2/ptrace.2:1637
8475 #, no-wrap
8476 msgid "    ptrace(PTRACE_TRACEME, 0, 0, 0);\n"
8477 msgstr ""
8478
8479 #. type: Plain text
8480 #: build/C/man2/ptrace.2:1643
8481 msgid "turns the calling thread into a tracee.  The thread continues to run (doesn't enter ptrace-stop).  A common practice is to follow the B<PTRACE_TRACEME> with"
8482 msgstr ""
8483
8484 #. type: Plain text
8485 #: build/C/man2/ptrace.2:1645
8486 #, no-wrap
8487 msgid "    raise(SIGSTOP);\n"
8488 msgstr ""
8489
8490 #. type: Plain text
8491 #: build/C/man2/ptrace.2:1648
8492 msgid "and allow the parent (which is our tracer now) to observe our signal-delivery-stop."
8493 msgstr ""
8494
8495 #. type: Plain text
8496 #: build/C/man2/ptrace.2:1672
8497 msgid "If the B<PTRACE_O_TRACEFORK>, B<PTRACE_O_TRACEVFORK>, or B<PTRACE_O_TRACECLONE> options are in effect, then children created by, respectively, B<vfork>(2)  or B<clone>(2)  with the B<CLONE_VFORK> flag, B<fork>(2)  or B<clone>(2)  with the exit signal set to B<SIGCHLD>, and other kinds of B<clone>(2), are automatically attached to the same tracer which traced their parent.  B<SIGSTOP> is delivered to the children, causing them to enter signal-delivery-stop after they exit the system call which created them."
8498 msgstr ""
8499
8500 #. type: Plain text
8501 #: build/C/man2/ptrace.2:1674
8502 msgid "Detaching of the tracee is performed by:"
8503 msgstr ""
8504
8505 #. type: Plain text
8506 #: build/C/man2/ptrace.2:1676
8507 #, no-wrap
8508 msgid "    ptrace(PTRACE_DETACH, pid, 0, sig);\n"
8509 msgstr ""
8510
8511 #. type: Plain text
8512 #: build/C/man2/ptrace.2:1684
8513 msgid "B<PTRACE_DETACH> is a restarting operation; therefore it requires the tracee to be in ptrace-stop.  If the tracee is in signal-delivery-stop, a signal can be injected.  Otherwise, the I<sig> parameter may be silently ignored."
8514 msgstr ""
8515
8516 #.  FIXME . Describe how to detach from a group-stopped tracee so that it
8517 #.         doesn't run, but continues to wait for SIGCONT.
8518 #. type: Plain text
8519 #: build/C/man2/ptrace.2:1708
8520 msgid "If the tracee is running when the tracer wants to detach it, the usual solution is to send B<SIGSTOP> (using B<tgkill>(2), to make sure it goes to the correct thread), wait for the tracee to stop in signal-delivery-stop for B<SIGSTOP> and then detach it (suppressing B<SIGSTOP> injection).  A design bug is that this can race with concurrent B<SIGSTOP>s.  Another complication is that the tracee may enter other ptrace-stops and needs to be restarted and waited for again, until B<SIGSTOP> is seen.  Yet another complication is to be sure that the tracee is not already ptrace-stopped, because no signal delivery happens while it is\\(emnot even B<SIGSTOP>."
8521 msgstr ""
8522
8523 #. type: Plain text
8524 #: build/C/man2/ptrace.2:1716
8525 msgid "If the tracer dies, all tracees are automatically detached and restarted, unless they were in group-stop.  Handling of restart from group-stop is currently buggy, but the \"as planned\" behavior is to leave tracee stopped and waiting for B<SIGCONT>.  If the tracee is restarted from signal-delivery-stop, the pending signal is injected."
8526 msgstr ""
8527
8528 #. type: SS
8529 #: build/C/man2/ptrace.2:1716
8530 #, no-wrap
8531 msgid "execve(2) under ptrace"
8532 msgstr ""
8533
8534 #
8535 #.  clone(2) CLONE_THREAD says:
8536 #.      If  any  of the threads in a thread group performs an execve(2),
8537 #.      then all threads other than the thread group leader are terminated,
8538 #.      and the new program is executed in the thread group leader.
8539 #.  In kernel 3.1 sources, see fs/exec.c::de_thread()
8540 #. type: Plain text
8541 #: build/C/man2/ptrace.2:1735
8542 msgid "When one thread in a multithreaded process calls B<execve>(2), the kernel destroys all other threads in the process, and resets the thread ID of the execing thread to the thread group ID (process ID).  (Or, to put things another way, when a multithreaded process does an B<execve>(2), at completion of the call, it appears as though the B<execve>(2)  occurred in the thread group leader, regardless of which thread did the B<execve>(2).)  This resetting of the thread ID looks very confusing to tracers:"
8543 msgstr ""
8544
8545 #. type: Plain text
8546 #: build/C/man2/ptrace.2:1745
8547 msgid "All other threads stop in B<PTRACE_EVENT_EXIT> stop, if the B<PTRACE_O_TRACEEXIT> option was turned on.  Then all other threads except the thread group leader report death as if they exited via B<_exit>(2)  with exit code 0."
8548 msgstr ""
8549
8550 #. type: Plain text
8551 #: build/C/man2/ptrace.2:1753
8552 msgid "The execing tracee changes its thread ID while it is in the B<execve>(2).  (Remember, under ptrace, the \"pid\" returned from B<waitpid>(2), or fed into ptrace calls, is the tracee's thread ID.)  That is, the tracee's thread ID is reset to be the same as its process ID, which is the same as the thread group leader's thread ID."
8553 msgstr ""
8554
8555 #. type: Plain text
8556 #: build/C/man2/ptrace.2:1759
8557 msgid "Then a B<PTRACE_EVENT_EXEC> stop happens, if the B<PTRACE_O_TRACEEXEC> option was turned on."
8558 msgstr ""
8559
8560 #. type: Plain text
8561 #: build/C/man2/ptrace.2:1780
8562 msgid "If the thread group leader has reported its B<PTRACE_EVENT_EXIT> stop by this time, it appears to the tracer that the dead thread leader \"reappears from nowhere\".  (Note: the thread group leader does not report death via I<WIFEXITED(status)> until there is at least one other live thread.  This eliminates the possibility that the tracer will see it dying and then reappearing.)  If the thread group leader was still alive, for the tracer this may look as if thread group leader returns from a different system call than it entered, or even \"returned from a system call even though it was not in any system call\".  If the thread group leader was not traced (or was traced by a different tracer), then during B<execve>(2)  it will appear as if it has become a tracee of the tracer of the execing tracee."
8563 msgstr ""
8564
8565 #. type: Plain text
8566 #: build/C/man2/ptrace.2:1783
8567 msgid "All of the above effects are the artifacts of the thread ID change in the tracee."
8568 msgstr ""
8569
8570 #. type: Plain text
8571 #: build/C/man2/ptrace.2:1803
8572 msgid "The B<PTRACE_O_TRACEEXEC> option is the recommended tool for dealing with this situation.  First, it enables B<PTRACE_EVENT_EXEC> stop, which occurs before B<execve>(2)  returns.  In this stop, the tracer can use B<PTRACE_GETEVENTMSG> to retrieve the tracee's former thread ID.  (This feature was introduced in Linux 3.0).  Second, the B<PTRACE_O_TRACEEXEC> option disables legacy B<SIGTRAP> generation on B<execve>(2)."
8573 msgstr ""
8574
8575 #. type: Plain text
8576 #: build/C/man2/ptrace.2:1809
8577 msgid "When the tracer receives B<PTRACE_EVENT_EXEC> stop notification, it is guaranteed that except this tracee and the thread group leader, no other threads from the process are alive."
8578 msgstr ""
8579
8580 #. type: Plain text
8581 #: build/C/man2/ptrace.2:1817
8582 msgid "On receiving the B<PTRACE_EVENT_EXEC> stop notification, the tracer should clean up all its internal data structures describing the threads of this process, and retain only one data structure\\(emone which describes the single still running tracee, with"
8583 msgstr ""
8584
8585 #. type: Plain text
8586 #: build/C/man2/ptrace.2:1819
8587 #, no-wrap
8588 msgid "    thread ID == thread group ID == process ID.\n"
8589 msgstr ""
8590
8591 #. type: Plain text
8592 #: build/C/man2/ptrace.2:1823
8593 msgid "Example: two threads call B<execve>(2)  at the same time:"
8594 msgstr ""
8595
8596 #. type: Plain text
8597 #: build/C/man2/ptrace.2:1834
8598 #, no-wrap
8599 msgid ""
8600 "*** we get syscall-enter-stop in thread 1: **\n"
8601 "PID1 execve(\"/bin/foo\", \"foo\" E<lt>unfinished ...E<gt>\n"
8602 "*** we issue PTRACE_SYSCALL for thread 1 **\n"
8603 "*** we get syscall-enter-stop in thread 2: **\n"
8604 "PID2 execve(\"/bin/bar\", \"bar\" E<lt>unfinished ...E<gt>\n"
8605 "*** we issue PTRACE_SYSCALL for thread 2 **\n"
8606 "*** we get PTRACE_EVENT_EXEC for PID0, we issue PTRACE_SYSCALL **\n"
8607 "*** we get syscall-exit-stop for PID0: **\n"
8608 "PID0 E<lt>... execve resumedE<gt> )             = 0\n"
8609 msgstr ""
8610
8611 #. type: Plain text
8612 #: build/C/man2/ptrace.2:1857
8613 msgid "If the B<PTRACE_O_TRACEEXEC> option is I<not> in effect for the execing tracee, the kernel delivers an extra B<SIGTRAP> to the tracee after B<execve>(2)  returns.  This is an ordinary signal (similar to one which can be generated by I<kill -TRAP>), not a special kind of ptrace-stop.  Employing B<PTRACE_GETSIGINFO> for this signal returns I<si_code> set to 0 (I<SI_USER>).  This signal may be blocked by signal mask, and thus may be delivered (much) later."
8614 msgstr ""
8615
8616 #. type: Plain text
8617 #: build/C/man2/ptrace.2:1876
8618 msgid "Usually, the tracer (for example, B<strace>(1))  would not want to show this extra post-execve B<SIGTRAP> signal to the user, and would suppress its delivery to the tracee (if B<SIGTRAP> is set to B<SIG_DFL>, it is a killing signal).  However, determining I<which> B<SIGTRAP> to suppress is not easy.  Setting the B<PTRACE_O_TRACEEXEC> option and thus suppressing this extra B<SIGTRAP> is the recommended approach."
8619 msgstr ""
8620
8621 #. type: SS
8622 #: build/C/man2/ptrace.2:1876
8623 #, no-wrap
8624 msgid "Real parent"
8625 msgstr ""
8626
8627 #. type: Plain text
8628 #: build/C/man2/ptrace.2:1883
8629 msgid "The ptrace API (ab)uses the standard UNIX parent/child signaling over B<waitpid>(2).  This used to cause the real parent of the process to stop receiving several kinds of B<waitpid>(2)  notifications when the child process is traced by some other process."
8630 msgstr ""
8631
8632 #. type: Plain text
8633 #: build/C/man2/ptrace.2:1886
8634 msgid "Many of these bugs have been fixed, but as of Linux 2.6.38 several still exist; see BUGS below."
8635 msgstr ""
8636
8637 #. type: Plain text
8638 #: build/C/man2/ptrace.2:1888
8639 msgid "As of Linux 2.6.38, the following is believed to work correctly:"
8640 msgstr ""
8641
8642 #. type: Plain text
8643 #: build/C/man2/ptrace.2:1896
8644 msgid "exit/death by signal is reported first to the tracer, then, when the tracer consumes the B<waitpid>(2)  result, to the real parent (to the real parent only when the whole multithreaded process exits).  If the tracer and the real parent are the same process, the report is sent only once."
8645 msgstr ""
8646
8647 #. type: Plain text
8648 #: build/C/man2/ptrace.2:1901
8649 msgid "On success, the B<PTRACE_PEEK*> requests return the requested data (but see NOTES), while other requests return zero."
8650 msgstr ""
8651
8652 #. type: Plain text
8653 #: build/C/man2/ptrace.2:1911
8654 #, fuzzy
8655 #| msgid "On success, B<PTRACE_PEEK*> requests return the requested data, while other requests return zero.  On error, all requests return -1, and I<errno> is set appropriately.  Since the value returned by a successful B<PTRACE_PEEK*> request may be -1, the caller must check I<errno> after such requests to determine whether or not an error occurred."
8656 msgid "On error, all requests return -1, and I<errno> is set appropriately.  Since the value returned by a successful B<PTRACE_PEEK*> request may be -1, the caller must clear I<errno> before the call, and then check it afterward to determine whether or not an error occurred."
8657 msgstr "成功すると、 B<PTRACE_PEEK*> の場合は要求したデータを返し、 それ以外の場合は 0 を返す。 エラーの場合は -1 を返し、 I<errno> が適切に設定される。 B<PTRACE_PEEK*> が成功して返す値も -1 になることがあるため、 そのような要求の場合には、呼び出し元は I<errno> を調べ、エラーか発生したのかどうかを判断しなければならない。"
8658
8659 #. type: Plain text
8660 #: build/C/man2/ptrace.2:1915
8661 msgid "(i386 only) There was an error with allocating or freeing a debug register."
8662 msgstr "(i386 のみ) デバッグレジスタの確保または解放でエラーが発生した。"
8663
8664 #. type: Plain text
8665 #: build/C/man2/ptrace.2:1926
8666 #, fuzzy
8667 #| msgid "There was an attempt to read from or write to an invalid area in the parent's or child's memory, probably because the area wasn't mapped or accessible.  Unfortunately, under Linux, different variations of this fault will return B<EIO> or B<EFAULT> more or less arbitrarily."
8668 msgid "There was an attempt to read from or write to an invalid area in the tracer's or the tracee's memory, probably because the area wasn't mapped or accessible.  Unfortunately, under Linux, different variations of this fault will return B<EIO> or B<EFAULT> more or less arbitrarily."
8669 msgstr "親プロセスまたは子プロセスのメモリの不正な領域に読み書きしようとした。 おそらくその領域がマッピングされていないか、 その領域へのアクセスが許されていないかである。 不運なことに、Linux ではこのようなエラーの場合、多かれ少なかれ 恣意的に B<EIO> を返したり B<EFAULT> を返したりすることがある。"
8670
8671 #. type: Plain text
8672 #: build/C/man2/ptrace.2:1929
8673 msgid "An attempt was made to set an invalid option."
8674 msgstr "不正なオプションを設定しようとした。"
8675
8676 #. type: Plain text
8677 #: build/C/man2/ptrace.2:1936
8678 #, fuzzy
8679 #| msgid "I<request> is invalid, or an attempt was made to read from or write to an invalid area in the parent's or child's memory, or there was a word-alignment violation, or an invalid signal was specified during a restart request."
8680 msgid "I<request> is invalid, or an attempt was made to read from or write to an invalid area in the tracer's or the tracee's memory, or there was a word-alignment violation, or an invalid signal was specified during a restart request."
8681 msgstr "I<request> が不正である。 または、親プロセスまたは子プロセスのメモリの 不正な領域に読み書きしようとした。 または、ワード境界違反があった。 または、実行再開の要求で不正なシグナルを指定した。"
8682
8683 #. type: Plain text
8684 #: build/C/man2/ptrace.2:1949
8685 #, fuzzy
8686 #| msgid "The specified process cannot be traced.  This could be because the parent has insufficient privileges (the required capability is B<CAP_SYS_PTRACE>); unprivileged processes cannot trace processes that they cannot send signals to or those running set-user-ID/set-group-ID programs, for obvious reasons.  Alternatively, the process may already be being traced, or be B<init>(8)  (PID 1)."
8687 msgid "The specified process cannot be traced.  This could be because the tracer has insufficient privileges (the required capability is B<CAP_SYS_PTRACE>); unprivileged processes cannot trace processes that they cannot send signals to or those running set-user-ID/set-group-ID programs, for obvious reasons.  Alternatively, the process may already be being traced, or (on kernels before 2.6.26) be B<init>(1)  (PID 1)."
8688 msgstr "指定したプロセスをトレースすることができない。これは親プロセスが 必要な権限 (必要なケーパビリティは B<CAP_SYS_PTRACE>)  を持っていないことが原因の場合がある。 分かりやすい理由を挙げるなら、 非特権プロセスはシグナルを送ることができないプロセスをトレースできないし、 set-user-ID/set-group-ID プログラムを実行しているプロセスはトレースできない。 または、プロセスはすでにトレース中である、 または B<init>(8)  プロセス (PID が 1) である。"
8689
8690 #. type: Plain text
8691 #: build/C/man2/ptrace.2:1954
8692 #, fuzzy
8693 #| msgid "The specified process does not exist, or is not currently being traced by the caller, or is not stopped (for requests that require that)."
8694 msgid "The specified process does not exist, or is not currently being traced by the caller, or is not stopped (for requests that require a stopped tracee)."
8695 msgstr "指定したプロセスが存在しない。 または、指定したプロセスは呼び出したプロセスが 現在トレース中の子プロセスではない。 または、指定したプロセスが停止していない (停止していることが必要な要求の場合)。"
8696
8697 #. type: Plain text
8698 #: build/C/man2/ptrace.2:1956
8699 msgid "SVr4, 4.3BSD."
8700 msgstr "SVr4, 4.3BSD."
8701
8702 #. type: Plain text
8703 #: build/C/man2/ptrace.2:1971
8704 #, fuzzy
8705 #| msgid "Although arguments to B<ptrace>()  are interpreted according to the prototype given, glibc currently declares B<ptrace>()  as a variadic function with only the I<request> argument fixed.  This means that unneeded trailing arguments may be omitted, though doing so makes use of undocumented B<gcc>(1)  behavior."
8706 msgid "Although arguments to B<ptrace>()  are interpreted according to the prototype given, glibc currently declares B<ptrace>()  as a variadic function with only the I<request> argument fixed.  It is recommended to always supply four arguments, even if the requested operation does not use them, setting unused/ignored arguments to I<0L> or I<(void\\ *)\\ 0>."
8707 msgstr "B<ptrace>()  の引き数は上のようなプロトタイプに基づいて解釈されるが、 glibc では、現在のところ B<ptrace>()  は I<request> 引き数だけが固定の可変長引き数関数として 宣言されている。 これは必要なければ残りの引き数は省略可能であることを意味するが、 それは B<gcc>(1)  の明文化されていない動作を利用していることになる。"
8708
8709 #.  See commit 00cd5c37afd5f431ac186dd131705048c0a11fdb
8710 #. type: Plain text
8711 #: build/C/man2/ptrace.2:1976
8712 msgid "In Linux kernels before 2.6.26, B<init>(1), the process with PID 1, may not be traced."
8713 msgstr "バージョン 2.6.26 より前の Linux カーネルでは、 B<init>(1) すなわち PID が 1 のプロセスはトレースすることができない。"
8714
8715 #.  See http://lkml.org/lkml/2008/5/8/375
8716 #. type: Plain text
8717 #: build/C/man2/ptrace.2:1983
8718 msgid "The layout of the contents of memory and the USER area are quite operating-system- and architecture-specific.  The offset supplied, and the data returned, might not entirely match with the definition of I<struct user>."
8719 msgstr "メモリや USER 領域の内容や配置はオペレーティングシステムごと、アーキテクチャごとに 非常に依存する。 オフセットが指定された場合、返されるデータは I<struct user> の定義と完全に一致しないこともありえる。"
8720
8721 #. type: Plain text
8722 #: build/C/man2/ptrace.2:1986
8723 msgid "The size of a \"word\" is determined by the operating-system variant (e.g., for 32-bit Linux it is 32 bits)."
8724 msgstr "「ワード (word) 」の大きさはオペレーティングシステムによって決まる。 (例えば、32 ビットの Linux では 32 ビットである、など。)"
8725
8726 #. type: Plain text
8727 #: build/C/man2/ptrace.2:1994
8728 msgid "This page documents the way the B<ptrace>()  call works currently in Linux.  Its behavior differs significantly on other flavors of UNIX.  In any case, use of B<ptrace>()  is highly specific to the operating system and architecture."
8729 msgstr "このマニュアルは現在の Linux における B<ptrace>()  コールの動作について記述している。他の UNIX では その動作は著しく異なる。 いかなる場合も B<ptrace>()  を使うとオペレーションシステムやアーキテクチャに非常に依存したものになる。"
8730
8731 #. type: SS
8732 #: build/C/man2/ptrace.2:1994
8733 #, no-wrap
8734 msgid "C library/kernel ABI differences"
8735 msgstr "C ライブラリとカーネル ABI の違い"
8736
8737 #. type: Plain text
8738 #: build/C/man2/ptrace.2:2006
8739 msgid "At the system call level, the B<PTRACE_PEEKTEXT>, B<PTRACE_PEEKDATA>, and B<PTRACE_PEEKUSER> requests have a different API: they store the result at the address specified by the I<data> parameter, and the return value is the error flag.  The glibc wrapper function provides the API given in DESCRIPTION above, with the result being returned via the function return value."
8740 msgstr ""
8741
8742 #. type: Plain text
8743 #: build/C/man2/ptrace.2:2017
8744 msgid "On hosts with 2.6 kernel headers, B<PTRACE_SETOPTIONS> is declared with a different value than the one for 2.4.  This leads to applications compiled with 2.6 kernel headers failing when run on 2.4 kernels.  This can be worked around by redefining B<PTRACE_SETOPTIONS> to B<PTRACE_OLDSETOPTIONS>, if that is defined."
8745 msgstr "カーネル 2.6 のヘッダがインストールされたホストでは、 B<PTRACE_SETOPTIONS> はカーネル 2.4 のヘッダとは異なる値で宣言される。 このため、カーネル 2.6 のヘッダでコンパイルされたアプリケーションは カーネル 2.4 では正しく動作しない。 この問題は、 B<PTRACE_SETOPTIONS> が定義されていた際は、 B<PTRACE_SETOPTIONS> を B<PTRACE_OLDSETOPTIONS> に定義し直すことで対処できる。"
8746
8747 #. type: Plain text
8748 #: build/C/man2/ptrace.2:2020
8749 msgid "Group-stop notifications are sent to the tracer, but not to real parent.  Last confirmed on 2.6.38.6."
8750 msgstr ""
8751
8752 #.  Note from Denys Vlasenko:
8753 #.      Here "exits" means any kind of death - _exit, exit_group,
8754 #.      signal death. Signal death and exit_group cases are trivial,
8755 #.      though: since signal death and exit_group kill all other threads
8756 #.      too, "until all other threads exit" thing happens rather soon
8757 #.      in these cases. Therefore, only _exit presents observably
8758 #.      puzzling behavior to ptrace users: thread leader _exit's,
8759 #.      but WIFEXITED isn't reported! We are trying to explain here
8760 #.      why it is so.
8761 #.   FIXME . need to test/verify this scenario
8762 #. type: Plain text
8763 #: build/C/man2/ptrace.2:2051
8764 msgid "If a thread group leader is traced and exits by calling B<_exit>(2), a B<PTRACE_EVENT_EXIT> stop will happen for it (if requested), but the subsequent B<WIFEXITED> notification will not be delivered until all other threads exit.  As explained above, if one of other threads calls B<execve>(2), the death of the thread group leader will I<never> be reported.  If the execed thread is not traced by this tracer, the tracer will never know that B<execve>(2)  happened.  One possible workaround is to B<PTRACE_DETACH> the thread group leader instead of restarting it in this case.  Last confirmed on 2.6.38.6."
8765 msgstr ""
8766
8767 #. type: Plain text
8768 #: build/C/man2/ptrace.2:2061
8769 msgid "A B<SIGKILL> signal may still cause a B<PTRACE_EVENT_EXIT> stop before actual signal death.  This may be changed in the future; B<SIGKILL> is meant to always immediately kill tasks even under ptrace.  Last confirmed on 2.6.38.6."
8770 msgstr ""
8771
8772 #. type: Plain text
8773 #: build/C/man2/ptrace.2:2079
8774 msgid "Some system calls return with B<EINTR> if a signal was sent to a tracee, but delivery was suppressed by the tracer.  (This is very typical operation: it is usually done by debuggers on every attach, in order to not introduce a bogus B<SIGSTOP>).  As of Linux 3.2.9, the following system calls are affected (this list is likely incomplete): B<epoll_wait>(2), and B<read>(2)  from an B<inotify>(7)  file descriptor.  The usual symptom of this bug is that when you attach to a quiescent process with the command"
8775 msgstr ""
8776
8777 #. type: Plain text
8778 #: build/C/man2/ptrace.2:2081
8779 #, no-wrap
8780 msgid "    strace -p E<lt>process-IDE<gt>\n"
8781 msgstr ""
8782
8783 #. type: Plain text
8784 #: build/C/man2/ptrace.2:2084
8785 msgid "then, instead of the usual and expected one-line output such as"
8786 msgstr ""
8787
8788 #. type: Plain text
8789 #: build/C/man2/ptrace.2:2087
8790 #, no-wrap
8791 msgid "    restart_syscall(E<lt>... resuming interrupted call ...E<gt>_\n"
8792 msgstr ""
8793
8794 #. type: Plain text
8795 #: build/C/man2/ptrace.2:2093
8796 #, no-wrap
8797 msgid "    select(6, [5], NULL, [5], NULL_\n"
8798 msgstr ""
8799
8800 #. type: Plain text
8801 #: build/C/man2/ptrace.2:2097
8802 msgid "('_' denotes the cursor position), you observe more than one line.  For example:"
8803 msgstr ""
8804
8805 #. type: Plain text
8806 #: build/C/man2/ptrace.2:2101
8807 #, no-wrap
8808 msgid ""
8809 "    clock_gettime(CLOCK_MONOTONIC, {15370, 690928118}) = 0\n"
8810 "    epoll_wait(4,_\n"
8811 msgstr ""
8812
8813 #. type: Plain text
8814 #: build/C/man2/ptrace.2:2122
8815 msgid "What is not visible here is that the process was blocked in B<epoll_wait>(2)  before B<strace>(1)  has attached to it.  Attaching caused B<epoll_wait>(2)  to return to user space with the error B<EINTR>.  In this particular case, the program reacted to B<EINTR> by checking the current time, and then executing B<epoll_wait>(2)  again.  (Programs which do not expect such \"stray\" B<EINTR> errors may behave in an unintended way upon an B<strace>(1)  attach.)"
8816 msgstr ""
8817
8818 #. type: Plain text
8819 #: build/C/man2/ptrace.2:2137
8820 msgid "B<gdb>(1), B<strace>(1), B<clone>(2), B<execve>(2), B<fork>(2), B<gettid>(2), B<seccomp>(2), B<sigaction>(2), B<tgkill>(2), B<vfork>(2), B<waitpid>(2), B<exec>(3), B<capabilities>(7), B<signal>(7)"
8821 msgstr "B<gdb>(1), B<strace>(1), B<clone>(2), B<execve>(2), B<fork>(2), B<gettid>(2), B<seccomp>(2), B<sigaction>(2), B<tgkill>(2), B<vfork>(2), B<waitpid>(2), B<exec>(3), B<capabilities>(7), B<signal>(7)"
8822
8823 #. type: TH
8824 #: build/C/man2/quotactl.2:27
8825 #, no-wrap
8826 msgid "QUOTACTL"
8827 msgstr "QUOTACTL"
8828
8829 #. type: TH
8830 #: build/C/man2/quotactl.2:27
8831 #, no-wrap
8832 msgid "2010-06-16"
8833 msgstr "2010-06-16"
8834
8835 #. type: Plain text
8836 #: build/C/man2/quotactl.2:30
8837 msgid "quotactl - manipulate disk quotas"
8838 msgstr "quotactl - ディスク quota を操作する"
8839
8840 #. type: Plain text
8841 #: build/C/man2/quotactl.2:34
8842 #, no-wrap
8843 msgid ""
8844 "B<#include E<lt>sys/quota.hE<gt>>\n"
8845 "B<#include E<lt>xfs/xqm.hE<gt>>\n"
8846 msgstr ""
8847 "B<#include E<lt>sys/quota.hE<gt>>\n"
8848 "B<#include E<lt>xfs/xqm.hE<gt>>\n"
8849
8850 #. type: Plain text
8851 #: build/C/man2/quotactl.2:37
8852 #, no-wrap
8853 msgid "B<int quotactl(int >I<cmd>B<, const char *>I<special>B<, int >I<id>B<, caddr_t >I<addr>B<);>\n"
8854 msgstr "B<int quotactl(int >I<cmd>B<, const char *>I<special>B<, int >I<id>B<, caddr_t >I<addr>B<);>\n"
8855
8856 #. type: Plain text
8857 #: build/C/man2/quotactl.2:49
8858 #, fuzzy
8859 #| msgid "The quota system defines for each user and/or group a soft limit and a hard limit bounding the amount of disk space that can be used on a given file system.  The hard limit cannot be crossed.  The soft limit can be crossed, but warnings will ensue.  Moreover, the user cannot be above the soft limit for more than one week (by default)  at a time: after this week the soft limit counts as hard limit."
8860 msgid "The quota system can be used to set per-user and per-group limits on the amount of disk space used on a filesystem.  For each user and/or group, a soft limit and a hard limit can be set for each filesystem.  The hard limit can't be exceeded.  The soft limit can be exceeded, but warnings will ensue.  Moreover, the user can't exceed the soft limit for more than one week (by default) at a time; after this time, the soft limit counts as a hard limit."
8861 msgstr "quota システムは、各々のユーザ及び/またはグループに対して、 ソフト・リミット及びハード・リミットを定める。これはあるファイル・システムで 使用する事が出来るディスク容量を制限する。 ハード・リミットは超過することは出来ない。 ソフト・リミットは超過する事が出来るが、警告が発せられる。 更に、(デフォルトでは) 一週間以上ソフト・リミットを超過したままに しておく事はできない: 一週間経過した後はハード・リミットを超過したと みなされる。"
8862
8863 #. type: Plain text
8864 #: build/C/man2/quotactl.2:74
8865 #, fuzzy
8866 #| msgid "The B<quotactl>()  system call manipulates these quota.  Its first argument is of the form B<QCMD(>I<subcmd>B<,>I<type>B<)> where I<type> is either B<USRQUOTA> or B<GRPQUOTA> (for user quota and group quota, respectively), and I<subcmd> is described below."
8867 msgid "The B<quotactl>()  call manipulates disk quotas.  The I<cmd> argument indicates a command to be applied to the user or group ID specified in I<id>.  To initialize the I<cmd> argument, use the I<QCMD(subcmd, type)> macro.  The I<type> value is either B<USRQUOTA>, for user quotas, or B<GRPQUOTA>, for group quotas.  The I<subcmd> value is described below."
8868 msgstr "B<quotactl>()  システムコールはこれらの quota に対する操作を行なう。 最初の引き数は B<QCMD(>I<subcmd>B<,>I<type>B<)> という形式である。 I<type> には、ユーザー quota については B<USRQUOTA> を、グループ quota については B<GRPQUOTA> を指定する。 I<subcmd> は以下で説明する。"
8869
8870 #. type: Plain text
8871 #: build/C/man2/quotactl.2:79
8872 msgid "The I<special> argument is a pointer to a null-terminated string containing the pathname of the (mounted) block special device for the filesystem being manipulated."
8873 msgstr ""
8874
8875 #. type: Plain text
8876 #: build/C/man2/quotactl.2:87
8877 msgid "The I<addr> argument is the address of an optional, command-specific, data structure that is copied in or out of the system.  The interpretation of I<addr> is given with each command below."
8878 msgstr ""
8879
8880 #. type: Plain text
8881 #: build/C/man2/quotactl.2:91
8882 msgid "The I<subcmd> value is one of the following:"
8883 msgstr "I<subcmd> の値は以下のいずれかである"
8884
8885 #. type: TP
8886 #: build/C/man2/quotactl.2:91
8887 #, no-wrap
8888 msgid "B<Q_QUOTAON>"
8889 msgstr "B<Q_QUOTAON>"
8890
8891 #. type: Plain text
8892 #: build/C/man2/quotactl.2:98
8893 msgid "Turn on quotas for a filesystem.  The I<id> argument is the identification number of the quota format to be used.  Currently, there are three supported quota formats:"
8894 msgstr ""
8895
8896 #. type: TP
8897 #: build/C/man2/quotactl.2:99
8898 #, no-wrap
8899 msgid "B<QFMT_VFS_OLD>"
8900 msgstr ""
8901
8902 #. type: Plain text
8903 #: build/C/man2/quotactl.2:102
8904 msgid "The original quota format."
8905 msgstr ""
8906
8907 #. type: TP
8908 #: build/C/man2/quotactl.2:102
8909 #, no-wrap
8910 msgid "B<QFMT_VFS_V0>"
8911 msgstr ""
8912
8913 #. type: Plain text
8914 #: build/C/man2/quotactl.2:106
8915 msgid "The standard VFS v0 quota format, which can handle 32-bit UIDs and GIDs and quota limits up to 2^42 bytes and 2^32 inodes."
8916 msgstr ""
8917
8918 #. type: TP
8919 #: build/C/man2/quotactl.2:106
8920 #, no-wrap
8921 msgid "B<QFMT_VFS_V1>"
8922 msgstr ""
8923
8924 #. type: Plain text
8925 #: build/C/man2/quotactl.2:110
8926 msgid "A quota format that can handle 32-bit UIDs and GIDs and quota limits of 2^64 bytes and 2^64 inodes."
8927 msgstr ""
8928
8929 #. type: Plain text
8930 #: build/C/man2/quotactl.2:121
8931 msgid "The I<addr> argument points to the pathname of a file containing the quotas for the filesystem.  The quota file must exist; it is normally created with the B<quotacheck>(8)  program.  This operation requires privilege (B<CAP_SYS_ADMIN>)."
8932 msgstr ""
8933
8934 #. type: TP
8935 #: build/C/man2/quotactl.2:121
8936 #, no-wrap
8937 msgid "B<Q_QUOTAOFF>"
8938 msgstr "B<Q_QUOTAOFF>"
8939
8940 #. type: Plain text
8941 #: build/C/man2/quotactl.2:131
8942 msgid "Turn off quotas for a filesystem.  The I<addr> and I<id> arguments are ignored.  This operation requires privilege (B<CAP_SYS_ADMIN>)."
8943 msgstr ""
8944
8945 #. type: TP
8946 #: build/C/man2/quotactl.2:131
8947 #, no-wrap
8948 msgid "B<Q_GETQUOTA>"
8949 msgstr "B<Q_GETQUOTA>"
8950
8951 #. type: Plain text
8952 #: build/C/man2/quotactl.2:142
8953 #, fuzzy
8954 #| msgid "Get limits and current usage of disk space.  The I<addr> argument is a pointer to a dqblk structure (defined in I<E<lt>sys/quota.hE<gt>>)."
8955 msgid "Get disk quota limits and current usage for user or group I<id>.  The I<addr> argument is a pointer to a I<dqblk> structure defined in I<E<lt>sys/quota.hE<gt>> as follows:"
8956 msgstr "ディスク使用量の制限値と現在の使用量を得る。 I<addr> 引き数は (I<E<lt>sys/quota.hE<gt>> で定義された) dqblk 構造体を指すポインタである。"
8957
8958 #. type: Plain text
8959 #: build/C/man2/quotactl.2:147 build/C/man2/quotactl.2:234
8960 #, no-wrap
8961 msgid ""
8962 "/* uint64_t is an unsigned 64-bit integer;\n"
8963 "   uint32_t is an unsigned 32-bit integer */\n"
8964 msgstr ""
8965
8966 #. type: Plain text
8967 #: build/C/man2/quotactl.2:167
8968 #, no-wrap
8969 msgid ""
8970 "struct dqblk {          /* Definition since Linux 2.4.22 */\n"
8971 "    uint64_t dqb_bhardlimit;   /* absolute limit on disk\n"
8972 "                                  quota blocks alloc */\n"
8973 "    uint64_t dqb_bsoftlimit;   /* preferred limit on\n"
8974 "                                  disk quota blocks */\n"
8975 "    uint64_t dqb_curspace;     /* current quota block\n"
8976 "                                  count */\n"
8977 "    uint64_t dqb_ihardlimit;   /* maximum number of\n"
8978 "                                  allocated inodes */\n"
8979 "    uint64_t dqb_isoftlimit;   /* preferred inode limit */\n"
8980 "    uint64_t dqb_curinodes;    /* current number of\n"
8981 "                                  allocated inodes */\n"
8982 "    uint64_t dqb_btime;        /* time limit for excessive\n"
8983 "                                  disk use */\n"
8984 "    uint64_t dqb_itime;        /* time limit for excessive\n"
8985 "                                  files */\n"
8986 "    uint32_t dqb_valid;        /* bit mask of QIF_*\n"
8987 "                                  constants */\n"
8988 "};\n"
8989 msgstr ""
8990
8991 #. type: Plain text
8992 #: build/C/man2/quotactl.2:170
8993 #, no-wrap
8994 msgid ""
8995 "/* Flags in dqb_valid that indicate which fields in\n"
8996 "   dqblk structure are valid. */\n"
8997 msgstr ""
8998
8999 #. type: Plain text
9000 #: build/C/man2/quotactl.2:181
9001 #, no-wrap
9002 msgid ""
9003 "#define QIF_BLIMITS   1\n"
9004 "#define QIF_SPACE     2\n"
9005 "#define QIF_ILIMITS   4\n"
9006 "#define QIF_INODES    8\n"
9007 "#define QIF_BTIME     16\n"
9008 "#define QIF_ITIME     32\n"
9009 "#define QIF_LIMITS    (QIF_BLIMITS | QIF_ILIMITS)\n"
9010 "#define QIF_USAGE     (QIF_SPACE | QIF_INODES)\n"
9011 "#define QIF_TIMES     (QIF_BTIME | QIF_ITIME)\n"
9012 "#define QIF_ALL       (QIF_LIMITS | QIF_USAGE | QIF_TIMES)\n"
9013 msgstr ""
9014
9015 #. type: Plain text
9016 #: build/C/man2/quotactl.2:198
9017 msgid "The I<dqb_valid> field is a bit mask that is set to indicate the entries in the I<dqblk> structure that are valid.  Currently, the kernel fills in all entries of the I<dqblk> structure and marks them as valid in the I<dqb_valid> field.  Unprivileged users may retrieve only their own quotas; a privileged user (B<CAP_SYS_ADMIN>)  can retrieve the quotas of any user."
9018 msgstr ""
9019
9020 #. type: TP
9021 #: build/C/man2/quotactl.2:198
9022 #, no-wrap
9023 msgid "B<Q_SETQUOTA>"
9024 msgstr "B<Q_SETQUOTA>"
9025
9026 #. type: Plain text
9027 #: build/C/man2/quotactl.2:218
9028 msgid "Set quota information for user or group I<id>, using the information supplied in the I<dqblk> structure pointed to by I<addr>.  The I<dqb_valid> field of the I<dqblk> structure indicates which entries in the structure have been set by the caller.  This operation supersedes the B<Q_SETQLIM> and B<Q_SETUSE> operations in the previous quota interfaces.  This operation requires privilege (B<CAP_SYS_ADMIN>)."
9029 msgstr ""
9030
9031 #. type: TP
9032 #: build/C/man2/quotactl.2:218
9033 #, no-wrap
9034 msgid "B<Q_GETINFO>"
9035 msgstr "B<Q_GETINFO>"
9036
9037 #. type: Plain text
9038 #: build/C/man2/quotactl.2:229
9039 #, fuzzy
9040 #| msgid "Get limits and current usage of disk space.  The I<addr> argument is a pointer to a dqblk structure (defined in I<E<lt>sys/quota.hE<gt>>)."
9041 msgid "Get information (like grace times) about quotafile.  The I<addr> argument should be a pointer to a I<dqinfo> structure.  This structure is defined in I<E<lt>sys/quota.hE<gt>> as follows:"
9042 msgstr "ディスク使用量の制限値と現在の使用量を得る。 I<addr> 引き数は (I<E<lt>sys/quota.hE<gt>> で定義された) dqblk 構造体を指すポインタである。"
9043
9044 #. type: Plain text
9045 #: build/C/man2/quotactl.2:238
9046 #, no-wrap
9047 msgid ""
9048 "struct dqinfo {         /* Defined since kernel 2.4.22 */\n"
9049 "    uint64_t dqi_bgrace;    /* Time before block soft limit\n"
9050 "                               becomes hard limit */\n"
9051 msgstr ""
9052 "struct dqinfo {         /* Defined since kernel 2.4.22 */\n"
9053 "    uint64_t dqi_bgrace;    /* Time before block soft limit\n"
9054 "                               becomes hard limit */\n"
9055
9056 #. type: Plain text
9057 #: build/C/man2/quotactl.2:245
9058 #, no-wrap
9059 msgid ""
9060 "    uint64_t dqi_igrace;    /* Time before inode soft limit\n"
9061 "                               becomes hard limit */\n"
9062 "    uint32_t dqi_flags;     /* Flags for quotafile\n"
9063 "                               (DQF_*) */\n"
9064 "    uint32_t dqi_valid;\n"
9065 "};\n"
9066 msgstr ""
9067 "    uint64_t dqi_igrace;    /* Time before inode soft limit\n"
9068 "                               becomes hard limit */\n"
9069 "    uint32_t dqi_flags;     /* Flags for quotafile\n"
9070 "                               (DQF_*) */\n"
9071 "    uint32_t dqi_valid;\n"
9072 "};\n"
9073
9074 #. type: Plain text
9075 #: build/C/man2/quotactl.2:247
9076 #, no-wrap
9077 msgid "/* Bits for dqi_flags */\n"
9078 msgstr "/* Bits for dqi_flags */\n"
9079
9080 #. type: Plain text
9081 #: build/C/man2/quotactl.2:249
9082 #, no-wrap
9083 msgid "/* Quota format QFMT_VFS_OLD */\n"
9084 msgstr "/* Quota format QFMT_VFS_OLD */\n"
9085
9086 #. type: Plain text
9087 #: build/C/man2/quotactl.2:251
9088 #, no-wrap
9089 msgid "#define V1_DQF_RSQUASH\t1   /* Root squash enabled */\n"
9090 msgstr "#define V1_DQF_RSQUASH\t1   /* Root squash enabled */\n"
9091
9092 #. type: Plain text
9093 #: build/C/man2/quotactl.2:253
9094 #, no-wrap
9095 msgid "/* Other quota formats have no dqi_flags bits defined */\n"
9096 msgstr "/* Other quota formats have no dqi_flags bits defined */\n"
9097
9098 #. type: Plain text
9099 #: build/C/man2/quotactl.2:256
9100 #, no-wrap
9101 msgid ""
9102 "/* Flags in dqi_valid that indicate which fields in\n"
9103 "   dqinfo structure are valid. */\n"
9104 msgstr ""
9105 "/* Flags in dqi_valid that indicate which fields in\n"
9106 "   dqinfo structure are valid. */\n"
9107
9108 #. type: Plain text
9109 #: build/C/man2/quotactl.2:261
9110 #, no-wrap
9111 msgid ""
9112 "# define IIF_BGRACE\t1\n"
9113 "# define IIF_IGRACE\t2\n"
9114 "# define IIF_FLAGS\t4\n"
9115 "# define IIF_ALL        (IIF_BGRACE | IIF_IGRACE | IIF_FLAGS)\n"
9116 msgstr ""
9117 "# define IIF_BGRACE\t1\n"
9118 "# define IIF_IGRACE\t2\n"
9119 "# define IIF_FLAGS\t4\n"
9120 "# define IIF_ALL        (IIF_BGRACE | IIF_IGRACE | IIF_FLAGS)\n"
9121
9122 #. type: Plain text
9123 #: build/C/man2/quotactl.2:277
9124 msgid "The I<dqi_valid> field in the I<dqinfo> structure indicates the entries in the structure that are valid.  Currently, the kernel fills in all entries of the I<dqinfo> structure and marks them all as valid in the I<dqi_valid> field.  The I<id> argument is ignored."
9125 msgstr ""
9126
9127 #. type: TP
9128 #: build/C/man2/quotactl.2:277
9129 #, no-wrap
9130 msgid "B<Q_SETINFO>"
9131 msgstr "B<Q_SETINFO>"
9132
9133 #. type: Plain text
9134 #: build/C/man2/quotactl.2:301
9135 msgid "Set information about quotafile.  The I<addr> argument should be a pointer to a I<dqinfo> structure.  The I<dqi_valid> field of the I<dqinfo> structure indicates the entries in the structure that have been set by the caller.  This operation supersedes the B<Q_SETGRACE> and B<Q_SETFLAGS> operations in the previous quota interfaces.  The I<id> argument is ignored.  This operation requires privilege (B<CAP_SYS_ADMIN>)."
9136 msgstr ""
9137
9138 #. type: TP
9139 #: build/C/man2/quotactl.2:301
9140 #, no-wrap
9141 msgid "B<Q_GETFMT>"
9142 msgstr "B<Q_GETFMT>"
9143
9144 #. type: Plain text
9145 #: build/C/man2/quotactl.2:308
9146 msgid "Get quota format used on the specified filesystem.  The I<addr> argument should be a pointer to a 4-byte buffer where the format number will be stored."
9147 msgstr ""
9148
9149 #. type: TP
9150 #: build/C/man2/quotactl.2:308
9151 #, no-wrap
9152 msgid "B<Q_SYNC>"
9153 msgstr "B<Q_SYNC>"
9154
9155 #. type: Plain text
9156 #: build/C/man2/quotactl.2:319
9157 msgid "Update the on-disk copy of quota usages for a filesystem.  If I<special> is NULL, then all filesystems with active quotas are sync'ed.  The I<addr> and I<id> arguments are ignored."
9158 msgstr ""
9159
9160 #. type: TP
9161 #: build/C/man2/quotactl.2:319
9162 #, no-wrap
9163 msgid "B<Q_GETSTATS>"
9164 msgstr "B<Q_GETSTATS>"
9165
9166 #.  Q_GETSTATS was removed in kernel 2.4.22.
9167 #. type: Plain text
9168 #: build/C/man2/quotactl.2:339
9169 msgid "Get statistics and other generic information about the quota subsystem.  The I<addr> argument should be a pointer to a I<dqstats> structure in which data should be stored.  This structure is defined in I<E<lt>sys/quota.hE<gt>>.  The I<special> and I<id> arguments are ignored.  This operation is obsolete and not supported by recent kernels.  Files in I</proc/sys/fs/quota/> carry the information instead."
9170 msgstr ""
9171
9172 #. type: Plain text
9173 #: build/C/man2/quotactl.2:342
9174 msgid "For XFS filesystems making use of the XFS Quota Manager (XQM), the above commands are bypassed and the following commands are used:"
9175 msgstr ""
9176
9177 #. type: TP
9178 #: build/C/man2/quotactl.2:342
9179 #, no-wrap
9180 msgid "B<Q_XQUOTAON>"
9181 msgstr "B<Q_XQUOTAON>"
9182
9183 #. type: Plain text
9184 #: build/C/man2/quotactl.2:363
9185 msgid "Turn on quotas for an XFS filesystem.  XFS provides the ability to turn on/off quota limit enforcement with quota accounting.  Therefore, XFS expects I<addr> to be a pointer to an I<unsigned int> that contains either the flags B<XFS_QUOTA_UDQ_ACCT> and/or B<XFS_QUOTA_UDQ_ENFD> (for user quota), or B<XFS_QUOTA_GDQ_ACCT> and/or B<XFS_QUOTA_GDQ_ENFD> (for group quota), as defined in I<E<lt>xfs/xqm.hE<gt>>.  This operation requires privilege (B<CAP_SYS_ADMIN>)."
9186 msgstr ""
9187
9188 #. type: TP
9189 #: build/C/man2/quotactl.2:363
9190 #, no-wrap
9191 msgid "B<Q_XQUOTAOFF>"
9192 msgstr "B<Q_XQUOTAOFF>"
9193
9194 #. type: Plain text
9195 #: build/C/man2/quotactl.2:374
9196 msgid "Turn off quotas for an XFS filesystem.  As with B<Q_QUOTAON>, XFS filesystems expect a pointer to an I<unsigned int> that specifies whether quota accounting and/or limit enforcement need to be turned off.  This operation requires privilege (B<CAP_SYS_ADMIN>)."
9197 msgstr ""
9198
9199 #. type: TP
9200 #: build/C/man2/quotactl.2:374
9201 #, no-wrap
9202 msgid "B<Q_XGETQUOTA>"
9203 msgstr "B<Q_XGETQUOTA>"
9204
9205 #. type: Plain text
9206 #: build/C/man2/quotactl.2:388
9207 msgid "Get disk quota limits and current usage for user I<id>.  The I<addr> argument is a pointer to an I<fs_disk_quota> structure (defined in I<E<lt>xfs/xqm.hE<gt>>).  Unprivileged users may retrieve only their own quotas; a privileged user (B<CAP_SYS_ADMIN>)  may retrieve the quotas of any user."
9208 msgstr ""
9209
9210 #. type: TP
9211 #: build/C/man2/quotactl.2:388
9212 #, no-wrap
9213 msgid "B<Q_XSETQLIM>"
9214 msgstr "B<Q_XSETQLIM>"
9215
9216 #. type: Plain text
9217 #: build/C/man2/quotactl.2:400
9218 msgid "Set disk quota limits for user I<id>.  The I<addr> argument is a pointer to an I<fs_disk_quota> structure (defined in I<E<lt>xfs/xqm.hE<gt>>).  This operation requires privilege (B<CAP_SYS_ADMIN>)."
9219 msgstr ""
9220
9221 #. type: TP
9222 #: build/C/man2/quotactl.2:400
9223 #, no-wrap
9224 msgid "B<Q_XGETQSTAT>"
9225 msgstr "B<Q_XGETQSTAT>"
9226
9227 #. type: Plain text
9228 #: build/C/man2/quotactl.2:408
9229 msgid "Returns an I<fs_quota_stat> structure containing XFS filesystem-specific quota information.  This is useful for finding out how much space is used to store quota information, and also to get quotaon/off status of a given local XFS filesystem."
9230 msgstr ""
9231
9232 #. type: TP
9233 #: build/C/man2/quotactl.2:408
9234 #, no-wrap
9235 msgid "B<Q_XQUOTARM>"
9236 msgstr "B<Q_XQUOTARM>"
9237
9238 #. type: Plain text
9239 #: build/C/man2/quotactl.2:412
9240 msgid "Free the disk space taken by disk quotas.  Quotas must have already been turned off."
9241 msgstr ""
9242
9243 #. type: Plain text
9244 #: build/C/man2/quotactl.2:419
9245 msgid "There is no command equivalent to B<Q_SYNC> for XFS since B<sync>(1)  writes quota information to disk (in addition to the other filesystem metadata that it writes out)."
9246 msgstr ""
9247
9248 #. type: Plain text
9249 #: build/C/man2/quotactl.2:427
9250 msgid "On success, B<quotactl>()  returns 0; on error -1 is returned, and I<errno> is set to indicate the error."
9251 msgstr ""
9252 "成功すると、 B<quotactl>()  は 0 を返す。\n"
9253 "エラーの場合、-1 を返し、 I<errno> をエラーを示す値に設定する。"
9254
9255 #. type: Plain text
9256 #: build/C/man2/quotactl.2:434
9257 msgid "I<addr> or I<special> is invalid."
9258 msgstr ""
9259
9260 #. type: Plain text
9261 #: build/C/man2/quotactl.2:440
9262 msgid "I<cmd> or I<type> is invalid."
9263 msgstr ""
9264
9265 #. type: Plain text
9266 #: build/C/man2/quotactl.2:447
9267 msgid "The file specified by I<special> or I<addr> does not exist."
9268 msgstr ""
9269
9270 #. type: Plain text
9271 #: build/C/man2/quotactl.2:452
9272 msgid "The kernel has not been compiled with the B<CONFIG_QUOTA> option."
9273 msgstr ""
9274
9275 #. type: TP
9276 #: build/C/man2/quotactl.2:452
9277 #, no-wrap
9278 msgid "B<ENOTBLK>"
9279 msgstr "B<ENOTBLK>"
9280
9281 #. type: Plain text
9282 #: build/C/man2/quotactl.2:456
9283 msgid "I<special> is not a block device."
9284 msgstr "I<special> がブロックデバイスではない。"
9285
9286 #. type: Plain text
9287 #: build/C/man2/quotactl.2:461
9288 msgid "The caller lacked the required privilege (B<CAP_SYS_ADMIN>)  for the specified operation."
9289 msgstr ""
9290
9291 #. type: Plain text
9292 #: build/C/man2/quotactl.2:465
9293 msgid "No disk quota is found for the indicated user.  Quotas have not been turned on for this filesystem."
9294 msgstr ""
9295
9296 #. type: Plain text
9297 #: build/C/man2/quotactl.2:474
9298 msgid "If I<cmd> is B<Q_SETQUOTA>, B<quotactl>()  may also set I<errno> to:"
9299 msgstr ""
9300
9301 #. type: Plain text
9302 #: build/C/man2/quotactl.2:477
9303 msgid "Specified limits are out of range allowed by quota format."
9304 msgstr ""
9305
9306 #. type: Plain text
9307 #: build/C/man2/quotactl.2:486
9308 msgid "If I<cmd> is B<Q_QUOTAON>, B<quotactl>()  may also set I<errno> to:"
9309 msgstr ""
9310
9311 #. type: Plain text
9312 #: build/C/man2/quotactl.2:495
9313 msgid "The quota file pointed to by I<addr> exists, but is not a regular file; or, the quota file pointed to by I<addr> exists, but is not on the filesystem pointed to by I<special>."
9314 msgstr ""
9315
9316 #. type: Plain text
9317 #: build/C/man2/quotactl.2:501
9318 msgid "B<Q_QUOTAON> attempted, but another B<Q_QUOTAON> had already been performed."
9319 msgstr ""
9320
9321 #. type: Plain text
9322 #: build/C/man2/quotactl.2:504
9323 msgid "The quota file is corrupted."
9324 msgstr "quota ファイルが壊れている。"
9325
9326 #. type: Plain text
9327 #: build/C/man2/quotactl.2:507
9328 msgid "Specified quota format was not found."
9329 msgstr ""
9330
9331 #. type: Plain text
9332 #: build/C/man2/quotactl.2:512
9333 msgid "B<quota>(1), B<getrlimit>(2), B<quotacheck>(8), B<quotaon>(8)"
9334 msgstr "B<quota>(1), B<getrlimit>(2), B<quotacheck>(8), B<quotaon>(8)"
9335
9336 #. type: TH
9337 #: build/C/man2/sendfile.2:19
9338 #, no-wrap
9339 msgid "SENDFILE"
9340 msgstr "SENDFILE"
9341
9342 #. type: TH
9343 #: build/C/man2/sendfile.2:19
9344 #, no-wrap
9345 msgid "2011-09-14"
9346 msgstr "2011-09-14"
9347
9348 #. type: Plain text
9349 #: build/C/man2/sendfile.2:22
9350 msgid "sendfile - transfer data between file descriptors"
9351 msgstr "sendfile - ファイル・ディスクリプタ間でデータを転送する"
9352
9353 #. type: Plain text
9354 #: build/C/man2/sendfile.2:24
9355 msgid "B<#include E<lt>sys/sendfile.hE<gt>>"
9356 msgstr "B<#include E<lt>sys/sendfile.hE<gt>>"
9357
9358 #.  The below is too ugly. Comments about glibc versions belong
9359 #.  in the notes, not in the header.
9360 #.  .B #include <features.h>
9361 #.  .br
9362 #.  .B #if (__GLIBC__==2 && __GLIBC_MINOR__>=1) || __GLIBC__>2
9363 #.  .br
9364 #.  .B #include <sys/sendfile.h>
9365 #.  .br
9366 #.  #else
9367 #.  .br
9368 #.  .B #include <sys/types.h>
9369 #.  .br
9370 #.  .B /* No system prototype before glibc 2.1. */
9371 #.  .br
9372 #.  .BI "ssize_t sendfile(int" " out_fd" ", int" " in_fd" ", off_t *" #.                        offset ", size_t" " count" )
9373 #.  .br
9374 #.  .B #endif
9375 #. type: Plain text
9376 #: build/C/man2/sendfile.2:47
9377 msgid "B<ssize_t sendfile(int>I< out_fd>B<, int>I< in_fd>B<, off_t *>I<offset>B<, size_t>I< count>B<);>"
9378 msgstr "B<ssize_t sendfile(int>I< out_fd>B<, int>I< in_fd>B<, off_t *>I<offset>B<, size_t>I< count>B<);>"
9379
9380 #. type: Plain text
9381 #: build/C/man2/sendfile.2:57
9382 msgid "B<sendfile>()  copies data between one file descriptor and another.  Because this copying is done within the kernel, B<sendfile>()  is more efficient than the combination of B<read>(2)  and B<write>(2), which would require transferring data to and from user space."
9383 msgstr "B<sendfile>()  は、あるファイル・ディスクリプタから別の ファイル・ディスクリプタへのデータのコピーを行う。 このコピーはカーネル内で行われるので、 B<sendfile>()  は、 B<read>(2)  と B<write>(2)  を組み合わせるよりも効率がよい。 B<read>(2)  や B<write>(2)  ではユーザ空間との間でデータの転送が必要となるからである。"
9384
9385 #. type: Plain text
9386 #: build/C/man2/sendfile.2:62
9387 msgid "I<in_fd> should be a file descriptor opened for reading and I<out_fd> should be a descriptor opened for writing."
9388 msgstr "I<in_fd> は読み込みのためにオープンされたファイル・ディスクリプタ、 I<out_fd> は書き込みのためにオープンされたディスクリプタでなければならない。"
9389
9390 #. type: Plain text
9391 #: build/C/man2/sendfile.2:83
9392 msgid "If I<offset> is not NULL, then it points to a variable holding the file offset from which B<sendfile>()  will start reading data from I<in_fd>.  When B<sendfile>()  returns, this variable will be set to the offset of the byte following the last byte that was read.  If I<offset> is not NULL, then B<sendfile>()  does not modify the current file offset of I<in_fd>; otherwise the current file offset is adjusted to reflect the number of bytes read from I<in_fd>."
9393 msgstr "I<offset> が NULL でない場合、 I<offset> は B<sendfile>()  が I<in_fd> のどこからデータを読み始めるかを示すファイル・オフセットを保持する変数への ポインタである。 B<sendfile>()  は復帰する時、この変数に最後に読み込んだバイトの 次のバイトのオフセットを書き込む。 I<offset> が NULL でない場合、 B<sendfile>()  は I<in_fd> のファイル・オフセットの現在値を変更しない。 NULL の場合は、ファイル・オフセットの現在値を I<in_fd> から読み込んだバイト数を反映した位置に調整する。"
9394
9395 #. type: Plain text
9396 #: build/C/man2/sendfile.2:90
9397 msgid "If I<offset> is NULL, then data will be read from I<in_fd> starting at the current file offset, and the file offset will be updated by the call."
9398 msgstr "I<offset> が NULL の場合、データは I<in_fd> の現在のファイル・オフセットから読み出され、 ファイル・オフセットはこの呼び出しで更新される。"
9399
9400 #. type: Plain text
9401 #: build/C/man2/sendfile.2:93
9402 msgid "I<count> is the number of bytes to copy between the file descriptors."
9403 msgstr "I<count> は、ファイル・ディスクリプタ間でコピーするバイト数である。"
9404
9405 #. type: Plain text
9406 #: build/C/man2/sendfile.2:100
9407 msgid "The I<in_fd> argument must correspond to a file which supports B<mmap>(2)-like operations (i.e., it cannot be a socket)."
9408 msgstr ""
9409 "I<in_fd> 引き数は B<mmap>(2) 風の操作ができるファイルを指していなければならな\n"
9410 "い (ソケットを指定することはできない)。"
9411
9412 #. type: Plain text
9413 #: build/C/man2/sendfile.2:108
9414 msgid "In Linux kernels before 2.6.33, I<out_fd> must refer to a socket.  Since Linux 2.6.33 it can be any file.  If it is a regular file, then B<sendfile>()  changes the file offset appropriately."
9415 msgstr ""
9416 "2.6.33 より前の Linux カーネルでは I<out_fd> はソケットを参照していなければな\n"
9417 "らない。Linux 2.6.33 以降では、任意のファイルを参照することができる。\n"
9418 "通常のファイルの場合には B<sendfile>() はファイルオフセットを適切に変更する。"
9419
9420 #. type: Plain text
9421 #: build/C/man2/sendfile.2:115
9422 msgid "If the transfer was successful, the number of bytes written to I<out_fd> is returned.  On error, -1 is returned, and I<errno> is set appropriately."
9423 msgstr "転送に成功した場合、 I<out_fd> に書き込まれたバイト数を返す。エラーの場合、-1 を返し、 I<errno> に適切な値を設定する。"
9424
9425 #. type: Plain text
9426 #: build/C/man2/sendfile.2:121
9427 msgid "Nonblocking I/O has been selected using B<O_NONBLOCK> and the write would block."
9428 msgstr "B<O_NONBLOCK> を用いて非ブロック I/O が選択されたが、書き込みがブロックされた。"
9429
9430 #. type: Plain text
9431 #: build/C/man2/sendfile.2:125
9432 msgid "The input file was not opened for reading or the output file was not opened for writing."
9433 msgstr "入力ファイルが読み込みのためにオープンされていないか、 出力ファイルが書き込みのためにオープンされていない。"
9434
9435 #. type: Plain text
9436 #: build/C/man2/sendfile.2:128
9437 msgid "Bad address."
9438 msgstr "アドレスがおかしい。"
9439
9440 #. type: Plain text
9441 #: build/C/man2/sendfile.2:134
9442 msgid "Descriptor is not valid or locked, or an B<mmap>(2)-like operation is not available for I<in_fd>."
9443 msgstr "ディスクリプタが有効でないか、ロックされている。もしくは B<mmap>(2)  風の操作が I<in_fd> では利用できない。"
9444
9445 #. type: Plain text
9446 #: build/C/man2/sendfile.2:138
9447 msgid "Unspecified error while reading from I<in_fd>."
9448 msgstr "I<in_fd> から読み込んでいるうちに予期しないエラーが起こった。"
9449
9450 #. type: Plain text
9451 #: build/C/man2/sendfile.2:142
9452 msgid "Insufficient memory to read from I<in_fd>."
9453 msgstr "I<in_fd> から読み込むための十分なメモリがない。"
9454
9455 #. type: Plain text
9456 #: build/C/man2/sendfile.2:148
9457 msgid "B<sendfile>()  is a new feature in Linux 2.2.  The include file I<E<lt>sys/sendfile.hE<gt>> is present since glibc 2.1."
9458 msgstr "B<sendfile> は Linux 2.2 の新しい機能である。 インクルードファイル I<E<lt>sys/sendfile.hE<gt>> は glibc 2.1 から存在している。"
9459
9460 #. type: Plain text
9461 #: build/C/man2/sendfile.2:150
9462 msgid "Not specified in POSIX.1-2001, or other standards."
9463 msgstr "POSIX.1-2001 や他の標準では規定されていない。"
9464
9465 #. type: Plain text
9466 #: build/C/man2/sendfile.2:155
9467 msgid "Other UNIX systems implement B<sendfile>()  with different semantics and prototypes.  It should not be used in portable programs."
9468 msgstr "他の UNIX システムでは、異なった方式やプロトタイプで B<sendfile>()  を実装している。移植性を考慮したプログラムでは使用すべきではない。"
9469
9470 #. type: Plain text
9471 #: build/C/man2/sendfile.2:165
9472 msgid "If you plan to use B<sendfile>()  for sending files to a TCP socket, but need to send some header data in front of the file contents, you will find it useful to employ the B<TCP_CORK> option, described in B<tcp>(7), to minimize the number of packets and to tune performance."
9473 msgstr "B<sendfile>()  を使って TCP ソケットにファイルを送ろうとしていて、 ファイルの内容の前にヘッダ・データを付け加える必要がある場合は、 パケット数を最小にして性能を上げるために B<tcp>(7)  に記述されている B<TCP_CORK> オプションを使うといいだろう。"
9474
9475 #. type: Plain text
9476 #: build/C/man2/sendfile.2:171
9477 msgid "In Linux 2.4 and earlier, I<out_fd> could also refer to a regular file, and B<sendfile>()  changed the current offset of that file."
9478 msgstr ""
9479 "Linux 2.4 とそれ以前のバージョンでも、 I<out_fd> は通常のファイルを参照でき、\n"
9480 "B<sendfile>() はそのファイルのオフセットの現在値を変更していた。"
9481
9482 #. type: Plain text
9483 #: build/C/man2/sendfile.2:183
9484 msgid "The original Linux B<sendfile>()  system call was not designed to handle large file offsets.  Consequently, Linux 2.4 added B<sendfile64>(), with a wider type for the I<offset> argument.  The glibc B<sendfile>()  wrapper function transparently deals with the kernel differences."
9485 msgstr ""
9486 "元々の Linux B<sendfile>() システムコールは大きなファイルオフセットを\n"
9487 "扱えるように設計されていなかった。その結果、Linux 2.4 で、\n"
9488 "ビット幅の大きな I<offset> 引き数を持った B<sendfile64>() が追加された。\n"
9489 "glibc の B<sendfile>() のラッパー関数はカーネルによるこの違いを吸収している。"
9490
9491 #. type: Plain text
9492 #: build/C/man2/sendfile.2:192
9493 msgid "Applications may wish to fall back to B<read>(2)/B<write>(2)  in the case where B<sendfile>()  fails with B<EINVAL> or B<ENOSYS>."
9494 msgstr "B<sendfile>()  が B<EINVAL> や B<ENOSYS> で失敗するような場合は、 アプリケーションは B<read>(2)/B<write>(2)  に戻すことを考えてもよいかもしれない。"
9495
9496 #. type: Plain text
9497 #: build/C/man2/sendfile.2:197
9498 msgid "The Linux-specific B<splice>(2)  call supports transferring data between arbitrary files (e.g., a pair of sockets)."
9499 msgstr ""
9500 "Linux 固有の B<splice>(2) システムコールは、任意のファイル間 (例えば、\n"
9501 "ソケット同士) でのデータ転送をサポートしている。"
9502
9503 #. type: Plain text
9504 #: build/C/man2/sendfile.2:202
9505 msgid "B<mmap>(2), B<open>(2), B<socket>(2), B<splice>(2)"
9506 msgstr "B<mmap>(2), B<open>(2), B<socket>(2), B<splice>(2)"
9507
9508 #. type: TH
9509 #: build/C/man2/set_tid_address.2:25
9510 #, no-wrap
9511 msgid "SET_TID_ADDRESS"
9512 msgstr "SET_TID_ADDRESS"
9513
9514 #. type: TH
9515 #: build/C/man2/set_tid_address.2:25
9516 #, no-wrap
9517 msgid "2014-07-08"
9518 msgstr "2014-07-08"
9519
9520 #. type: Plain text
9521 #: build/C/man2/set_tid_address.2:28
9522 msgid "set_tid_address - set pointer to thread ID"
9523 msgstr "set_tid_address - スレッド ID へのポインタを設定する"
9524
9525 #. type: Plain text
9526 #: build/C/man2/set_tid_address.2:31
9527 #, no-wrap
9528 msgid "B<#include E<lt>linux/unistd.hE<gt>>\n"
9529 msgstr "B<#include E<lt>linux/unistd.hE<gt>>\n"
9530
9531 #. type: Plain text
9532 #: build/C/man2/set_tid_address.2:33
9533 #, no-wrap
9534 msgid "B<long set_tid_address(int *>I<tidptr>B<);>\n"
9535 msgstr "B<long set_tid_address(int *>I<tidptr>B<);>\n"
9536
9537 #. type: Plain text
9538 #: build/C/man2/set_tid_address.2:40
9539 msgid "For each thread, the kernel maintains two attributes (addresses) called I<set_child_tid> and I<clear_child_tid>.  These two attributes contain the value NULL by default."
9540 msgstr "各スレッドについて、カーネルは I<set_child_tid> と I<clear_child_tid> という 2 つの属性を保持する。この 2 つの属性はデフォルトでは NULL である。"
9541
9542 #. type: TP
9543 #: build/C/man2/set_tid_address.2:40
9544 #, no-wrap
9545 msgid "I<set_child_tid>"
9546 msgstr "I<set_child_tid>"
9547
9548 #. type: Plain text
9549 #: build/C/man2/set_tid_address.2:51
9550 msgid "If a thread is started using B<clone>(2)  with the B<CLONE_CHILD_SETTID> flag, I<set_child_tid> is set to the value passed in the I<ctid> argument of that system call."
9551 msgstr "スレッドが B<CLONE_CHILD_SETTID> フラグを指定した B<clone>(2)  によって開始された場合、 I<set_child_tid> は B<clone>(2) のシステムコールの I<ctid> 引き数で渡された値に設定される。"
9552
9553 #. type: Plain text
9554 #: build/C/man2/set_tid_address.2:56
9555 msgid "When I<set_child_tid> is set, the very first thing the new thread does is to write its thread ID at this address."
9556 msgstr "I<set_child_tid> が設定された場合、一番最初に新しいスレッドが行うことは、 このアドレスに自身のスレッド ID を書き込むことである。"
9557
9558 #. type: TP
9559 #: build/C/man2/set_tid_address.2:56
9560 #, no-wrap
9561 msgid "I<clear_child_tid>"
9562 msgstr "I<clear_child_tid>"
9563
9564 #. type: Plain text
9565 #: build/C/man2/set_tid_address.2:67
9566 msgid "If a thread is started using B<clone>(2)  with the B<CLONE_CHILD_CLEARTID> flag, I<clear_child_tid> is set to the value passed in the I<ctid> argument of that system call."
9567 msgstr "スレッドが B<CLONE_CHILD_CLEARTID> フラグを指定した B<clone>(2) によって開始された場合、 I<clear_child_tid> は B<clone>(2) のシステムコールの I<ctid> 引き数で渡された値に設定される。"
9568
9569 #. type: Plain text
9570 #: build/C/man2/set_tid_address.2:74
9571 msgid "The system call B<set_tid_address>()  sets the I<clear_child_tid> value for the calling thread to I<tidptr>."
9572 msgstr "システムコール B<set_tid_address>()  は呼び出し元スレッドの I<clear_child_tid> の値を I<tidptr> に設定する。"
9573
9574 #. type: Plain text
9575 #: build/C/man2/set_tid_address.2:82
9576 msgid "When a thread whose I<clear_child_tid> is not NULL terminates, then, if the thread is sharing memory with other threads, then 0 is written at the address specified in I<clear_child_tid> and the kernel performs the following operation:"
9577 msgstr "I<clear_child_tid> が NULL でないスレッドが終了すると、そのスレッドが他のスレッドとメモリを共有していれば、 I<clear_child_tid> で指定されたアドレスに 0 が書き込まれ、カーネルは以下の処理を実行する。"
9578
9579 #. type: Plain text
9580 #: build/C/man2/set_tid_address.2:84
9581 #, no-wrap
9582 msgid "    futex(clear_child_tid, FUTEX_WAKE, 1, NULL, NULL, 0);\n"
9583 msgstr "    futex(clear_child_tid, FUTEX_WAKE, 1, NULL, NULL, 0);\n"
9584
9585 #. type: Plain text
9586 #: build/C/man2/set_tid_address.2:88
9587 msgid "The effect of this operation is to wake a single thread that is performing a futex wait on the memory location.  Errors from the futex wake operation are ignored."
9588 msgstr "この処理の結果、このメモリアドレスに対する futex wait を実行しているスレッドを一つ起こす (wake)。 futex wake 操作でのエラーは無視される。"
9589
9590 #. type: Plain text
9591 #: build/C/man2/set_tid_address.2:91
9592 msgid "B<set_tid_address>()  always returns the caller's thread ID."
9593 msgstr "B<set_tid_address>()  は常に呼び出し元のスレッド ID を返す。"
9594
9595 #. type: Plain text
9596 #: build/C/man2/set_tid_address.2:94
9597 msgid "B<set_tid_address>()  always succeeds."
9598 msgstr "B<set_tid_address>()  は常に成功する。"
9599
9600 #. type: Plain text
9601 #: build/C/man2/set_tid_address.2:97
9602 msgid "This call is present since Linux 2.5.48.  Details as given here are valid since Linux 2.5.49."
9603 msgstr "この呼び出しは Linux 2.5.48 以降で存在する。 ここで書かれた詳細は Linux 2.5.49 以降で有効である。"
9604
9605 #. type: Plain text
9606 #: build/C/man2/set_tid_address.2:103
9607 msgid "B<clone>(2), B<futex>(2), B<gettid>(2)"
9608 msgstr "B<clone>(2), B<futex>(2), B<gettid>(2)"
9609
9610 #. type: TH
9611 #: build/C/man2/splice.2:26
9612 #, no-wrap
9613 msgid "SPLICE"
9614 msgstr "SPLICE"
9615
9616 #. type: TH
9617 #: build/C/man2/splice.2:26 build/C/man2/tee.2:26
9618 #, no-wrap
9619 msgid "2014-12-31"
9620 msgstr "2014-12-31"
9621
9622 #. type: Plain text
9623 #: build/C/man2/splice.2:29
9624 msgid "splice - splice data to/from a pipe"
9625 msgstr "splice - パイプとの間でデータを継ぎ合わせる"
9626
9627 #. type: Plain text
9628 #: build/C/man2/splice.2:33 build/C/man2/tee.2:33
9629 #, no-wrap
9630 msgid ""
9631 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
9632 "B<#include E<lt>fcntl.hE<gt>>\n"
9633 msgstr ""
9634 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
9635 "B<#include E<lt>fcntl.hE<gt>>\n"
9636
9637 #.  Return type was long before glibc 2.7
9638 #. type: Plain text
9639 #: build/C/man2/splice.2:38
9640 #, no-wrap
9641 msgid ""
9642 "B<ssize_t splice(int >I<fd_in>B<, loff_t *>I<off_in>B<, int >I<fd_out>B<,>\n"
9643 "B<               loff_t *>I<off_out>B<, size_t >I<len>B<, unsigned int >I<flags>B<);>\n"
9644 msgstr ""
9645 "B<ssize_t splice(int >I<fd_in>B<, loff_t *>I<off_in>B<, int >I<fd_out>B<,>\n"
9646 "B<               loff_t *>I<off_out>B<, size_t >I<len>B<, unsigned int >I<flags>B<);>\n"
9647
9648 #. type: Plain text
9649 #: build/C/man2/splice.2:50
9650 msgid "B<splice>()  moves data between two file descriptors without copying between kernel address space and user address space.  It transfers up to I<len> bytes of data from the file descriptor I<fd_in> to the file descriptor I<fd_out>, where one of the descriptors must refer to a pipe."
9651 msgstr "B<splice>()  は、カーネルアドレス空間とユーザアドレス空間との間のコピーを伴わずに、 2 つのファイルディスクリプタ間でデータの移動を行う。 ファイルディスクリプタ I<fd_in> からファイルディスクリプタ I<fd_out> へ最大 I<len> バイトを転送する。 2 つのファイルディスクリプタのうち一つは パイプを参照していなければならない。"
9652
9653 #. type: Plain text
9654 #: build/C/man2/splice.2:55
9655 msgid "The following semantics apply for I<fd_in> and I<off_in>:"
9656 msgstr "I<fd_in> と I<off_in> には以下のルールが適用される。"
9657
9658 #. type: Plain text
9659 #: build/C/man2/splice.2:61
9660 msgid "If I<fd_in> refers to a pipe, then I<off_in> must be NULL."
9661 msgstr "I<fd_in> がパイプを参照している場合、 I<off_in> は NULL でなければならない。"
9662
9663 #. type: Plain text
9664 #: build/C/man2/splice.2:70
9665 msgid "If I<fd_in> does not refer to a pipe and I<off_in> is NULL, then bytes are read from I<fd_in> starting from the current file offset, and the current file offset is adjusted appropriately."
9666 msgstr "I<fd_in> がパイプを参照しておらず、かつ I<off_in> が NULL の場合、 バイトは I<fd_in> の現在のファイルオフセットから読み出され、 現在のファイルオフセットは適切に調整される。"
9667
9668 #. type: Plain text
9669 #: build/C/man2/splice.2:83
9670 msgid "If I<fd_in> does not refer to a pipe and I<off_in> is not NULL, then I<off_in> must point to a buffer which specifies the starting offset from which bytes will be read from I<fd_in>; in this case, the current file offset of I<fd_in> is not changed."
9671 msgstr "I<fd_in> がパイプを参照しておらず、 I<off_in> が NULL でない場合、 I<off_in> は I<fd_in> からのデータ読み出しを開始する先頭オフセットを格納したバッファ へのポインタでなければならない。この場合、 I<fd_in> の現在のファイルオフセットは変更されない。"
9672
9673 #. type: Plain text
9674 #: build/C/man2/splice.2:88
9675 msgid "Analogous statements apply for I<fd_out> and I<off_out>."
9676 msgstr "I<fd_out> と I<off_out> に関しても同様である。"
9677
9678 #. type: Plain text
9679 #: build/C/man2/splice.2:93 build/C/man2/vmsplice.2:78
9680 msgid "The I<flags> argument is a bit mask that is composed by ORing together zero or more of the following values:"
9681 msgstr "I<flags> 引き数には、以下の値の 0 個以上をビット毎の論理和の形で指定する。"
9682
9683 #. type: TP
9684 #: build/C/man2/splice.2:93 build/C/man2/tee.2:62 build/C/man2/vmsplice.2:78
9685 #, no-wrap
9686 msgid "B<SPLICE_F_MOVE>"
9687 msgstr "B<SPLICE_F_MOVE>"
9688
9689 #. type: Plain text
9690 #: build/C/man2/splice.2:106
9691 msgid "Attempt to move pages instead of copying.  This is only a hint to the kernel: pages may still be copied if the kernel cannot move the pages from the pipe, or if the pipe buffers don't refer to full pages.  The initial implementation of this flag was buggy: therefore starting in Linux 2.6.21 it is a no-op (but is still permitted in a B<splice>()  call); in the future, a correct implementation may be restored."
9692 msgstr "ページのコピーでなく移動を試みる。 これはカーネルに対するヒントでしかない。 つまり、カーネルがパイプからページを移動できない場合や、 パイプバッファがページ全部を参照していない場合は、 ページのコピーが行われることもある。 このフラグの最初の実装にはバグがあった。そのため、 Linux 2.6.21 以降ではこのフラグの操作はできないようになっている (ただし、 B<splice>()  コールでこのフラグを指定することは今も認められている)。 将来、正しい実装が行われることだろう。"
9693
9694 #. type: TP
9695 #: build/C/man2/splice.2:106 build/C/man2/tee.2:68 build/C/man2/vmsplice.2:84
9696 #, no-wrap
9697 msgid "B<SPLICE_F_NONBLOCK>"
9698 msgstr "B<SPLICE_F_NONBLOCK>"
9699
9700 #. type: Plain text
9701 #: build/C/man2/splice.2:115
9702 msgid "Do not block on I/O.  This makes the splice pipe operations nonblocking, but B<splice>()  may nevertheless block because the file descriptors that are spliced to/from may block (unless they have the B<O_NONBLOCK> flag set)."
9703 msgstr "入出力時に停止 (block) しない。 このフラグを指定すると、 splice によるパイプ操作を非停止モード (nonblocking) で 行おうとするが、その場合でも B<splice>()  は停止することもある。なぜなら、データのやり取りを行う ファイルディスクリプタは (B<O_NONBLOCK> フラグをセットされていない場合) 停止する可能性があるからである。"
9704
9705 #. type: TP
9706 #: build/C/man2/splice.2:115 build/C/man2/tee.2:73 build/C/man2/vmsplice.2:91
9707 #, no-wrap
9708 msgid "B<SPLICE_F_MORE>"
9709 msgstr "B<SPLICE_F_MORE>"
9710
9711 #. type: Plain text
9712 #: build/C/man2/splice.2:129
9713 msgid "More data will be coming in a subsequent splice.  This is a helpful hint when the I<fd_out> refers to a socket (see also the description of B<MSG_MORE> in B<send>(2), and the description of B<TCP_CORK> in B<tcp>(7))"
9714 msgstr "この後の splice でさらに転送されるデータがあることを示す。 このフラグは I<fd_out> がソケットを参照している場合に有用なヒントとなる (B<send>(2)  の B<MSG_MORE> や B<tcp>(7)  の B<TCP_CORK> の説明も参照)。"
9715
9716 #. type: TP
9717 #: build/C/man2/splice.2:129 build/C/man2/tee.2:79 build/C/man2/vmsplice.2:97
9718 #, no-wrap
9719 msgid "B<SPLICE_F_GIFT>"
9720 msgstr "B<SPLICE_F_GIFT>"
9721
9722 #. type: Plain text
9723 #: build/C/man2/splice.2:135
9724 msgid "Unused for B<splice>(); see B<vmsplice>(2)."
9725 msgstr "B<splice>()  では使用しない。 B<vmsplice>(2)  参照。"
9726
9727 #. type: Plain text
9728 #: build/C/man2/splice.2:144
9729 msgid "Upon successful completion, B<splice>()  returns the number of bytes spliced to or from the pipe.  A return value of 0 means that there was no data to transfer, and it would not make sense to block, because there are no writers connected to the write end of the pipe referred to by I<fd_in>."
9730 msgstr "成功して完了すると、 B<splice>()  はパイプから出し入れしたバイト数を返す。 返り値 0 はデータの転送が行わなかったことを示す。 この場合、処理を停止 (block) しても無意味である。 なぜなら、 I<fd_in> が参照するパイプの書き込み側に接続されている者がいないからである。"
9731
9732 #. type: Plain text
9733 #: build/C/man2/splice.2:150
9734 msgid "On error, B<splice>()  returns -1 and I<errno> is set to indicate the error."
9735 msgstr "エラーの場合、 B<splice>()  は -1 を返し、 I<errno> にエラーを示す値を設定する。"
9736
9737 #. type: Plain text
9738 #: build/C/man2/splice.2:157 build/C/man2/tee.2:107
9739 #: build/C/man2/vmsplice.2:133
9740 msgid "B<SPLICE_F_NONBLOCK> was specified in I<flags>, and the operation would block."
9741 msgstr "B<SPLICE_F_NONBLOCK> が I<flags> に指定されていて、かつ操作が停止するような状態であった。"
9742
9743 #. type: Plain text
9744 #: build/C/man2/splice.2:161
9745 msgid "One or both file descriptors are not valid, or do not have proper read-write mode."
9746 msgstr "ファイルディスクリプタの一方または両方が有効ではない、 もしくは適切な read-write モードではない。"
9747
9748 #.  The append-mode error is given since 2.6.27; in earlier kernels,
9749 #.  splice() in append mode was broken
9750 #. type: Plain text
9751 #: build/C/man2/splice.2:169
9752 msgid "Target filesystem doesn't support splicing; target file is opened in append mode; neither of the descriptors refers to a pipe; or offset given for nonseekable device."
9753 msgstr "対象のファイルシステムが splice に対応していない、 または対象のファイルが追記モードでオープンされている、 またはディスクリプタのどちらもパイプを参照していない、 または seek できないデバイスに対してオフセットが指定された。"
9754
9755 #. type: Plain text
9756 #: build/C/man2/splice.2:172 build/C/man2/tee.2:120
9757 #: build/C/man2/vmsplice.2:148
9758 msgid "Out of memory."
9759 msgstr "メモリ不足。"
9760
9761 #. type: TP
9762 #: build/C/man2/splice.2:172
9763 #, no-wrap
9764 msgid "B<ESPIPE>"
9765 msgstr "B<ESPIPE>"
9766
9767 #. type: Plain text
9768 #: build/C/man2/splice.2:179
9769 msgid "Either I<off_in> or I<off_out> was not NULL, but the corresponding file descriptor refers to a pipe."
9770 msgstr "I<off_in> か I<off_out> のいずれかが NULL ではないが、対応するファイルディスクリプタが パイプを参照している。"
9771
9772 #. type: Plain text
9773 #: build/C/man2/splice.2:184
9774 msgid "The B<splice>()  system call first appeared in Linux 2.6.17; library support was added to glibc in version 2.5."
9775 msgstr ""
9776 "B<splice>() システムコールは Linux 2.6.17 で初めて登場した。\n"
9777 "ライブラリによるサポートは glibc バージョン 2.5 で追加された。"
9778
9779 #. type: Plain text
9780 #: build/C/man2/splice.2:196
9781 msgid "The three system calls B<splice>(), B<vmsplice>(2), and B<tee>(2), provide user-space programs with full control over an arbitrary kernel buffer, implemented within the kernel using the same type of buffer that is used for a pipe.  In overview, these system calls perform the following tasks:"
9782 msgstr "3 つのシステムコール (B<splice>(), B<vmsplice>(2), B<tee>(2))  を使うと、ユーザ空間プログラムは任意のカーネルバッファに対する 完全な制御ができる。カーネルバッファは、パイプに使用されているのと 同種のバッファを使ってカーネル内に実装されている。 大まかにいうと、これらのシステムコールは以下の仕事を行う:"
9783
9784 #. type: TP
9785 #: build/C/man2/splice.2:196
9786 #, no-wrap
9787 msgid "B<splice>()"
9788 msgstr "B<splice>()"
9789
9790 #. type: Plain text
9791 #: build/C/man2/splice.2:200
9792 msgid "moves data from the buffer to an arbitrary file descriptor, or vice versa, or from one buffer to another."
9793 msgstr "バッファから任意のファイルディスクリプタや、その逆方向、 もしくはあるバッファから別のバッファへの、データ移動を行う。"
9794
9795 #. type: TP
9796 #: build/C/man2/splice.2:200
9797 #, no-wrap
9798 msgid "B<tee>(2)"
9799 msgstr "B<tee>(2)"
9800
9801 #. type: Plain text
9802 #: build/C/man2/splice.2:203
9803 msgid "\"copies\" the data from one buffer to another."
9804 msgstr "あるバッファから別のバッファへのデータ「コピー」を行う。"
9805
9806 #. type: TP
9807 #: build/C/man2/splice.2:203
9808 #, no-wrap
9809 msgid "B<vmsplice>(2)"
9810 msgstr "B<vmsplice>(2)"
9811
9812 #. type: Plain text
9813 #: build/C/man2/splice.2:206
9814 msgid "\"copies\" data from user space into the buffer."
9815 msgstr "ユーザ空間からバッファへのデータ「コピー」を行う。"
9816
9817 #.  Linus: Now, imagine using the above in a media server, for example.
9818 #.  Let's say that a year or two has passed, so that the video drivers
9819 #.  have been updated to be able to do the splice thing, and what can
9820 #.  you do? You can:
9821 #.  - splice from the (mpeg or whatever - let's just assume that the video
9822 #.    input is either digital or does the encoding on its own - like they
9823 #.    pretty much all do) video input into a pipe (remember: no copies - the
9824 #.    video input will just DMA directly into memory, and splice will just
9825 #.    set up the pages in the pipe buffer)
9826 #.  - tee that pipe to split it up
9827 #.  - splice one end to a file (ie "save the compressed stream to disk")
9828 #.  - splice the other end to a real-time video decoder window for your
9829 #.    real-time viewing pleasure.
9830 #.  Linus: Now, the advantage of splice()/tee() is that you can
9831 #.  do zero-copy movement of data, and unlike sendfile() you can
9832 #.  do it on _arbitrary_ data (and, as shown by "tee()", it's more
9833 #.  than just sending the data to somebody else: you can duplicate
9834 #.  the data and choose to forward it to two or more different
9835 #.  users - for things like logging etc.).
9836 #. type: Plain text
9837 #: build/C/man2/splice.2:237
9838 msgid "Though we talk of copying, actual copies are generally avoided.  The kernel does this by implementing a pipe buffer as a set of reference-counted pointers to pages of kernel memory.  The kernel creates \"copies\" of pages in a buffer by creating new pointers (for the output buffer) referring to the pages, and increasing the reference counts for the pages: only pointers are copied, not the pages of the buffer."
9839 msgstr "ここではコピーの話をしているが、実際のコピーは一般的に回避される。 カーネルは、パイプ・バッファをカーネルメモリのページへのポインタ集合として 実装し、ページへの参照回数を管理することで、これを実現している。 カーネルは、対象となるページを参照する (出力バッファ用の) ポインタを 新規に作成することでバッファ内のページの「コピー」を作成し、 そのページの参照回数を増やす。つまり、ポインタだけがコピーされ、 バッファのページはコピーされない。"
9840
9841 #. type: Plain text
9842 #: build/C/man2/splice.2:240
9843 msgid "See B<tee>(2)."
9844 msgstr "B<tee>(2)  参照。"
9845
9846 #. type: Plain text
9847 #: build/C/man2/splice.2:244
9848 msgid "B<sendfile>(2), B<tee>(2), B<vmsplice>(2)"
9849 msgstr "B<sendfile>(2), B<tee>(2), B<vmsplice>(2)"
9850
9851 #. type: TH
9852 #: build/C/man2/tee.2:26
9853 #, no-wrap
9854 msgid "TEE"
9855 msgstr "TEE"
9856
9857 #. type: Plain text
9858 #: build/C/man2/tee.2:29
9859 msgid "tee - duplicating pipe content"
9860 msgstr "tee - パイプの中身を複製する"
9861
9862 #. type: Plain text
9863 #: build/C/man2/tee.2:36
9864 #, no-wrap
9865 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"
9866 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"
9867
9868 #.  Example programs http://brick.kernel.dk/snaps
9869 #.  add a "tee(in, out1, out2)" system call that duplicates the pages
9870 #.  (again, incrementing their reference count, not copying the data) from
9871 #.  one pipe to two other pipes.
9872 #. type: Plain text
9873 #: build/C/man2/tee.2:56
9874 msgid "B<tee>()  duplicates up to I<len> bytes of data from the pipe referred to by the file descriptor I<fd_in> to the pipe referred to by the file descriptor I<fd_out>.  It does not consume the data that is duplicated from I<fd_in>; therefore, that data can be copied by a subsequent B<splice>(2)."
9875 msgstr "B<tee>()  は、ファイルディスクリプタ I<fd_in> が参照するパイプからファイルディスクリプタ I<fd_out> が参照するパイプへ最大 I<len> バイトのデータを複製する。 この操作では、複製されるデータは I<fd_in> からは消費されない。したがって、これらのデータをこの後の B<splice>(2)  でコピーすることができる。"
9876
9877 #. type: Plain text
9878 #: build/C/man2/tee.2:62
9879 msgid "I<flags> is a series of modifier flags, which share the name space with B<splice>(2)  and B<vmsplice>(2):"
9880 msgstr "I<flags> は一連の修飾フラグであり、 B<splice>(2)  や B<vmsplice>(2)  と共通の名前である。"
9881
9882 #. type: Plain text
9883 #: build/C/man2/tee.2:68
9884 msgid "Currently has no effect for B<tee>(); see B<splice>(2)."
9885 msgstr "現在のところ B<tee>()  では何の効果もない。 B<splice>(2)  参照。"
9886
9887 #.  Not used for vmsplice
9888 #.  May be in the future -- therefore EAGAIN
9889 #. type: Plain text
9890 #: build/C/man2/tee.2:73 build/C/man2/vmsplice.2:91
9891 msgid "Do not block on I/O; see B<splice>(2)  for further details."
9892 msgstr "入出力で停止 (block) しない。詳細は B<splice>(2)  参照。"
9893
9894 #. type: Plain text
9895 #: build/C/man2/tee.2:79
9896 msgid "Currently has no effect for B<tee>(), but may be implemented in the future; see B<splice>(2)."
9897 msgstr "現在のところ B<tee>()  では何の効果もないが、将来的には実装される可能性がある。 B<splice>(2)  参照。"
9898
9899 #. type: Plain text
9900 #: build/C/man2/tee.2:85
9901 msgid "Unused for B<tee>(); see B<vmsplice>(2)."
9902 msgstr "B<tee>()  では未使用。 B<vmsplice>(2)  参照。"
9903
9904 #. type: Plain text
9905 #: build/C/man2/tee.2:94
9906 msgid "Upon successful completion, B<tee>()  returns the number of bytes that were duplicated between the input and output.  A return value of 0 means that there was no data to transfer, and it would not make sense to block, because there are no writers connected to the write end of the pipe referred to by I<fd_in>."
9907 msgstr "成功して完了すると、 B<tee>()  は入出力間で複製されたバイト数を返す。 返り値 0 はデータの転送が行われなかったことを示す。 この場合、処理を停止 (block) しても無意味である。 なぜなら、 I<fd_in> が参照するパイプの書き込み側に接続されている者がいないからである。"
9908
9909 #. type: Plain text
9910 #: build/C/man2/tee.2:100
9911 msgid "On error, B<tee>()  returns -1 and I<errno> is set to indicate the error."
9912 msgstr "エラーの場合、 B<tee>()  は -1 を返し、 I<errno> にエラーを示す値を設定する。"
9913
9914 #. type: Plain text
9915 #: build/C/man2/tee.2:117
9916 msgid "I<fd_in> or I<fd_out> does not refer to a pipe; or I<fd_in> and I<fd_out> refer to the same pipe."
9917 msgstr "I<fd_in> と I<fd_out> のどちらかがパイプを参照していない。もしくは I<fd_in> と I<fd_out> が同じパイプを参照している。"
9918
9919 #. type: Plain text
9920 #: build/C/man2/tee.2:125
9921 msgid "The B<tee>()  system call first appeared in Linux 2.6.17; library support was added to glibc in version 2.5."
9922 msgstr ""
9923 "B<tee>() システムコールは Linux 2.6.17 で初めて登場した。\n"
9924 "ライブラリによるサポートは glibc バージョン 2.5 で追加された。"
9925
9926 #. type: Plain text
9927 #: build/C/man2/tee.2:136
9928 msgid "Conceptually, B<tee>()  copies the data between the two pipes.  In reality no real data copying takes place though: under the covers, B<tee>()  assigns data in the output by merely grabbing a reference to the input."
9929 msgstr "概念としては、 B<tee>()  は二つのパイプ間でデータのコピーを行う。 しかし、実際には実データのコピーは行われない。 内部では、 B<tee>()  は入力側に対する参照だけを作成することで出力側にデータを 追加する。"
9930
9931 #. type: Plain text
9932 #: build/C/man2/tee.2:143
9933 msgid "The example below implements a basic B<tee>(1)  program using the B<tee>()  system call.  Here is an example of its use:"
9934 msgstr "以下の例は、 B<tee>()  システムコールを使って、 基本的な B<tee>(1)  プログラムを実装したものである。 以下は利用例である。"
9935
9936 #. type: Plain text
9937 #: build/C/man2/tee.2:150
9938 #, no-wrap
9939 msgid ""
9940 "$ B<date |./a.out out.log | cat>\n"
9941 "Tue Oct 28 10:06:00 CET 2014\n"
9942 "$ B<cat out.log>\n"
9943 "Tue Oct 28 10:06:00 CET 2014\n"
9944 msgstr ""
9945 "$ B<date |./a.out out.log | cat>\n"
9946 "Tue Oct 28 10:06:00 CET 2014\n"
9947 "$ B<cat out.log>\n"
9948 "Tue Oct 28 10:06:00 CET 2014\n"
9949
9950 #. type: SS
9951 #: build/C/man2/tee.2:152
9952 #, no-wrap
9953 msgid "Program source"
9954 msgstr "プログラムのソース"
9955
9956 #. type: Plain text
9957 #: build/C/man2/tee.2:162
9958 #, no-wrap
9959 msgid ""
9960 "#define _GNU_SOURCE\n"
9961 "#include E<lt>fcntl.hE<gt>\n"
9962 "#include E<lt>stdio.hE<gt>\n"
9963 "#include E<lt>stdlib.hE<gt>\n"
9964 "#include E<lt>unistd.hE<gt>\n"
9965 "#include E<lt>errno.hE<gt>\n"
9966 "#include E<lt>limits.hE<gt>\n"
9967 msgstr ""
9968 "#define _GNU_SOURCE\n"
9969 "#include E<lt>fcntl.hE<gt>\n"
9970 "#include E<lt>stdio.hE<gt>\n"
9971 "#include E<lt>stdlib.hE<gt>\n"
9972 "#include E<lt>unistd.hE<gt>\n"
9973 "#include E<lt>errno.hE<gt>\n"
9974 "#include E<lt>limits.hE<gt>\n"
9975
9976 #. type: Plain text
9977 #: build/C/man2/tee.2:168
9978 #, no-wrap
9979 msgid ""
9980 "int\n"
9981 "main(int argc, char *argv[])\n"
9982 "{\n"
9983 "    int fd;\n"
9984 "    int len, slen;\n"
9985 msgstr ""
9986 "int\n"
9987 "main(int argc, char *argv[])\n"
9988 "{\n"
9989 "    int fd;\n"
9990 "    int len, slen;\n"
9991
9992 #. type: Plain text
9993 #: build/C/man2/tee.2:173
9994 #, no-wrap
9995 msgid ""
9996 "    if (argc != 2) {\n"
9997 "        fprintf(stderr, \"Usage: %s E<lt>fileE<gt>\\en\", argv[0]);\n"
9998 "        exit(EXIT_FAILURE);\n"
9999 "    }\n"
10000 msgstr ""
10001 "    if (argc != 2) {\n"
10002 "        fprintf(stderr, \"Usage: %s E<lt>fileE<gt>\\en\", argv[0]);\n"
10003 "        exit(EXIT_FAILURE);\n"
10004 "    }\n"
10005
10006 #. type: Plain text
10007 #: build/C/man2/tee.2:179
10008 #, no-wrap
10009 msgid ""
10010 "    fd = open(argv[1], O_WRONLY | O_CREAT | O_TRUNC, 0644);\n"
10011 "    if (fd == -1) {\n"
10012 "        perror(\"open\");\n"
10013 "        exit(EXIT_FAILURE);\n"
10014 "    }\n"
10015 msgstr ""
10016 "    fd = open(argv[1], O_WRONLY | O_CREAT | O_TRUNC, 0644);\n"
10017 "    if (fd == -1) {\n"
10018 "        perror(\"open\");\n"
10019 "        exit(EXIT_FAILURE);\n"
10020 "    }\n"
10021
10022 #. type: Plain text
10023 #: build/C/man2/tee.2:186
10024 #, no-wrap
10025 msgid ""
10026 "    do {\n"
10027 "        /*\n"
10028 "         * tee stdin to stdout.\n"
10029 "         */\n"
10030 "        len = tee(STDIN_FILENO, STDOUT_FILENO,\n"
10031 "                  INT_MAX, SPLICE_F_NONBLOCK);\n"
10032 msgstr ""
10033 "    do {\n"
10034 "        /*\n"
10035 "         * tee stdin to stdout.\n"
10036 "         */\n"
10037 "        len = tee(STDIN_FILENO, STDOUT_FILENO,\n"
10038 "                  INT_MAX, SPLICE_F_NONBLOCK);\n"
10039
10040 #. type: Plain text
10041 #: build/C/man2/tee.2:195
10042 #, no-wrap
10043 msgid ""
10044 "        if (len E<lt> 0) {\n"
10045 "            if (errno == EAGAIN)\n"
10046 "                continue;\n"
10047 "            perror(\"tee\");\n"
10048 "            exit(EXIT_FAILURE);\n"
10049 "        } else\n"
10050 "            if (len == 0)\n"
10051 "                break;\n"
10052 msgstr ""
10053 "        if (len E<lt> 0) {\n"
10054 "            if (errno == EAGAIN)\n"
10055 "                continue;\n"
10056 "            perror(\"tee\");\n"
10057 "            exit(EXIT_FAILURE);\n"
10058 "        } else\n"
10059 "            if (len == 0)\n"
10060 "                break;\n"
10061
10062 #. type: Plain text
10063 #: build/C/man2/tee.2:209
10064 #, no-wrap
10065 msgid ""
10066 "        /*\n"
10067 "         * Consume stdin by splicing it to a file.\n"
10068 "         */\n"
10069 "        while (len E<gt> 0) {\n"
10070 "            slen = splice(STDIN_FILENO, NULL, fd, NULL,\n"
10071 "                          len, SPLICE_F_MOVE);\n"
10072 "            if (slen E<lt> 0) {\n"
10073 "                perror(\"splice\");\n"
10074 "                break;\n"
10075 "            }\n"
10076 "            len -= slen;\n"
10077 "        }\n"
10078 "    } while (1);\n"
10079 msgstr ""
10080 "        /*\n"
10081 "         * Consume stdin by splicing it to a file.\n"
10082 "         */\n"
10083 "        while (len E<gt> 0) {\n"
10084 "            slen = splice(STDIN_FILENO, NULL, fd, NULL,\n"
10085 "                          len, SPLICE_F_MOVE);\n"
10086 "            if (slen E<lt> 0) {\n"
10087 "                perror(\"splice\");\n"
10088 "                break;\n"
10089 "            }\n"
10090 "            len -= slen;\n"
10091 "        }\n"
10092 "    } while (1);\n"
10093
10094 #. type: Plain text
10095 #: build/C/man2/tee.2:213
10096 #, no-wrap
10097 msgid ""
10098 "    close(fd);\n"
10099 "    exit(EXIT_SUCCESS);\n"
10100 "}\n"
10101 msgstr ""
10102 "    close(fd);\n"
10103 "    exit(EXIT_SUCCESS);\n"
10104 "}\n"
10105
10106 #. type: Plain text
10107 #: build/C/man2/tee.2:217
10108 msgid "B<splice>(2), B<vmsplice>(2)"
10109 msgstr "B<splice>(2), B<vmsplice>(2)"
10110
10111 #. type: TH
10112 #: build/C/man2/vm86.2:26
10113 #, no-wrap
10114 msgid "VM86"
10115 msgstr "VM86"
10116
10117 #. type: TH
10118 #: build/C/man2/vm86.2:26
10119 #, no-wrap
10120 msgid "2009-02-20"
10121 msgstr "2009-02-20"
10122
10123 #. type: Plain text
10124 #: build/C/man2/vm86.2:29
10125 msgid "vm86old, vm86 - enter virtual 8086 mode"
10126 msgstr "vm86old, vm86 - 仮想 8086 モードへ移行する"
10127
10128 #. type: Plain text
10129 #: build/C/man2/vm86.2:31
10130 msgid "B<#include E<lt>sys/vm86.hE<gt>>"
10131 msgstr "B<#include E<lt>sys/vm86.hE<gt>>"
10132
10133 #. type: Plain text
10134 #: build/C/man2/vm86.2:33
10135 msgid "B<int vm86old(struct vm86_struct *>I<info>B<);>"
10136 msgstr "B<int vm86old(struct vm86_struct *>I<info>B<);>"
10137
10138 #. type: Plain text
10139 #: build/C/man2/vm86.2:35
10140 msgid "B<int vm86(unsigned long >I<fn>B<, struct vm86plus_struct *>I<v86>B<);>"
10141 msgstr "B<int vm86(unsigned long >I<fn>B<, struct vm86plus_struct *>I<v86>B<);>"
10142
10143 #. type: Plain text
10144 #: build/C/man2/vm86.2:48
10145 msgid "The system call B<vm86>()  was introduced in Linux 0.97p2.  In Linux 2.1.15 and 2.0.28, it was renamed to B<vm86old>(), and a new B<vm86>()  was introduced.  The definition of I<struct vm86_struct> was changed in 1.1.8 and 1.1.9."
10146 msgstr "B<vm86>()  システムコールは Linux 0.97p2 で導入された。 これは Linux 2.1.15 と 2.0.28 で B<vm86old>()  に名前が変更され、 新しい B<vm86>()  が導入された。 I<struct vm86_struct> の定義は 1.1.8 と 1.1.9 で変更された。"
10147
10148 #. type: Plain text
10149 #: build/C/man2/vm86.2:52
10150 msgid "These calls cause the process to enter VM86 mode (virtual-8086 in Intel literature), and are used by B<dosemu>."
10151 msgstr "これらのコールによってプロセスは VM86 モード (Intel の文書では仮想 8086 モード) へと移行する。 これらのコールは B<dosemu> で使用される。"
10152
10153 #. type: Plain text
10154 #: build/C/man2/vm86.2:54
10155 msgid "VM86 mode is an emulation of real mode within a protected mode task."
10156 msgstr "VM86 モードはプロテクトモードタスクにおける リアルモードのエミュレーションである。"
10157
10158 #. type: Plain text
10159 #: build/C/man2/vm86.2:64
10160 msgid "This return value is specific to i386 and indicates a problem with getting user-space data."
10161 msgstr "この返り値は i386 固有のものであり、 ユーザー空間のデータを取得する際に問題があったことを示す。"
10162
10163 #. type: Plain text
10164 #: build/C/man2/vm86.2:68
10165 msgid "This return value indicates the call is not implemented on the present architecture."
10166 msgstr "この返り値は、このコールが現在のアーキテクチャで実装されていないことを示す。"
10167
10168 #. type: Plain text
10169 #: build/C/man2/vm86.2:73
10170 msgid "Saved kernel stack exists.  (This is a kernel sanity check; the saved stack should exist only within vm86 mode itself.)"
10171 msgstr "保存されたカーネルスタックが既に存在している。(これはカーネルが通常の 状態であるかをチェックしている。保存されたスタックは vm86 モードで しか存在しない。)"
10172
10173 #. type: Plain text
10174 #: build/C/man2/vm86.2:76
10175 msgid "This call is specific to Linux on 32-bit Intel processors, and should not be used in programs intended to be portable."
10176 msgstr "この関数は 32 ビット Intel プロセッサ上の Linux 特有の関数であり、 移植を意図したプログラムでは使用すべきでない。"
10177
10178 #. type: TH
10179 #: build/C/man2/vmsplice.2:26
10180 #, no-wrap
10181 msgid "VMSPLICE"
10182 msgstr "VMSPLICE"
10183
10184 #. type: TH
10185 #: build/C/man2/vmsplice.2:26
10186 #, no-wrap
10187 msgid "2014-10-02"
10188 msgstr "2014-10-02"
10189
10190 #. type: Plain text
10191 #: build/C/man2/vmsplice.2:29
10192 msgid "vmsplice - splice user pages into a pipe"
10193 msgstr "vmsplice - ユーザ・ページをパイプに継ぎ合わせる"
10194
10195 #. type: Plain text
10196 #: build/C/man2/vmsplice.2:34
10197 #, no-wrap
10198 msgid ""
10199 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
10200 "B<#include E<lt>fcntl.hE<gt>>\n"
10201 "B<#include E<lt>sys/uio.hE<gt>>\n"
10202 msgstr ""
10203 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
10204 "B<#include E<lt>fcntl.hE<gt>>\n"
10205 "B<#include E<lt>sys/uio.hE<gt>>\n"
10206
10207 #. type: Plain text
10208 #: build/C/man2/vmsplice.2:37
10209 #, no-wrap
10210 msgid ""
10211 "B<ssize_t vmsplice(int >I<fd>B<, const struct iovec *>I<iov>B<,>\n"
10212 "B<                 unsigned long >I<nr_segs>B<, unsigned int >I<flags>B<);>\n"
10213 msgstr ""
10214 "B<ssize_t vmsplice(int >I<fd>B<, const struct iovec *>I<iov>B<,>\n"
10215 "B<                 unsigned long >I<nr_segs>B<, unsigned int >I<flags>B<);>\n"
10216
10217 #.  Linus: vmsplice() system call to basically do a "write to
10218 #.  the buffer", but using the reference counting and VM traversal
10219 #.  to actually fill the buffer. This means that the user needs to
10220 #.  be careful not to reuse the user-space buffer it spliced into
10221 #.  the kernel-space one (contrast this to "write()", which copies
10222 #.  the actual data, and you can thus reuse the buffer immediately
10223 #.  after a successful write), but that is often easy to do.
10224 #. type: Plain text
10225 #: build/C/man2/vmsplice.2:57
10226 msgid "The B<vmsplice>()  system call maps I<nr_segs> ranges of user memory described by I<iov> into a pipe.  The file descriptor I<fd> must refer to a pipe."
10227 msgstr "B<vmsplice>()  システムコールは、 I<iov> で指定されたユーザ・メモリの I<nr_segs> の範囲をパイプにマッピングする。 I<fd> はパイプを参照していなければならない。"
10228
10229 #. type: Plain text
10230 #: build/C/man2/vmsplice.2:64
10231 msgid "The pointer I<iov> points to an array of I<iovec> structures as defined in I<E<lt>sys/uio.hE<gt>>:"
10232 msgstr "ポインタ I<iov> は I<iovec> 構造体の配列を指す。 I<iovec> 構造体は I<E<lt>sys/uio.hE<gt>> で以下のように定義されている:"
10233
10234 #. type: Plain text
10235 #: build/C/man2/vmsplice.2:71
10236 #, no-wrap
10237 msgid ""
10238 "struct iovec {\n"
10239 "    void  *iov_base;            /* Starting address */\n"
10240 "    size_t iov_len;             /* Number of bytes */\n"
10241 "};\n"
10242 msgstr ""
10243 "struct iovec {\n"
10244 "    void  *iov_base;            /* 開始アドレス */\n"
10245 "    size_t iov_len;             /* バイト数 */\n"
10246 "};\n"
10247
10248 #. type: Plain text
10249 #: build/C/man2/vmsplice.2:84
10250 msgid "Unused for B<vmsplice>(); see B<splice>(2)."
10251 msgstr "B<vmsplice>()  では未使用。 B<splice>(2)  参照。"
10252
10253 #. type: Plain text
10254 #: build/C/man2/vmsplice.2:97
10255 msgid "Currently has no effect for B<vmsplice>(), but may be implemented in the future; see B<splice>(2)."
10256 msgstr "現在のところ B<vmsplice>()  では何の効果もないが、将来的には実装される可能性がある。 B<splice>(2)  参照。"
10257
10258 #.  FIXME . Explain the following line in a little more detail:
10259 #.  FIXME
10260 #.      It looks like the page-alignment requirement went away with
10261 #.      commit bd1a68b59c8e3bce45fb76632c64e1e063c3962d
10262 #.  .... if we expect to later SPLICE_F_MOVE to the cache.
10263 #. type: Plain text
10264 #: build/C/man2/vmsplice.2:117
10265 msgid "The user pages are a gift to the kernel.  The application may not modify this memory ever, or page cache and on-disk data may differ.  Gifting pages to the kernel means that a subsequent B<splice>(2)  B<SPLICE_F_MOVE> can successfully move the pages; if this flag is not specified, then a subsequent B<splice>(2)  B<SPLICE_F_MOVE> must copy the pages.  Data must also be properly page aligned, both in memory and length."
10266 msgstr "ユーザ・ページがカーネルへ渡すもの (gift) であることを示す。 アプリケーションはこのメモリを絶対に変更してはならない。 さもなければ、ページキャッシュとディスク上のデータは 一致しなくなるだろう。 ページをカーネルに渡すと、この次の B<splice>(2)  B<SPLICE_F_MOVE> でそのページの移動を行うことができる。 このフラグが指定されなかった場合、この次の B<splice>(2)  B<SPLICE_F_MOVE> でそのページのコピーを行わなければならない。 データはメモリ上でページ境界にあっていなければならず、 長さもページ境界の倍数でなければならない。"
10267
10268 #. type: Plain text
10269 #: build/C/man2/vmsplice.2:126
10270 msgid "Upon successful completion, B<vmsplice>()  returns the number of bytes transferred to the pipe.  On error, B<vmsplice>()  returns -1 and I<errno> is set to indicate the error."
10271 msgstr "成功して完了すると、 B<vmsplice>()  はパイプに転送したバイト数を返す。 エラーの場合、 B<vmplice>()  は -1 を返し、 I<errno> をエラーを示す値に設定する。"
10272
10273 #. type: Plain text
10274 #: build/C/man2/vmsplice.2:137
10275 msgid "I<fd> either not valid, or doesn't refer to a pipe."
10276 msgstr "I<fd> が有効でない、もしくはパイプを参照していない。"
10277
10278 #. type: Plain text
10279 #: build/C/man2/vmsplice.2:145
10280 msgid "I<nr_segs> is greater than B<IOV_MAX>; or memory not aligned if B<SPLICE_F_GIFT> set."
10281 msgstr "I<nr_segs> が B<IOV_MAX> よりも大きい。または B<SPLICE_F_GIFT> が設定されたがメモリがページ境界にあっていない。"
10282
10283 #. type: Plain text
10284 #: build/C/man2/vmsplice.2:153
10285 msgid "The B<vmsplice>()  system call first appeared in Linux 2.6.17; library support was added to glibc in version 2.5."
10286 msgstr ""
10287 "B<vmsplice>() システムコールは Linux 2.6.17 で初めて登場した。\n"
10288 "ライブラリによるサポートは glibc バージョン 2.5 で追加された。"
10289
10290 #. type: Plain text
10291 #: build/C/man2/vmsplice.2:164
10292 msgid "B<vmsplice>()  follows the other vectorized read/write type functions when it comes to limitations on number of segments being passed in.  This limit is B<IOV_MAX> as defined in I<E<lt>limits.hE<gt>>.  At the time of this writing, that limit is 1024."
10293 msgstr "指定されたセグメント数が上限に達した場合、 B<vmsplice>()  は他のベクトル形式の read/write を行う関数と同じ動作をする。 上限は B<IOV_MAX> であり、 I<E<lt>limits.hE<gt>> で定義されている。 このドキュメントを書いた時点での値は 1024 である。"
10294
10295 #. type: Plain text
10296 #: build/C/man2/vmsplice.2:167
10297 msgid "B<splice>(2), B<tee>(2)"
10298 msgstr "B<splice>(2), B<tee>(2)"
10299
10300 #~ msgid "2014-05-10"
10301 #~ msgstr "2014-05-10"
10302
10303 #~ msgid "B<PERF_RECORD_MISC_MMAP_DATA>"
10304 #~ msgstr "B<PERF_RECORD_MISC_MMAP_DATA>"
10305
10306 #~ msgid "These system calls were added in Linux 2.6.17.  No library support is provided; use B<syscall>(2)."
10307 #~ msgstr ""
10308 #~ "これらのシステムコールは Linux 2.6.17 で追加された。ライブラリによる\n"
10309 #~ "サポートは提供されていない。 B<syscall>(2) を使うこと。"
10310
10311 #~ msgid "B<PERF_FLAG_FD_OUTPUT>"
10312 #~ msgstr "B<PERF_FLAG_FD_OUTPUT>"
10313
10314 #~ msgid "2014-04-17"
10315 #~ msgstr "2014-04-17"
10316
10317 #~ msgid "2014-05-05"
10318 #~ msgstr "2014-05-05"
10319
10320 #~ msgid "2014-02-20"
10321 #~ msgstr "2014-02-20"
10322
10323 #~ msgid "2012-07-19"
10324 #~ msgstr "2012-07-19"
10325
10326 #~ msgid "2012-05-04"
10327 #~ msgstr "2012-05-04"
10328
10329 #~ msgid "2013-12-12"
10330 #~ msgstr "2013-12-12"
10331
10332 #~ msgid "2012-04-25"
10333 #~ msgstr "2012-04-25"
10334
10335 #~ msgid "This function will return the current B<personality>()  when I<persona> equals 0xffffffff.  Otherwise, it will make the execution domain referenced by I<persona> the new execution domain of the calling process."
10336 #~ msgstr "B<personality ()> 関数は、 I<persona> が 0xffffffff の場合は現在の B<パーソナリティ> を返す。 それ以外の場合、 I<persona> により参照される実行ドメインを、 呼び出し元のプロセスの新しい実行ドメインとする。"
10337
10338 #~ msgid "Depending on which operation was executed, the returned value for a successful call can have differing meanings."
10339 #~ msgstr "どの操作が実行されたかによって、 成功時の返り値の意味が変わる。"
10340
10341 #~ msgid "Returns 0 if the process was woken by a B<FUTEX_WAKE> call.  In case of timeout, the operation fails with the error B<ETIMEDOUT>.  If the futex was not equal to the expected value, the operation fails with the error B<EWOULDBLOCK>.  Signals (see B<signal>(7))  or other spurious wakeups cause B<FUTEX_WAIT> to fail with the error B<EINTR>."
10342 #~ msgstr "プロセスが B<FUTEX_WAKE> の呼び出しで wake すると 0 を返す。 タイムアウトの場合、操作はエラー B<ETIMEOUT> で失敗する。 futex が指定された値と等しくない場合、 エラー B<EWOULDBLOCK> で失敗する。 シグナルを受信するか (B<signal>(7)  参照) 他の偽の wake があった場合には、エラー B<EINTR> で失敗する。"
10343
10344 #~ msgid "An operation was not defined or error in page alignment."
10345 #~ msgstr "操作が定義されていない。またはページ・アラインメントでエラーが発生した。"
10346
10347 #~ msgid "Stop the child at the next B<execve>(2)  call with I<SIGTRAP | PTRACE_EVENT_EXEC\\ E<lt>E<lt>\\ 8>."
10348 #~ msgstr "次の B<execve>(2)  呼び出し時に I<SIGTRAP | PTRACE_EVENT_EXEC\\ E<lt>E<lt>\\ 8> で子プロセスの動作を停止させる。"
10349
10350 #~ msgid "Stop the child at the completion of the next B<vfork>(2)  call with I<SIGTRAP | PTRACE_EVENT_VFORK_DONE\\ E<lt>E<lt>\\ 8>."
10351 #~ msgstr "次の B<vfork>(2)  呼び出し時に I<SIGTRAP | PTRACE_EVENT_VFORK_DONE\\ E<lt>E<lt>\\ 8> で子プロセスの動作を停止させる。"
10352
10353 #~ msgid "Attaches to the process specified in I<pid>, making it a traced \"child\" of the calling process; the behavior of the child is as if it had done a B<PTRACE_TRACEME>.  The calling process actually becomes the parent of the child process for most purposes (e.g., it will receive notification of child events and appears in B<ps>(1)  output as the child's parent), but a B<getppid>(2)  by the child will still return the PID of the original parent.  The child is sent a B<SIGSTOP>, but will not necessarily have stopped by the completion of this call; use B<wait>(2)  to wait for the child to stop.  (I<addr> and I<data> are ignored.)"
10354 #~ msgstr "I<pid> で指定されたプロセスに接続 (attach) し、それを呼び出し元のプロセスの 子プロセスとしてトレースできるようにする。子プロセスは B<PTRACE_TRACEME> したかのように振舞う。呼び出し元のプロセスはそのほとんどの目的において、 その子プロセスの実際の親になる (例えば、子プロセスのイベントの 通知を受けとったり、 B<ps>(1)  で親として表示されたりする)。しかし、子プロセスで B<getppid>(2)  を実行した場合には元の親プロセスの PID が返される。 子プロセスには B<SIGSTOP> が送られるが、この呼び出しが完了するまでに 必ずしも停止するとは限らない。子プロセスの停止を待つには B<wait>(2)  を使用すること。(I<addr> と I<data> は無視される。)"
10355
10356 #~ msgid "Tracing causes a few subtle differences in the semantics of traced processes.  For example, if a process is attached to with B<PTRACE_ATTACH>, its original parent can no longer receive notification via B<wait>(2)  when it stops, and there is no way for the new parent to effectively simulate this notification."
10357 #~ msgstr "トレースすることによってトレースされるプロセスの動作に些細な違いが 起こることがある。例えば、プロセスが B<PTRACE_ATTACH> によって接続された場合には、そのプロセスが停止した時でも本来の親は B<wait>(2)  を使って通知を受けることができず、新しい親が効率よく この通知を真似る方法もない。"
10358
10359 #~ msgid "When the parent receives an event with B<PTRACE_EVENT_*> set, the child is not in the normal signal delivery path.  This means the parent cannot do B<ptrace>(PTRACE_CONT)  with a signal or B<ptrace>(PTRACE_KILL).  B<kill>(2)  with a B<SIGKILL> signal can be used instead to kill the child process after receiving one of these messages."
10360 #~ msgstr "親プロセスが B<PTRACE_EVENT_*> がセットされたイベントを受信した場合、 子プロセスは通常通りのシグナル配送が行われる状態にない。 つまり、親プロセスが、 シグナルにより B<ptrace>(PTRACE_CONT)  を行ったり、 B<ptrace>(PTRACE_KILL)  を行ったりできないということである。 こららのメッセージの受信後は、子プロセスを終了 (kill) するのに、 シグナル B<SIGKILL> を指定して B<kill>(2)  を行う方法を代わりに使用できる。"
10361
10362 #~ msgid "The SunOS man page describes B<ptrace>()  as \"unique and arcane\", which it is.  The proc-based debugging interface present in Solaris 2 implements a superset of B<ptrace>()  functionality in a more powerful and uniform way."
10363 #~ msgstr "SunOS のマニュアル・ページには B<ptrace>()  は「独特で不可解」と記述されており、まさしくそうである。 Solaris 2 では proc ベースの デバッグのインターフェースとして B<ptrace>()  の上位互換関数が実装され、より強力で一貫性のあるものとなっている。"
10364
10365 #~ msgid "The second argument I<special> is the block special device these quota apply to.  It must be mounted."
10366 #~ msgstr "二番目の引き数 I<special> は quota を適用するデバイスのブロック・スペシャル・ファイルである。 そのデバイスはマウントされていなくてはならない。"
10367
10368 #~ msgid "The third argument I<id> is the user or group ID these quota apply to (when relevant)."
10369 #~ msgstr "三番目の引き数 I<id> には、(必要な場合に) quota を適用するユーザーもしくはグループの ID を指定する。"
10370
10371 #~ msgid "The fourth argument I<addr> is the address of a data structure, depending on the command."
10372 #~ msgstr "四番目の引き数 I<addr> には、コマンドごとに異ったデータ構造体のアドレスを指定する。"
10373
10374 #~ msgid "Enable quota.  The I<addr> argument is the pathname of the file containing the quota for the file system."
10375 #~ msgstr "quota を有効にする。 I<addr> 引き数には、そのファイル・システムの quota が記録されているファイルの パス名を指定する。"
10376
10377 #~ msgid "Disable quota."
10378 #~ msgstr "quota を無効にする。"
10379
10380 #~ msgid "Set limits and current usage; I<addr> is as before."
10381 #~ msgstr "制限値と現在の使用量を設定する: I<addr> は同上。"
10382
10383 #~ msgid "Set limits; I<addr> is as before."
10384 #~ msgstr "制限値を設定する; I<addr> は同上。"
10385
10386 #~ msgid "Set usage."
10387 #~ msgstr "使用量を設定する。"
10388
10389 #~ msgid "Sync disk copy of a file system's quota."
10390 #~ msgstr "ファイル・システムの quota ファイルをディスクと同期させる。"
10391
10392 #~ msgid "Get collected stats."
10393 #~ msgstr "収集された統計を取得する。"
10394
10395 #~ msgid "On success, B<quotactl>()  returns 0.  On error, -1 is returned, and I<errno> is set appropriately."
10396 #~ msgstr "B<quotactl>()  は、成功時には 0 を返す。エラー時は、-1 を返すとともに、 I<errno> が適切な値に設定される。"
10397
10398 #~ msgid "B<Q_QUOTAON> was asked, but quotas were enabled already."
10399 #~ msgstr "B<Q_QUOTAON> の要求がなされたが、quota(s) は既に有効になっている。"
10400
10401 #~ msgid "Bad I<addr> value."
10402 #~ msgstr "I<addr> の値に誤りがある。"
10403
10404 #~ msgid "I<type> is not a known quota type.  Or, I<special> could not be found."
10405 #~ msgstr "I<type> が既知の quota の形式ではない。もしくは、 I<special> デバイスが見付からなかった。"
10406
10407 #~ msgid "Too many open files: cannot open quota file."
10408 #~ msgstr "ファイルをオープンしすぎている: quota ファイルをオープン出来ない。"
10409
10410 #~ msgid "I<special> cannot be found in the mount table."
10411 #~ msgstr "I<special> がマウント・テーブル内に見当たらない。"
10412
10413 #~ msgid "The kernel was compiled without quota support."
10414 #~ msgstr "quota を使用可にしてカーネルをコンパイルしていない。"
10415
10416 #~ msgid "The process was not root (for the file system), and B<Q_GETQUOTA> was asked for another I<id> than that of the process itself, or anything other than B<Q_GETSTATS> or B<Q_SYNC> was asked."
10417 #~ msgstr "プロセスが (そのファイル・システムの) root のものではなく、 かつプロセス自身のものとは異なる I<id> に対して B<Q_GETQUOTA> 要求を行なった。 もしくは、 B<Q_GETSTATS>, B<Q_SYNC> 以外の要求がなされた。"
10418
10419 #~ msgid "B<Q_GETQUOTA> or B<Q_SETQUOTA> or B<Q_SETUSE> or B<Q_SETQLIM> was asked for a file system that didn't have quota enabled."
10420 #~ msgstr "quota が有効になっていないファイル・システムに対して B<Q_GETQUOTA>, B<Q_SETQUOTA>, B<Q_SETUSE>, B<Q_SETQLIM> のいずれかの要求がなされた。"