Searching \ for '[PIC]: Histograms' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page:
Search entire site for: 'Histograms'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: Histograms'
2000\08\21@202446 by Bob Ammerman

picon face
OOPS, I previously sent this to James Newton instead of the list...

There are two techniques used for profiling: counting and sampling.

In the first you instrument the code (or use a single-step capability of the
processor or run under a simulator) to count the number of times certain
code paths are followed. This could certainly be done on a PIC, but you'd
have to account for the delay introduced. This is the usual technique
supported by a simulator.

In the second method you generate interrupts, either on a fixed interval, or
on some (pseudo-)random interval. At each interval you sample the program
counter. This could be done on 18C series PIC's only AFAIK because they are
the only PICs that provide programmatic access to the stack.

Bob Ammerman
RAm Systems
(contract development of high performance, high function, low-level

----- Original Message -----
From: James Newton <spam_OUTjamesnewtonTakeThisOuTspamPICLIST.COM>
To: <.....PICLISTKILLspamspam@spam@MITVMA.MIT.EDU>
Sent: Monday, August 21, 2000 3:38 PM
Subject: Re: [PIC]: PIC Profiler

> I may be wrong here but without a time based interrupt (ROMZap has only
> placed calls to the monitor routine and I didn't think WLoader had any
> ability, please correct if wrong) I don't see how profiling would happen.
> I certainly do agree that this would be a good place for it, and that it
> could be done, but either an external interrupt, or timer ISR code would
> required. Not too hard, just would require some additional (precious)
> overhead.
> Now, the ICD (is anyone from Microchip listening) should be able to do
> without any additional target chip hardware or software overhead. Just a
> tweak (maybe) in the ICD "module" firmware and some GUI on the PC.
> The SXKey for the SX PIC clones has a "Poll"
> mode where the chip gets interrupted and the registers updated on the PC
> screen every few hundred milliseconds and I've used that as an "seat of
> pants" profiler in the past.
> My experience is that 90% of the programs spend %80 percent of their time
> 5% of the code (or about) so it sort of jumps out at you. I've also been
> (unpleasantly) suppressed at which 5% of the code it is on a number of
> occasions.
> ---
> James Newton (PICList Admin #3)
> 1-619-652-0593
> PIC/PICList FAQ: or .org
> {Original Message removed}

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