summaryrefslogtreecommitdiffstats
path: root/sys/amd64
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>2006-10-27 14:17:50 +0000
committerbde <bde@FreeBSD.org>2006-10-27 14:17:50 +0000
commitf3dd13700bb000a0c99cb0996d1f6c9df117b656 (patch)
treecc1bab4d53c3e6c38a88d9d908f4e7581449fe5b /sys/amd64
parent849676e291fd7ded8bde77730c8a4e6c76ee52ea (diff)
downloadFreeBSD-src-f3dd13700bb000a0c99cb0996d1f6c9df117b656.zip
FreeBSD-src-f3dd13700bb000a0c99cb0996d1f6c9df117b656.tar.gz
Don't call mexitcount or provide a stub mexitcount to call when
profiling is configured but high resolution profiling is not configured. Only functions in *.[Ss] called the stub, so efficiency was not significantly affected.
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/amd64/prof_machdep.c13
-rw-r--r--sys/amd64/include/asmacros.h4
2 files changed, 4 insertions, 13 deletions
diff --git a/sys/amd64/amd64/prof_machdep.c b/sys/amd64/amd64/prof_machdep.c
index d78365f..4c57f34 100644
--- a/sys/amd64/amd64/prof_machdep.c
+++ b/sys/amd64/amd64/prof_machdep.c
@@ -375,17 +375,4 @@ stopguprof(gp)
}
#endif
}
-
-#else /* !GUPROF */
-#ifdef __GNUCLIKE_ASM
-__asm(" \n\
- .text \n\
- .p2align 4,0x90 \n\
- .globl " __XSTRING(HIDENAME(mexitcount)) " \n\
-" __XSTRING(HIDENAME(mexitcount)) ": \n\
- ret \n\
-");
-#else /* !__GNUCLIKE_ASM */
-#error this file needs to be ported to your compiler
-#endif /* __GNUCLIKE_ASM */
#endif /* GUPROF */
diff --git a/sys/amd64/include/asmacros.h b/sys/amd64/include/asmacros.h
index 9c0f655..81fed27 100644
--- a/sys/amd64/include/asmacros.h
+++ b/sys/amd64/include/asmacros.h
@@ -108,8 +108,12 @@
#define FAKE_MCOUNT(caller) pushq caller ; call __mcount ; popq %rcx
#define MCOUNT call __mcount
#define MCOUNT_LABEL(name) GEN_ENTRY(name) ; nop ; ALIGN_TEXT
+#ifdef GUPROF
#define MEXITCOUNT call HIDENAME(mexitcount)
#define ret MEXITCOUNT ; NON_GPROF_RET
+#else
+#define MEXITCOUNT
+#endif
#else /* !GPROF */
/*
OpenPOWER on IntegriCloud