OSDN Git Service

d633aa226fb6538368dbc146e125f86cc26ea0f6
[linuxjm/LDP_man-pages.git] / draft / man3 / profil.3
1 .\" Hey Emacs! This file is -*- nroff -*- source.
2 .\"
3 .\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu)
4 .\"
5 .\" Permission is granted to make and distribute verbatim copies of this
6 .\" manual provided the copyright notice and this permission notice are
7 .\" preserved on all copies.
8 .\"
9 .\" Permission is granted to copy and distribute modified versions of this
10 .\" manual under the conditions for verbatim copying, provided that the
11 .\" entire resulting derived work is distributed under the terms of a
12 .\" permission notice identical to this one.
13 .\"
14 .\" Since the Linux kernel and libraries are constantly changing, this
15 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
16 .\" responsibility for errors or omissions, or for damages resulting from
17 .\" the use of the information contained herein.  The author(s) may not
18 .\" have taken the same level of care in the production of this manual,
19 .\" which is licensed free of charge, as they might when working
20 .\" professionally.
21 .\"
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
24 .\"
25 .\" Modified Fri Jun 23 01:35:19 1995 Andries Brouwer <aeb@cwi.nl>
26 .\" (prompted by Bas V. de Bakker <bas@phys.uva.nl>)
27 .\" Corrected (and moved to man3), 980612, aeb
28 .\"
29 .\" Japanese Version Copyright (c) 1997 HANATAKA Shinya
30 .\"         all rights reserved.
31 .\" Translated San Feb 23 20:40:50 JST 1997
32 .\"         by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
33 .\" Modified Sun Jun 21 17:30:21 JST 1998
34 .\"         by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
35 .\" Updated & Modified Thu Feb 17 00:57:49 JST 2005
36 .\"         by Yuichi SATO <ysato444@yahoo.co.jp>
37 .\"
38 .\"WORD:        profile                 プロファイル
39 .\"WORD:        kernel                  カーネル
40 .\"WORD:        implement               実装
41 .\"WORD:        library                 ライブラリ
42 .\"WORD:        core                    メモリ
43 .\"WORD:        virtual                 仮想
44 .\"WORD:        word                    ワード
45 .\"WORD:        increment               インクリメント
46 .\"WORD:        core dump               コア・ダンプ
47 .\"
48 .TH PROFIL 3 2007-07-26 "Linux" "Linux Programmer's Manual"
49 .\"O .SH NAME
50 .SH 名前
51 .\"O profil \- execution time profile
52 profil \- 実行時間プロファイル (profile)
53 .\"O .SH SYNOPSIS
54 .SH 書式
55 .B #include <unistd.h>
56 .sp
57 .BI "int profil(unsigned short *" buf ", size_t " bufsiz \
58 ", size_t " offset ", unsigned int " scale );
59 .sp
60 .in -4n
61 .\"O Feature Test Macro Requirements for glibc (see
62 .\"O .BR feature_test_macros (7)):
63 glibc 向けの機能検査マクロの要件
64 .RB ( feature_test_macros (7)
65 参照):
66 .in
67 .sp
68 .BR profil ():
69 _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE\ <\ 500)
70 .\"O .SH DESCRIPTION
71 .SH 説明
72 .\"O This routine provides a means to find out in what areas your program
73 .\"O spends most of its time.
74 .\"O The argument
75 .\"O .I buf
76 .\"O points to
77 .\"O .I bufsiz
78 .\"O bytes of core.
79 .\"O Every virtual 10 milliseconds, the user's program counter (PC)
80 .\"O is examined:
81 このルーティンはプログラムのどこの部分で時間を費やしているかを調べる
82 手段を提供する。引き数
83 .I buf
84
85 .I bufsiz
86 バイトのメモリを指している。仮想の 10 ミリ秒ごとに、ユーザーの
87 プログラム・カウンター (PC) が検査される:
88 .\"O .I offset
89 .\"O is subtracted and the result is multiplied by
90 .\"O .I scale
91 .\"O and divided by 65536.
92 .I offset
93 が引かれ、その結果が
94 .I scale
95 倍され 65536 で割られる。
96 .\"O If the resulting value is less than
97 .\"O .IR bufsiz ,
98 .\"O then the corresponding entry in
99 .\"O .I buf
100 .\"O is incremented.
101 結果が
102 .I bufsiz
103 より小さい場合は
104 .I buf
105 の対応するエントリがインクリメントされる。
106 .\"O If
107 .\"O .I buf
108 .\"O is NULL, profiling is disabled.
109 .I buf
110 が NULL ならば、プロファイル (profile) は無効にされる。
111 .\"O .SH "RETURN VALUE"
112 .SH 返り値
113 .\"O Zero is always returned.
114 常に 0 が返される。
115 .\"O .SH "CONFORMING TO"
116 .SH 準拠
117 .\"O Similar to a call in SVr4 (but not POSIX.1-2001).
118 SVr4 のコールに似ている (しかし POSIX.1-2001 ではない)。
119 .\"O .SH BUGS
120 .SH バグ
121 .\"O .BR profil ()
122 .\"O cannot be used on a program that also uses
123 .\"O .B ITIMER_PROF
124 .\"O interval timers (see
125 .\"O .BR setitimer (2)).
126 .BR profil ()
127
128 .B ITIMER_PROF
129 インターバル・タイマーも使用しているプログラムでは使用できない
130 .RB ( setitimer (2)
131 参照)。
132
133 .\"O True kernel profiling provides more accurate results.
134 .\"O Libc 4.4 contained a kernel patch providing a system call profil.
135 本当のカーネル・プロファイルはより正確な結果を与える。
136 libc 4.4 にはシステムコール profil を提供するための
137 カーネルパッチが含まれていた。
138 .\"O .SH "SEE ALSO"
139 .SH 関連項目
140 .BR gprof (1),
141 .BR setitimer (2),
142 .BR sigaction (2),
143 .BR signal (2)