summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2010-06-29 19:07:44 +0000
committermarcel <marcel@FreeBSD.org>2010-06-29 19:07:44 +0000
commitcd482a8dfcd52e6dc52e0661406343c6c841cbf3 (patch)
tree14e423c6fba12f691bf429d096948e1a1d91a067
parent566f36f96167c7bcd294511a8a13783af34c84b3 (diff)
downloadFreeBSD-src-cd482a8dfcd52e6dc52e0661406343c6c841cbf3.zip
FreeBSD-src-cd482a8dfcd52e6dc52e0661406343c6c841cbf3.tar.gz
Fix profiling (part 1):
o Functions are 4-byte aligned for Book-E. o We get compiled with -DPROF and not -DGPROF if profiling is enabled.
-rw-r--r--sys/powerpc/include/asm.h2
-rw-r--r--sys/powerpc/include/profile.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/sys/powerpc/include/asm.h b/sys/powerpc/include/asm.h
index d611617..f80c118 100644
--- a/sys/powerpc/include/asm.h
+++ b/sys/powerpc/include/asm.h
@@ -63,7 +63,7 @@
#define _ENTRY(x) \
.text; .align 4; .globl x; .type x,@function; x:
-#ifdef GPROF
+#ifdef PROF
# define _PROF_PROLOGUE mflr 0; stw 0,4(1); bl _mcount
#else
# define _PROF_PROLOGUE
diff --git a/sys/powerpc/include/profile.h b/sys/powerpc/include/profile.h
index 388feb1..47f1393 100644
--- a/sys/powerpc/include/profile.h
+++ b/sys/powerpc/include/profile.h
@@ -34,7 +34,7 @@
#define _MCOUNT_DECL void __mcount
-#define FUNCTION_ALIGNMENT 16
+#define FUNCTION_ALIGNMENT 4
typedef u_int fptrdiff_t;
OpenPOWER on IntegriCloud