Date: Wed, 19 Mar 2003 02:44:33 -0500 From: Yaoping Ruan <yruan@cs.princeton.edu> To: hackers@FreeBSD.ORG Subject: mcount() / kernel profiling Message-ID: <3E781FE1.10A0F029@cs.princeton.edu> References: <bulk.48478.20030318143322@hub.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Greeting, Could anybody give me some advise about the kernel profiling implementation in FreeBSD. Specifically, I am confused by: 1. Is the asm code in /sys/i386/isa/prof_machdep.c the entry code plugged into each function? and it calls _MCOUNT_DECL(frompc, selfpc) in /sys/libkern/mcount.c, which to my understanding is the implementation doing real profiling? 2. How does __mcount linked by each function? I know GCC has an option -finstrument-functions and one can write __cyg_profile_func_enter() and __cyg_profile_func_exit() procedure. But what mechanism is used for mcount? Thanks a lot - Yaoping R. 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?3E781FE1.10A0F029>