Commit Graph

27 Commits

Author SHA1 Message Date
bbe62d83b8 helpers: avoid concurrent requests to authorize
We don't want to spam users with polkit requests, so try to only do one
at a time and ensure that if we suceeded, we skip it until later.
2020-08-21 13:01:39 -07:00
c4eaa53f20 libsysprof: handle bus/proxy failure gracefully 2020-01-02 10:31:12 -08:00
fc745767d4 governor: add daemon API and helpers to set CPU governor 2019-06-14 08:03:37 -07:00
807bff9152 build: fix build on macOS 2019-06-04 14:35:48 -07:00
af2a17daa5 polkit: try harder to make polkit optional on non-Linux
We want the viewer to be usable on Mac/Windows/FreeBSD, even if our
profiler tooling isn't (yet).

Another option could be to do a simplified viewer window for those
platforms, but I think that is more work to maintain than abstracting
some of the stuff better in libsysprof.
2019-06-04 14:28:06 -07:00
2c6044d7bb helpers: remove flatpak check for now
We don't know if the file is sensitive or not, so we must go to the
daemon for the contents.
2019-05-29 15:13:01 -07:00
aac6e6ed9f Revert "helpers: try harder to avoid D-Bus to daemon"
This reverts commit 84c708890621472d640dfe2360e1273fcc5163cf.

This caused some issues with callgraphs.
2019-05-29 15:13:01 -07:00
9229e41976 libsysprof: allow auto-start of sysprof3
We don't need to allow auth here, but we do need to allow auto-start.
2019-05-29 15:13:01 -07:00
13b3edcbf6 helpers: try harder to avoid D-Bus to daemon 2019-05-29 15:13:01 -07:00
234200f8d1 libsysprof: try local proc file access if not in flatpak 2019-05-29 15:13:01 -07:00
c368da09de libsysprof-ui: allow restricting remote proxy 2019-05-29 15:13:00 -07:00
5718b5fb20 libsysprof: more fallbacks for bad proxy 2019-05-29 15:13:00 -07:00
5e368cede2 libsysprof: process local task parsing on a thread 2019-05-29 15:13:00 -07:00
d6e3d580fd helpers: do not allow interactive authorization
We want to use the authorize_async() flow up front to authorize the
connection, and then make all other API fail immediately to reduce the
chance that we block the peers.
2019-05-29 15:13:00 -07:00
9d72203687 sysprofd: add API to get a FD for a file in proc
This is useful for optimized parsing of proc files such as necessary by
the memory source to seek() back to the start (instead of re-opening a
new file).
2019-05-29 15:13:00 -07:00
36ecfd3dd1 libsysprof: add async variant for proc source 2019-05-29 15:13:00 -07:00
b4fa5ed04f libsysprof: add helper to get process info array 2019-05-29 15:13:00 -07:00
4678273958 libsysprof: avoid remote call if we can 2019-05-29 15:13:00 -07:00
22e121b564 libsysprof: remove dead code 2019-05-29 15:13:00 -07:00
280f4b9415 libsysprof: backport autoptr cleanups when necessary 2019-05-29 15:13:00 -07:00
eacdc47c34 libsysprof: fix weak ref usage 2019-05-29 15:13:00 -07:00
05bfc21fce libsysprof: only use sync form for perf counter
We already have async auth workflow, so we only need the synchronous
form here, which makes things a bit less complicated.
2019-05-29 15:13:00 -07:00
0e20e98801 libsysprof: add authorize_async() to authorize bus
We want a single authorization request from the user when
starting a profile, and to do it as early as possible. This
will allow for the local profiler to set this up before
starting things.
2019-05-29 15:13:00 -07:00
ad4ca5faef helpers: add sync helper 2019-05-29 15:13:00 -07:00
fb9e356dbb libsysprof: add sync get_proc variant and fallbacks 2019-05-29 15:13:00 -07:00
1a576aa779 helpers: add fallbacks for perf_event_open
First try the proxy to the service, then fallback to trying in-process.
2019-05-29 15:13:00 -07:00
cd3b4d6538 src: use helpers and add group_fd to remote API 2019-05-29 15:13:00 -07:00