Message-ID: <35C16C29.CD2AB583@mailexcite.com> Date: Fri, 31 Jul 1998 03:03:06 -0400 From: Doug Gale MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: Cant create GMON.OUT References: <35C1303D DOT 1CD9 AT Hotmail DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: oshawappp34.idirect.com Organization: "Usenet User" Lines: 31 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Leif wrote: > I would like to do some profiling but for some reason GMON.OUT never > gets written. I compile under RHide using -pg. I have tried many > combinations of -pg -g -o2. When I compile with -pg I do notice the > program running slower as the how-to text said it would. However, after > I quit the program, theres is no file ANYWHERE on my HardDrive named > GMON.OUT . My program does exit normally, I have tried exiting the > program with a return from main() and tried exiting with exit; . My > program does exit with code 0. It seems I have done ALL the neccessary > steps but it wont produce the sneaky GMON.OUT :( One thing I was unsure > about is in the how-to text it says you must also link with the -pg > option. So I tried putting -pg into Linker Options and there was an > error saying the linker didnt recognize -pg. So I looked at the docs for > ld.exe and gcc.exe and couldnt find anything about -pg or profiling > options. > > Can anyone help me produce GMON.OUT, prefferably from RHide, but I will > settle for command line methods :) No need for you to worry about command line parameters. Uncheck -pg, (I never use that), go to Options/Libraries, check "Link for profiling", go to the Compile menu, choose Link (to force linking for the first time after checking this option). Run your program (it's profiling while you run). When you have finished the profile run, exit your program, exit rhide and type "gprof myexe.exe > outnam.txt". This will dump the profile data collected in myexe.exe to the text file outnam.txt. Just open outnam.txt with your favorite text editor, and there's your profile data.