OSDN Git Service

(split) LDP: draft snapshot generated from latest ja.po files.
[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 .\"
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 \fB#include <unistd.h>\fP
38 .sp
39 \fBint profil(unsigned short *\fP\fIbuf\fP\fB, size_t \fP\fIbufsiz\fP\fB, size_t
40 \fP\fIoffset\fP\fB, unsigned int \fP\fIscale\fP\fB);\fP
41 .sp
42 .in -4n
43 glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
44 .in
45 .sp
46 \fBprofil\fP(): _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE\ <\ 500)
47 .SH 説明
48 このルーティンはプログラムのどこの部分で時間を費やしているかを調べる 手段を提供する。引き数 \fIbuf\fP は \fIbufsiz\fP
49 バイトのメモリを指している。仮想の 10 ミリ秒ごとに、ユーザーの プログラム・カウンター (PC) が検査される: \fIoffset\fP
50 が引かれ、その結果が \fIscale\fP 倍され 65536 で割られる。 結果が \fIbufsiz\fP より小さい場合は \fIbuf\fP
51 の対応するエントリがインクリメントされる。 \fIbuf\fP が NULL ならば、プロファイル (profile) は無効にされる。
52 .SH 返り値
53 常に 0 が返される。
54 .SH 準拠
55 SVr4 のコールに似ている (しかし POSIX.1\-2001 ではない)。
56 .SH バグ
57 \fBprofil\fP()  は \fBITIMER_PROF\fP インターバル・タイマーも使用しているプログラムでは使用できない
58 (\fBsetitimer\fP(2)  参照)。
59
60 本当のカーネル・プロファイルはより正確な結果を与える。 libc 4.4 にはシステムコール profil を提供するための
61 カーネルパッチが含まれていた。
62 .SH 関連項目
63 \fBgprof\fP(1), \fBsetitimer\fP(2), \fBsigaction\fP(2), \fBsignal\fP(2)