13.07.2015 Views

TASKING VX-toolset for ARM User Guide

TASKING VX-toolset for ARM User Guide

TASKING VX-toolset for ARM User Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>TASKING</strong> <strong>VX</strong>-<strong>toolset</strong> <strong>for</strong> <strong>ARM</strong> <strong>User</strong> <strong>Guide</strong>Profiling using code instrumentation techniques (Dynamic Profiling)The <strong>TASKING</strong> C compiler has an option to add code to your application which takes care of the profilingprocess. This is called code instrumentation. The gathered profiling data is first stored in the target'smemory and will be written to a file when the application finishes execution or when the function__prof_cleanup() is called.Advantages• it can give a complete call graph of the application annotated with the time spent in each function andbasic block• this profiling method is execution environment independent• the application is profiled while it executes on its aimed target taking real-life inputDisadvantage• instrumentation code creates a significant run-time overhead, and instrumentation code and gathereddata take up target memoryThis method provides a valuable complement to the other two methods and is described into more detailbelow.Profiling estimation by the C compiler (Static Profiling)The <strong>TASKING</strong> C compiler has an option to generate static profile in<strong>for</strong>mation through various heuristicsand estimates. The profiling data produced this way at compile time is stored in an XML file, which canbe processed and displayed using the same tools used <strong>for</strong> dynamic (run-time) profiling.Advantages• it can give a give a quick estimation of the time spent in each function and basic block• this profiling method is execution environment independent• the application is profiled at compile time• it requires no extra code instrumentation, so no extra run-time overheadDisadvantage• it is an estimation by the compiler and there<strong>for</strong>e less accurate than dynamic profilingThis method also is described into more detail below.6.2. Profiling using Code Instrumentation (Dynamic Profiling)Profiling can be used to determine which parts of a program take most of the execution time.Once the collected data are presented, it may reveal which pieces of your code execute slower thanexpected and which functions contribute most to the overall execution time of a program. It gives you178

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!