.\" 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 2020\-12\-21 Linux "Linux Programmer's Manual" .SH 名前 profil \- 実行時間プロファイル (profile) .SH 書式 .nf \fB#include \fP .PP \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 .PP .fi .RS -4 glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参照): .RE .PP \fBprofil\fP(): .nf .\" commit 266865c0e7b79d4196e2cc393693463f03c90bd8 glibc 2.21 以降: _DEFAULT_SOURCE glibc 2.19 と 2.20: _DEFAULT_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE\ <\ 500) glibc 2.19 以前: _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE\ <\ 500) .fi .SH 説明 このルーティンはプログラムのどこの部分で時間を費やしているかを調べる 手段を提供する。引数 \fIbuf\fP は \fIbufsiz\fP バイトのメモリーを指している。仮想の 10 ミリ秒ごとに、ユーザーの プログラムカウンター (PC) が検査される: \fIoffset\fP が引かれ、その結果が \fIscale\fP 倍され 65536 で割られる。 結果が \fIbufsiz\fP より小さい場合は \fIbuf\fP の対応するエントリーがインクリメントされる。 \fIbuf\fP が NULL ならば、プロファイル (profile) は無効にされる。 .SH 返り値 常に 0 が返される。 .SH 属性 この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。 .TS allbox; lb lb lb l l l. インターフェース 属性 値 T{ \fBprofil\fP() T} Thread safety MT\-Unsafe .TE .sp 1 .SH 準拠 SVr4 のコールに似ている (しかし POSIX.1 ではない)。 .SH バグ \fBprofil\fP() は \fBITIMER_PROF\fP インターバルタイマーも使用しているプログラムでは使用できない (\fBsetitimer\fP(2) 参照)。 .PP .\" Libc 4.4 contained a kernel patch providing a system call profil. 本当のカーネルプロファイルはより正確な結果を与える。 .SH 関連項目 \fBgprof\fP(1), \fBsprof\fP(1), \fBsetitimer\fP(2), \fBsigaction\fP(2), \fBsignal\fP(2) .SH この文書について この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は \%https://www.kernel.org/doc/man\-pages/ に書かれている。