332b359851
Submitted by: Norihiro Kumagai <kuma@nk.rim.or.jp> Reviewed by: Watanabe Kazuhiro <CQG00620@nifty.ne.jp>, kano@na.rim.or.jp
335 lines
9.5 KiB
Groff
335 lines
9.5 KiB
Groff
.\" Copyright (c) 1983, 1990, 1993
|
|
.\" The Regents of the University of California. All rights reserved.
|
|
.\"
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
.\" modification, are permitted provided that the following conditions
|
|
.\" are met:
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
.\" 3. All advertising materials mentioning features or use of this software
|
|
.\" must display the following acknowledgement:
|
|
.\" This product includes software developed by the University of
|
|
.\" California, Berkeley and its contributors.
|
|
.\" 4. Neither the name of the University nor the names of its contributors
|
|
.\" may be used to endorse or promote products derived from this software
|
|
.\" without specific prior written permission.
|
|
.\"
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
.\" SUCH DAMAGE.
|
|
.\"
|
|
.\" @(#)gprof.1 8.1 (Berkeley) 6/6/93
|
|
.\" %FreeBSD: src/usr.bin/gprof/gprof.1,v 1.27 2004/07/03 00:24:41 ru Exp %
|
|
.\"
|
|
.\" $FreeBSD$
|
|
.\"
|
|
.Dd June 20, 2004
|
|
.Dt GPROF 1
|
|
.Os
|
|
.Sh ̾¾Î
|
|
.Nm gprof
|
|
.Nd ¸Æ¤Ó½Ð¤·¥°¥é¥Õ¤Ë´ð¤Å¤¯¥×¥í¥Õ¥¡¥¤¥ë¥Ç¡¼¥¿¤òɽ¼¨¤¹¤ë
|
|
.Sh ½ñ¼°
|
|
.Nm
|
|
.Op Fl abKlLsuz
|
|
.Op Fl C Ar count
|
|
.Op Fl e Ar name
|
|
.Op Fl E Ar name
|
|
.Op Fl f Ar name
|
|
.Op Fl F Ar name
|
|
.Op Fl k Ar fromname toname
|
|
.Op Ar a.out Op Ar a.out.gmon ...
|
|
.Sh ²òÀâ
|
|
.Nm
|
|
¥æ¡¼¥Æ¥£¥ê¥Æ¥£¤Ï¡¢C ¤ä Pascal¡¢Fortran77 ¤Î¼Â¹Ô¥×¥í¥Õ¥¡¥¤¥ë¤òÀ¸À®¤·¤Þ¤¹¡£
|
|
.Nm
|
|
¤Ç¤Ï¡¢¸Æ¤Ó½Ð¤µ¤ì¤¿¥ë¡¼¥Á¥ó¤Î¼Â¹Ô»þ´Ö¤Ï¡¢¸Æ¤Ó½Ð¤·¤¿Â¦¤Î
|
|
¥ë¡¼¥Á¥ó¤Ë²Ã»»¤µ¤ì¤Þ¤¹¡£
|
|
¥×¥í¥Õ¥¡¥¤¥ë¥Ç¡¼¥¿¤Ï¡¢¸Æ¤Ó½Ð¤·¥°¥é¥Õ¥×¥í¥Õ¥¡¥¤¥ë¥Õ¥¡¥¤¥ë
|
|
(call graph profile file)
|
|
¤«¤éÆɤ߽Фµ¤ì¤Þ¤¹¡£
|
|
¤³¤Î¥Õ¥¡¥¤¥ë¤Ï¡¢
|
|
.Xr cc 1 ,
|
|
.Xr pc 1 ,
|
|
.Xr f77 1
|
|
¤Ë
|
|
.Fl pg
|
|
¤ò¤Ä¤±¤Æ¥³¥ó¥Ñ¥¤¥ë
|
|
¤µ¤ì¤¿¥×¥í¥°¥é¥à¤Ë¤è¤Ã¤ÆÀ¸À®¤µ¤ì¤Þ¤¹¡£
|
|
.Fl pg
|
|
¤ò¤Ä¤±¤ë¤È¡¢¥³¥ó¥Ñ¥¤¥é¤Ï
|
|
¥×¥í¥Õ¥¡¥¤¥ëÍѥ饤¥Ö¥é¥ê¤ò¥ê¥ó¥¯¤·¤Þ¤¹¡£
|
|
Ìó«»ö¤È¤·¤Æ¡¢¤³¤ì¤é¤Î¥é¥¤¥Ö¥é¥ê¤Î̾Á°¤Î¸å¤Ë¤Ï
|
|
.Pa _p
|
|
¤¬ÉÕ¤¤Þ¤¹¡£
|
|
¤Ä¤Þ¤ê¡¢¥×¥í¥Õ¥¡¥¤¥ë¤µ¤ì¤ë¥Ð¡¼¥¸¥ç¥ó¤Î
|
|
.Pa libc.a
|
|
¤Ï
|
|
.Pa libc_p.a
|
|
¤Ç¤¢¤ê¡¢¥³¥ó¥Ñ¥¤¥é¤äÎٲȤËľÀܥ饤¥Ö¥é¥ê¤ò»ØÄꤹ¤ë¤È¤¤Ë
|
|
.Fl l Ns Ar c
|
|
¤ÎÂå¤ê¤Ë
|
|
.Fl l Ns Ar c_p
|
|
¤ò»ÈÍѲÄǽ¤Ç¤¹¡£
|
|
Í¿¤¨¤é¤ì¤¿¥ª¥Ö¥¸¥§¥¯¥È¥Õ¥¡¥¤¥ë (¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï
|
|
.Pa a.out )
|
|
¤òÆɤ߹þ¤ó¤Ç¡¢¤½¤Î¥ª¥Ö¥¸¥§¥¯¥È¤Î¥·¥ó¥Ü¥ë¥Æ¡¼¥Ö¥ë¤È
|
|
¸Æ¤Ó½Ð¤·¥°¥é¥Õ¥×¥í¥Õ¥¡¥¤¥ë¤È¤ò·ë¤ÓÉÕ¤±¤Þ¤¹¡£
|
|
¥Ç¥Õ¥©¥ë¥È¤Î¥°¥é¥Õ¥×¥í¥Õ¥¡¥¤¥ë¥Õ¥¡¥¤¥ë¤Î̾Á°¤Ï¡¢
|
|
¼Â¹Ô·Á¼°Ì¾¤Ë¥µ¥Õ¥£¥Ã¥¯¥¹
|
|
.Pa .gmon
|
|
¤òÉÕ¤±¤¿¤â¤Î¤Ç¤¹¡£
|
|
2 ¤Ä°Ê¾å¤Î¥×¥í¥Õ¥¡¥¤¥ë¥Õ¥¡¥¤¥ë¤¬Í¿¤¨¤é¤ì¤ë¤È¡¢
|
|
.Nm
|
|
¤Ï¡¢¤½¤ì¤é¤Î¾ðÊó¤ò¹ç·×¤·¤Æ½ÐÎϤ·¤Þ¤¹¡£
|
|
.Pp
|
|
.Nm
|
|
¥æ¡¼¥Æ¥£¥ê¥Æ¥£¤Ï¡¢³Æ¥ë¡¼¥Á¥ó¤¬¾ÃÈñ¤·¤¿»þ´Ö¤ò·×»»¤·¤Þ¤¹¡£
|
|
¼¡¤Ë¡¢¤³¤Î»þ´Ö¤Ï¸Æ¤Ó½Ð¤·¥°¥é¥Õ¤ÎÊդˤ½¤Ã¤ÆÅÁÇŤµ¤ì¤Þ¤¹¡£
|
|
¥µ¥¤¥¯¥ë¤¬¸«¤Ä¤«¤ë¤È¡¢¥µ¥¤¥¯¥ë¤ËÂФ¹¤ë¸Æ¤Ó½Ð¤·¤¬¡¢¥µ¥¤¥¯¥ë¤Î»þ´Ö¤ò
|
|
¶¦Í¤¹¤ë¤â¤Î¤È¤µ¤ì¤Þ¤¹¡£
|
|
ºÇ½é¤Î¥ê¥¹¥È¤Ë¤Ï¡¢´Ø¿ô¤«¤é¤Î¸Æ¤Ó½Ð¤·¥°¥é¥ÕÁ´ÂΤιç·×»þ´Ö¤Ë¤è¤Ã¤Æ
|
|
¥½¡¼¥È¤µ¤ì¤¿´Ø¿ô¤¬É½¼¨¤µ¤ì¤Æ¤¤¤Þ¤¹¡£
|
|
³Æ´Ø¿ô¤Î¥¨¥ó¥È¥ê¤Î²¼¤Ë¤Ï¡¢¤½¤Î´Ø¿ô¤Î¸Æ¤Ó½Ð¤·¥°¥é¥Õ
|
|
¤Ç¤Î (ľÀܤÎ) »Ò (¤¹¤Ê¤ï¤Á¸Æ¤Ó½Ð¤µ¤ì¤¿´Ø¿ô̾) ¤¬É½¼¨¤µ¤ì¡¢¤½¤ì¤é¤Î
|
|
´Ø¿ô¤Î¾ÃÈñ»þ´Ö¤¬¤É¤ì¤¯¤é¤¤¿Æ (¤Ä¤Þ¤ê¸Æ¤Ó½Ð¤·¤¿Â¦¤Î´Ø¿ô) ¤ËÅÁÇŤµ¤ì¤Æ¤¤¤ë¤«¤¬
|
|
¼¨¤µ¤ì¤Æ¤¤¤Þ¤¹¡£
|
|
ƱÍͤˡ¢³Æ´Ø¿ô¤Î¥¨¥ó¥È¥ê¤Î¾å¦¤Ë¤Ï¡¢
|
|
´Ø¿ô¤Ç¤Î¾ÃÈñ»þ´Ö¤¬¸Æ¤Ó½Ð¤·¸µ¤Î´Ø¿ô¤Ë¤É¤Î¤è¤¦¤ËÅÁÇŤµ¤ì¤Æ¤¤¤ë¤«¤¬
|
|
¼¨¤µ¤ì¤Æ¤¤¤Þ¤¹¡£
|
|
.Pp
|
|
¥µ¥¤¥¯¥ëÁ´ÂΤȤ½¤Î¥á¥ó¥Ð¤Î¥ê¥¹¥È¤ò¼¨¤·¤¿¥¨¥ó¥È¥ê¤¬¡¢
|
|
¥µ¥¤¥¯¥ë¤Î¸Æ¤Ó½Ð¤·²ó¿ô¤ä¼Â¹Ô»þ´Ö¤Ø¤Î³Æ¥á¥ó¥Ð¤Î´óÍ¿¤ò´Þ¤á¤Æɽ¼¨¤µ¤ì¤Þ¤¹¡£
|
|
.Pp
|
|
¼¡¤Î¥ê¥¹¥È¤Ç¤Ï¡¢
|
|
.Xr prof 1
|
|
(NetBSD, FreeBSD¤Ë¤Ï¤¢¤ê¤Þ¤»¤ó) ¤ÈƱÍͤʥեé¥Ã¥È¥×¥í¥Õ¥¡¥¤¥ë (flat profile)
|
|
ɽ¼¨¤µ¤ì¤Þ¤¹¡£
|
|
¤³¤³¤Ë¤Ï¡¢´Ø¿ô¤Î¹ç·×¼Â¹Ô»þ´Ö¤ä¸Æ¤Ó½Ð¤·²ó¿ô¡¢
|
|
¤½¤Î´Ø¿ôËÜÂΤΤߤμ¹Իþ´Ö (¥ß¥êÉäޤ¿¤Ï¥Þ¥¤¥¯¥íÉÃ)¡¢
|
|
¤½¤Î´Ø¿ôËÜÂεڤӤ½¤³¤«¤é¸Æ¤Ó½Ð¤µ¤ì¤¿´Ø¿ô¤Î¼Â¹Ô»þ´Ö (¥ß¥êÉäޤ¿¤Ï¥Þ¥¤¥¯¥íÉÃ)¡¢
|
|
¤¬É½¼¨¤µ¤ì¤Þ¤¹¡£
|
|
.Pp
|
|
ºÇ¸å¤Ë´Ø¿ô̾¤Îº÷°ú¤¬É½¼¨¤µ¤ì¤Þ¤¹¡£
|
|
.Pp
|
|
°Ê²¼¤Î¥ª¥×¥·¥ç¥ó¤¬ÍøÍѲÄǽ¤Ç¤¹¡£
|
|
.Bl -tag -width indent
|
|
.It Fl a
|
|
ÀÅŪ¤ËÀë¸À¤µ¤ì¤¿´Ø¿ô¤Îɽ¼¨¤òÍÞÀ©¤·¤Þ¤¹¡£
|
|
¤³¤Î¥ª¥×¥·¥ç¥ó¤¬»ØÄꤵ¤ì¤ë¤È¡¢ÀÅŪ´Ø¿ô¤Ë¤Ä¤¤¤Æ¤Î¤¹¤Ù¤Æ¤Î´ØÏ¢¤¹¤ë¾ðÊó
|
|
(¼Â¹Ô»þ´Ö¡¢Ê̤δؿô¤Î¸Æ¤Ó½Ð¤·¡¢Â¾¤Î´Ø¿ô¤«¤é¤Î¸Æ¤Ó½Ð¤·¤Ê¤É) ¤¬¡¢
|
|
.Pa a.out
|
|
¥Õ¥¡¥¤¥ëÃæ¤ÎÀÅŪ´Ø¿ô¤ÎľÁ°¤ËÆɤ߹þ¤Þ¤ì¤ë¤µ¤ì¤ë´Ø¿ô¤Ë´Þ¤Þ¤ì¤ë¤³¤È¤Ë¤Ê¤ê¤Þ¤¹¡£
|
|
.It Fl b
|
|
¥×¥í¥Õ¥¡¥¤¥ëÃæ¤Î³Æ¥Õ¥£¡¼¥ë¥É¤ÎÀâÌÀʸ¤òÍÞÀ©¤·¤Þ¤¹¡£
|
|
.It Fl C Ar count
|
|
.Ar count
|
|
¿ô°Ê¾å¤Î´Ø¿ô¤ò´Þ¤à (¸Æ¤Ó½Ð¤·´Ø·¸¤Î) ¥µ¥¤¥¯¥ë¤ò¼è¤ê½ü¤¯¤¿¤á¤Ë¡¢
|
|
ÀÚÃǤ¹¤Ù¤¥¢¡¼¥¯ (¸Æ¤Ó½Ð¤·´Ø·¸) ¤ÎºÇ¾®½¸¹ç¤ò¸«¤Ä¤±¤Þ¤¹¡£
|
|
Ãí°Õ:¥µ¥¤¥¯¥ë¤òÃæÃǤ¹¤ë¤¿¤á¤ËÍѤ¤¤é¤ì¤ë¥¢¥ë¥´¥ê¥º¥à¤Ï»Ø¿ô´Ø¿ôŪ¤Ê
|
|
¤â¤Î¤Ç¤¹¡£
|
|
¤½¤Î¤¿¤á¡¢¤³¤Î¥ª¥×¥·¥ç¥ó¤ò»ØÄꤹ¤ë¤È¡¢
|
|
.Nm
|
|
¤ò¼Â¹Ô¤¹¤ë¤Î¤ËÈó¾ï¤ËŤ¤»þ´Ö¤¬¤«¤«¤ê¤Þ¤¹¡£
|
|
.It Fl e Ar name
|
|
¥ë¡¼¥Á¥ó
|
|
.Ar name
|
|
¤È¤½¤Î¤¹¤Ù¤Æ¤Î»Ò¹ (¤½¤ì¤é¤Î´Ø¿ô¤¬É½¼¨ÍÞÀ©¤µ¤ì¤Æ¤¤¤Ê¤¤¿Æ¤ò¤Û¤«¤Ë
|
|
»ý¤Ã¤Æ¤¤¤Ê¤±¤ì¤Ð) ¤Î¥°¥é¥Õ¥×¥í¥Õ¥¡¥¤¥ë¥¨¥ó¥È¥ê¤Îɽ¼¨¤òÍÞÀ©
|
|
¤·¤Þ¤¹¡£
|
|
2 ¤Ä°Ê¾å¤Î
|
|
.Fl e
|
|
¤ò»ØÄꤹ¤ë¤³¤È¤¬¤Ç¤¤Þ¤¹¡£
|
|
³Æ
|
|
.Fl e
|
|
¤Ë¤Ï 1 ¤Ä¤·¤«
|
|
.Ar name
|
|
¤ò»ØÄꤹ¤ë¤³¤È¤¬¤Ç¤¤Þ¤»¤ó¡£
|
|
.It Fl E Ar name
|
|
.Fl e
|
|
¤ÈƱÍÍ¡¢»ØÄꤵ¤ì¤¿¥ë¡¼¥Á¥ó
|
|
.Ar name
|
|
¤Î¥°¥é¥Õ¥×¥í¥Õ¥¡¥¤¥ë
|
|
¥¨¥ó¥È¥êɽ¼¨¤òÍÞÀ©¤·¤Þ¤¹¡£
|
|
¤µ¤é¤Ë¡¢¥×¥í¥°¥é¥à¤Î¥È¡¼¥¿¥ë¤Î»þ´Ö¤È·×»»»þ´Ö¤Î
|
|
¥Ñ¡¼¥»¥ó¥Æ¡¼¥¸¤«¤é
|
|
.Ar name
|
|
¤Ç»È¤ï¤ì¤Æ¤¤¤ë»þ´Ö¤ò¼è¤ê½ü¤¤Þ¤¹¡£
|
|
(¤¿¤È¤¨¤Ð¡¢
|
|
.Fl E
|
|
.Ar mcount
|
|
.Fl E
|
|
.Ar mcleanup
|
|
¤¬¥Ç¥Õ¥©¥ë¥È¤Ç¤¹)
|
|
.It Fl f Ar name
|
|
»ØÄꤵ¤ì¤¿¥ë¡¼¥Á¥ó
|
|
.Ar name
|
|
¤È¤½¤Î»Ò¹¤Î¥°¥é¥Õ¥×¥í¥Õ¥¡¥¤¥ë¥¨¥ó¥È¥ê
|
|
¤Î¤ß¤òɽ¼¨¤·¤Þ¤¹¡£
|
|
.Fl f
|
|
¥ª¥×¥·¥ç¥ó¤Ï¡¢Ê£¿ô»ØÄꤹ¤ë¤³¤È¤¬¤Ç¤¤Þ¤¹¡£
|
|
³Æ¥ª¥×¥·¥ç¥ó
|
|
.Fl f
|
|
¤Ë¤Ï¡¢1 ¤Ä¤·¤«
|
|
.Ar name
|
|
¤ò»ØÄꤹ¤ë¤³¤È¤¬¤Ç¤¤Þ¤»¤ó¡£
|
|
.It Fl F Ar name
|
|
.Fl f
|
|
¤ÈƱÍͤˡ¢»ØÄꤵ¤ì¤¿¥ë¡¼¥Á¥ó
|
|
.Ar name
|
|
¤È¤½¤Î»Ò¹¤Î¥°¥é¥Õ
|
|
¥×¥í¥Õ¥¡¥¤¥ë¥¨¥ó¥È¥ê¤Î¤ß¤òɽ¼¨¤·¤Þ¤¹¡£
|
|
¥×¥í¥°¥é¥à¤Î¥È¡¼¥¿¥ë¤Î»þ´Ö¤È·×»»»þ´Ö¤Î³ä¹ç
|
|
¤Ë¤Ï¡¢É½¼¨¤µ¤ì¤¿¥ë¡¼¥Á¥ó¤Î»þ´Ö¤Î¤ß¤¬»È¤ï¤ì¤Þ¤¹¡£
|
|
.Fl F
|
|
¤ÏÊ£¿ô»ØÄꤹ¤ë¤³¤È¤¬¤Ç¤¤Þ¤¹¡£
|
|
³Æ¥ª¥×¥·¥ç¥ó
|
|
.Fl F
|
|
¤Ë¤Ï¡¢1 ¤Ä¤·¤«
|
|
.Ar name
|
|
¤ò»ØÄꤹ¤ë¤³¤È¤¬¤Ç¤¤Þ¤»¤ó¡£
|
|
¥ª¥×¥·¥ç¥ó
|
|
.Fl F
|
|
¤Ï¡¢¥ª¥×¥·¥ç¥ó
|
|
.Fl E
|
|
¤Î¸ú²Ì¤òÂǤÁ¾Ã¤·¤Þ¤¹¡£
|
|
.It Fl k Ar fromname Ar toname
|
|
.Ar fromname
|
|
¤«¤é
|
|
.Ar toname
|
|
¤Ø¤Î´Ø¿ô¸Æ¤Ó½Ð¤·´Ø·¸¤Î¥¢¡¼¥¯¤òºï½ü¤·¤Þ¤¹¡£
|
|
¤³¤Î¥ª¥×¥·¥ç¥ó¤Ë¤è¤Ã¤Æ¡¢ÉÔɬÍפÀ¤È»×¤¦¥µ¥¤¥¯¥ë¤òÀÚÃǤ¹¤ë¤³¤È¤¬¤Ç¤¤Þ¤¹¡£
|
|
¥ª¥×¥·¥ç¥ó
|
|
.Fl k
|
|
¤Ï¡¢Ê£¿ô»ØÄꤹ¤ë¤³¤È¤¬¤Ç¤¤Þ¤¹¡£
|
|
³Æ¥ª¥×¥·¥ç¥ó
|
|
.Fl k
|
|
¤Ë¤Ï°ìÂФΥ롼¥Á¥ó̾
|
|
.Pf ( Ar fromname
|
|
¤È
|
|
.Ar toname )
|
|
¤·¤«
|
|
»ØÄꤹ¤ë¤³¤È¤¬¤Ç¤¤Þ¤»¤ó¡£
|
|
.It Fl K
|
|
.Xr sysctl 3
|
|
¤ª¤è¤Ó
|
|
.Xr kldsym 2
|
|
¤Î¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤ò»ÈÍѤ·¤Æ¡¢
|
|
¸½ºß¼Â¹ÔÃæ¤Î¥«¡¼¥Í¥ë¤«¤é¥·¥ó¥Ü¥ë¾ðÊó¤ò¼ý½¸¤·¤Þ¤¹¡£
|
|
¤³¤ì¤Ï¡¢
|
|
.Pa a.out
|
|
°ú¿ô¤ò̵»ë¤µ¤»¡¢
|
|
.Xr kld 4
|
|
¥â¥¸¥å¡¼¥ëÃæ¤Î¥·¥ó¥Ü¥ë¤ò»ÈÍѤǤ¤ë¤è¤¦¤Ë¤·¤Þ¤¹¡£
|
|
.It Fl l
|
|
¸Æ¤Ó½Ð¤·¥°¥é¥Õ¥×¥í¥Õ¥¡¥¤¥ë¤Îɽ¼¨¤òÍÞÀ©¤·¤Þ¤¹¡£
|
|
.It Fl L
|
|
¥Õ¥é¥Ã¥È¥×¥í¥Õ¥¡¥¤¥ë¤Îɽ¼¨¤òÍÞÀ©¤·¤Þ¤¹¡£
|
|
.It Fl s
|
|
»ØÄꤵ¤ì¤¿¤¹¤Ù¤Æ¤Î¥×¥í¥Õ¥¡¥¤¥ë¥Õ¥¡¥¤¥ëÃæ¤Î¥×¥í¥Õ¥¡¥¤¥ë¾ðÊó¤Î¹ç·×
|
|
¤òɽ¤¹¥µ¥Þ¥ê¥×¥í¥Õ¥¡¥¤¥ë¥Õ¥¡¥¤¥ë
|
|
.Pa gmon.sum
|
|
¤¬À¸À®¤µ¤ì¤Þ¤¹¡£
|
|
¤³¤Î¥µ¥Þ¥ê¥×¥í¥Õ¥¡¥¤¥ë¥Õ¥¡¥¤¥ë¤Ï¤³¤Î¤¢¤È¤Î
|
|
.Nm
|
|
¤Î¼Â¹Ô¤Ë
|
|
ÂФ·¤ÆÍ¿¤¨¤é¤ì (¤½¤ÎºÝ¤Ë¤âÄ̾ï
|
|
.Fl s
|
|
¤¬»ØÄꤵ¤ì¤ë)¡¢°ìÏ¢¤Î
|
|
.Pa a.out
|
|
¼Â¹Ô¤Î·ë²Ì¤Î¥×¥í¥Õ¥¡¥¤¥ë¥Ç¡¼¥¿¤Î¹ç·×¤ò
|
|
µá¤á¤ë¤³¤È¤¬¤Ç¤¤Þ¤¹¡£
|
|
.It Fl u
|
|
C ¥×¥í¥°¥é¥à¤Ë¤Ï¸«¤¨¤Ê¤¤Ì¾Á°¤Î´Ø¿ô¤Îɽ¼¨¤òÍÞÀ©¤·¤Þ¤¹¡£
|
|
ELF ¥ª¥Ö¥¸¥§¥¯¥È·Á¼°¤Ç¤Ï¡¢Ê¸»ú
|
|
.Ql .\&
|
|
¤ò´Þ¤à̾Á°¤ò°ÕÌ£¤·¤Þ¤¹¡£
|
|
a.out ¥ª¥Ö¥¸¥§¥¯¥È·Á¼°¤Ç¤Ï¡¢Ê¸»ú
|
|
.Ql _
|
|
¤Ç³«»Ï¤·¤Ê¤¤Ì¾Á°¤ò°ÕÌ£¤·¤Þ¤¹¡£
|
|
¤½¤ì¤é¤Î´Ø¿ô¤Ë´ØÏ¢¤¹¤ë¾ðÊó¤Ï¡¢¤¹¤°Äã°Ì¦¤Î¥¢¥É¥ì¥¹¤Ë¤¢¤ë (ɽ¼¨¤¬
|
|
ÍÞÀ©¤µ¤ì¤Æ¤¤¤Ê¤¤) ´Ø¿ô¤Ë´Þ¤Þ¤ì¤Þ¤¹¡£
|
|
¤³¤ì¤Ë¤è¤ê´Ø¿ôÆâ¤Ë¤¢¤ë¤¿¤À¤Î¥é¥Ù¥ë¤¬´Ø¿ô¤Èǧ¼±¤µ¤ì¤Æ¤·¤Þ¤¦¤Î¤ò
|
|
Ëɤ°»ö¤¬¤Ç¤¤Þ¤¹¡£
|
|
.It Fl z
|
|
»ÈÍѤµ¤ì¤Æ¤¤¤Ê¤¤¥ë¡¼¥Á¥ó (¸Æ¤Ó½Ð¤·²ó¿ô¤È¹ç·×»þ´Ö¤¬ 0 ¤Ç¤¢¤ë) ¤òɽ¼¨¤·¤Þ¤¹¡£
|
|
.Fl c
|
|
¥ª¥×¥·¥ç¥ó¤È¤È¤â¤Ë»È¤¦¤È¡¢°ìÅÙ¤â¸Æ¤Ð¤ì¤Æ¤¤¤Ê¤¤¥ë¡¼¥Á¥ó¤òȯ¸«¤¹¤ë»ö¤¬¤Ç¤¤Þ¤¹¡£
|
|
.El
|
|
.Sh ´ØÏ¢¥Õ¥¡¥¤¥ë
|
|
.Bl -tag -width a.out.gmon -compact
|
|
.It Pa a.out
|
|
¥Æ¥¥¹¥È¶õ´Ö¤È̾Á°¥ê¥¹¥È¡£
|
|
.It Pa a.out.gmon
|
|
ưŪ¤Ê¸Æ¤Ó½Ð¤·¥°¥é¥Õ¤È¥×¥í¥Õ¥¡¥¤¥ë¡£
|
|
.It Pa gmon.sum
|
|
ưŪ¤Ê¸Æ¤Ó½Ð¤·¥°¥é¥Õ¤È¥×¥í¥Õ¥¡¥¤¥ë¤Î¥µ¥Þ¥ê¡£
|
|
.El
|
|
.Sh ´ØÏ¢¹àÌÜ
|
|
.Xr cc 1 ,
|
|
.Xr profil 2 ,
|
|
.Xr clocks 7
|
|
.\" .Xr monitor 3 ,
|
|
.\" .Xr prof 1
|
|
.Rs
|
|
.%T "An Execution Profiler for Modular Programs"
|
|
.%A S. Graham
|
|
.%A P. Kessler
|
|
.%A M. McKusick
|
|
.%J "Software - Practice and Experience"
|
|
.%V 13
|
|
.%P pp. 671-685
|
|
.%D 1983
|
|
.Re
|
|
.Rs
|
|
.%T "gprof: A Call Graph Execution Profiler"
|
|
.%A S. Graham
|
|
.%A P. Kessler
|
|
.%A M. McKusick
|
|
.%J "Proceedings of the SIGPLAN '82 Symposium on Compiler Construction, SIGPLAN Notices"
|
|
.%V 17
|
|
.%N 6
|
|
.%P pp. 120-126
|
|
.%D June 1982
|
|
.Re
|
|
.Sh Îò»Ë
|
|
.Nm
|
|
¥×¥í¥Õ¥¡¥¤¥é¤Ï¡¢
|
|
.Bx 4.2
|
|
¤«¤éÅо줷¤Þ¤·¤¿¡£
|
|
.Sh ¥Ð¥°
|
|
¥µ¥ó¥×¥ê¥ó¥°¤Î¼þ´ü¤¬¥ê¥¹¥È¤ÎºÇ½é¤Ëɽ¼¨¤µ¤ì¤Þ¤¹¤¬¡¢
|
|
Åý·×Ū¤Ê°è¤ò½Ð¤Ê¤¤¤â¤Î¤Ç¤¢¤ë¤«¤â¤·¤ì¤Þ¤»¤ó¡£
|
|
²æ¡¹¤Ï¡¢³Æ´Ø¿ô¤Î¼Â¹Ô»þ´Ö¤Ï¤½¤Î´Ø¿ô¤¬¾ÃÈñ¤·¤¿»þ´Ö¤Î¹ç·×¤ò¤½¤Î´Ø¿ô¤Î
|
|
¸Æ¤Ó½Ð¤·²ó¿ô¤Ç³ä¤Ã¤¿¤â¤Î¤Ë¤è¤Ã¤Æɽ¸½¤µ¤ì¤ë¤È²¾Äꤷ¤Æ¤¤¤Þ¤¹¡£
|
|
¤·¤¿¤¬¤Ã¤Æ¡¢¸Æ¤Ó½Ð¤·¥°¥é¥Õ¤Î´Ø·¸¤Ë¤½¤Ã¤Æ´Ø¿ô¤Î¿Æ¤ËÅÁÇŤµ¤ì¤ë»þ´Ö¤Ï¡¢
|
|
¤½¤Î´Ø·¸¤ò¤¿¤É¤ë²ó¿ô¤ËľÀÜÈæÎ㤷¤Æ¤¤¤Þ¤¹¡£
|
|
.Pp
|
|
¼«¿È¤¬¥×¥í¥Õ¥¡¥¤¥ë¤µ¤ì¤Æ¤¤¤Ê¤¤¿Æ¤Ï¡¢¥×¥í¥Õ¥¡¥¤¥ë¤·¤Æ¤¤¤ë»Ò¶¡¤«¤é
|
|
ÅÁÇŤµ¤ì¤ë»þ´Ö¤ò»ý¤Ã¤Æ¤ª¤ê¡¢¸Æ¤Ó½Ð¤·¥°¥é¥Õ¤Î¥ê¥¹¥È¤Î¤Ê¤«¤Ç
|
|
¼«Æ°Åª¤Ëµ¯Æ°¤µ¤ì¤ë¤â¤Î¤È¤·¤Æ¸½¤ì¤Þ¤¹¡£
|
|
¤·¤«¤·¡¢¤³¤Î´Ø¿ô¤¬»ý¤Ä»þ´Ö¤Ï
|
|
¤½¤ì°Ê¾åÅÁÇŤµ¤ì¤Þ¤»¤ó¡£
|
|
ƱÍͤˡ¢¥·¥°¥Ê¥ë¤òÊ᪤¹¤ë´Ø¿ô¤Ï¡¢¤½¤ì¤é¤¬¥×¥í¥Õ¥¡¥¤¥ë¤µ¤ì¤Æ¤¤¤Æ¤â¡¢
|
|
¼«Æ°Åª¤Ëµ¯Æ°¤µ¤ì¤ë¤â¤Î¤È¤·¤Æ¸½¤ì¤Þ¤¹ (¤â¤¦¾¯¤·Ê£»¨¤ÊÍýͳ¤¬¤¢¤ê¤Þ¤¹¤¬)¡£
|
|
¥×¥í¥Õ¥¡¥¤¥ë¥ë¡¼¥Á¥ó¤ò¼Â¹Ô¤·¤Æ¤¤¤ëºÇÃæ¤Ë¥·¥°¥Ê¥ë¤òÊ᪤¹¤ë
|
|
´Ø¿ô¤¬¸Æ½Ð¤µ¤ì¤¿¤È¤ (¤³¤Î¾ì¹ç¤Ï¤¹¤Ù¤Æ¤¬¼º¤ï¤ì¤Æ¤·¤Þ¤¤¤Þ¤¹) ¤ò½ü¤¤¤Æ¤Ï¡¢
|
|
¥·¥°¥Ê¥ë¤òÊ᪤¹¤ë´Ø¿ô¤Î»Ò¶¡¤Î¼Â¹Ô»þ´Ö¤Ï¡¢¤½¤Î¿Æ¤ËÀµ¤·¤¯
|
|
ÅÁÇŤµ¤ì¤ë¤Ù¤¤Ç¤¹¡£
|
|
.Pp
|
|
¥×¥í¥Õ¥¡¥¤¥ë¤µ¤ì¤Æ¤¤¤ë¥×¥í¥°¥é¥à¤Ï¡¢
|
|
¥°¥é¥Õ¥×¥í¥Õ¥¡¥¤¥ë
|
|
¥Õ¥¡¥¤¥ë¤Ë¥×¥í¥Õ¥¡¥¤¥ë¾ðÊ󤬥»¡¼¥Ö¤µ¤ì¤ë¤è¤¦
|
|
.Xr exit 3
|
|
¤ò¸Æ¤Ö¤«¡¢Àµ¾ï¤Ë½ªÎ»¤·¤Ê¤±¤ì¤Ð¤¤¤±¤Þ¤»¤ó¡£
|