Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Dec 1998 15:40:41 -0500 (EST)
From:      zhihuizhang <bf20761@binghamton.edu>
To:        hackers <freebsd-hackers@FreeBSD.ORG>
Subject:   Questions about mcount and GUPROF
Message-ID:  <Pine.SOL.L3.93.981230151837.9739A-100000@bingsun2>

next in thread | raw e-mail | index | archive | help

After I notice a "call  __mcount" in assembly format in file asmacros.h,
I try to find where the routine __mcount is defined. In file mcount.c, we
have: _MCOUNT_DECL(frompc, selfpc).  According to file profile.h, if
KERNEL is not defined, we have:

#define _MCOUNT_DECL static __inline void _mcount 

This will give us _mcount() and we can call it with __mcount() (with one
more preceding underscore). 

However, if KERNEL is defined, we have in profile.h:

#define _MCOUNT_DECL void mcount    

This can not give us the same format we need to call it in assembly
language. 

Can someone explain this for me?  By the way, what does the option GUPROF
mean? I can not find it in the FreeBSD handbook. 

Thanks a lot.

-------------------------------------------------- 
| Zhihui Zhang, http://cs.binghamton.edu/~zzhang |
| Dept. of Computer Science,  SUNY at Binghamton |
--------------------------------------------------



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SOL.L3.93.981230151837.9739A-100000>