tools: bpftool: partition basic-block for each function in the CFG
authorJiong Wang <jiong.wang@netronome.com>
Fri, 2 Mar 2018 02:01:19 +0000 (18:01 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 2 Mar 2018 02:29:48 +0000 (18:29 -0800)
commit0824611f9b38d556327916ed0702a7323a88c58b
treedab2c4962103355e20145148ac402b48dfa312bf
parent80331752e990e3f13df1c1d45496424d8eccc29b
tools: bpftool: partition basic-block for each function in the CFG

This patch partition basic-block for each function in the CFG. The
algorithm is simple, we identify basic-block head in a first traversal,
then second traversal to identify the tail.

We could build extended basic-block (EBB) in next steps. EBB could make the
graph more readable when the eBPF sequence is big.

Signed-off-by: Jiong Wang <jiong.wang@netronome.com>
Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/bpf/bpftool/cfg.c