summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1995-03-10 08:41:26 +0000
committerphk <phk@FreeBSD.org>1995-03-10 08:41:26 +0000
commit2c992ab302b75a0385c091a37fd1ac08e087f82f (patch)
tree2d7e54c1973fee8188915d04ef9c25d460e7e696
parentf41548603754017fc6251d05327b8b4c5e03037a (diff)
downloadFreeBSD-src-2c992ab302b75a0385c091a37fd1ac08e087f82f.zip
FreeBSD-src-2c992ab302b75a0385c091a37fd1ac08e087f82f.tar.gz
Add a dummy ___bb_init_func for BB profiling of the kernel.
To use this: recompile src/gnu/usr.bin/cc, compile your kernel. The files you want to profile should be compiled with '-a -g'. "strip -x" the kernel and run. You don't need to profile all files in the kernel. My next commit is the program to extract the data from the running kernel.
-rw-r--r--sys/amd64/amd64/locore.S14
-rw-r--r--sys/amd64/amd64/locore.s14
-rw-r--r--sys/i386/i386/locore.s14
3 files changed, 39 insertions, 3 deletions
diff --git a/sys/amd64/amd64/locore.S b/sys/amd64/amd64/locore.S
index 657debd..65ff44e 100644
--- a/sys/amd64/amd64/locore.S
+++ b/sys/amd64/amd64/locore.S
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)locore.s 7.3 (Berkeley) 5/13/91
- * $Id: locore.s,v 1.48 1995/02/11 04:21:22 phk Exp $
+ * $Id: locore.s,v 1.49 1995/02/17 02:22:41 phk Exp $
*/
/*
@@ -758,3 +758,15 @@ NON_GPROF_ENTRY(sigcode)
.globl _szsigcode
_szsigcode:
.long _szsigcode-_sigcode
+
+/*
+ * Here for doing BB-profiling (gcc -a).
+ * We rely on the "bbset" instead, but need a dummy function.
+ */
+ .text
+ .align 2
+.globl ___bb_init_func
+___bb_init_func:
+ movl 4(%ebp),%eax
+ movl $1,(%eax)
+ ret
diff --git a/sys/amd64/amd64/locore.s b/sys/amd64/amd64/locore.s
index 657debd..65ff44e 100644
--- a/sys/amd64/amd64/locore.s
+++ b/sys/amd64/amd64/locore.s
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)locore.s 7.3 (Berkeley) 5/13/91
- * $Id: locore.s,v 1.48 1995/02/11 04:21:22 phk Exp $
+ * $Id: locore.s,v 1.49 1995/02/17 02:22:41 phk Exp $
*/
/*
@@ -758,3 +758,15 @@ NON_GPROF_ENTRY(sigcode)
.globl _szsigcode
_szsigcode:
.long _szsigcode-_sigcode
+
+/*
+ * Here for doing BB-profiling (gcc -a).
+ * We rely on the "bbset" instead, but need a dummy function.
+ */
+ .text
+ .align 2
+.globl ___bb_init_func
+___bb_init_func:
+ movl 4(%ebp),%eax
+ movl $1,(%eax)
+ ret
diff --git a/sys/i386/i386/locore.s b/sys/i386/i386/locore.s
index 657debd..65ff44e 100644
--- a/sys/i386/i386/locore.s
+++ b/sys/i386/i386/locore.s
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)locore.s 7.3 (Berkeley) 5/13/91
- * $Id: locore.s,v 1.48 1995/02/11 04:21:22 phk Exp $
+ * $Id: locore.s,v 1.49 1995/02/17 02:22:41 phk Exp $
*/
/*
@@ -758,3 +758,15 @@ NON_GPROF_ENTRY(sigcode)
.globl _szsigcode
_szsigcode:
.long _szsigcode-_sigcode
+
+/*
+ * Here for doing BB-profiling (gcc -a).
+ * We rely on the "bbset" instead, but need a dummy function.
+ */
+ .text
+ .align 2
+.globl ___bb_init_func
+___bb_init_func:
+ movl 4(%ebp),%eax
+ movl $1,(%eax)
+ ret
OpenPOWER on IntegriCloud