summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordrahn <drahn@openbsd.org>2006-04-24 14:30:07 +0000
committerdrahn <drahn@openbsd.org>2006-04-24 14:30:07 +0000
commitc334daa72b3817f5f42ed0efe493917b4cc82919 (patch)
tree5cf9eb9a33155ddc11ee8466d4f5e817efef98bc
parentProperly terminate ENTRY with a semicolon, required for asm profiling. (diff)
downloadwireguard-openbsd-c334daa72b3817f5f42ed0efe493917b4cc82919.tar.xz
wireguard-openbsd-c334daa72b3817f5f42ed0efe493917b4cc82919.zip
Enable profling in asm if either PROF or GPROF is enabled, kernel profiling
builds with GPROF, libraries build with PROF. ok espie, miod
-rw-r--r--sys/arch/i386/include/asm.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/arch/i386/include/asm.h b/sys/arch/i386/include/asm.h
index f2da5755a33..86f17269d03 100644
--- a/sys/arch/i386/include/asm.h
+++ b/sys/arch/i386/include/asm.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: asm.h,v 1.8 2004/06/13 21:49:16 niklas Exp $ */
+/* $OpenBSD: asm.h,v 1.9 2006/04/24 14:30:07 drahn Exp $ */
/* $NetBSD: asm.h,v 1.7 1994/10/27 04:15:56 cgd Exp $ */
/*-
@@ -92,7 +92,7 @@
#define _ENTRY(x) \
.text; _ALIGN_TEXT; .globl x; .type x,@function; x:
-#ifdef GPROF
+#if defined(PROF) || defined(GPROF)
# define _PROF_PROLOGUE \
pushl %ebp; movl %esp,%ebp; call PIC_PLT(mcount); popl %ebp
#else
@@ -102,6 +102,7 @@
#define ENTRY(y) _ENTRY(_C_LABEL(y)); _PROF_PROLOGUE
#define NENTRY(y) _ENTRY(_C_LABEL(y))
#define ASENTRY(y) _ENTRY(_ASM_LABEL(y)); _PROF_PROLOGUE
+#define NASENTRY(y) _ENTRY(_ASM_LABEL(y))
#define ALTENTRY(name) .globl _C_LABEL(name); _C_LABEL(name):