helpers: add fallbacks for perf_event_open

First try the proxy to the service, then fallback to trying in-process.
This commit is contained in:
Christian Hergert
2019-05-09 14:44:16 -07:00
parent e53a56feaf
commit 1a576aa779
3 changed files with 129 additions and 24 deletions

View File

@ -42,7 +42,6 @@ gboolean sysprof_helpers_list_processes_finish (SysprofHelpers
gint32 **processes,
gsize *n_processes,
GError **error);
#ifdef __linux__
void sysprof_helpers_get_proc_file_async (SysprofHelpers *self,
const gchar *path,
GCancellable *cancellable,
@ -52,6 +51,7 @@ gboolean sysprof_helpers_get_proc_file_finish (SysprofHelpers
GAsyncResult *result,
gchar **contents,
GError **error);
#ifdef __linux__
void sysprof_helpers_perf_event_open_async (SysprofHelpers *self,
struct perf_event_attr *attr,
gint32 pid,