Commit Graph

298 Commits

Author SHA1 Message Date
d525f065f4 libsysprof-ui: add API to reload pages
This can be useful when the page is interactive and needs to reload.
2020-02-18 19:17:38 -08:00
059508d582 memprof: fix whitespace 2020-02-18 17:22:32 -08:00
77a13fe7f9 icons: provide helper icons
Fixes https://gitlab.gnome.org/GNOME/sysprof/issues/30
2020-02-18 12:05:55 +01:00
aca1a6a765 libsysprof-ui: check for valid frame type before incrementing 2020-02-13 14:32:34 -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
bae10987f0 libsysprof-ui: fix timing information for marks tooltips 2020-01-24 09:29:34 -08:00
94b0ecb758 display: provide recording time for display titles 2020-01-23 12:46:44 -08:00
460df56fa5 visualizers: clear selected row when showing details
The details don't correspond to any selected row, so clear the row when
we switch to the details page.
2020-01-23 12:36:04 -08:00
731b6dd379 sysprof: allow passing program path to sysprof
If the path provided to us is an executable program (instead of a syscap
file) then we can setup the path as the binary to execute in the profiler
assistant and save the user a couple clicks.
2020-01-23 11:59:50 -08:00
599ecaebe1 display: remove unused variable 2020-01-23 11:59:50 -08:00
7dad1f2ab4 marks: add end time to mark details 2020-01-22 12:01:26 -08:00
812b0d60a0 counters: use counter description in menu item 2020-01-21 21:06:41 -08:00
db160cf536 ui: avoid concurrent reloads of stack depths
This ensures that we only have one thread doing reloads of stack frame
depths at a time. While we only ref the reader in the state, it should
still be fine because cursors *always* make a copy of the reader for their
internal use. I don't think this should fix #23, but it may reduce the
chances of it happening.

It's unclear to me what could cause #23 to happen, unless for some reason
multiple threads were sharing the reader's internal buffer causing the
frame-> dereferences to be junk. But as stated with reader copies, that
should not be able to happen.

Another possible avenue is that the task is cancelled and for some reason
the task is clearing the task data while the thread is running. Again,
that is not supposed to be possible given the design of GTask as it
should not release task data until finalized.
2020-01-08 11:13:24 -08:00
bd2da8baa0 ui: use g_atomic_rc_box
This changes a couple of our structures to use the atomic rc box instead
of gslice directly. It shouldn't affect anything, just some general
modernization while looking at #23
2020-01-08 11:00:54 -08:00
a67701848d details-page: Protect against NULL line
On a Raspberry PI 4, Sysprof crashes immediately when
trying to memchr() on the 'line' variable. The current
RPI4 support is poor on Linux mainline admitedly, but
having Sysprof to work on it at least gives us a chance
to profile the major bottlenecks.

Protect against NULL 'line'.
2019-12-30 14:03:15 -03:00
b56cd73308 fix typo
Fixes #20
2019-12-12 12:39:28 -08:00
653ff6ba9e build: add datadir to pkgconfig files
Mutter wants sysprof's exact dbus interface directory during build time
* https://gitlab.gnome.org/GNOME/mutter/blob/master/src/meson.build#L714

On certain platforms mutter's datadir != sysprof's datadir.
This is initial work for a forthcoming PR to do
```
sysprof_dep.get_pkgconfig_variable('datadir')
```
in mutter for compatibility with these platforms.

This patch is on behalf of nixpkgs where we actually have to carry a 
downstream patch [0] for this exact reason. We install everything into 
their own immutable prefix under `/nix/store`.

[0]: a821167046/pkgs/desktops/gnome-3/core/mutter/0001-build-use-get_pkgconfig_variable-for-sysprof-dbusdir.patch
2019-12-04 17:17:58 -05:00
73dc39329a libsysprof-ui: avoid use of environ for -Werror=shadow
Fixes #18
2019-10-21 11:35:42 -07:00
1d445c4fad sysprof-ui: add missing filtering of processes
The search implementation here is pretty barebones, but at least it gets
things working again after the fallout from the redesign.

