www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2022/08/01/07:20:05

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
X-Recipient: djgpp AT delorie DOT com
X-Original-DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
mime-version; bh=13WnBvZM/SMveyXTzjj3fRiTsm2F3vgvyYJ549XRkTQ=; b=i3FKEA4EFWuS
1ZUQ7qxXFhSME4PDJrjjsjgwpZ9u8j3WI/bkNTs0P/AHX4eWpSvwbDSkE3ixsqm34nr8Co0IvBqC3
7DWcJTBfVElYJgGgypJ0QmXao0RWywTUfLP+awTlzdQI19wtCOve4+WCXL8v345v/hyAV1ySnI3kL
k+VDIKXBmHTrAjDCMojYBGORvxFMsc96YPB2jByktOEN9zQFF0gEdc5FX+H0lwpS8Z0tSpi/zQ9eH
LXGb27mL3XLWyg146I0e3U70gWCLkJXXdyTF6jy3Ea9blYWGpGtmTtA9rlNrvJfdtgNe4QvV5HGjY
Bnp3/hJ3AJxzJV2e091eVA==;
Date: Mon, 01 Aug 2022 14:19:39 +0300
Message-Id: <834jyw43ec.fsf@gnu.org>
From: "Eli Zaretskii (eliz AT gnu DOT org) [via djgpp AT delorie DOT com]" <djgpp AT delorie DOT com>
To: djgpp AT delorie DOT com
In-Reply-To: <slrntee0oh.lbr.bencollver@svadhyaya.localdomain>
(djgpp AT delorie DOT com)
Subject: Re: gprof report incomplete
References: <slrntee0oh DOT lbr DOT bencollver AT svadhyaya DOT localdomain>
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> From: "Ben Collver (bencollver AT tilde DOT pink) [via djgpp AT delorie DOT com]" <djgpp AT delorie DOT com>
> Date: Sun, 31 Jul 2022 22:34:45 -0000 (UTC)
> 
> I am trying to use gprof in DJGPP 2.05.  I wrote a small test program
> named hello.c.  On Linux, gprof correctly reports 10 calls to
> function helloworld.  With DJGPP, gprof reports an undefined number
> of calls to __dpmi_int and nothing else.

I think this is more or less expected, given that (a) the profile
timer has a relatively low frequency in DJGPP (just 18.2 Hz), that
(b) the heavy processing of printf is in triggering switch from
protected mode to real mode and invoking a DOS interrupt (which
is what __dpmi_int does), and (c) that the profile timer is
effectively disabled during the time the CPU is in real mode.

> I am not sure how to troubleshoot this further.  Any other ideas?

Why is it important to profile such toy programs?  What real-life
problem did you encounter that led you to try the above?

- Raw text -


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