This is the mail archive of the insight@sources.redhat.com mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Can it calculate instructions


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]