mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-03-22 21:21:26 +00:00
capture: add sysprof_collector_is_active()
This can be used to check if a collector is actively running.
This commit is contained in:
@ -863,3 +863,15 @@ sysprof_collector_request_counter (unsigned int n_counters)
|
|||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
sysprof_collector_is_active (void)
|
||||||
|
{
|
||||||
|
bool ret = false;
|
||||||
|
|
||||||
|
COLLECTOR_BEGIN {
|
||||||
|
ret = true;
|
||||||
|
} COLLECTOR_END;
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|||||||
@ -65,6 +65,8 @@ SYSPROF_BEGIN_DECLS
|
|||||||
|
|
||||||
SYSPROF_AVAILABLE_IN_3_36
|
SYSPROF_AVAILABLE_IN_3_36
|
||||||
void sysprof_collector_init (void);
|
void sysprof_collector_init (void);
|
||||||
|
SYSPROF_AVAILABLE_IN_3_38
|
||||||
|
bool sysprof_collector_is_active (void);
|
||||||
SYSPROF_AVAILABLE_IN_3_36
|
SYSPROF_AVAILABLE_IN_3_36
|
||||||
void sysprof_collector_allocate (SysprofCaptureAddress alloc_addr,
|
void sysprof_collector_allocate (SysprofCaptureAddress alloc_addr,
|
||||||
int64_t alloc_size,
|
int64_t alloc_size,
|
||||||
|
|||||||
Reference in New Issue
Block a user