summaryrefslogtreecommitdiffstats
path: root/collectors/ebpf.plugin/ebpf_dcstat.c
diff options
context:
space:
mode:
authorthiagoftsm <thiagoftsm@gmail.com>2023-03-08 14:49:35 +0000
committerGitHub <noreply@github.com>2023-03-08 14:49:35 +0000
commitb3f59597c47f108df1303eeb2702b487c08a188e (patch)
tree14410df486a1f23de8793f911bfea444763c4bbc /collectors/ebpf.plugin/ebpf_dcstat.c
parentf4fced9b90b1569c82a809a048af5d0591b2ea6d (diff)
eBPF new charts (user ring) (#14623)
Diffstat (limited to 'collectors/ebpf.plugin/ebpf_dcstat.c')
-rw-r--r--collectors/ebpf.plugin/ebpf_dcstat.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/collectors/ebpf.plugin/ebpf_dcstat.c b/collectors/ebpf.plugin/ebpf_dcstat.c
index a223511e51..fdc661e32b 100644
--- a/collectors/ebpf.plugin/ebpf_dcstat.c
+++ b/collectors/ebpf.plugin/ebpf_dcstat.c
@@ -5,7 +5,7 @@
// ----------------------------------------------------------------------------
// ARAL vectors used to speed up processing
-ARAL *ebpf_aral_dcstat_pid;
+ARAL *ebpf_aral_dcstat_pid = NULL;
static char *dcstat_counter_dimension_name[NETDATA_DCSTAT_IDX_END] = { "ratio", "reference", "slow", "miss" };
static netdata_syscall_stat_t dcstat_counter_aggregated_data[NETDATA_DCSTAT_IDX_END];
@@ -344,7 +344,7 @@ static void ebpf_dcstat_exit(void *ptr)
*/
static inline void ebpf_dcstat_aral_init()
{
- ebpf_aral_dcstat_pid = ebpf_allocate_pid_aral("ebpf-dcstat", sizeof(netdata_publish_dcstat_t));
+ ebpf_aral_dcstat_pid = ebpf_allocate_pid_aral(NETDATA_EBPF_DCSTAT_ARAL_NAME, sizeof(netdata_publish_dcstat_t));
}
/**
@@ -1053,6 +1053,11 @@ static void dcstat_collector(ebpf_module_t *em)
if (apps & NETDATA_EBPF_APPS_FLAG_CHART_CREATED)
ebpf_dcache_send_apps_data(apps_groups_root_target);
+#ifdef NETDATA_DEV_MODE
+ if (ebpf_aral_dcstat_pid)
+ ebpf_send_data_aral_chart(ebpf_aral_dcstat_pid, em);
+#endif
+
if (cgroups)
ebpf_dc_send_cgroup_data(update_every);
@@ -1201,6 +1206,12 @@ void *ebpf_dcstat_thread(void *ptr)
pthread_mutex_lock(&lock);
ebpf_create_filesystem_charts(em->update_every);
ebpf_update_stats(&plugin_statistics, em);
+ ebpf_update_kernel_memory_with_vector(&plugin_statistics, em->maps);
+#ifdef NETDATA_DEV_MODE
+ if (ebpf_aral_dcstat_pid)
+ ebpf_statistic_create_aral_chart(NETDATA_EBPF_DCSTAT_ARAL_NAME, em);
+#endif
+
pthread_mutex_unlock(&lock);
dcstat_collector(em);