summaryrefslogtreecommitdiffstats
path: root/python/xrelfo.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* lib: convert xref_threadsched to xref_eventschedDonald Sharp2023-03-241-2/+2
| | | | Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* *: auto-convert to SPDX License IDsDavid Lamparter2023-02-091-14/+1
| | | | | | Done with a combination of regex'ing and banging my head against a wall. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* python: hide inet_ntoa from frrbotDavid Lamparter2022-10-281-2/+3
| | | | | | These are not the inet_ntoa you are looking for ;) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* python: apply black formattingDavid Lamparter2022-10-281-119/+208
| | | | | | | The python/ directory hasn't been shoved into black yet (unlike topotests, where most FRR python code is.) Run black over it. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* build, vtysh: extract vtysh commands from .xrefDavid Lamparter2022-10-261-0/+10
| | | | | | | | | | | | | | | | | | | Rather than running selected source files through the preprocessor and a bunch of perl regex'ing to get the list of all DEFUNs, use the data collected in frr.xref. This not only eliminates issues we've been having with preprocessor failures due to nonexistent header files, but is also much faster. Where extract.pl would take 5s, this now finishes in 0.2s. And since this is a non-parallelizable build step towards the end of the build (dependent on a lot of other things being done already), the speedup is actually noticeable. Also files containing CLI no longer need to be listed in `vtysh_scan` since the .xref data covers everything. `#ifndef VTYSH_EXTRACT_PL` checks are equally obsolete. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* python: use ujson if availableDavid Lamparter2022-10-061-3/+12
| | | | | | It's noticeably faster. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* lib: make cmd_element->attr a bitmask & clarifyDavid Lamparter2022-10-061-6/+8
| | | | | | | | | It already "looks" like a bitmask, but we currently can't flag a command both YANG and HIDDEN at the same time. It really should be a bitmask. Also clarify DEPRECATED behaviour (or the absence thereof.) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* build: add `-Werror` to xrelfo log format warningsDavid Lamparter2021-06-241-1/+5
| | | | | | | | | Adding a `\n' should now produce a warning. Controlled by `-Werror` so if you're doing a dev build and it's warning about some `prefix2str` that should be converted to `%pFX`, you can turn off `-Werror` to fix it later like with all other warnings. Signed-off-by: David Lamparter <equinox@diac24.net>
* lib/xref: record log message format argsDavid Lamparter2021-02-231-16/+43
| | | | | | | | | | | Apparently you can do `#__VA_ARGS__` and it actually does something sensible, so here we go recording the format parameters for log messages into the xref. This allows some more checking in xrelfo.py, e.g. hints to use `%pFX` and co. Signed-off-by: David Lamparter <equinox@diac24.net>
* python/xrelfo: the ELF xref extractorDavid Lamparter2021-02-231-0/+397
This creates JSON dumps of all the xref structs littered around FRR. Signed-off-by: David Lamparter <equinox@diac24.net>