Commit Graph

41 Commits

Author SHA1 Message Date
757d36ae8e Cleanup the build a bit
Makes the Meson build a little bit better and cleans up some of the
formatting.
2022-05-25 14:07:02 -05:00
9c98b10fee build: remove deprecated meson feature 2022-04-01 16:56:32 -07:00
6f11fcf510 sysprofd: fix warning 2021-03-22 14:55:04 -07:00
4777e74862 sysprofd: ftruncate() when overwriting files
This is really only used for proc like files which are generally a single
page, but might as well start from zero.
2021-02-24 13:03:24 -08:00
667180cbc8 sysprofd: add API to set perf_event_paranoid
This will allow us to get more information on demand when running the
profiler without endless tweaking by end users.
2021-02-24 11:26:10 -08:00
e647a83557 turbostat: fix ref count check 2020-08-21 13:15:38 -07:00
eae4eb4ad7 build: Drop redundant _GNU_SOURCE definitions
It’s defined in `meson.build` now. See the previous commit.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-07-06 11:27:28 +01:00
3c7b76c6ba build: Move Meson dependency() calls to where they’re used
This avoids making the project depend on all its dependencies, some of
which are optional, when being built as a Meson subproject.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-07-03 22:01:33 +01:00
d89a689ab4 sysprofd: remove use of GAtomicRCBox
Using an embedded ref count allows us to backport to older operating
systems for which GLib is restricted to 2.56.
2020-02-20 11:01:02 -08:00
b624ec8809 build: track changes to GLib and gdbus-codegen
GLib is already doing this, which broke a number of auto-generated code.
This tracks those changes and manually sets the annotations so that we
are guaranteed to get this behavior.

We'll need to fix other uses (such as in Mutter), but we have to do that
already because of the change in GLib.

Fixes #17
2019-10-30 14:46:20 -07:00
5ff150d365 turbostat: remove prctl
This won't be reliable since our handlers are run on threads.
2019-07-31 13:20:05 -07:00
f9f7e29e54 turbostat: use kill() to force sample by turbostat
This is more reliable than using a PTY and allows us to use a regular
pipe to output data into a GIOChannel. This also changes the design to
use async IO watches for sample delivery.
2019-07-31 13:08:42 -07:00
a3d0ddc231 sysprofd: add RAPL profiler on the org.gnome.Sysprof3 D-Bus peer
This allows consumers to get a RAPL profiler object on the D-Bus at
org.gnome.Sysprof3 with path /org/gnome/Sysprof3/RAPL. This can be used
by the clients to record extra power statistics.

It requires the `turbostat` program to be installed, and is provided in
packages such as `kernel-tools` on Fedora. Distributions may want to
ensure that is available as a dependency of Sysprof, but it is not
strictly required.
2019-07-30 15:29:43 -07:00
b8898fceea service: remove unnecessary code
This is fixed in glib now.
2019-07-30 15:17:32 -07:00
09c457c880 sysprofd: implement org.gnome.Sysprof2 compatability API
This allows the new sysprofd to service requests for older clients
expecting to talk to or.gnome.Sysprof2.
2019-06-25 14:27:43 -07:00
fc745767d4 governor: add daemon API and helpers to set CPU governor 2019-06-14 08:03:37 -07:00
ce6ba83ff3 sysprofd: remove debug code 2019-06-05 10:50:52 -07:00
7fd8ca4c8f sysprofd: make sysprofd exit after 120 seconds of inactivity 2019-05-29 15:13:01 -07:00
c368da09de libsysprof-ui: allow restricting remote proxy 2019-05-29 15:13:00 -07:00
931112b195 sysprofd: actually check authorization result 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
dfdebf115f sysprofd: add comm and do some postprocessing 2019-05-29 15:13:00 -07:00
ecbca06013 sysprofd: add hook to postprocess cmdline 2019-05-29 15:13:00 -07:00
3310d83257 sysprofd: use add_value()
Otherwise we need another GVariantBuilder
2019-05-29 15:13:00 -07:00
a318a135c6 sysprofd: fix include 2019-05-29 15:13:00 -07:00
d6d4c0d140 sysprofd: start on optimized getprocessinfo helper
Calling all the individual function calls to get process information would
be considerably inefficient, so we can coalesce a bunch of that and change
our process-model implementation (and proc source) to use this.
2019-05-29 15:13:00 -07:00
200f7484d1 sysprofd: remove consistency check
We can try and just let the syscall tell us what happened.
2019-05-29 15:13:00 -07:00
aafcc0a57a sysprofd: remove debug code 2019-05-29 15:13:00 -07:00
623d7ad027 build: cleanup dependency checking
We always require polkit now, so that we can fallback when we fail to
communicate with the peer.
2019-05-29 15:13:00 -07:00
0b284329d4 sysprof3: start moving API towards sysprof-3 2019-05-29 15:13:00 -07:00
1bd0107c54 build: fix various includes for older GCC 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
427a4ca79d src: add helpers for common clinet/service side utils 2019-05-29 15:12:59 -07:00
4a6f7324c1 sysprofd: fix error path and add some logging 2019-05-29 15:12:59 -07:00
bc5c243407 sysprofd: implement mechanics for perf_event_open 2019-05-29 15:12:59 -07:00
ab2fdffa6d sysprofd: require polkit authorization by the peer 2019-05-29 15:12:59 -07:00
e77310a511 build: update some dependency versions
These might give us a chance to work on Debian stable.
2019-05-29 15:12:59 -07:00
ed48eadd08 sysprofd: start on port to GDBusConnection
This will help us reduce a lot of code and eventually make some things
more asynchronous to allow for interactive authorization.
2019-05-29 15:12:59 -07:00
53c718b708 build: rename all symbols to use sysprof_ as prefix
As we gain in usage, we need to be more careful about using a prefix
that will not collide with other symbols. So version 3 of our ABI will
change to using Sysprof/SYSPROF/sysprof as the various prefixes.

The soname/api version bump will happen later on this branch so that
things are easier to test up until then.
2019-05-29 15:12:59 -07:00
6ba408f073 shared: remove use of libshared
This moves everything into other places and simple includes the
files in the cases that it is necessary. In the future, we can
rewrite sysprofd to use GDBus and add GetProcFile() to allow
for client-side processing of kallsyms.
2019-05-29 15:12:59 -07:00
1708ad1b48 tree: start on massive tree refactor
The big thing going on here is that we are going to split up the libraries
a bit better, and remove GObject from the capture library. The libsysprof
library will bring in the capture library statically, so we can export the
symbols we want.

Eventually, we will bump the version to sysprof-3, but not yet.
2019-05-29 15:12:59 -07:00