public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: santosh tatoju <santosh_tatoju@yahoo.co.in>
To: binutils@sourceware.org
Subject: gprof - reg
Date: Sun, 01 May 2011 11:54:00 -0000	[thread overview]
Message-ID: <16808.99701.qm@web95206.mail.in2.yahoo.com> (raw)

Hi all,

I am currently working on gprof utility. I need a clarification on the following. 

To determine the execution time of a function, gprof uses sampling method by collecting samples of program counter at regular intervals of time. It provides a statistical approximation of execution time.  

Other method is to measure the lapsed time between function entry and function exit. This method is simple and will provide exact timings. 

Why the first method is used in spite of its overhead? why the second method is not adopted for evaluating function execution time? What are the advantages of using the first method over the second?

Pls do respond, Thanks in advance.

             reply	other threads:[~2011-05-01 11:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-01 11:54 santosh tatoju [this message]
2011-05-10 15:38 ` Nick Clifton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=16808.99701.qm@web95206.mail.in2.yahoo.com \
    --to=santosh_tatoju@yahoo.co.in \
    --cc=binutils@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).