aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-09-18 11:52:17 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-09-21 18:32:53 +0200
commitca8e055c22155b262e14409a555bab41a52edfea (patch)
treebd9e4a3f8d744e1972256ff1a2d04afdacd10c0a /tools/perf/scripts/python
parentscripts: get_abi.pl: Ignore fs/cgroup sysfs nodes earlier (diff)
downloadlinux-ca8e055c22155b262e14409a555bab41a52edfea.tar.gz
linux-ca8e055c22155b262e14409a555bab41a52edfea.zip
scripts: get_abi.pl: add a graph to speedup the undefined algorithm
Searching for symlinks is an expensive operation with the current logic, as it is at the order of O(n^3). In practice, running the check spends 2-3 minutes to check all symbols. Fix it by storing the directory tree into a graph, and using a Breadth First Search (BFS) to find the links for each sysfs node. With such improvement, it can now report issues with ~11 seconds on my machine. It comes with a price, though: there are more symbols reported as undefined after this change. I suspect it is due to some sysfs circular loops that are dropped by BFS. Despite such increase, it seems that the reports are now more coherent. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Link: https://lore.kernel.org/r/f5c1e7b14a27132821c08f0459ba9aea3ed69028.1631957565.git.mchehab+huawei@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions