2019-11-15 00:36:15 +00:00
|
|
|
.. default-domain:: cpp
|
|
|
|
|
|
|
|
.. highlight:: sh
|
|
|
|
|
2019-12-19 00:13:38 +00:00
|
|
|
.. _chapter-bloat:
|
|
|
|
|
2019-11-25 21:56:31 +00:00
|
|
|
--------
|
|
|
|
pw_bloat
|
|
|
|
--------
|
2019-11-15 00:36:15 +00:00
|
|
|
The bloat module provides tools to generate size report cards for output
|
|
|
|
binaries.
|
|
|
|
|
2019-12-19 00:13:38 +00:00
|
|
|
.. _bloat-howto:
|
|
|
|
|
|
|
|
Defining size reports
|
|
|
|
=====================
|
|
|
|
|
2019-11-15 00:36:15 +00:00
|
|
|
.. TODO(frolv): Explain how bloat works and how to set it up.
|
|
|
|
|
|
|
|
Documentation integration
|
|
|
|
=========================
|
2019-11-15 23:09:05 +00:00
|
|
|
Bloat reports are easy to add to documentation files. All ``pw_size_report``
|
2019-11-15 00:36:15 +00:00
|
|
|
targets output a ``.rst`` file containing a tabular report card. This file
|
|
|
|
can be imported directly into a documentation file using the ``include``
|
|
|
|
directive.
|
|
|
|
|
2019-12-19 00:13:38 +00:00
|
|
|
For example, the ``simple_bloat_loop`` and ``simple_bloat_function`` size
|
|
|
|
reports under ``//pw_bloat/examples`` are imported into this file as follows:
|
2019-11-15 00:36:15 +00:00
|
|
|
|
|
|
|
.. code:: rst
|
|
|
|
|
2019-12-19 00:13:38 +00:00
|
|
|
Simple bloat loop example
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
.. include:: examples/simple_bloat_loop.rst
|
|
|
|
|
|
|
|
Simple bloat function example
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
.. include:: examples/simple_bloat_function.rst
|
2019-11-15 00:36:15 +00:00
|
|
|
|
|
|
|
Resulting in this output:
|
|
|
|
|
2019-12-19 00:13:38 +00:00
|
|
|
Simple bloat loop example
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
.. include:: examples/simple_bloat_loop.rst
|
|
|
|
|
|
|
|
Simple bloat function example
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
.. include:: examples/simple_bloat_function.rst
|