From Jeffrey Hsu on the port of mprof to the MIPS:
Date: 8/90

      added some #includes for mips compiler stuff
      created global int variable intloc for use by assembly language routines
      mips traverses the stack differently
      call pdrinit in mprof_startup to read in symbol table
      used __Argv as alternative to making the application stash argv in some
	global somewhere
      dynamically set mp_root_address to an address between __start and main
      added routines pdrinit, getpdr, getretaddr to handle stack traces
      I assume the frame register is 29 and the return address is in 31.

      pretty much the same code as mprof.c to read in the symbol table
      added code to read in structures and typedefs
	pretty hairy
    -> note:  mpheader is a typedef not a structure
	mprof only screens out types, in mpf_intern_type
	so you may see a mpheader under the size 8 bin
	but you can fix that using the same mechanism in mpf_intern_typedef

      define CRT0_ADDRESS to dummy value

      mostly like sun4
      changed ASFLAGS to take out sun stuff
      changed the way the library was created
	Is there some reason for copying libc.a rather than creating a separate
	library?  The user will have to change his command line in either case.

      added routines to get reg 29 and 31
      note: calling the routine to get reg 31 changes reg 31,
	    so we're not really getting reg 31, but the pc at the time we
	    call reg 31
	    all this is accounted for in the code

      added check for realloc w/ null pointer, not really mips specific
	advantages:  some applications can now run w/o modification
	disadvantages:  if you use this feature, the direct allocation table
	    will show realloc as a caller of malloc and your leak table may
	    have realloc as the last function to call malloc
      added mips to the #if check for redefining exit