Critical Code Tab

The Critical Code tab displays data into two views; the top view displays the summary of the functions, and the bottom view displays the statistics for all the instructions executed in a particular function. Click a hyperlinked function in the top view of the Critical Code viewer to view the corresponding statistics for the instructions executed in that function. For example, the statistics of the main() function are shown in the figure below.

Figure 1. Statistics of Critical Code Data
Statistics of Critical Code Data

The table below describes the fields of the statistics of the critical code data.

Table 1. Description of Statistics of Critical Code Data
Name Description
Line/Address Displays either the line number for each instruction in the source code or the address for the assembly code.
Instruction Displays all the instructions executed in the selected function.
Coverage For C source lines, displays the percentage of number of assembly instructions executed from the total number of assembly instructions corresponding to the source line. For assembly source lines, it shows if the instructions were executed or not.
ASM Decision Coverage Displays the decision coverage computed for direct and indirect conditional branches. It is the mean value of the individual decision coverages. So if a function has two conditional instructions, one with 100% and another with 50% decision coverage, the decision coverage would be (100 + 50) / 2 = 75% . It is calculated only for assembly instructions and not for C source code.
ASM Count Displays the number of times each instruction is executed.
Time (CPU Cycles) Displays the total number of clock cycles that each instruction in the function takes.

Click the column header to sort the critical code data by that column. However, you can only sort the critical code data available on the top view. The table below lists the buttons available in the statistics view of the Critical Code tab.

Table 2. Buttons Available in Statistics View of Critical Code Tab
Name Button Description
Search
Lets you search for a particular text in the statistics view. In the Search text box, type the data that you want to search and click the Search button. The first instance of the data is selected in the statistics view. Click the button again or press the Enter key to view the next instances of the data.
Previous function
Lets you view the details of the previous function that was displayed in the bottom view. Click it to view the details of the previous function.
Next function
Lets you view the details of the next function that was displayed in the bottom view. Click it to view the details of the previous function.
Export
Lets you export the critical code data of both top and bottom views in a CSV file. Click the button and select the Export the statistics above option to export the details of the top view or the Export the statistics below option to export the details of the bottom view respectively.
Configure table
Lets you show and hide column(s) of the critical code data. Click the button and select the Configure the table above option to show/hide columns of the top view or the Configure the table below option to show/hide columns of the bottom view. The Drag and drop to order columns dialog box appears in which you can check/uncheck the checkboxes corresponding to the available columns to show/hide them in the Critical Code viewer. The option also allows you to set CPU frequency and set time in cycles, milliseconds, microseconds, and nanoseconds.
Graphics
Lets you display the histograms in two colors for the CPU Cycles and ASM Count columns in the bottom view of the critical code data. Click the button and select the Assembly/Source > ASM Count or Assembly/Source > CPU Cycles option to display histograms in the ASM Count or CPU Cycles column. The colors in these columns differentiate source code with the assembly code.
Show code
Lets you display the assembly or mixed code in the statistics of the critical code data. Click the button and select the Assembly option to display the assembly code or the Mixed option to display the mixed code in the statistical details.