delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/05/14/05:45:05

From: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: gprof with all zero execution times in version 2.03
Date: 14 May 2003 09:36:13 GMT
Organization: Aachen University of Technology (RWTH)
Lines: 41
Message-ID: <b9t2md$7ca$1@nets3.rz.RWTH-Aachen.DE>
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> <5c9be5c2 DOT 0305131309 DOT 7d688c74 AT posting DOT google DOT com>
NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de
X-Trace: nets3.rz.RWTH-Aachen.DE 1052904973 7562 137.226.32.75 (14 May 2003 09:36:13 GMT)
X-Complaints-To: abuse AT rwth-aachen DOT de
NNTP-Posting-Date: 14 May 2003 09:36:13 GMT
Originator: broeker@
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Andre Chrcanovic <alrc AT task DOT com DOT br> wrote:

> What the file boot.def has is:

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

This doesn't look like something you should be using the -imacros
option for.  A simple #include "boot.def" at the beginning of your
source codes would be the proper way of doing that.

Also note that you're walking on forbidden ground here.  Macros
beginning with two underscores are reserved for the implementation
(i.e. for DJGPP libc or GCC internal usage).  You're not supposed to
be #define'ing any such macros yourself, ever.

> 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?

IIRC, -pg changes the application binary interface (ABI) of compiled C
code.  In particular, the function prologue is a bit different.
Compare gcc -S output to gcc -S -pg output from a simple C source file
to see the difference.  Raw assembly routines may or may not comply
with these changes --- only a look at the actual source code can tell.

> 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...

There, you did it.  Unless you did that *very* carefully, this almost
certainly is what broke the profile data collection.  Gprof relies on
standard timer ticks to do its work.
-- 
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.

- Raw text -


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