Commit Graph

34 Commits

Author SHA1 Message Date
bd73d534d0 tools: feature test various sources behind __linux__ 2020-11-16 14:58:09 -08:00
04eacbcfe2 build: make polkit optional again for sysprof-cli 2020-11-16 14:57:04 -08:00
9405c960cc tools: load proper speedtrack library
Fixes #51
2020-10-15 13:38:37 -07:00
45c8c95706 libsysprof-capture: Drop GError usage from SysprofCaptureWriter
Use `errno` instead, which is icky, but given that all of the failure
modes are from POSIX I/O functions, it’s at least in keeping with them.

This is a major API break.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Helps: #40
2020-07-03 22:00:34 +01:00
e19d70bca0 libsysprof-capture: Drop GError usage from SysprofCaptureReader
Use `errno` instead, which is icky, but given that all of the failure
modes are from POSIX I/O functions, it’s at least in keeping with them.

This is a major API break.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Helps: #40
2020-07-03 22:00:34 +01:00
03906a84c6 tools: add --no-throttle sysprof-cli option
This allows disabling the CPU governer by switching to "performance".
2020-03-18 11:16:00 -07:00
89f656013a tools: add --speedtrack command line option 2020-03-15 16:00:22 -07:00
98f6dc6642 tools: add --env=VAR=VALUE command line option 2020-02-21 12:40:55 -08:00
c39cf46776 tools: perform cleanup/supplementals when stopping profiler 2020-02-11 18:39:20 -08:00
33c81a3a9c memprof: add memory profiling using LD_PRELOAD
This brings over some of the techniques from the old memprof design.
Sysprof and memprof shared a lot of code, so it is pretty natural to
bring back the same callgraph view based on memory allocations.

This reuses the StackStash just like it did in memprof. While it
would be nice to reuse some existing tools out there, the fit of
memprof with sysprof is so naturally aligned, it's not really a
big deal to bring back the LD_PRELOAD. The value really comes
from seeing all this stuff together instead of multiple apps.

There are plenty of things we can implement on top of this that
we are not doing yet such as temporary allocations, cross-thread
frees, graphing the heap, and graphing differences between the
heap at to points in time. I'd like all of these things, given
enough time to make them useful.

This is still a bit slow though due to the global lock we take
to access the writer. To improve the speed here we need to get
rid of that lock and head towards a design that allows a thread
to request a new writer from Sysprof and save it in TLS (to be
destroyed when the thread exits).
2020-02-07 19:00:33 -08:00
981873af75 cli: add --merge command line option
This allows the caller to merge multiple syscap files into one such as:

  sysprof-cli --merge a.syscap b.syscap > c.syscap

Fixes #26
2020-01-29 08:17:36 -08:00
753a698563 tools: add --rapl to sysprof-cli command
This allows recording energy statistics using turbostat if supported by
the host system.
2019-08-08 16:12:26 -07:00
1cb182d1df tools: fix local usage for no_battery 2019-08-02 11:01:13 -07:00
8c72bafff8 tools: set cwd when spawning with sysprof-cli 2019-07-28 12:32:49 -07:00
745f4c4168 tools: add --gtk option for GTK_TRACE_FD= envvar 2019-07-20 18:38:24 -07:00
6987888349 sysprof: include locale.h
setlocale and LC_ALL requires this
2019-07-17 14:59:42 +05:30
bb5261bc32 tools: setup translations for sysprof-cli 2019-07-13 15:01:59 -07:00
6a331f44f4 tools: add -- option instead of -c
This adds the common convention for applications that receive command
line arguments to use [-- COMMAND ARGS] instead of "-c" which is rather
limiting for shell expansion.

Fixes #10
2019-07-13 15:01:47 -07:00
f89d5830f2 cli: add diskstat data source recording 2019-07-01 14:46:43 -07:00
d44fdb48d9 tools: record battery from sysprof-cli 2019-06-26 14:26:15 -07:00
a951f1a240 tools: record network stats from sysprof-cli 2019-06-26 14:22:09 -07:00
84850218ed sysprof-cli: allow disabling perf stacktraces 2019-06-05 16:55:50 -07:00
5402074c53 tools: add --gnome-shell option to sysprof-cli
This can be used to connect to newer GNOME Shell versions that have
profiling integrated.
2019-06-04 15:10:51 -07:00
af32235541 gjs: add gjs source back
This sets various environment variables we need.
2019-06-03 18:01:53 -07:00
30524ab3d0 sysprof-cli: exit main loop on failure 2019-05-29 15:13:01 -07:00
c670cdd82a sysprof-cli: add symbol rollup unless --no-decode 2019-05-29 15:13:01 -07:00
f57bc57461 sysprof-cli: remove -g option
We might want to save this for gtk
2019-05-29 15:13:01 -07:00
9c1518b384 tools: use PolkitUnixProcess 2019-05-29 15:13:01 -07:00
88bf04cb37 tools: add polkit agent to sysprof-cli
The goal for this is to be able to not use sudo to authenticate the user
and elevate privileges.
2019-05-29 15:13:01 -07:00
aca6baa3bd tools: add --gjs option and fix --use-trace-fd
This uses the new tracefd source for gjs and trace-fd sources.
2019-05-29 15:13:01 -07:00
63d3ea12ed tools: add --use-trace-fd option 2019-05-29 15:13:01 -07:00
b5c855a01f tools: use g_unix_signal_add() instead of eventfd
This will do basically the same thing, but be more convenient for us and
less likely to error.
2019-05-29 15:13:00 -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
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