OSDN Git Service

libbpf: Normalize and improve logging across few functions
authorAndrii Nakryiko <andriin@fb.com>
Thu, 20 Aug 2020 23:12:39 +0000 (16:12 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 21 Aug 2020 22:40:22 +0000 (15:40 -0700)
commit9c0f8cbdc0e9cf8a2a3a96045778b8d759f172c2
treedda535077729918dc5752f275d2ca26b370f31e8
parent50e09460d9f8dee9fbaaa3194c7921753d75cd96
libbpf: Normalize and improve logging across few functions

Make libbpf logs follow similar pattern and provide more context like section
name or program name, where appropriate. Also, add BPF_INSN_SZ constant and
use it throughout to clean up code a little bit. This commit doesn't have any
functional changes and just removes some code changes out of the way before
bigger refactoring in libbpf internals.

Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200820231250.1293069-6-andriin@fb.com
tools/lib/bpf/libbpf.c