www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/11/10/03:23:21

Date: Mon, 10 Nov 1997 10:21:10 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Nate Eldredge <eldredge AT ap DOT net>
cc: djgpp AT delorie DOT com
Subject: Re: Curious: How does DJGPP profile __dpmi_int?
In-Reply-To: <199711100341.TAA11151@adit.ap.net>
Message-ID: <Pine.SUN.3.91.971110101904.13667N-100000@is>
MIME-Version: 1.0

On Sun, 9 Nov 1997, Nate Eldredge wrote:

> That's my question. How is it possible for __dpmi_int to show up on
> profiling outputs of DJGPP programs? I looked at its sources, expecting to
> find a call to _mcount (the function that's called on entry to a profiled
> function and sets up its profiling), but I didn't.

I think it's for the same reason other library functions appear in
the profile, although the library wasn't compiled with -pg.

The reason is that the profile is also gathered on timer tick
interrupts.  The interrupt handler records the EIP and later
gprof translates it into a symbol by looking at the debug info
in the executable (much like the debugger does).

> It's a nice feature, but how the heck is it done? I think it's magic.

"Any sufficiently high technology is indistinguishable from magic."  
(A. Einstein)

- Raw text -


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