Worst Stack Size Report

The default Worst Stack Size report is in HTML format. It is generated from a template named wssreport.template provided as a text file that you can modify to customize the report. It uses four online JavaScript libraries:
  • Bootstrap,
  • JQuery,
  • Font Awesome,
  • VisJS.

These libraries are not provided. You need an Internet connection when you open the report. Otherwise, you need to download the libraries (.css and .js files), copy them in the same folder as your report's, and modify the template file as follows:

Replace:
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css" integrity="sha384-B4dIYHKNBt8Bc12p+WXckhzcICo0wtJAoU8YZTY5qE0Id1GSseTk6S+L3BlXeVIU" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/vis/4.21.0/vis.min.css">
…
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vis/4.21.0/vis.js"></script>
with
<link rel="stylesheet" href="./bootstrap.min.css>
<link rel="stylesheet" href="./all.css">
<link rel="stylesheet" href="./vis.min.css">
…
<script src="./jquery-3.3.1.slim.min.js"></script>
<script src="./popper.min.js"></script>
<script src="./bootstrap.min.js"></script>
<script src="./vis.js"></script
The Worst Stack Size report is made of three parts.

Summary

Worst Stack Size per Entry Point table
entry point per thread
The Summary section displays a table with the Worst Stack Size calculated by the tools, given the information you provided in the build settings. This number is provided in bytes.
The Worst Stack Size is given per entry point and per thread if you have entered the list of entry point threads of your application in the Build Settings. You can set the list of entry point threads of your application in the Build Settings.
The table displays the following information:
  • The number of control flows found in your application. A control flow is a set of successive calls starting from an entry point (each function that is never called by another one is considered as an entry point) to a function with no call or to an external function.
  • The number of control flows for which we have no estimation of the stack size. This happens when one of the functions in this control flow has not been executed or if it is an external function for which no estimation of the stack size is provided.

    If this number if greater than 0, it is highlighted in red because there is no way to be sure that the worst stack size is really the worst regarding the missing information.

  • The number of recursive control flows found in the application. If this number if greater than 0, it is highlighted in red because there is no way to be sure that the worst stack size is really the worst.
  • The number of functions in your application.
  • The number of functions without stack size estimation. These are the functions that have not been executed or the external functions for which we have not provided an estimation of the stack size. If this number if greater than 0, it is highlighted in red because we can't be sure that the worst stack size is really the worst.

    The information is given for each entry thread.

    If you don’t provide the list of entry points in the build settings, the information is displayed only for the control flow and gives the Worst Stack Size.

Total Stack Size vs. Maximum Stack Size graph
WSS graph
If you provide in the Settings the list of entry points, optionally you can provide the maximum Stack Size allowed and a percentage of available Stack Size for security. In such case, the report displays the total Stack Size and verifies if this size does not go over the available Stack Size.
The Maximum Stack Size and Percentage of available Stack Size for security options can be set in the Build Settings.
In the report, you can compare the Stack Size or the sum of Stack Size with the maximum of Stack Size allowed and the percentage of available Stack Size for security if both options are provided in the settings.

In the toolbar that is under the graph, you can select the information to display or hide (all entry points, or for only one thread) and the number of control flows in the table. You can also show or hide the graph in the report from a button.

Details

The Details table lists by default the 10 first control flows with the biggest Stack Size and displays for each of them the following information:
  • The control flow, for example, the successive functions starting from an entry point (any function that is never called by another one is considered as an entry point) to a function with no call, or to an external function. Each function is identified by its name, its module (example: C file) between brackets, and by the line and column where this call to the next function calls appear in the code in parenthesis.
  • The estimation of the Stack Size. The information is blank if the tool has not been able to calculate the Stack Size for this control flow. In this case, the functions in the control flow that prevent us from computing the Stack Size are highlighted in red.

A drop down menu at the top of the table allows you to choose 10, 20, 30, 50, 100 or all the control flows to display.

Functions

The Functions table lists all the functions of your application, including external functions. The following information is provided for each function:
  • The module name (i.e. the C file) where the function is saved.,
  • The function name. This name is in red if there is no stack information for this function,
  • The number of functions called in the current one.
  • The Stack Size of the function in bytes.

Call Graph

The Call Graph part displays all the functions as an interactive call graph from left to right or from the top to the bottom, depending on the selector button position on the top of the call graph.

You can select a control flow in the table to highlight it in the call graph.

Feedback