
AMDebug™ Technology
Élan™SC520 Microcontroller User’s Manual
26-7
26.4.2
Software Performance Profiling
Software profiling refers to examining the execution times, frequencies, and calling patterns
of different software procedures within a complete program. A variety of techniques are
currently used, some based on statistical analysis, others based on measurements
achieved without statistical sampling. Execution times and call linkage are typically captured
by external (off-chip) instrumentation watching the system buses.
Performance profiling is an exceptionally useful tool to the software engineer trying to
optimize application execution times. When a bond-out package is utilized, an external
hardware device can be constructed to capture the necessary data. When used for instruc-
tion tracing, the trace cache will contain more information than is necessary to perform only
profile analysis. Typically, code first must be “instrumented” before it can be analyzed.
Alternatively, to support performance profiling, the breakpoint control registers can be fur-
ther configured to start and stop a counter that measures elapsed time. When the counter
is started, it is first set to zero, and when the counter is stopped, its value is placed in the
trace cache. This scheme does not have all of the capabilities offered by a system assisted
by external (off-chip) hardware; however, no instrumentation of code is required before
profiling can commence.
A breakpoint/trace control register is set to trigger (start) the counter on the entry to a
procedure. A second breakpoint control register is used to stop counting when the proce-
dure prologue is entered. A similar scheme is used to measure other parameters, such as
an interrupt handler execution times. When the counter is stopped, the 16-bit count value
is placed in the trace cache.
Post processing software is required to analyze the profile data. The trace cache, when
used to profile software, does not gather execution trace information. When profiling, the
trace cache gathers information about the execution time spent, for example, in the selected
procedure. Only one procedure can be profiled at one time. By examining the trace cache,
the minimum, average, and maximum time spent in the procedure can be determined (within
the limitations of the samples gathered). A trace entry takes the form of a pair of time values.
A second counter runs continually, but is reset to zero after it is placed in the trace cache.
The second counter is used to obtain the frequency of occurrence of the procedure of
interest; whereas, the first counter provides information about the procedures execution
time (duration).
Содержание Elan SC520
Страница 1: ...lan SC520 Microcontroller User s Manual Order 22004A...
Страница 4: ...iv lan SC520 Microcontroller User s Manual...
Страница 28: ...Introduction xxviii lan SC520 Microcontroller User s Manual...
Страница 42: ...Architectural Overview 1 14 lan SC520 Microcontroller User s Manual...
Страница 78: ...System Initialization 3 22 lan SC520 Microcontroller User s Manual...
Страница 108: ...Clock Generation and Control 5 10 lan SC520 Microcontroller User s Manual...
Страница 118: ...Reset Generation 6 10 lan SC520 Microcontroller User s Manual...
Страница 148: ...System Arbitration 8 24 lan SC520 Microcontroller User s Manual...
Страница 214: ...SDRAM Controller 10 36 lan SC520 Microcontroller User s Manual...
Страница 230: ...Write Buffer and Read Buffer 11 16 lan SC520 Microcontroller User s Manual...
Страница 288: ...GP Bus DMA Controller 14 22 lan SC520 Microcontroller User s Manual...
Страница 316: ...Programmable Interval Timer 16 8 lan SC520 Microcontroller User s Manual...
Страница 328: ...Software Timer 18 4 lan SC520 Microcontroller User s Manual...
Страница 346: ...Real Time Clock 20 12 lan SC520 Microcontroller User s Manual...
Страница 360: ...UART Serial Ports 21 14 lan SC520 Microcontroller User s Manual...
Страница 414: ...AMDebug Technology 26 8 lan SC520 Microcontroller User s Manual...