#define PROF_LEVEL_MAX 10
ZBX_PTR_VECTOR_DECL(func_profiles, zbx_func_profile_t*)
ZBX_PTR_VECTOR_IMPL(func_profiles, zbx_func_profile_t*)
static volatile int zbx_prof_scope_requested;
static ZBX_THREAD_LOCAL zbx_vector_func_profiles_t zbx_func_profiles;
static ZBX_THREAD_LOCAL zbx_prof_scope_t zbx_prof_scope;
static ZBX_THREAD_LOCAL int zbx_prof_initialized;
static ZBX_THREAD_LOCAL zbx_func_profile_t *zbx_func_profile[PROF_LEVEL_MAX];
static ZBX_THREAD_LOCAL int zbx_func_profile_level;
static void zbx_prof_init(void)
if (0 == zbx_prof_initialized)
zbx_prof_initialized = 1;
zbx_vector_func_profiles_create(&zbx_func_profiles);
static int compare_func_profile(const void *d1, const void *d2)
const zbx_func_profile_t *func_profile1 = *((const zbx_func_profile_t * const *)d1);
const zbx_func_profile_t *func_profile2 = *((const zbx_func_profile_t * const *)d2);
ZBX_RETURN_IF_NOT_EQUAL(func_profile1->func_name, func_profile2->func_name);
static void func_profile_free(zbx_func_profile_t *func_profile)
void zbx_prof_start(const char *func_name, zbx_prof_scope_t scope)
zbx_func_profile_t *func_profile, func_profile_local = {func_name, 0};