Message-ID: <3B1C2662.A2575F0D@mail.rosecom.ca> From: April 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 Content-Type: multipart/alternative; boundary="------------4578454969EC75959D5EBEFB" 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 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--