summaryrefslogtreecommitdiffstats
path: root/sys/ia64/include/cpu.h
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2004-08-25 07:42:34 +0000
committermarcel <marcel@FreeBSD.org>2004-08-25 07:42:34 +0000
commit52736a0a13c8e6e526a15ae80cb713785a0e54e9 (patch)
tree96140b7210ea2a78aca4308ffa0ac64699660fe9 /sys/ia64/include/cpu.h
parenta2bb055310854876373f4978c9077436ae388a9b (diff)
downloadFreeBSD-src-52736a0a13c8e6e526a15ae80cb713785a0e54e9.zip
FreeBSD-src-52736a0a13c8e6e526a15ae80cb713785a0e54e9.tar.gz
Make profiling actually work. The gcc compiler emits a call to the
_mcount() stub when profiling is enabled. Emit this code sequence for assembly routines as welli (MCOUNT definition in <machine/asm.h>. We do not pass the GOT entry however as the 4th argument, because it's not used. The _mcount() stub calls __mcount(), which does the actual work. Define _MCOUNT_DECL to define __mcount. We do not have an implementation of mcount(), so we define MCOUNT as empty, but have a weak alias to _mcount() in _mcount.S. Note that the _mcount() stub in the kernel is slightly different from the stub in userland. This is because we do not have to worry about nested routines in the kernel.
Diffstat (limited to 'sys/ia64/include/cpu.h')
-rw-r--r--sys/ia64/include/cpu.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/ia64/include/cpu.h b/sys/ia64/include/cpu.h
index c7a4603..da33f82 100644
--- a/sys/ia64/include/cpu.h
+++ b/sys/ia64/include/cpu.h
@@ -78,6 +78,11 @@ struct clockframe {
#ifdef _KERNEL
+#ifdef GPROF
+extern char btext[];
+extern char etext[];
+#endif
+
/*
* Return contents of in-cpu fast counter as a sort of "bogo-time"
* for non-critical timing.
OpenPOWER on IntegriCloud