mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
libsysprof-profile: make timeout msec tweakable
We may want to tweak this as we discover we can either backoff or increase our timing intervals.
This commit is contained in:
@ -94,6 +94,7 @@ typedef struct _SysprofPerfEventSource
|
||||
{
|
||||
GSource source;
|
||||
SysprofPerfEventStream *stream;
|
||||
int timeout_msec;
|
||||
} SysprofPerfEventSource;
|
||||
|
||||
enum {
|
||||
@ -237,7 +238,7 @@ sysprof_perf_event_source_prepare (GSource *gsource,
|
||||
SysprofPerfEventStream *self = source->stream;
|
||||
|
||||
if (timeout != NULL)
|
||||
*timeout = 5;
|
||||
*timeout = source->timeout_msec;
|
||||
|
||||
return self != NULL &&
|
||||
self->active &&
|
||||
@ -450,6 +451,7 @@ sysprof_perf_event_stream_new (GDBusConnection *connection,
|
||||
source = (SysprofPerfEventSource *)
|
||||
g_source_new (&source_funcs, sizeof (SysprofPerfEventSource));
|
||||
source->stream = self;
|
||||
source->timeout_msec = 5;
|
||||
self->source = (GSource *)source;
|
||||
|
||||
g_source_set_callback (self->source, sysprof_perf_event_stream_dispatch, self, NULL);
|
||||
|
||||
Reference in New Issue
Block a user