diff options
| author | Mauro Carvalho Chehab <[email protected]> | 2025-02-10 10:18:15 +0000 |
|---|---|---|
| committer | Jonathan Corbet <[email protected]> | 2025-02-10 18:19:57 +0000 |
| commit | 0d5fd96880d9135a4b35fb5523896b21b13dde78 (patch) | |
| tree | f1d100be93393620ba7e08ae6a14316b85155604 /scripts/lib/abi/helpers.py | |
| parent | scripts/lib/abi/abi_parser.py: make it backward-compatible with Python 3.6 (diff) | |
| download | kernel-0d5fd96880d9135a4b35fb5523896b21b13dde78.tar.gz kernel-0d5fd96880d9135a4b35fb5523896b21b13dde78.zip | |
scripts/get_abi.py: add support for undefined ABIs
The undefined logic is complex and has lots of magic on it.
Implement it, using the same algorithm we have at get_abi.pl. Yet,
some tweaks to optimize performance and to make the code simpler
were added here:
- at the perl version, the tree graph had loops, so we had to
use BFS to traverse it. On this version, the graph is a tree,
so, it simplifies the what group for sysfs aliases;
- the logic which splits regular expressions into subgroups
was re-written to make it faster;
- it may optionally use multiple processes to search for symbol
matches;
- it has some additional debug levels.
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: Jonathan Corbet <[email protected]>
Link: https://lore.kernel.org/r/1529c255845d117696d5af57d8dc05554663afdf.1739182025.git.mchehab+huawei@kernel.org
Diffstat (limited to 'scripts/lib/abi/helpers.py')
| -rw-r--r-- | scripts/lib/abi/helpers.py | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/scripts/lib/abi/helpers.py b/scripts/lib/abi/helpers.py index 84a253ed5058..639b23e4ca33 100644 --- a/scripts/lib/abi/helpers.py +++ b/scripts/lib/abi/helpers.py @@ -16,13 +16,23 @@ class AbiDebug: WHAT_PARSING = 1 WHAT_OPEN = 2 DUMP_ABI_STRUCTS = 4 + UNDEFINED = 8 + REGEX = 16 + SUBGROUP_MAP = 32 + SUBGROUP_DICT = 64 + SUBGROUP_SIZE = 128 + GRAPH = 256 DEBUG_HELP = """ -Print debug information according with the level(s), -which is given by the following bitmask: - 1 - enable debug parsing logic 2 - enable debug messages on file open 4 - enable debug for ABI parse data +8 - enable extra debug information to identify troubles + with ABI symbols found at the local machine that + weren't found on ABI documentation (used only for + undefined subcommand) +16 - enable debug for what to regex conversion +32 - enable debug for symbol regex subgroups +64 - enable debug for sysfs graph tree variable """ |
