diff options
author | tjr <tjr@FreeBSD.org> | 2004-05-29 01:13:28 +0000 |
---|---|---|
committer | tjr <tjr@FreeBSD.org> | 2004-05-29 01:13:28 +0000 |
commit | 3793bc5d4886caad8c9d7c3bc40d8c6f9987cd9a (patch) | |
tree | 9cc903eec97bf09694f4f566588c564115902933 | |
parent | ddbca80ea4b7c2708c105436a363ce9098d0e7d3 (diff) | |
download | FreeBSD-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.S | 19 |
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 |