OSDN Git Service

ef091fba5686cd6c8bf2c9e5048ccf9804eb4f0a
[linuxjm/LDP_man-pages.git] / release / man3 / profil.3
1 .\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu)
2 .\"
3 .\" %%%LICENSE_START(VERBATIM)
4 .\" Permission is granted to make and distribute verbatim copies of this
5 .\" manual provided the copyright notice and this permission notice are
6 .\" preserved on all copies.
7 .\"
8 .\" Permission is granted to copy and distribute modified versions of this
9 .\" manual under the conditions for verbatim copying, provided that the
10 .\" entire resulting derived work is distributed under the terms of a
11 .\" permission notice identical to this one.
12 .\"
13 .\" Since the Linux kernel and libraries are constantly changing, this
14 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
15 .\" responsibility for errors or omissions, or for damages resulting from
16 .\" the use of the information contained herein.  The author(s) may not
17 .\" have taken the same level of care in the production of this manual,
18 .\" which is licensed free of charge, as they might when working
19 .\" professionally.
20 .\"
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
23 .\" %%%LICENSE_END
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 .\"
30 .\" This file was generated with po4a. Translate the source file.
31 .\"
32 .\"*******************************************************************
33 .TH PROFIL 3 2007\-07\-26 Linux "Linux Programmer's Manual"
34 .SH 名前
35 profil \- 実行時間プロファイル (profile)
36 .SH 書式
37 .nf
38 \fB#include <unistd.h>\fP
39 .sp
40 \fBint profil(unsigned short *\fP\fIbuf\fP\fB, size_t \fP\fIbufsiz\fP\fB,\fP
41 \fB           size_t \fP\fIoffset\fP\fB, unsigned int \fP\fIscale\fP\fB);\fP
42 .sp
43 .fi
44 .in -4n
45 glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
46 .in
47 .sp
48 \fBprofil\fP(): _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE\ <\ 500)
49 .SH 説明
50 このルーティンはプログラムのどこの部分で時間を費やしているかを調べる 手段を提供する。引き数 \fIbuf\fP は \fIbufsiz\fP
51 バイトのメモリを指している。仮想の 10 ミリ秒ごとに、ユーザーの プログラム・カウンター (PC) が検査される: \fIoffset\fP
52 が引かれ、その結果が \fIscale\fP 倍され 65536 で割られる。 結果が \fIbufsiz\fP より小さい場合は \fIbuf\fP
53 の対応するエントリがインクリメントされる。 \fIbuf\fP が NULL ならば、プロファイル (profile) は無効にされる。
54 .SH 返り値
55 常に 0 が返される。
56 .SH 準拠
57 SVr4 のコールに似ている (しかし POSIX.1\-2001 ではない)。
58 .SH バグ
59 \fBprofil\fP()  は \fBITIMER_PROF\fP インターバル・タイマーも使用しているプログラムでは使用できない
60 (\fBsetitimer\fP(2)  参照)。
61
62 本当のカーネル・プロファイルはより正確な結果を与える。 libc 4.4 にはシステムコール profil を提供するための
63 カーネルパッチが含まれていた。
64 .SH 関連項目
65 \fBgprof\fP(1), \fBsetitimer\fP(2), \fBsigaction\fP(2), \fBsignal\fP(2)
66 .SH この文書について
67 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部
68 である。プロジェクトの説明とバグ報告に関する情報は
69 http://www.kernel.org/doc/man\-pages/ に書かれている。