simulavr-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Simulavr-devel] simulavr and avr-gdb


From: Klaus Rudolph
Subject: Re: [Simulavr-devel] simulavr and avr-gdb
Date: Mon, 20 Feb 2006 09:24:37 +0100 (MET)

Hi Dave,

there is actually no C/C++ source based stack checking algo in the simulator
which could be able to find begin and end of a c/c++ function,
so it is easy possible to add the support for your needs.
It is really possible but not implemented. Sorry.

But you can add -t flag to call and get a trace file.
grep through your trace file for the needed functions.
There is a entry in each line which counts the needed times/steps.
Maybe you can write a little parser for your needs in awk/perl or 
some other scripting languages. Seems to be really easy :-)

Runtime measurements will be set on the "todo" list, but I will give
you no date for that :-)

Hope this helps.

 Klaus



> --- Ursprüngliche Nachricht ---
> Von: Dave <address@hidden>
> An: address@hidden, Klaus Rudolph <address@hidden>
> Betreff: Re: [Simulavr-devel] simulavr and avr-gdb
> Datum: Fri, 17 Feb 2006 12:18:00 -0800 (PST)
> 
> Hello,
> 
> I need to measure how many instructions it takes to run a certain routine
> using simulavr. The reason I'm trying to do is to see the execution time.
I
> tried to set up a timer on my AVR butterfly, but my program takes only a
> few microseconds, so it's better if I can get the instruction count in
> simulation. My question is how can I set a counter in simulavr to count
> instructions? Thank you for your help!
> 
> Dave
> 
> Klaus Rudolph <address@hidden> wrote: Hi Dave,
> 
> > 
> > 
> > - how many instructions does it take to run a certain
> > routine?
> 
> There is actually no profiling support for simulavr and also
> not for simulavrxx. simulavrxx provide some statistics, especially
> for interrupt latency and interrupt execution times. It should
> be easy to write a function based statistic. Maybe it is simplier
> to create a gprof output from the simulator and do the rest with 
> the standard toolchain. But I was not able to get support from
> gcc for that purpose. So I have not tried to implement that.
> 
> > - what is the memory layout of my data structures?
> That needs not a debugger. Simply look in your elf-file.
> 
> > - how long does it take to run the whole program?
> Same as first question :-)
> 
> > - where are my data structures located, in sram or in
> Same as second question :-)
> 
> > flash?
> Same as second question :-)
> 
> Do you know the nm instruction? There you get the address of each
> located data/function of your elf file. with objdump you can 
> look inside your code and can see the disassembly of all code parts.
> 
> Your question is not directly related to the simulator, so I would
> please you to read the gcc/binutils documentation first. There
> you find a lot of information regarding your questions. 
> The simulation itself could do some statistics for you, but most of
> your questions points to static parameters and needs not a debugger or
> a simulator.
> 
> Typically simulatons are used to get more information for
> heap usage (malloc/free, fragmentations...), interrupt latency problems,
> stack usage and depth of nested irqs and so on.
> 
> I hope this helps :-)
> 
> 
> 
> Regards
>    Klaus
> 
> -- 
> DSL-Aktion wegen gro�er Nachfrage bis 28.2.2006 verl�ngert:
> GMX DSL-Flatrate 1 Jahr kostenlos* http://www.gmx.net/de/go/dsl
> 
> 
>               
> ---------------------------------
>  Yahoo! Mail
>  Use Photomail to share photos without annoying attachments.

-- 
DSL-Aktion wegen großer Nachfrage bis 28.2.2006 verlängert:
GMX DSL-Flatrate 1 Jahr kostenlos* http://www.gmx.net/de/go/dsl




reply via email to

[Prev in Thread] Current Thread [Next in Thread]