Skip to content

Commit c6c79fb

Browse files
committed
add env to enable tracking prov in proxy lib
1 parent 8b86b9d commit c6c79fb

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/proxy_lib/proxy_lib.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,16 +138,21 @@ void proxy_lib_create_common(void) {
138138
}
139139
#endif
140140

141+
umf_pool_create_flags_t pool_flags = UMF_POOL_CREATE_FLAG_DISABLE_TRACKING;
142+
if (utils_env_var_has_str("UMF_PROXY", "tracking=enabled")) {
143+
LOG_DEBUG("proxy_lib: enabling of Tracking Provider");
144+
pool_flags = pool_flags & ~UMF_POOL_CREATE_FLAG_DISABLE_TRACKING;
145+
}
146+
141147
umf_result = umfMemoryProviderCreate(umfOsMemoryProviderOps(), &os_params,
142148
&OS_memory_provider);
143149
if (umf_result != UMF_RESULT_SUCCESS) {
144150
LOG_ERR("creating OS memory provider failed");
145151
exit(-1);
146152
}
147153

148-
umf_result =
149-
umfPoolCreate(umfPoolManagerOps(), OS_memory_provider, NULL,
150-
UMF_POOL_CREATE_FLAG_DISABLE_TRACKING, &Proxy_pool);
154+
umf_result = umfPoolCreate(umfPoolManagerOps(), OS_memory_provider, NULL,
155+
pool_flags, &Proxy_pool);
151156
if (umf_result != UMF_RESULT_SUCCESS) {
152157
LOG_ERR("creating UMF pool manager failed");
153158
exit(-1);

0 commit comments

Comments
 (0)