|
|
@ -96,28 +96,11 @@ impl Features {
|
|
|
|
bpf_perf_link: is_perf_link_supported(),
|
|
|
|
bpf_perf_link: is_perf_link_supported(),
|
|
|
|
btf,
|
|
|
|
btf,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
debug!("BPF Feature Detection: {:#?}", f);
|
|
|
|
debug!("{}", f);
|
|
|
|
|
|
|
|
if let Some(btf) = f.btf.as_ref() {
|
|
|
|
|
|
|
|
debug!("{}", btf)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
f
|
|
|
|
f
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
impl std::fmt::Display for Features {
|
|
|
|
|
|
|
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
|
|
|
|
|
|
|
f.write_fmt(format_args!(
|
|
|
|
|
|
|
|
"[FEAT PROBE] BPF program name support: {}\n\
|
|
|
|
|
|
|
|
[FEAT PROBE] bpf_link support for kprobe/uprobe/tracepoint: {}\n\
|
|
|
|
|
|
|
|
[FEAT PROBE] BTF support: {}",
|
|
|
|
|
|
|
|
self.bpf_name,
|
|
|
|
|
|
|
|
self.bpf_perf_link,
|
|
|
|
|
|
|
|
self.btf.is_some()
|
|
|
|
|
|
|
|
))
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// Builder style API for advanced loading of eBPF programs.
|
|
|
|
/// Builder style API for advanced loading of eBPF programs.
|
|
|
|
///
|
|
|
|
///
|
|
|
|
/// Loading eBPF code involves a few steps, including loading maps and applying
|
|
|
|
/// Loading eBPF code involves a few steps, including loading maps and applying
|
|
|
|