diff options
author | Martin KaFai Lau <kafai@fb.com> | 2020-09-24 17:03:44 -0700 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2020-09-25 13:58:01 -0700 |
commit | a968d5e277f1a640a3184561ac2c39261ba79196 (patch) | |
tree | b5828c48b421240b444bca470034ace56372c063 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 182bf3f3ddb607a0715b73a8396af1fce0945c14 (diff) |
bpf: Move the PTR_TO_BTF_ID check to check_reg_type()
check_reg_type() checks whether a reg can be used as an arg of a
func_proto. For PTR_TO_BTF_ID, the check is actually not
completely done until the reg->btf_id is pointing to a
kernel struct that is acceptable by the func_proto.
Thus, this patch moves the btf_id check into check_reg_type().
"arg_type" and "arg_btf_id" are passed to check_reg_type() instead of
"compatible". The compatible_reg_types[] usage is localized in
check_reg_type() now.
The "if (!btf_id) verbose(...); " is also removed since it won't happen.
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Lorenz Bauer <lmb@cloudflare.com>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Link: https://lore.kernel.org/bpf/20200925000344.3854828-1-kafai@fb.com
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions