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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 6. ProfilingProfiling is the process of collecting statistical data about a running application. With these data you cananalyze which functions are called, how often they are called and what their execution time is.This chapterdescribes the <strong>TASKING</strong> profiling method with code instrumentation techniques and static profiling.6.1. What is Profiling?Profiling is a collection of methods to gather data about your application which helps you to identify codefragments where execution consumes the greatest amount of time.<strong>TASKING</strong> supplies a number of profiler tools each dedicated to solve a particular type of per<strong>for</strong>mancetuning problem. Per<strong>for</strong>mance problems can be solved by:• Identifying time-consuming algorithms and rewrite the code using a more time-efficient algorithm.• Identifying time-consuming functions and select the appropriate compiler optimizations <strong>for</strong> these functions(<strong>for</strong> example, enable loop unrolling or function inlining).• Identifying time consuming loops and add the appropriate pragmas to enable the compiler to furtheroptimize these loops.A profiler helps you to find and identify the time consuming constructs and provides you this way withvaluable in<strong>for</strong>mation to optimize your application.<strong>TASKING</strong> employs various schemes <strong>for</strong> collecting profiling data, depending on the capabilities of thetarget system and different in<strong>for</strong>mation needs.6.1.1. Methods of ProfilingThere are several methods of profiling: recording by an instruction set simulator, profiling with codeinstrumentation techniques (dynamic profiling) and profiling by the C compiler at compile time (staticprofiling). Each method has its advantages and disadvantages.Profiling by an instruction set simulatorOne way to gather profiling in<strong>for</strong>mation is built into the instruction set simulator (ISS). The ISS recordsthe time consumed by each instruction that is executed. The debugger then retrieves this in<strong>for</strong>mation andcorrelates the time spent <strong>for</strong> individual instructions to C source statements.Advantages• it gives (cycle) accurate in<strong>for</strong>mation with extreme fine granularity• the executed code is identical to the non-profiled codeDisadvantages• the method requires an ISS as execution environment177

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

Saved successfully!

Ooh no, something went wrong!