Presentation is loading. Please wait.

Presentation is loading. Please wait.

© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  The course describes the performance analysis and profiling tools.

Similar presentations


Presentation on theme: "© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  The course describes the performance analysis and profiling tools."— Presentation transcript:

1 © 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  The course describes the performance analysis and profiling tools in the High Performance Embedded Workshop (HEW), which speeds development of software for embedded systems. Objectives  Learn about the different performance analysis and profile windows and their capabilities.  Understand how to use these tools efficiently during application development. Content  25 Pages  4 Questions Learning Time  35 minutes

2 © 2008, Renesas Technology America, Inc., All Rights Reserved 2 Performance Analysis Window - Displays the number of execution cycles required for each function and the number of times each function is called Profile List Sheet Window - Displays the address location of each function or global variable, its size, the number of times the function is called or the global variable is accessed, and number of internal/external or I/O memory accesses Profile Tree Sheet Window - Displays the relation of a function to its caller in a tree structure, and includes information such as address location, size, stack size, and the number of times the function is called Profile Chart Window - Displays the function-call hierarchy in graphical form Capability Overview Performance Analysis Profiling

3 © 2008, Renesas Technology America, Inc., All Rights Reserved 3 Three ways to open the Performance Analysis Window  Select from menu: View  Performance  Performance Analysis  Press key sequence: Ctrl + Shift + P  Click on icon: Opening Window Performance Analysis

4 © 2008, Renesas Technology America, Inc., All Rights Reserved 4 Information in Window  Index – Numbered entries  Function – Name of user-specified function (or user specified start address of function) to be analyzed  Cycle – Number of instruction execution cycles required  Count – Number of times the function is called  % – Ratio of execution cycle count of function to execution cycle count or the entire application  Histogram – Histogram display of % ratio Performance Analysis

5 © 2008, Renesas Technology America, Inc., All Rights Reserved 5 Right-click in the Performance Analysis window Select “Add Range” to add the required functions Select “Enable Analysis” Run the program, stopping at any desired location Starting Performance Analysis Performance Analysis Right-click anywhere in window

6 © 2008, Renesas Technology America, Inc., All Rights Reserved 6 Interpreting Analysis Results Four functions perform the same task: Compute value of 2 10  longway — Computes the result using a long algorithm; takes 39,500 cycles to execute  recur — Takes 45,000 execution cycles and is called 500 times (all of the other functions are called only 50 times)  shortway — Requires the fewest number of execution cycles (33,000), so it is the least computationally intensive  quick — Uses more cycles than all other functions (107,300); thus, it’s the most computationally intensive Performance Analysis

7 © 2008, Renesas Technology America, Inc., All Rights Reserved 7 Simulator Versus Emulator  Simulator reports number of execution cycles  Emulator reports actual run time of program Example: Discrepancy in “recur” count values - For simulator, recur is 500 cycles - For emulator, recur is 50 cycles Performance Analysis E6000 Simulator E6000 Emulator

8

9

10 © 2008, Renesas Technology America, Inc., All Rights Reserved 10 Opening Profile Window Profiling Three ways to open the Profile Windows  Select from menu: View  Performance  Profile  Press key sequence: Ctrl + Shift + P  Click on icon:

11 © 2008, Renesas Technology America, Inc., All Rights Reserved 11 Profile List Sheet Function/VariableFunction or variable name F/VSelection is a function or variable Address Start address of the function or variable listed Size Size of the function or variable listed Times Number of times the function is called Cycle Number of execution cycles Ext mem Number of accesses to external memory I/O area Number of accesses to input/output area Int mem Number of accesses to internal memory Profiling

12 © 2008, Renesas Technology America, Inc., All Rights Reserved 12 Profile Tree Sheet Profiling FunctionFunction name AddressStart address of function SizeSize of function Stack sizeStack size of the function being executed TimesNumber of times a function is called by its parent function CycleNumber of execution cycles Ext memNumber of external memory access I/O areaNumber of input/output area excess Int memNumber of internal memory access

13 © 2008, Renesas Technology America, Inc., All Rights Reserved 13 Right-click in either Profile sheet to open menu Select “Enable Profiler” Run the program, stopping at any desired location To Start Profiling Profiling Right-click anywhere in window

