Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes and improvements to the WMC tool #172

Open
malenov opened this issue Sep 13, 2023 · 4 comments
Open

Fixes and improvements to the WMC tool #172

malenov opened this issue Sep 13, 2023 · 4 comments

Comments

@malenov
Copy link
Contributor

malenov commented Sep 13, 2023

Dear all,

during the development of the 3GPP IVAS codec a couple of issues and potential improvements were identified in the wmc_tool, for example:

  • NaN printed in the complexity printout for a non-instrumented function
  • update of memory consumption counters could be called from the function update_wmops()
  • suboptimal code updating the worst-case intra-frame and inter-frame heap memory consumption
  • detailed per-frame and per-block memory consumption exported to a .csv file
  • incorrect calculation of the worst-case heap size for memory blocks allocated and de-allocated multiple times in a single frame

Exporting the detailed per-frame and per-block memory consumption to an external file allows for running external statistical analysis tools such as Python pandas.

I will provide an update of the wmc_tool addressing all the above issues.

@ludomal
Copy link
Member

ludomal commented Sep 25, 2023

Thank you, @malenov, for presenting the current issues with wmc_tool. We are looking forward to your contribution.
The next ITU-T SG12 meeting will be around April next year; this gives us some time to prepare for the next revision of the STL.

@malenov
Copy link
Contributor Author

malenov commented Oct 3, 2023

So far all known problems and issues were fixed. Here's an excerpt of the changelog:

  • fixed a problem where NaN was printed for a non-instrumented function having zero complexity
  • dynamic allocation and re-allocation of all internal buffers tracking both heap and stack call trees; with this fix there is no hard limitation for the total number of functions supported in the whole project and no limitation to the stack depth
  • introduction of a new -f FRAME_PER_SECONDS command-line option allowing the user to choose the number of frames per second (default is still 50.0)
  • fixed a problem when push_wmops() was called twice when WMOPS_DETAILS was activated
  • the WMC tool will raise an error message if #define WMC_TOOL_SKIP is not paired with #undef WMC_TOOL_SKIP

The following new features (functionality) were added:

  • export information about all dynamical allocations/de-allocations occuring during the runtime of the codec to a .csv file
  • example Python script mem_analysis.py for graphical analysis and profiling of dynamic memory alloations based on the generated .csv file
  • counting complexity and PROM size of BASOP operations and BASOP functions within floating-point source code

The new version of the WMC tool is v1.5

@malenov
Copy link
Contributor Author

malenov commented Oct 3, 2023

@ludomal, shall I create a changelog.txt file with the description of the above modifications or describe them in the README.MD file?

@malenov malenov changed the title Improvements to the wmc_tool Fixes and improvements to the WMC tool Oct 24, 2023
@malenov
Copy link
Contributor Author

malenov commented Nov 9, 2023

I've just created the file HISTORY.md containing the history of modifications to the WMC tool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants