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.
This commit is contained in:
Bruce Evans 2006-10-27 14:17:50 +00:00
parent c2df509a1d
commit 447647908c
4 changed files with 8 additions and 24 deletions

View File

@ -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 */

View File

@ -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 */
/*

View File

@ -108,8 +108,12 @@
#define FAKE_MCOUNT(caller) pushl caller ; call __mcount ; popl %ecx
#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 */
/*

View File

@ -349,15 +349,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\
");
#endif /* __GNUCLIKE_ASM */
#endif /* GUPROF */