14 © 2008, Renesas Technology America, Inc., All Rights Reserved 14 Profile Window Options  View Source – Displays the source program or disassembled memory contents for the address in the selected line  View Profile-Chart – Displays the “Profile-Chart” window for the selected function  Enable Profiler – Toggles acquisition of profiler  Not trace the function call – Stops tracing function calls while profile data is acquired. This menu is used when acquiring profile data of the program in which functions are called in a special way, such as task switching in the OS  Setting – Pops-up a menu with additional option choices: Show Functions/Variables*, Show Functions*, Show Variables*, Only Executed Functions, and Include Data of Child Function  Find – Searches for a character string in “Function” column  Find Data** – Searches for maximum or minimum profile data  Clear Data – Clears data in profiler  Output Profile Information Files – Profiling results are saved in a profile information file (.pro extension). The optimizing linkage editor optimizes user programs according to the profile information in this file  Output Text file – Saves profile results to a text file Profiling * Profile List Sheet only ** Profile Tree Sheet only

15 © 2008, Renesas Technology America, Inc., All Rights Reserved 15 Profile List Sheet Results Displays profiling results by individual functions or variables - For example, the function “recur”  Is located at start address H’00000936  Has a size of H’3E  Is called 500 times during its execution  Occupies 45,000 execution cycles  Has made 4300 accesses to internal memory Profiling

16 © 2008, Renesas Technology America, Inc., All Rights Reserved 16 Address — Ensures that functions or variables are saved to the desired memory location Size — Indicates which functions or variables should be optimized further if the code is too large Times — Confirms the number of times a function or variable is called Cycle — Counts suggest which functions to optimize to increase speed if the execution exceeds requirements Ext mem — Shows the number of times external memory is accessed I/O area — Indicates the number of times the I/O area is accessed Int mem — Shows the number of times internal memory is accessed Advantages of List Sheet Profiling

17 © 2008, Renesas Technology America, Inc., All Rights Reserved 17 Profile Tree Sheet Results Results of profiling functions are displayed in relation to the calling function Statistical data are similar to data obtained in Profile List Sheet - Exception in this example is the “recur” function, called only 50 times (versus 500 times in Profile List Sheet) Profile Tree shows how many times a function is called by parent function, not the overall number of calls in the program Profiling

18 © 2008, Renesas Technology America, Inc., All Rights Reserved 18  Tree Sheet results show a function’s calling hierarchy  Stack-size information gives a way to judge how efficiently the reserved stack memory is being used Advantages of Tree Sheet Profiling

19 © 2008, Renesas Technology America, Inc., All Rights Reserved 19 Opening Profile Chart Profiling Two ways to open the Profile Chart Window  Right-click on function in Profile List Sheet or Tree Sheet, then select from menu: View Profile-Chart  Click on icon: Right-click on function of interest

20 © 2008, Renesas Technology America, Inc., All Rights Reserved 20 Right-clicking on the Profile Chart brings up menu of options  “Multiple View” — Allows viewing of multiple Profile-Chart displays  “Expands Size” — Increases spaces between each function  “Reduces Size” — Decreases spaces between each function Profile Chart Options Profiling

21 © 2008, Renesas Technology America, Inc., All Rights Reserved 21 Relationships among functions are depicted graphically  “main” function is called by “PowerON_Reset”  “longway,” “quick,” “shortway,” “recur” are called by “main” function  Value beside each function name indicates number of times the function is called by the calling function Interpreting Profile Chart Profiling

22 © 2008, Renesas Technology America, Inc., All Rights Reserved 22  Provides a clear picture of the hierarchy of functions  “Multiple view” allows comparison of functions at two ends of Profile Chart Advantages of Profile Chart Profiling

23

24

25 © 2008, Renesas Technology America, Inc., All Rights Reserved 25 Introduction to Performance Analysis and Profiling What information these tools provide How they can be used to evaluate the performance of code Course Summary Download a free evaluation copy of HEW at: www.renesas.com/hew


Download ppt "© 2008, Renesas Technology America, Inc., All Rights Reserved 1 Introduction Purpose  The course describes the performance analysis and profiling tools."

Similar presentations


Ads by Google