diff --git a/src/libsysprof-capture/sysprof-collector.c b/src/libsysprof-capture/sysprof-collector.c index 23a3c105..27794328 100644 --- a/src/libsysprof-capture/sysprof-collector.c +++ b/src/libsysprof-capture/sysprof-collector.c @@ -863,3 +863,15 @@ sysprof_collector_request_counter (unsigned int n_counters) return ret; } + +bool +sysprof_collector_is_active (void) +{ + bool ret = false; + + COLLECTOR_BEGIN { + ret = true; + } COLLECTOR_END; + + return ret; +} diff --git a/src/libsysprof-capture/sysprof-collector.h b/src/libsysprof-capture/sysprof-collector.h index f989f08f..849ac628 100644 --- a/src/libsysprof-capture/sysprof-collector.h +++ b/src/libsysprof-capture/sysprof-collector.h @@ -65,6 +65,8 @@ SYSPROF_BEGIN_DECLS SYSPROF_AVAILABLE_IN_3_36 void sysprof_collector_init (void); +SYSPROF_AVAILABLE_IN_3_38 +bool sysprof_collector_is_active (void); SYSPROF_AVAILABLE_IN_3_36 void sysprof_collector_allocate (SysprofCaptureAddress alloc_addr, int64_t alloc_size,