summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortjr <tjr@FreeBSD.org>2004-05-29 01:13:28 +0000
committertjr <tjr@FreeBSD.org>2004-05-29 01:13:28 +0000
commit3793bc5d4886caad8c9d7c3bc40d8c6f9987cd9a (patch)
tree9cc903eec97bf09694f4f566588c564115902933
parentddbca80ea4b7c2708c105436a363ce9098d0e7d3 (diff)
downloadFreeBSD-src-3793bc5d4886caad8c9d7c3bc40d8c6f9987cd9a.zip
FreeBSD-src-3793bc5d4886caad8c9d7c3bc40d8c6f9987cd9a.tar.gz
Implement __bb_init_func. This is a fairly straightforward conversion
of the i386 version.
-rw-r--r--sys/amd64/amd64/support.S19
1 files changed, 19 insertions, 0 deletions
diff --git a/sys/amd64/amd64/support.S b/sys/amd64/amd64/support.S
index 3f72252..d81d3e5 100644
--- a/sys/amd64/amd64/support.S
+++ b/sys/amd64/amd64/support.S
@@ -653,3 +653,22 @@ ENTRY(longjmp)
incl %eax
ret
#endif
+
+/*
+ * Support for BB-profiling (gcc -a). The kernbb program will extract
+ * the data from the kernel.
+ */
+
+ .data
+ ALIGN_DATA
+ .globl bbhead
+bbhead:
+ .quad 0
+
+ .text
+NON_GPROF_ENTRY(__bb_init_func)
+ movq $1,(%rdi)
+ movq bbhead,%rax
+ movq %rax,32(%rdi)
+ movq %rdi,bbhead
+ NON_GPROF_RET
OpenPOWER on IntegriCloud