summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/mips/bits
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2004-08-21 21:19:29 +0000
committerEric Andersen <andersen@codepoet.org>2004-08-21 21:19:29 +0000
commit6e112da93a731085ff9b07f0804395bb3866925a (patch)
tree63320d9f5200bb3892ccfbcc55be84a5da535023 /libc/sysdeps/linux/mips/bits
parente50f6d1c15483fc17323ecdd427f4a84c018f3af (diff)
Kill off all support for 'gcc -pg' / 'gprof' style profiling. There is both a
size and performance penalty to profiling applications this way, as well as Heisenberg effects, where the act of measuring changes what is measured. There are better tools for doing profiling, such as OProfile, that do not require gcc to instrument the application code. -Erik
Diffstat (limited to 'libc/sysdeps/linux/mips/bits')
-rw-r--r--libc/sysdeps/linux/mips/bits/dlfcn.h22
-rw-r--r--libc/sysdeps/linux/mips/bits/machine-gmon.h73
2 files changed, 0 insertions, 95 deletions
diff --git a/libc/sysdeps/linux/mips/bits/dlfcn.h b/libc/sysdeps/linux/mips/bits/dlfcn.h
index c5b4c5950..55e68e91e 100644
--- a/libc/sysdeps/linux/mips/bits/dlfcn.h
+++ b/libc/sysdeps/linux/mips/bits/dlfcn.h
@@ -40,25 +40,3 @@
/* Do not delete object when closed. */
#define RTLD_NODELETE 0x01000
-#ifdef __USE_GNU
-/* To support profiling of shared objects it is a good idea to call
- the function found using `dlsym' using the following macro since
- these calls do not use the PLT. But this would mean the dynamic
- loader has no chance to find out when the function is called. The
- macro applies the necessary magic so that profiling is possible.
- Rewrite
- foo = (*fctp) (arg1, arg2);
- into
- foo = DL_CALL_FCT (fctp, (arg1, arg2));
-*/
-# define DL_CALL_FCT(fctp, args) \
- (_dl_mcount_wrapper_check ((void *) (fctp)), (*(fctp)) args)
-
-__BEGIN_DECLS
-
-/* This function calls the profiling functions. */
-extern void _dl_mcount_wrapper_check (void *__selfpc) __THROW;
-
-__END_DECLS
-
-#endif
diff --git a/libc/sysdeps/linux/mips/bits/machine-gmon.h b/libc/sysdeps/linux/mips/bits/machine-gmon.h
deleted file mode 100644
index 6bece2be5..000000000
--- a/libc/sysdeps/linux/mips/bits/machine-gmon.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/* Machine-specific calling sequence for `mcount' profiling function. MIPS
- Copyright (C) 1996, 1997, 2000, 2001, 2002 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-#if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ <= 1)
-#define _MCOUNT_DECL(frompc,selfpc) \
-static void __mcount (u_long frompc, u_long selfpc)
-#else
-#define _MCOUNT_DECL(frompc,selfpc) \
-static void __attribute_used__ __mcount (u_long frompc, u_long selfpc)
-#endif
-
-/* Call __mcount with our the return PC for our caller,
- and the return PC our caller will return to. */
-#ifdef __PIC__
-#define CPLOAD ".cpload $25;"
-#define CPRESTORE ".cprestore 44\n\t"
-#else
-#define CPLOAD
-#define CPRESTORE
-#endif
-
-#define MCOUNT asm(\
- ".globl _mcount;\n\t" \
- ".align 2;\n\t" \
- ".type _mcount,@function;\n\t" \
- ".ent _mcount\n\t" \
- "_mcount:\n\t" \
- ".frame $sp,44,$31\n\t" \
- ".set noreorder;\n\t" \
- ".set noat;\n\t" \
- CPLOAD \
- "subu $29,$29,48;\n\t" \
- CPRESTORE \
- "sw $4,24($29);\n\t" \
- "sw $5,28($29);\n\t" \
- "sw $6,32($29);\n\t" \
- "sw $7,36($29);\n\t" \
- "sw $2,40($29);\n\t" \
- "sw $1,16($29);\n\t" \
- "sw $31,20($29);\n\t" \
- "move $5,$31;\n\t" \
- "move $4,$1;\n\t" \
- "jal __mcount;\n\t" \
- "nop;\n\t" \
- "lw $4,24($29);\n\t" \
- "lw $5,28($29);\n\t" \
- "lw $6,32($29);\n\t" \
- "lw $7,36($29);\n\t" \
- "lw $2,40($29);\n\t" \
- "lw $31,20($29);\n\t" \
- "lw $1,16($29);\n\t" \
- "addu $29,$29,56;\n\t" \
- "j $31;\n\t" \
- "move $31,$1;\n\t" \
- ".set reorder;\n\t" \
- ".set at\n\t" \
- ".end _mcount");