@cryptotaxi247 / netdata-1 / commits / 784849583

Move CO-RE headers (integration between eBPF and Network Viewer) (#16978)

thiagoftsm committed Feb 12, 2024 at 13:03 UTC 784849583616d51649c2de5a8b468db90e0c6132
6 files changed +16 -21
.gitignore
+1 -1
@@ -30,7 +30,7 @@ artifacts/
30 ebpf.plugin
31 src/collectors/ebpf.plugin/reset_netdata_trace.sh
32 !ebpf.plugin/
33 -src/collectors/ebpf.plugin/includes/
33 +src/libnetdata/ebpf/includes/
34
35 # protoc generated files
36 *.pb.cc
netdata-installer.sh
+1 -1
@@ -914,7 +914,7 @@ bundle_libbpf() {
914 bundle_libbpf
915
916 copy_co_re() {
917 - cp -R "${1}/includes" "src/collectors/ebpf.plugin/"
917 + cp -R "${1}/includes" "src/libnetdata/ebpf/"
918 }
919
920 bundle_ebpf_co_re() {
packaging/bundle-ebpf-co-re.sh
+1 -1
@@ -6,4 +6,4 @@ CORE_VERSION="$(cat "${SRCDIR}/packaging/ebpf-co-re.version")"
6 CORE_TARBALL="netdata-ebpf-co-re-glibc-${CORE_VERSION}.tar.xz"
7 curl -sSL --connect-timeout 10 --retry 3 "https://github.com/netdata/ebpf-co-re/releases/download/${CORE_VERSION}/${CORE_TARBALL}" > "${CORE_TARBALL}" || exit 1
8 grep "${CORE_TARBALL}" "${SRCDIR}/packaging/ebpf-co-re.checksums" | sha256sum -c - || exit 1
9 -tar -xa --no-same-owner -f "${CORE_TARBALL}" -C "${SRCDIR}/src/collectors/ebpf.plugin" || exit 1
9 +tar -xa --no-same-owner -f "${CORE_TARBALL}" -C "${SRCDIR}/src/libnetdata/ebpf" || exit 1
src/collectors/ebpf.plugin/ebpf.h
+13 -11
@@ -38,17 +38,19 @@
38 #define NETDATA_EBPF_CONFIG_FILE "ebpf.d.conf"
39
40 #ifdef LIBBPF_MAJOR_VERSION // BTF code
41 -#include "includes/cachestat.skel.h"
42 -#include "includes/dc.skel.h"
43 -#include "includes/disk.skel.h"
44 -#include "includes/fd.skel.h"
45 -#include "includes/hardirq.skel.h"
46 -#include "includes/mdflush.skel.h"
47 -#include "includes/mount.skel.h"
48 -#include "includes/shm.skel.h"
49 -#include "includes/socket.skel.h"
50 -#include "includes/swap.skel.h"
51 -#include "includes/vfs.skel.h"
41 +#include "libnetdata/ebpf/includes/cachestat.skel.h"
42 +#include "libnetdata/ebpf/includes/dc.skel.h"
43 +#include "libnetdata/ebpf/includes/disk.skel.h"
44 +#include "libnetdata/ebpf/includes/fd.skel.h"
45 +#include "libnetdata/ebpf/includes/filesystem.skel.h"
46 +#include "libnetdata/ebpf/includes/hardirq.skel.h"
47 +#include "libnetdata/ebpf/includes/mdflush.skel.h"
48 +#include "libnetdata/ebpf/includes/mount.skel.h"
49 +#include "libnetdata/ebpf/includes/shm.skel.h"
50 +#include "libnetdata/ebpf/includes/sync.skel.h"
51 +#include "libnetdata/ebpf/includes/socket.skel.h"
52 +#include "libnetdata/ebpf/includes/swap.skel.h"
53 +#include "libnetdata/ebpf/includes/vfs.skel.h"
54
55 extern struct cachestat_bpf *cachestat_bpf_obj;
56 extern struct dc_bpf *dc_bpf_obj;
src/collectors/ebpf.plugin/ebpf_filesystem.h
-3
@@ -8,9 +8,6 @@
8 #define NETDATA_EBPF_FS_MODULE_DESC "Monitor filesystem latency for: btrfs, ext4, nfs, xfs and zfs."
9
10 #include "ebpf.h"
11 -#ifdef LIBBPF_MAJOR_VERSION
12 -#include "includes/filesystem.skel.h"
13 -#endif
11
12 #define NETDATA_FS_MAX_DIST_NAME 64UL
13
src/collectors/ebpf.plugin/ebpf_sync.h
-4
@@ -3,10 +3,6 @@
3 #ifndef NETDATA_EBPF_SYNC_H
4 #define NETDATA_EBPF_SYNC_H 1
5
6 -#ifdef LIBBPF_MAJOR_VERSION
7 -#include "includes/sync.skel.h"
8 -#endif
9 -
6 // Module name & description
7 #define NETDATA_EBPF_MODULE_NAME_SYNC "sync"
8 #define NETDATA_EBPF_SYNC_MODULE_DESC "Monitor calls to syscalls sync(2), fsync(2), fdatasync(2), syncfs(2), msync(2), and sync_file_range(2)."