mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
perf: delay source start until polkit has authorized
Without this, after logging in you are already multiple seconds into your profiling session recording. Not ideal. So instead, we do the async polkit auth upfront during SpSource::prepare(), and then toggle ready after we have received notification.
This commit is contained in:
@ -19,7 +19,7 @@
|
||||
#ifndef SP_PERF_COUNTER_H
|
||||
#define SP_PERF_COUNTER_H
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <gio/gio.h>
|
||||
#include <linux/perf_event.h>
|
||||
|
||||
|
||||
@ -110,6 +110,12 @@ typedef void (*SpPerfCounterCallback) (SpPerfCounterEvent *event,
|
||||
guint cpu,
|
||||
gpointer user_data);
|
||||
|
||||
void sp_perf_counter_authorize_async (GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
gboolean sp_perf_counter_authorize_finish (GAsyncResult *result,
|
||||
GError **error);
|
||||
|
||||
GType sp_perf_counter_get_type (void);
|
||||
SpPerfCounter *sp_perf_counter_new (GMainContext *context);
|
||||
void sp_perf_counter_set_callback (SpPerfCounter *self,
|
||||
|
||||
Reference in New Issue
Block a user