.\" Hey Emacs! This file is -*- nroff -*- source. .\" .\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu) .\" .\" 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. .\" .\" Modified Fri Jun 23 01:35:19 1995 Andries Brouwer .\" (prompted by Bas V. de Bakker ) .\" Corrected (and moved to man3), 980612, aeb .\" .\" 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 .\" .\"WORD: profile プロファイル .\"WORD: kernel カーネル .\"WORD: implement 実装 .\"WORD: library ライブラリ .\"WORD: core メモリ .\"WORD: virtual 仮想 .\"WORD: word ワード .\"WORD: increment インクリメント .\"WORD: core dump コア・ダンプ .\" .TH PROFIL 3 2007-07-26 "Linux" "Linux Programmer's Manual" .\"O .SH NAME .SH 名前 .\"O profil \- execution time profile profil \- 実行時間プロファイル (profile) .\"O .SH SYNOPSIS .SH 書式 .B #include .sp .BI "int profil(unsigned short *" buf ", size_t " bufsiz \ ", size_t " offset ", unsigned int " scale ); .sp .in -4n .\"O Feature Test Macro Requirements for glibc (see .\"O .BR feature_test_macros (7)): glibc 向けの機能検査マクロの要件 .RB ( feature_test_macros (7) 参照): .in .sp .BR profil (): _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE\ <\ 500) .\"O .SH DESCRIPTION .SH 説明 .\"O This routine provides a means to find out in what areas your program .\"O spends most of its time. .\"O The argument .\"O .I buf .\"O points to .\"O .I bufsiz .\"O bytes of core. .\"O Every virtual 10 milliseconds, the user's program counter (PC) .\"O is examined: このルーティンはプログラムのどこの部分で時間を費やしているかを調べる 手段を提供する。引き数 .I buf は .I bufsiz バイトのメモリを指している。仮想の 10 ミリ秒ごとに、ユーザーの プログラム・カウンター (PC) が検査される: .\"O .I offset .\"O is subtracted and the result is multiplied by .\"O .I scale .\"O and divided by 65536. .I offset が引かれ、その結果が .I scale 倍され 65536 で割られる。 .\"O If the resulting value is less than .\"O .IR bufsiz , .\"O then the corresponding entry in .\"O .I buf .\"O is incremented. 結果が .I bufsiz より小さい場合は .I buf の対応するエントリがインクリメントされる。 .\"O If .\"O .I buf .\"O is NULL, profiling is disabled. .I buf が NULL ならば、プロファイル (profile) は無効にされる。 .\"O .SH "RETURN VALUE" .SH 返り値 .\"O Zero is always returned. 常に 0 が返される。 .\"O .SH "CONFORMING TO" .SH 準拠 .\"O Similar to a call in SVr4 (but not POSIX.1-2001). SVr4 のコールに似ている (しかし POSIX.1-2001 ではない)。 .\"O .SH BUGS .SH バグ .\"O .BR profil () .\"O cannot be used on a program that also uses .\"O .B ITIMER_PROF .\"O interval timers (see .\"O .BR setitimer (2)). .BR profil () は .B ITIMER_PROF インターバル・タイマーも使用しているプログラムでは使用できない .RB ( setitimer (2) 参照)。 .\"O True kernel profiling provides more accurate results. .\"O Libc 4.4 contained a kernel patch providing a system call profil. 本当のカーネル・プロファイルはより正確な結果を与える。 libc 4.4 にはシステムコール profil を提供するための カーネルパッチが含まれていた。 .\"O .SH "SEE ALSO" .SH 関連項目 .BR gprof (1), .BR setitimer (2), .BR sigaction (2), .BR signal (2)