summaryrefslogtreecommitdiffstats
path: root/collectors/ebpf.plugin/ebpf_disk.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-05-08 16:27:04 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-05-08 16:27:04 +0000
commita836a244a3d2bdd4da1ee2641e3e957850668cea (patch)
treecb87c75b3677fab7144f868435243f864048a1e6 /collectors/ebpf.plugin/ebpf_disk.c
parentAdding upstream version 1.38.1. (diff)
downloadnetdata-a836a244a3d2bdd4da1ee2641e3e957850668cea.tar.xz
netdata-a836a244a3d2bdd4da1ee2641e3e957850668cea.zip
Adding upstream version 1.39.0.upstream/1.39.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'collectors/ebpf.plugin/ebpf_disk.c')
-rw-r--r--collectors/ebpf.plugin/ebpf_disk.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/collectors/ebpf.plugin/ebpf_disk.c b/collectors/ebpf.plugin/ebpf_disk.c
index 5e7e2599d..e1a579441 100644
--- a/collectors/ebpf.plugin/ebpf_disk.c
+++ b/collectors/ebpf.plugin/ebpf_disk.c
@@ -429,7 +429,7 @@ static void ebpf_cleanup_disk_list()
static void ebpf_disk_free(ebpf_module_t *em)
{
pthread_mutex_lock(&ebpf_exit_cleanup);
- em->thread->enabled = NETDATA_THREAD_EBPF_STOPPING;
+ em->enabled = NETDATA_THREAD_EBPF_STOPPING;
pthread_mutex_unlock(&ebpf_exit_cleanup);
ebpf_disk_disable_tracepoints();
@@ -444,7 +444,7 @@ static void ebpf_disk_free(ebpf_module_t *em)
ebpf_cleanup_disk_list();
pthread_mutex_lock(&ebpf_exit_cleanup);
- em->thread->enabled = NETDATA_THREAD_EBPF_STOPPED;
+ em->enabled = NETDATA_THREAD_EBPF_STOPPED;
pthread_mutex_unlock(&ebpf_exit_cleanup);
}
@@ -761,25 +761,21 @@ void *ebpf_disk_thread(void *ptr)
em->maps = disk_maps;
if (ebpf_disk_enable_tracepoints()) {
- em->thread->enabled = NETDATA_THREAD_EBPF_STOPPED;
goto enddisk;
}
avl_init_lock(&disk_tree, ebpf_compare_disks);
if (read_local_disks()) {
- em->thread->enabled = NETDATA_THREAD_EBPF_STOPPED;
goto enddisk;
}
if (pthread_mutex_init(&plot_mutex, NULL)) {
- em->thread->enabled = NETDATA_THREAD_EBPF_STOPPED;
error("Cannot initialize local mutex");
goto enddisk;
}
em->probe_links = ebpf_load_program(ebpf_plugin_dir, em, running_on_kernel, isrh, &em->objects);
if (!em->probe_links) {
- em->thread->enabled = NETDATA_THREAD_EBPF_STOPPED;
goto enddisk;
}
@@ -792,6 +788,7 @@ void *ebpf_disk_thread(void *ptr)
pthread_mutex_lock(&lock);
ebpf_update_stats(&plugin_statistics, em);
+ ebpf_update_kernel_memory_with_vector(&plugin_statistics, disk_maps);
pthread_mutex_unlock(&lock);
disk_collector(em);