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

@ -27,14 +27,14 @@
G_BEGIN_DECLS
gboolean helpers_list_processes (gint32 **processes,
gsize *n_processes);
gboolean helpers_perf_event_open (GVariant *options,
gint32 pid,
gint32 cpu,
gint group_fd,
guint64 flags,
gint *out_fd);
gboolean helpers_list_processes (gint32 **processes,
gsize *n_processes);
gboolean helpers_perf_event_open (GVariant *options,
gint32 pid,
gint32 cpu,
gint group_fd,
guint64 flags,
gint *out_fd);
gboolean helpers_get_proc_file (const gchar *path,
gchar **contents,
gsize *len);