delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/05/13/18:10:08

From: alrc AT task DOT com DOT br (Andre Chrcanovic)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: gprof with all zero execution times in version 2.03
Date: 13 May 2003 14:09:11 -0700
Organization: http://groups.google.com/
Lines: 52
Message-ID: <5c9be5c2.0305131309.7d688c74@posting.google.com>
References: <200305121929 DOT h4CJTEN08938 AT delorie DOT com> <b9qgbu$ef9$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE> <5c9be5c2 DOT 0305130628 DOT 45188bfd AT posting DOT google DOT com> <b9r2o9$8fl$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE>
NNTP-Posting-Host: 200.165.11.92
X-Trace: posting.google.com 1052860151 4170 127.0.0.1 (13 May 2003 21:09:11 GMT)
X-Complaints-To: groups-abuse AT google DOT com
NNTP-Posting-Date: 13 May 2003 21:09:11 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

My comments below.

Thanks,

Andre.

Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de> wrote in message news:<b9r2o9$8fl$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE>...
> Andre Chrcanovic <alrc AT task DOT com DOT br> wrote:
> 
> > CFLAGS = -mcpu=pentium -pg -c -imacros boot.def -D__DOS__ $(INCLUDES)
>                                 ^^^^^^^^^^^^^^^^^
> Setting aside those issues already raised by the other response, let me
> comment on this line:
> 
> 1) No debug flags (-g)?  While not strictly needed for profiling, having 
>    them in place should be your default.  Who knows --- it might even solve
>    your problem.
>

I tried with the -g flag and the results were the same.
 
> 2) That -imacros override smells fishy.   It's impossible to tell what 
>    it actually does without seeing that file, boot.def.  This being in
>    your control, *you* have to make sure it doesn't interfere with the
>    profiling machinery.
> 

What the file boot.def has is:

#define __BOOT__
#define __HEADER__
#define __ENABLE_LAN_BOOT__
#define __BOOT_PCI__
#define __DISCO__

> > LNKOPTS = -L$(NPCDIR)/bin -L$(PRODIR)/bin -L$(LANDIR)/bin
> > -L$(TCPDIR)/bin \
> >           -lnuc00 -lprotocol -llan_n -ltcpip
> 
> In case of doubt, those libraries may be the cause of your problem,
> too.  E.g. if they weren't built with -pg themselves, or they fiddle
> with the timers on their own.

I compiled all libraries using the -g and -pg flags, but the
executable generated does not run: it crashes. When I remove -g and
-pg from the libraries that have some assembly code (I use nasm), the
executable runs, but the results were the same. What is the influence
of nasm generated objects in profiling an executable?

Regarding the timers, I change the PC timer and have my own timer
interrupt routine. I need a 5 ms interrupt to scan telephony
hardware...

- Raw text -


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