The Analysis tab performs queries on the collected performance data and displays the results.
Read on, or click a part of the image below to jump straight to the help for that area.
As with many of the tab views, the display is split into two resizable panes.
•the left side shows a query form and an ordered hierarchical view of the matching functions called in the program's execution
The result tree's popup menu provides options to filter data or to examine it in more detail
•The right side shows the source code view for any function selected on the left
The analysis query form lets you search the collected data and the performance statistics for a wide set of criteria.
•Query Type choose the main feature on which you want to search
There are a wide range of options and they fall into four categories:
•Function information like class, function or file name
•Performance data like total time, average time or visit count
•Hotspot queries like most visited or most time consuming
•Callstack investigation like callstack length, or recursion
The full list:
Most of these types are self explanatory or described briefly in the Statistics data but there's a few new ones:
Distance to root / leaf find function calls at a certain nesting level from the top or the lowest point of the callstack
Recursing function find any functions that have been called recursively
Recursing function depth find functions called recursively to a specific depth
The options underneath the Query Type may change to one of the following to match the corresponding type of query:
•Class, Function, File or Module choose from the drop down list the name you want to search for
The drop down is populated with known options from the hook data.
This option is disabled if the query type doesn't require a subsequent choice of name.
The results may be constrained by type of comparison with optional range checking.
For function information like class, name, file, these constraints do not apply.
For number based queries, including Address, you can limit, invert or box the results
•Comparison choose from the comparison type from the drop down list
•Range enter one or both values to specify a limit or a range, depending on the comparison type
For example:
< (less than) or == (equals) would need just the one limit.
Inside range would need lower and upper bounds specified.
Query results are shown as an ordered list of trees for every matched function that has been hooked and called.
For example, if there are 10 matching results, there will be 10 top level nodes in the tree. Some of these may show child functions, some may not.
The query result structure can be likened to taking the Call Tree data, removing all functions above a matching functions, while keeping all functions below.
Each result is shown independently of any other, so it's quite likely that some later results may also appear as children of earlier results in the list.
Functions are initially ordered by Total Time - the time a function and it's child functions contribute to the total run time.
Selecting a function shows its source code on the right hand pane.
Double clicking any item will display the function on the Relations tab.
Like the Call Tree view, function timings shown here are for the time spent in the relevant part of the call tree, not a combined total for everywhere that a function may be used.
This example shows part of the results when searching for all functions in the class CMainFrame using the example application.
Example:
The results below show the first 5 most time consuming results when searching for functions in the class CMainFrame using the example application.
Expanding the nodes shows that results 3 and 4 above can be found within the children of the first result
The query result tree is coloured using the customisable Hotspot Colours settings that range from 100% down to 0%.
•Colours choose the way the colour scheme is applied in the tree
•Parent % colouring is based on function time relative to that of its parent's function time
In the example below:
qsCompFunc is in the 90-100% colour band as it contributed 97.31% of its parent's function time
doCombSort is in the 90-100% colour band as it contributed 97.96% of its parent's function time
•Total % colouring is based on function time relative to the total execution time
Now in the example:
qsCompFunc is in the 50-60% colour band as it contributed 51.29% to the total run time
doCombSort is in the 30-40% colour band as it contributed 32.06% to the total run time
•No Colour black and white display only
On other tabs, it's the Refresh button that updates the display. Here, although the Search button triggers the query again, it essentially does the same thing.
•Search updates the display with the search results - as does the button on the Tools menu and toolbar
A search automatically expands the first nodes in the tree and highlights the most time consuming low-level function (hotspot).
As there's no auto update here, you'll need to use this Search button to update the display whenever you wish.
•Collapse / Expand All hide or show every node in all the result trees
•Clear removes the results
•Display... displays the Analysis Display Settings dialog
The result tree is initially ordered by most time consuming function first (Total Time)
•Smallest values first change the ordering direction of the data
•Largest values first change the ordering direction of the data
Note that while your application is executing, the sorted data is live. Sorting may not complete correctly as the data may change during the sort. Only when your program has finished executing is the sorted data guaranteed accurate.
You can't filter out functions by name but there are two ways to change what's displayed in the view.
Change the amount of detail shown for each function:
•Address check to show the address in memory for the function
•Filename check to show the file location in which the function was found
•Modulename shows the function's module
Reduce the scope of the tree by only showing a partial list of results:
•First N Matches restricts the results to a specified number of matches
•All Matches shows all results
You'll need to Search again in order to update the display
To find text in the tree, use the Find Dialog where you can search for functions, files and modules.
The following popup menu is available over the result tree to add filters, examine relations or edit code.
Menu actions apply to the function in the tree at the menu-click location.
Functions may appear in the tree more than once if called by different parent functions.
•Go to Previous Analysis Node for this Function jump to the previous instance of this function in any of the result trees
+has the same action
•Go to Next Analysis Node for this Function jump to the next instance of this function in the results
+has the same action
If there are no previous or next instances, nothing will happen.
•Go to Call Graph Node switch to the Call Graph view where the display will be expanded to show the first match found for the selected function
•Go to Call Tree Node switch to the Call Tree view where the display will be expanded to show the first match found for the selected function
•Go to Call Graph Node open the Call Graph view at the main entry for the selected function
The Call Graph view is similar to the Call Tree, but where a function would appear multiple times, it instead appears once as the main instance and is then linked to from other locations.
While the display filter controls visibility of hooked data, instrumentation filters control which functions are hooked in the first place.
The function instrumentation filter sub-menu lets you add hook filters at different levels of granularity.
The affect of adding function filters here depends on the current filter settings:
•If the current filters are set to hook everything, adding new filters will switch to excluding newly selected hooks
•Otherwise, the current filter will be retained, i.e. hook or don't hook newly selected items
The first three options add filters to the Class and Function Filter Settings:
•By Class adds a new filter, excluding the entire class from the results of subsequent sessions
•By Class and Method excludes only the selected function from new sessions
•By Function excludes all matching function names irrespective of their containing class or even if not in a class at all
The next two, Filename and Directory, are part of the Source Files Filter settings.
•By FileName adds a new filter, excluding all functions in the same file (as the selected item) from the results of subsequent sessions
•By Directory excludes functions in all files in the same directory as the selected function
Finally, the DLL level is controlled by the Hooked DLLs settings.
•By DLL excludes functions in all files belonging to the same executable or DLL as the selected function
Instrumentation filters become effective at the start of the next session. Adding a filter during a session will show the relevant rows in grey so that you can see which files would be filtered, but the performance data will continue to be included for the rest of the current session.
Line timing instrumentation filters control which lines are hooked for line timing and are independent of the function filters above.
The affect of adding line timing filters here depends on the current line timing filter settings:
•If the current filters are set to hook everything, adding new filters will switch to only including newly selected hooks
Note that this is the opposite of function filters.
•Otherwise, the current filter will be retained, i.e. hook or don't hook newly selected items
The line timing instrumentation filter sub-menu lets you add hook filters at three different levels of granularity.
Each option add filters to the Line Timing Filter Settings:
•By Class adds a new filter, appending the entire class in the line timing results of subsequent sessions
•By Class and Method include only the selected function in the line timing of new sessions
•By Function includes all matching function names irrespective of their containing class or even if not in a class at all
Instrumentation filters become effective at the start of the next session. Adding a filter during a session will show the relevant rows in grey so that you can see which files would be filtered, but the performance data will continue to be included for the rest of the current session.
While this may already be the Analysis tab, sometimes it can be useful to choose a function from the results and pivot the search to show a new result set:
•Show in Analysis tab choosing any item in the following sub-menu, to perform a new search in the Analysis tab
For example:
•Class the results show all points in the call tree that match the class of the selected function
•File name shows all points in the call tree that match the file name of the selected function
•Slower Functions (%) shows all functions that are slower than the selected function
•Show in Relations tab switch to the Relations tab where you can examine functions that either call, or are called by, the selected function
Double clicking any item will also display it in the Relations tab.
You can hide some entries from the displayed results.
However, this is a very temporary action, as a function and its children will only be hidden from view until the next Search.
•Remove entry hides the selected function in the tree
Only the selected node is hidden. Other calls to the same function in a different part of the results will remain.
•Edit Source Code... opens the default or preferred editor to edit the source code
The last few menu options expand and collapse parts of the tree.
•Expand Next Hotspot finds the next most significant in the call tree and expands all the callstack nodes to make it visible
•Collapse / Expand Entry close or recursively open the selected function to its full extent
•Collapse / Expand All completely collapse or expand the entire tree
Clicking on a function in the results tree shows that function's source code file in the right hand pane.
The source code view is described in detail separately as its behaviour is the same for all views.