diff options
author | Eduard Zingerman <eddyz87@gmail.com> | 2025-02-15 03:03:57 -0800 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2025-02-18 19:22:59 -0800 |
commit | bb7abf3049025f7e4ad91cff2d9fe8381a9278af (patch) | |
tree | 69e00fb0be6e806656e9463cb72051bf794bf223 /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | c1ce66357f8f7d73ff70353ec15f1fba164bc7e1 (diff) |
bpf: make state->dfs_depth < state->loop_entry->dfs_depth an invariant
For a generic loop detection algorithm a graph node can be a loop
header for itself. However, state loop entries are computed for use in
is_state_visited(), where get_loop_entry(state)->branches is checked.
is_state_visited() also checks state->branches, thus the case when
state == state->loop_entry is not interesting for is_state_visited().
This change does not affect correctness, but simplifies
get_loop_entry() a bit and also simplifies change to
update_loop_entry() in patch 9.
Signed-off-by: Eduard Zingerman <eddyz87@gmail.com>
Link: https://lore.kernel.org/r/20250215110411.3236773-7-eddyz87@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions