summaryrefslogtreecommitdiffstats
path: root/daemon
diff options
context:
space:
mode:
authorTimotej S <6674623+underhood@users.noreply.github.com>2022-10-13 16:20:51 +0200
committerGitHub <noreply@github.com>2022-10-13 16:20:51 +0200
commitc6f563da745f7d5d97b9408700fd87d484835e55 (patch)
tree04c1af5888eb4dd3fb2a269d2fe5cc1948449188 /daemon
parent4521b76927488a8af02b83b7dce742a8f250e5e3 (diff)
minor - add trace alloc to buildinfo (#13817)
add trace alloc to buildinfo
Diffstat (limited to 'daemon')
-rw-r--r--daemon/buildinfo.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/daemon/buildinfo.c b/daemon/buildinfo.c
index 2f837ea309..ef813a9617 100644
--- a/daemon/buildinfo.c
+++ b/daemon/buildinfo.c
@@ -197,6 +197,11 @@
#define FEAT_YES_NO(x) ((x) ? "YES" : "NO")
+#ifdef NETDATA_TRACE_ALLOCATIONS
+#define FEAT_TRACE_ALLOC 1
+#else
+#define FEAT_TRACE_ALLOC 0
+#endif
char *get_value_from_key(char *buffer, char *key) {
char *s = NULL, *t = NULL;
@@ -298,6 +303,9 @@ void print_build_info(void) {
printf(" GCP PubSub: %s\n", FEAT_YES_NO(FEAT_PUBSUB));
printf(" MongoDB: %s\n", FEAT_YES_NO(FEAT_MONGO));
printf(" Prometheus Remote Write: %s\n", FEAT_YES_NO(FEAT_REMOTE_WRITE));
+
+ printf("Debug/Developer Features:\n");
+ printf(" Trace Allocations: %s\n", FEAT_YES_NO(FEAT_TRACE_ALLOC));
};
#define FEAT_JSON_BOOL(x) ((x) ? "true" : "false")
@@ -354,6 +362,8 @@ void print_build_info_json(void) {
printf(" \"mongodb\": %s,\n", FEAT_JSON_BOOL(FEAT_MONGO));
printf(" \"prom-remote-write\": %s\n", FEAT_JSON_BOOL(FEAT_REMOTE_WRITE));
printf(" }\n");
+ printf(" \"debug-n-devel\": {\n");
+ printf(" \"trace-allocations\": %s\n }\n",FEAT_JSON_BOOL(FEAT_TRACE_ALLOC));
printf("}\n");
};
@@ -454,4 +464,7 @@ void analytics_build_info(BUFFER *b) {
#ifdef ENABLE_PROMETHEUS_REMOTE_WRITE
add_to_bi(b, "Prometheus Remote Write");
#endif
+#ifdef NETDATA_TRACE_ALLOCATIONS
+ add_to_bi(b, "DebugTraceAlloc");
+#endif
}