summaryrefslogtreecommitdiffstats
path: root/libnetdata/aral
diff options
context:
space:
mode:
authorCosta Tsaousis <costa@netdata.cloud>2023-02-09 20:27:05 +0200
committerGitHub <noreply@github.com>2023-02-09 20:27:05 +0200
commit414f416c5d290db3c3eed9073258c834fac7f2f7 (patch)
treeaeed0a2619a1f42c60ec816311d1dd10c8e5ccc1 /libnetdata/aral
parent8043106b60ec3d8d32b3a9ff3ef53991e73d9037 (diff)
Virtual hosts for data collection (#14464)
* support multiple hosts at pluginsd structures * cleanup obsolete code * use a lookup hashtable to quickly find the keyword to execute, without traversing the whole linked list of keywords * more cleanup * move new hash function to inlined.h * minimize comparisons, eliminate a pre-parsing of the first keyword for each line * cleanup parser from old code * move parser into libnetdata * unique entries in parser keywords hashtable * move all hashing functions to inlined.h, name their sources, simple_hash() now defaults to FNV1a, it was FNV1 * small_hash() for parser * plugins.d now can switch hosts, and also create/update them * update hash function and hashtable size * updated message * unittest all hashing functions * reset the chart when setting a new host * remove host tags * enable archived hosts when a collector pushes host info * do not need localhost to swtich to localhost * disable ARAL and OWA with -DFSANITIZE_ADDRESS=1
Diffstat (limited to 'libnetdata/aral')
-rw-r--r--libnetdata/aral/aral.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libnetdata/aral/aral.c b/libnetdata/aral/aral.c
index 4505ee0f28..2a4b0687dd 100644
--- a/libnetdata/aral/aral.c
+++ b/libnetdata/aral/aral.c
@@ -465,6 +465,9 @@ static inline ARAL_PAGE *aral_acquire_a_free_slot(ARAL *ar TRACE_ALLOCATIONS_FUN
}
void *aral_mallocz_internal(ARAL *ar TRACE_ALLOCATIONS_FUNCTION_DEFINITION_PARAMS) {
+#ifdef FSANITIZE_ADDRESS
+ return mallocz(ar->config.requested_element_size);
+#endif
ARAL_PAGE *page = aral_acquire_a_free_slot(ar TRACE_ALLOCATIONS_FUNCTION_CALL_PARAMS);
@@ -614,6 +617,11 @@ static inline void aral_move_page_with_free_list___aral_lock_needed(ARAL *ar, AR
}
void aral_freez_internal(ARAL *ar, void *ptr TRACE_ALLOCATIONS_FUNCTION_DEFINITION_PARAMS) {
+#ifdef FSANITIZE_ADDRESS
+ freez(ptr);
+ return;
+#endif
+
if(unlikely(!ptr)) return;
// get the page pointer