www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1993/06/09/15:35:39

From: jih-shin ho <u7711501 AT bicmos DOT ee DOT nctu DOT edu DOT tw>
Subject: Re: profiling under DJGPP 1.10 ?
To: dj AT ctron DOT com (DJ Delorie)
Date: Thu, 10 Jun 93 2:47:47 EAT
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu (djgpp)

> 
> > Can you please explain why the Gmon.out is so large?  A one line
> > "Hello World" type program with only a main() function should have a
> > small profile, or is it showing the profile for internal (non
> > application) functions?  I, unfortunately, could not get the Gprof to
> > show me the profile because Gprof ran out of memory.
> 
> I don't know why the profile file is so large, but I will look into it
> for 1.11.
> 

Do you use new ld.exe from djgpp 1.10 ? This new ld aligns '_etext' to
segment boundary. gcrt0.o uses this symbol as 'end of program(text)' mark.
So it thinks that your program is 4M bytes in size.

The following is from mcount.c

  h.low = 0x1020;
  h.high = (int)&etext;
  histlen = (h.high-h.low)/4*sizeof(short);

  ........

  f = open("gmon.out", O_WRONLY|O_CREAT|O_TRUNC|O_BINARY, 0666);
  write(f, &h, sizeof(header));
  write(f, histogram, histlen);


It will write at least 2M bytes data to gmon.out.

Please use old ld from djgpp 1.09.

Also I have built ld from bunutil-2.2. This ld will produce COFF output file.
The data segment of COFF file is aligned to page boundary instead of 
segment boundary. Maybe this will solve the large memory requirement in
DPMI mode. Of course, the '_etext' symbol is aligned to page boundary.
I will upload it to omnigate soon.

> > Is Objective C/C++ operational in DJGPP 1.10/1.10a?  If so,
> > what is the procedure for compiling/linking an Obj. C/C++ program
> > using DJGPP 1.10?  If I remember correctly this was "totally re-
> > implemented in GCC 2.4.~0" due to the numerous problems in the
> > previous releases.
> 
> I didn't have a chance to build the ObjC runtime libraries for 1.10.
> 


  -- Jih-Shin Ho

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019