summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@uclibc-ng.org>2016-07-11 14:59:22 (GMT)
committerWaldemar Brodkorb <wbx@uclibc-ng.org>2016-07-17 09:22:40 (GMT)
commit345181fb9a36ad18c0a40ccb74bff9ee4d03819b (patch)
treeae423df029137e85c5e7edbcec1e128ba4ebabda
parenta072066753e15c3a82bc32f89c1eef277af0b31e (diff)
cleanup CALL_MCOUNT / PROF
As this is only implemented for a few architecture and not well tested, just remove it.
-rw-r--r--libc/sysdeps/linux/arm/sysdep.h13
-rw-r--r--libc/sysdeps/linux/i386/sysdep.h15
-rw-r--r--libc/sysdeps/linux/ia64/sysdep.h8
-rw-r--r--libc/sysdeps/linux/sh/sysdep.h23
-rw-r--r--libc/sysdeps/linux/x86_64/sysdep.h19
-rw-r--r--libc/sysdeps/linux/xtensa/sysdep.h8
6 files changed, 8 insertions, 78 deletions
diff --git a/libc/sysdeps/linux/arm/sysdep.h b/libc/sysdeps/linux/arm/sysdep.h
index 208521f..f8f2f8a 100644
--- a/libc/sysdeps/linux/arm/sysdep.h
+++ b/libc/sysdeps/linux/arm/sysdep.h
@@ -67,23 +67,12 @@
.globl C_SYMBOL_NAME(name); \
ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),function) \
.align ALIGNARG(4); \
- name##: \
- CALL_MCOUNT
+ name##:
#undef END
#define END(name) \
ASM_SIZE_DIRECTIVE(name)
-/* If compiled for profiling, call `mcount' at the start of each function. */
-#ifdef PROF
-#define CALL_MCOUNT \
- str lr,[sp, #-4]! ; \
- bl PLTJMP(mcount) ; \
- ldr lr, [sp], #4 ;
-#else
-#define CALL_MCOUNT /* Do nothing. */
-#endif
-
#ifdef NO_UNDERSCORES
/* Since C identifiers are not normally prefixed with an underscore
on this system, the asm identifier `syscall_error' intrudes on the
diff --git a/libc/sysdeps/linux/i386/sysdep.h b/libc/sysdeps/linux/i386/sysdep.h
index 4fa47fc..79e53a1 100644
--- a/libc/sysdeps/linux/i386/sysdep.h
+++ b/libc/sysdeps/linux/i386/sysdep.h
@@ -47,26 +47,13 @@
ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),@function) \
.align ALIGNARG(4); \
C_LABEL(name) \
- cfi_startproc; \
- CALL_MCOUNT
+ cfi_startproc;
#undef END
#define END(name) \
cfi_endproc; \
ASM_SIZE_DIRECTIVE(name) \
-/* If compiled for profiling, call `mcount' at the start of each function. */
-#ifdef PROF
-/* The mcount code relies on a normal frame pointer being on the stack
- to locate our caller, so push one just for its benefit. */
-#define CALL_MCOUNT \
- pushl %ebp; cfi_adjust_cfa_offset (4); movl %esp, %ebp; \
- cfi_def_cfa_register (ebp); call JUMPTARGET(mcount); \
- popl %ebp; cfi_def_cfa (esp, 4);
-#else
-#define CALL_MCOUNT /* Do nothing. */
-#endif
-
#ifdef NO_UNDERSCORES
/* Since C identifiers are not normally prefixed with an underscore
on this system, the asm identifier `syscall_error' intrudes on the
diff --git a/libc/sysdeps/linux/ia64/sysdep.h b/libc/sysdeps/linux/ia64/sysdep.h
index 3e7e467..3662114 100644
--- a/libc/sysdeps/linux/ia64/sysdep.h
+++ b/libc/sysdeps/linux/ia64/sysdep.h
@@ -39,15 +39,12 @@
#define C_LABEL(name) name/**/:
#endif
-#define CALL_MCOUNT
-
#define ENTRY(name) \
.text; \
.align 32; \
.proc C_SYMBOL_NAME(name); \
.global C_SYMBOL_NAME(name); \
- C_LABEL(name) \
- CALL_MCOUNT
+ C_LABEL(name)
#define HIDDEN_ENTRY(name) \
.text; \
@@ -55,8 +52,7 @@
.proc C_SYMBOL_NAME(name); \
.global C_SYMBOL_NAME(name); \
.hidden C_SYMBOL_NAME(name); \
- C_LABEL(name) \
- CALL_MCOUNT
+ C_LABEL(name)
#define LEAF(name) \
.text; \
diff --git a/libc/sysdeps/linux/sh/sysdep.h b/libc/sysdeps/linux/sh/sysdep.h
index 281c415..137dd1d 100644
--- a/libc/sysdeps/linux/sh/sysdep.h
+++ b/libc/sysdeps/linux/sh/sysdep.h
@@ -42,34 +42,13 @@
ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),function) \
.align ALIGNARG(5); \
C_LABEL(name) \
- cfi_startproc; \
- CALL_MCOUNT
+ cfi_startproc;
#undef END
#define END(name) \
cfi_endproc; \
ASM_SIZE_DIRECTIVE(C_SYMBOL_NAME(name))
-/* If compiled for profiling, call `mcount' at the start of each function. */
-#ifdef PROF
-#define CALL_MCOUNT \
- mov.l 1f,r1; \
- sts.l pr,@-r15; \
- cfi_adjust_cfa_offset (4); \
- cfi_rel_offset (pr, 0); \
- mova 2f,r0; \
- jmp @r1; \
- lds r0,pr; \
- .align 2; \
-1: .long mcount; \
-2: lds.l @r15+,pr; \
- cfi_adjust_cfa_offset (-4); \
- cfi_restore (pr)
-
-#else
-#define CALL_MCOUNT /* Do nothing. */
-#endif
-
#ifdef __UCLIBC_UNDERSCORES__
/* Since C identifiers are not normally prefixed with an underscore
on this system, the asm identifier `syscall_error' intrudes on the
diff --git a/libc/sysdeps/linux/x86_64/sysdep.h b/libc/sysdeps/linux/x86_64/sysdep.h
index 0e51001..a5971d7 100644
--- a/libc/sysdeps/linux/x86_64/sysdep.h
+++ b/libc/sysdeps/linux/x86_64/sysdep.h
@@ -42,30 +42,13 @@
ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),@function) \
.align ALIGNARG(4); \
C_LABEL(name) \
- cfi_startproc; \
- CALL_MCOUNT
+ cfi_startproc;
#undef END
#define END(name) \
cfi_endproc; \
ASM_SIZE_DIRECTIVE(name)
-/* If compiled for profiling, call `mcount' at the start of each function. */
-#ifdef PROF
-/* The mcount code relies on a normal frame pointer being on the stack
- to locate our caller, so push one just for its benefit. */
-#define CALL_MCOUNT \
- pushq %rbp; \
- cfi_adjust_cfa_offset(8); \
- movq %rsp, %rbp; \
- cfi_def_cfa_register(%rbp); \
- call JUMPTARGET(mcount); \
- popq %rbp; \
- cfi_def_cfa(rsp,8);
-#else
-#define CALL_MCOUNT /* Do nothing. */
-#endif
-
#ifdef NO_UNDERSCORES
/* Since C identifiers are not normally prefixed with an underscore
on this system, the asm identifier `syscall_error' intrudes on the
diff --git a/libc/sysdeps/linux/xtensa/sysdep.h b/libc/sysdeps/linux/xtensa/sysdep.h
index 060b9b9..8d1bfcf 100644
--- a/libc/sysdeps/linux/xtensa/sysdep.h
+++ b/libc/sysdeps/linux/xtensa/sysdep.h
@@ -45,8 +45,7 @@
.align ALIGNARG(2); \
LITERAL_POSITION; \
C_LABEL(name) \
- abi_entry(sp, FRAMESIZE); \
- CALL_MCOUNT
+ abi_entry(sp, FRAMESIZE);
#define HIDDEN_ENTRY(name) \
.globl C_SYMBOL_NAME(name); \
@@ -55,8 +54,7 @@
.align ALIGNARG(2); \
LITERAL_POSITION; \
C_LABEL(name) \
- abi_entry(sp, FRAMESIZE); \
- CALL_MCOUNT
+ abi_entry(sp, FRAMESIZE);
#undef END
#define END(name) ASM_SIZE_DIRECTIVE(name)
@@ -92,8 +90,6 @@
#error Unsupported Xtensa ABI
#endif
#endif
-#define CALL_MCOUNT /* Do nothing. */
-
/* Linux uses a negative return value to indicate syscall errors,
unlike most Unices, which use the condition codes' carry flag.