summaryrefslogtreecommitdiffstats
path: root/src/collectors/ebpf.plugin/ebpf_process.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/collectors/ebpf.plugin/ebpf_process.c')
-rw-r--r--src/collectors/ebpf.plugin/ebpf_process.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/collectors/ebpf.plugin/ebpf_process.c b/src/collectors/ebpf.plugin/ebpf_process.c
index d2810f899..d80f7a3e8 100644
--- a/src/collectors/ebpf.plugin/ebpf_process.c
+++ b/src/collectors/ebpf.plugin/ebpf_process.c
@@ -57,11 +57,7 @@ ebpf_process_stat_t *process_stat_vector = NULL;
static netdata_syscall_stat_t process_aggregated_data[NETDATA_KEY_PUBLISH_PROCESS_END];
static netdata_publish_syscall_t process_publish_aggregated[NETDATA_KEY_PUBLISH_PROCESS_END];
-struct config process_config = { .first_section = NULL,
- .last_section = NULL,
- .mutex = NETDATA_MUTEX_INITIALIZER,
- .index = { .avl_tree = { .root = NULL, .compar = appconfig_section_compare },
- .rwlock = AVL_LOCK_INITIALIZER } };
+struct config process_config = APPCONFIG_INITIALIZER;
/*****************************************************************
*
@@ -1124,8 +1120,6 @@ void ebpf_process_update_cgroup_algorithm()
*/
static void process_collector(ebpf_module_t *em)
{
- heartbeat_t hb;
- heartbeat_init(&hb);
int publish_global = em->global_charts;
int cgroups = em->cgroup_charts;
pthread_mutex_lock(&ebpf_exit_cleanup);
@@ -1141,9 +1135,11 @@ static void process_collector(ebpf_module_t *em)
uint32_t lifetime = em->lifetime;
netdata_idx_t *stats = em->hash_table_stats;
memset(stats, 0, sizeof(em->hash_table_stats));
+ heartbeat_t hb;
+ heartbeat_init(&hb, USEC_PER_SEC);
while (!ebpf_plugin_stop() && running_time < lifetime) {
- usec_t dt = heartbeat_next(&hb, USEC_PER_SEC);
- (void)dt;
+ heartbeat_next(&hb);
+
if (ebpf_plugin_stop())
break;