public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
From: "Martin M. Hunt" <hunt@redhat.com>
To: kivik@firstlinux.net
Cc: "insight@sources.redhat.com" <insight@sources.redhat.com>
Subject: Re: Can it calculate instructions
Date: Thu, 06 Feb 2003 20:41:00 -0000	[thread overview]
Message-ID: <1044564095.1176.12.camel@Dragon> (raw)
In-Reply-To: <20030206195957.0EA5B3FBE@sitemail.everyone.net>

On Thu, 2003-02-06 at 11:59, Matts wrote:
> I am considering starting a project for the arm7 or arm9 processor, 
> and I am considering using gcc as compiler and insight as debugger. 
> I have one question on this, is it possible to count instructions with insight ?

Insight can show any function disassembled so you can see how many
instructions there are.  You can do the same with the objdump utility.

Remember you really don't want to try to use a source debugger on highly
optimized code.

> I would really need to calculate processor cycles, but I guess that 
> is not possible with insight ?

There are better ways to do what you want.

> What I need is the possibility to see how many instructions or processor 
> cykles a certain c function takes.

Counting instructions is easy.  Counting CPU cycles requires a CPU
simulator. However I don't believe the GNU arm simulator does that. Even
with a perfect simulator, real world results can vary greatly due to
memory and cache interactions, etc.  It is usually much easier and more
accurate to just measure the CPU time your function takes on a working
system.

Martin


      parent reply	other threads:[~2003-02-06 20:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-06 20:00 Matts
2003-02-06 20:25 ` Duane Ellis
2003-02-06 20:31   ` Keith Seitz
2003-02-06 20:48     ` Duane Ellis
2003-02-06 21:15       ` Keith Seitz
2003-02-06 20:41 ` Martin M. Hunt [this message]

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=1044564095.1176.12.camel@Dragon \
    --to=hunt@redhat.com \
    --cc=insight@sources.redhat.com \
    --cc=kivik@firstlinux.net \
    /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).