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.

ProfilingFor the command line, see the C compiler option --profile (-p).Profiling is only possible with optimization levels 0, 1 and 2. So:5. Open the Optimization page and set the Optimization level to 2 - Optimize more.6. Click OK to apply the new option settings and rebuild the project ( ).6.2.1.1. Profiling Modules and C LibrariesProfiling individual modulesIt is possible to profile individual C modules. In this case only limited profiling data is gathered <strong>for</strong> thefunctions in the modules compiled without the profiling option. When you use the suboption Call graph,the profiling data reveals which profiled functions are called by non-profiled functions. The profiling datadoes not show how often and from where the non-profiled functions themselves are called. Though thisdoes not affect the flat profile, it might reduce the usefulness of the call graph.Profiling C library functionsEclipse and/or the control program will link your program with the standard version of the C library.Functions from this library which are used in your application, will not be profiled. If you do want toincorporate the library functions in the profile, you must set the appropriate C compiler options in the Clibrary makefiles and rebuild the library.6.2.1.2. Linking Profiling LibrariesWhen building your application, the application must be linked against the corresponding profile library.Eclipse (or the control program) automatically select the correct library based on the profiling options youspecified. However, if you compile, assemble and link your application manually, make sure you specifythe correct library.See Section 8.3, Linking with Libraries <strong>for</strong> an overview of the (profiling) libraries.6.2.2. Step 2: Execute the ApplicationOnce you have compiled and linked the application <strong>for</strong> profiling, it must be executed to generate theprofiling data. Run the program as usual: the program should run normally taking the same input as usualand producing the same output as usual. The application will run somewhat slower than normal becauseof the extra time spent on collecting the profiling data.Follow the steps below to run the application on the <strong>TASKING</strong> simulator, using the debugger. (In fact,you can run the application also on a target board.)1. From the Debug menu, select Debug Configurations...The Debug Configurations dialog appears.2. Select <strong>TASKING</strong> C/C++ Debugger and click the New launch configuration button ( ) to add anew configuration.181

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

Saved successfully!

Ooh no, something went wrong!