Mail Archives: djgpp/2001/06/04/20:30:06
Message-ID: | <3B1C2662.A2575F0D@mail.rosecom.ca>
|
From: | April <awhite AT mail DOT rosecom DOT ca>
|
X-Mailer: | Mozilla 4.75 [en]C-CCK-MCD {TLC;RETAIL} (Win95; U)
|
X-Accept-Language: | en
|
MIME-Version: | 1.0
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | gprof question
|
Lines: | 90
|
Date: | Mon, 04 Jun 2001 20:22:58 -0400
|
NNTP-Posting-Host: | 205.189.215.9
|
X-Trace: | client 991700656 205.189.215.9 (Mon, 04 Jun 2001 20:24:16 EDT)
|
NNTP-Posting-Date: | Mon, 04 Jun 2001 20:24:16 EDT
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Reply-To: | djgpp AT delorie DOT com
|
--------------4578454969EC75959D5EBEFB
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
I've started trying to improve my program - a btree program - using the
output of gprof.
I compiled the program without optimization - I learned that hard way
that
functions inlined were not reported.
This is the top of the output of gprof:
% cumulative self self total
time seconds seconds calls ms/call ms/call name
65.73 31.22 31.22 __dpmi_int
11.70 36.78 5.56 __dj_movedata
3.04 38.22 1.44 mcount
2.92 39.61 1.39 1708128 0.00 0.00 KeyGet
1.99 40.56 0.94 916869 0.00 0.00 NodeCopy
These results were from inserting 20000 random words into the btree. I
was quite impressed with the number of calls to KeyGet, but I was
equally shocked by the amount of time reported for __dpmi_int.
info simply states:
This function performs a software interrupt in real mode after
filling
in *most* the registers from the given structure.
I realize that this is a very ambiguous question, but what generally
causes these interrupts to fire? The program runs for about 50 seconds,
and more than 30 seconds apparently are taken up by calls to this
interrupt. If I can acertain what causes it to fire, I might be able to
alter my code and reduce this significant overhead - I hope :-)
Thanks.
April
--------------4578454969EC75959D5EBEFB
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<tt>I've started trying to improve my program - a btree program - using
the</tt>
<br><tt>output of gprof.</tt><tt></tt>
<p><tt>I compiled the program without optimization - I learned that hard
way that</tt>
<br><tt>functions inlined were not reported.</tt><tt></tt>
<p><tt>This is the top of the output of gprof:</tt><tt></tt>
<p><tt> % cumulative self
self total</tt>
<br><tt> time seconds seconds
calls ms/call ms/call name</tt>
<br><tt> 65.73 31.22 31.22
__dpmi_int</tt>
<br><tt> 11.70 36.78
5.56
__dj_movedata</tt>
<br><tt> 3.04 38.22
1.44
mcount</tt>
<br><tt> 2.92 39.61
1.39 1708128 0.00
0.00 KeyGet</tt>
<br><tt> 1.99 40.56
0.94 916869 0.00
0.00 NodeCopy</tt><tt></tt>
<p><tt>These results were from inserting 20000 random words into the btree.
I was quite impressed with the number of calls to KeyGet, but I was equally
shocked by the amount of time reported for __dpmi_int.</tt><tt></tt>
<p><tt>info simply states:</tt><tt></tt>
<p><tt> This function performs a software interrupt in
real mode after filling</tt>
<br><tt> in *most* the registers from the given structure.</tt><tt></tt>
<p><tt>I realize that this is a very ambiguous question, but what generally
causes these interrupts to fire? The program runs for about 50 seconds,
and more than 30 seconds apparently are taken up by calls to this interrupt.
If I can acertain what causes it to fire, I might be able to alter my code
and reduce this significant overhead - I hope :-)</tt><tt></tt>
<p><tt>Thanks.</tt><tt></tt>
<p><tt>April</tt></html>
--------------4578454969EC75959D5EBEFB--
- Raw text -