.\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu) .\" .\" %%%LICENSE_START(VERBATIM) .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" %%%LICENSE_END .\" .\" Modified Fri Jun 23 01:35:19 1995 Andries Brouwer .\" (prompted by Bas V. de Bakker ) .\" Corrected (and moved to man3), 980612, aeb .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .\" .\" Japanese Version Copyright (c) 1997 HANATAKA Shinya .\" all rights reserved. .\" Translated San Feb 23 20:40:50 JST 1997 .\" by HANATAKA Shinya .\" Modified Sun Jun 21 17:30:21 JST 1998 .\" by HANATAKA Shinya .\" Updated & Modified Thu Feb 17 00:57:49 JST 2005 .\" by Yuichi SATO .\" .TH PROFIL 3 2014\-07\-08 Linux "Linux Programmer's Manual" .SH 名前 profil \- 実行時間プロファイル (profile) .SH 書式 .nf \fB#include \fP .sp \fBint profil(unsigned short *\fP\fIbuf\fP\fB, size_t \fP\fIbufsiz\fP\fB,\fP \fB size_t \fP\fIoffset\fP\fB, unsigned int \fP\fIscale\fP\fB);\fP .sp .fi .in -4n glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参照): .in .sp \fBprofil\fP(): _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE\ <\ 500) .SH 説明 このルーティンはプログラムのどこの部分で時間を費やしているかを調べる 手段を提供する。引き数 \fIbuf\fP は \fIbufsiz\fP バイトのメモリーを指している。仮想の 10 ミリ秒ごとに、ユーザーの プログラムカウンター (PC) が検査される: \fIoffset\fP が引かれ、その結果が \fIscale\fP 倍され 65536 で割られる。 結果が \fIbufsiz\fP より小さい場合は \fIbuf\fP の対応するエントリーがインクリメントされる。 \fIbuf\fP が NULL ならば、プロファイル (profile) は無効にされる。 .SH 返り値 常に 0 が返される。 .SH 準拠 SVr4 のコールに似ている (しかし POSIX.1\-2001 ではない)。 .SH バグ \fBprofil\fP() は \fBITIMER_PROF\fP インターバルタイマーも使用しているプログラムでは使用できない (\fBsetitimer\fP(2) 参照)。 本当のカーネルプロファイルはより正確な結果を与える。 libc 4.4 にはシステムコール profil を提供するための カーネルパッチが含まれていた。 .SH 関連項目 \fBgprof\fP(1), \fBsprof\fP(1), \fBsetitimer\fP(2), \fBsigaction\fP(2), \fBsignal\fP(2) .SH この文書について この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.79 の一部である。 プロジェクトの説明とバグ報告に関する情報は \%http://www.kernel.org/doc/man\-pages/ に書かれている。