This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Mips profiling


Is this the one you're talking about?  I had already seen your patch to take
the .set noreorder off - I guess this one went in at the same time.  Now I'm
wondering if your mcount works the same way - we have a architecture
dependent _mcount() stub for x86, mips, sh, arm and ppc which basically
calculates the arguments and calls the generic mcount().  Thank you for
explaining the calling conventions to mcount earlier - that might help me
iron out some of the issues I'm having with getting sh working as well.
I've only been looking at profiling (and mips/sh4 assembly) for a week or
two now so I'm still mostly wallowing in ignorance.

Incidentally, for anyone interested, I've got sh4 mcount profiling working
in a limited way - I'll be posting the diffs here at some point when I get
the kinks ironed out.  (actually, I think most of the kinks are in our
mcount, not gcc, but that's another story ;-).

cheers,

Kris

> RCS file: /cvs/gcc/gcc/gcc/config/mips/linux.h,v
> retrieving revision 1.33
> diff -u -r1.33 linux.h
> --- linux.h	2001/11/19 11:28:52	1.33
> +++ linux.h	2002/01/17 00:59:53
> @@ -283,3 +283,9 @@
>  /* Tell function_prologue in mips.c that we have already output the
.ent/.end
>     pseudo-ops.  */
>  #define FUNCTION_NAME_ALREADY_DECLARED
> +
> +/* The glibc _mcount stub will save $v0 for us.  Don't mess with saving
> +   it, since ASM_OUTPUT_REG_PUSH/ASM_OUTPUT_REG_POP do not work in the
> +   presence of $gp-relative calls.  */
> +#undef ASM_OUTPUT_REG_PUSH
> +#undef ASM_OUTPUT_REG_POP
> Index: mips.h

----- Original Message -----
From: "Daniel Jacobowitz" <drow@mvista.com>
To: "Kris Warkentin" <kewarken@qnx.com>
Cc: <gcc@gcc.gnu.org>
Sent: Thursday, March 21, 2002 5:06 PM
Subject: Re: Mips profiling


> On Thu, Mar 21, 2002 at 05:08:19PM -0500, Kris Warkentin wrote:
> > Well, that possibly explains the ra issue...I'll look at our code to see
> > what happens to it.  Seems odd to me that it fails on optimized code
only.
> > We're also seeing some problems with bus errors when we compile C++ with
> > profiling but I haven't followed that up yet.
>
> Search the gcc-patches (I think) archives for posts about MIPS
> profiling.  It's probably the PUSH/POP macros (which can destroy $gp)
> causing this.  I fixed it for Linux several months ago.
>
> --
> Daniel Jacobowitz                           Carnegie Mellon University
> MontaVista Software                         Debian GNU/Linux Developer
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]