Files
u-boot/tools
Simon Glass 9d6670f89a codman: Add documentation
Provide a description of the purpose of codman and some examples of how
to use it.

Series-to: concept
Cover-letter:
codman: Add a new source-code analysis tool

Add a new tool called 'codman' (code manager) for analysing source code
usage in U-Boot builds. This tool determines which files and lines of
code are actually compiled based on the build configuration.

The tool provides three analysis methods:
- unifdef: Static preprocessor analysis (default)
- DWARF: Debug information from compiled code (-w)
- (experimental) LSP: Language server analysis using clangd (-l)

Codman supports:

- File-level analysis: which files are compiled vs unused
- Line-level analysis: which lines are active vs removed by preprocessor
- Kconfig-impact analysis with -a/--adjust option
- Various output formats: stats, directories, detail, summary

Since there is quite a lot of processing involved, Codman uses parallel
processing where possible.

This tool is admittedly not quite up to my normal code quality, but it
has been an interesting experiment in using Claude to create something
from scratch.

The unifdef part of the tool benefits from some patches I created for
that tool:
- O(1) algorithm for symbol lookup, instead of O(n) - faster!
- support for IS_ENABLED(), CONFIG_IS_ENABLED()

Please get in touch if you would like the patches.

This series also includes a minor improvement to buildman and a tidy-up
of the tout library to reduce code duplication.
END

Signed-off-by: Simon Glass <simon.glass@canonical.com>
Series-links: 1:65
2025-11-24 06:47:19 -07:00
..
2025-07-26 23:55:02 +12:00
2025-11-24 06:47:19 -07:00
2024-10-21 20:51:23 -06:00
2025-08-04 14:39:59 -06:00