Fixes #15
2019-10-07 12:57:50 -07:00
dbfa6c811b libsysprof-ui: track how many counters matched 2019-08-02 10:59:08 -07:00
5fa8c2dd1a rapl: check for > 0 counters 2019-08-01 18:01:39 -07:00
949c75e0f4 libsysprof-ui: soften the shadows a bit 2019-08-01 00:48:25 -07:00
6295b28816 ticks: tweak background style for ticks 2019-08-01 00:30:16 -07:00
2d6906b542 ticks: don't draw final layout if there isn't space
This just helps keep things from geting cut off.
2019-08-01 00:26:02 -07:00
2d69a5ff1c libsysprof-ui: simplify sizing of positioning in visualizers
This simplifies the visualizer sizing by avoiding the expanding sizes
when there is more space available. Doing so allows us to treat all the
sizing uniformly.

We can also make the ticks area a visualizer for more code re-use.
2019-08-01 00:20:31 -07:00
21643c71bf marks: tweak ellipsize to avoid resizes 2019-08-01 00:16:11 -07:00
52e587a0cb libsysprof-ui: use nsec constant 2019-07-31 16:09:49 -07:00
130a283abe rapl: use "Watts" for line displays 2019-07-31 15:55:32 -07:00
12866c4e15 libsysprof-ui: add units display for line graphs 2019-07-31 15:55:19 -07:00
98fd2fe35d rapl: add counters for additonal core/cpu pairs 2019-07-31 15:25:41 -07:00
8712067b8e rapl: add new aid for the RAPL profiler 2019-07-31 15:05:10 -07:00
959261919d libsysprof-ui: add source for energy stats 2019-07-30 15:52:02 -07:00
0378b0727b scrollmap: tweak box generation a bit for safety 2019-07-30 15:17:16 -07:00
c2728b8ada cleanup: remove duplicated NSEC_PER_SEC macros
This switches everything to using a single 64-bit constant for NSEC_PER_SEC
that ensure we're doing 64-bit math everywhere.
2019-07-18 10:22:46 -07:00
96fd7a65b8 procs: show active process count when available 2019-07-01 15:45:41 -07:00
7e078e031f cpu: check to see if we find process or exits 2019-07-01 15:45:24 -07:00
518f422e4f diskstat: set read/write labels for graph 2019-07-01 12:55:21 -07:00
f2c435f75f duplex: allow setting duplex labels 2019-07-01 12:55:21 -07:00
6f6ad38a3b diskstat: add aid to show duplex graph for disk graphs 2019-07-01 12:55:21 -07:00
b19f995ae2 assistant: add aid for diskstats source 2019-07-01 12:55:21 -07:00
145afe825b duplex: make diff of previous value configurable
We might want to use raw values instead of diffs, and this makes that
possible. Doing so could be used for disks, etc.
2019-07-01 12:23:17 -07:00
cb688f7ba1 display: fix layout of frame/separator 2019-06-26 19:48:41 -07:00
22ce2875d1 netdev: add combined counter for all devices (cooked) together 2019-06-26 19:24:38 -07:00
dfa2d46d3d duplex: style tweaks 2019-06-26 19:05:28 -07:00
ed8580cf32 duplex: fix copy pasta 2019-06-26 19:03:38 -07:00
6d4796294e netdev: start on netdev aid to display network graphs 2019-06-26 18:58:31 -07:00
00997fbd7f netdev: add source for network device information
This source parses the /proc/net/dev file to get basic statistics about
network throughput on the system.

We still need a specialized Aid and Visualizer so that we can render the
counter data in a more useful format.
2019-06-26 14:18:21 -07:00
7e403af624 build: remove dead code 2019-06-25 10:01:52 -07:00
2035c7e086 build: fix build on debian stable 2019-06-24 21:14:34 -07:00
e8528609ec libsysprof-ui: land new UI design
This comprises a massive rewrite of the UI for browsing captures. We use
the SysprofAid class to scan capture files for content and then auto-
matically add visualizers and details pages.

To avoid breaking things incrementally, we just land this as a very large
commit. Not necessarily ideal, but given the amount of stuff that could
break, this is easier.

As part of this process, we're removing a lot of the surface API so that
we can limit how much we need to maintain in terms of ABI.
2019-06-24 20:52:40 -07:00