Searching \ for '[PIC] Can MPLAB profile my code?' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/languages.htm?key=mplab
Search entire site for: 'Can MPLAB profile my code?'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] Can MPLAB profile my code?'
2008\03\20@190926 by Gordon Williams

picon face
MPLAB has a stopwatch function in the simulator.  I've used this with break
points numerous times to find out how long critical sections were taking.

Very useful for optimization.

Regards,

Gordon Williams


: Harold Hallikainen wrote:
: >
: > PIC question: Does MPLAB have a way to profile my code so I can figure
out
: > where it's spending all that time?

2008\03\20@192842 by sergio masci

flavicon
face


On Thu, 20 Mar 2008, Gordon Williams wrote:

{Quote hidden}

Profiling is very different. Instead of looking at a specific piece of
code and working out how long it takes to execute, you would look at lots
of pieces of code simultaniously and work out how long each piece takes to
execute relative to the whole. The pieces would typically be functions or
subroutines. In this way you would be able to identify which piece is
takeing a disproportionate amount of time and needs optimising.

Regards
Sergio

2008\03\20@221349 by Harold Hallikainen

face
flavicon
face

{Quote hidden}

One method I've heard of profiling code is to just let it run and capture
the program counter now and then. You can then give the profiler a range
of PC addresses (like some function) and see what percentage of the time
is spent there. It'd be great if the ICD-2 and MPLAB could do something
like this.

Harold



--
FCC Rules Updated Daily at http://www.hallikainen.com - Advertising
opportunities available!

2008\03\20@231152 by Jinx

face picon face
> Does MPLAB have a way to profile my code so I can figure
> out where it's spending all that time?

Not being funny, but doesn't code normally spend its time
where you tell it to ?

2008\03\20@235211 by Michael Monteith

picon face
Not necesarily.  Sometimes things go on that you hadn't taken
into account.  When I used to program PC clones for test equipment
we learned that the way it updated video was a huge waster of I/O.
It updated the display 60 times a second regardless if the data changed.
We didn't find that out until I put in timer codes in different places to
find out where the time was being used up.   After I found it out I rewrote
the video interrupt so that it only updated if the data changed.  It improved
the speed thousands of times.  Just because you tell it to do something
doesn't tell it how long to do it.  Sometimes they way you write you code
the compiler may not make efficient use of it.  So you can insert timer code
and try different techniques to improve your codes performance.  When
memory and processing speed were hard to come by these techniques
were very important.

Michael


----- Original Message ----
{Quote hidden}

> --

2008\03\21@000457 by Harold Hallikainen

face
flavicon
face

>> Does MPLAB have a way to profile my code so I can figure
>> out where it's spending all that time?
>
> Not being funny, but doesn't code normally spend its time
> where you tell it to ?
>

That's true. It always spends all its time where I tell it to.
Unfortunately, that's sometimes not where I want it to be...

Harold



--
FCC Rules Updated Daily at http://www.hallikainen.com - Advertising
opportunities available!

More... (looser matching)
- Last day of these posts
- In 2008 , 2009 only
- Today
- New search...