Commit Graph

496 Commits

Author SHA1 Message Date
82020e86be libsysprof: add instrument to record scheduler switching
This is to allow us to look at what processes were running when as a way
to get a high-level overview of usage.
2023-08-21 15:05:48 -07:00
bf73d142dc libsysprof: sort frames with timsort
These are largely pre-sorted, but not fully when you have merged data. This
uses timsort to speed that up a bit.

In particular, the comparison of various sorts break down to (for a
~32,000,000 record capture.

  g_array_sort_with_data() => 3.9 seconds
  qsort_r() = > 3.7 seconds
  gtk_tim_sort() => .79 seconds
2023-08-18 16:46:28 -07:00
bdf9a55969 libsysprof: be defensive against null traceable 2023-08-17 13:36:39 -07:00
9f00d904b0 Revert "libsysprof: add rwlock for symbol cache"
This reverts commit d1b4308af7.
2023-08-16 15:43:50 -07:00
48dc402c3b Revert "libsysprof: parallelize capture symbolizing"
This reverts commit a7a0c782d1.
2023-08-16 15:43:49 -07:00
3b97252a8e Revert "libsysprof: be defensive against null traceable"
This reverts commit c75022c257.
2023-08-16 15:43:46 -07:00
c75022c257 libsysprof: be defensive against null traceable 2023-08-16 14:06:40 -07:00
a7a0c782d1 libsysprof: parallelize capture symbolizing 2023-08-15 22:17:34 -07:00
d1b4308af7 libsysprof: add rwlock for symbol cache
This is necessary so we can start looking at threading symbolizers.
2023-08-15 19:21:31 -07:00
3598755963 libsysprof: flush incoming events when finalizing ring source
This just helps ensure we've not lost anything during the shutdown of the
profiler here.
2023-08-15 15:38:02 -07:00
b96bf5c969 libsysprof: increase priority of mapped ring buffer source
We want to reduce the chances we've lost anything in these, which is
pretty important for memory tracing.
2023-08-15 14:41:23 -07:00
c576df92db libsysprof: allow specifying type in index model 2023-08-14 21:48:51 -07:00
4967d5faeb libsysprof: add test for leak detection 2023-08-14 16:02:46 -07:00
f7a32750e2 libsysprof: add leak detector helper
This is a leak detector by finding allocations which do not have a
corresponding free record.
2023-08-14 16:02:46 -07:00
a27eee8087 libsysprof: give internal access to allocations bitset 2023-08-14 16:02:46 -07:00
45f08e07c9 libsysprof: externalize access to frames array
This can be useful to optimize some walking paths in other layers.
2023-08-14 16:02:46 -07:00
fd705063bf libsysprof: defend against empty symbol lists 2023-08-08 14:15:51 -07:00
a1211ec298 libsysprof: add some memory counters
We will probably add a bunch more here too.
2023-08-07 18:02:05 -07:00
fba4642451 build: fix static dep race in enums 2023-08-07 15:41:43 -07:00
7ec7cb9b84 libsysprof: add a subtitle property
To make things easier to bind from the window.
2023-08-07 14:47:13 -07:00
c38c1fb4b0 libsysprof: allow specifying phase for subprocess output
This is helpful in that you can specify which phase of the capture the
process should be run so that it's less likely to show up on profiles.
2023-08-07 12:54:46 -07:00
4250abf81e libsysprof: setup perf streams in prepare
This starts the perf streams from prepare instead of from record so that
we can do the linux instrument work in prepare. The samples are dropped
until our start-time is set.

Doing it this way removes sysprof-cli and sysprofd greatly from the
overhead in the callgraph which is useful so that the user gets to see
what they really care about.

It has the added benefit that we're less likely to see the pkla processes
showing up from authorizing our D-Bus connection for creating per streams.
2023-08-07 12:14:32 -07:00
053271f946 sysprof: implement document saving 2023-08-06 17:59:50 -07:00
d9932de4ff libsysprof: remove unused code 2023-08-06 16:32:37 -07:00
56332e0071 libsysprof: remove lsusb from linux instrument
This is done more generically now with the graphical recorder.
2023-08-06 15:59:41 -07:00
fd6e9c964e libsysprof: remove glxinfo/eglinfo from linux device
This is a separate instrument now.
2023-08-06 15:43:22 -07:00
15d9cbc28f libsysprof: add test for subprocess output 2023-08-06 14:51:42 -07:00
433dff95ce libsysprof: add helper instrument for subprocess output 2023-08-06 14:51:42 -07:00
fe4995cf1f libsysprof: synchronize access to tid symbols hashtable
This can get mutated after the document is loaded, so we need to
synchronize access to it.
2023-08-06 02:18:43 -07:00
c5517c0ead libsysprof: try to break cycles at end of recording 2023-08-05 23:42:57 -07:00
3ddf806f92 libsysprof: avoid fork amplification from recording 2023-08-04 16:00:01 -07:00
51e1e4ef4b Revert "libsysprof: do process setup before recording starts"
This reverts commit a286c2a8cb.

This is needed so that we get better system info currently for
processes spawned by sysprof-cli.
2023-08-04 15:36:13 -07:00
56680ae12f libsysprof: implement follow fork instead of tracking spawnable 2023-08-04 15:31:00 -07:00
48e94181a7 libsysprof: remove unused GObjectClass 2023-08-04 15:30:04 -07:00
c705bae53e libsysprof: notify instruments of process spawn 2023-08-04 15:02:38 -07:00
f217d788ee libsysprof: avoid g_type_instance constructor/destructors 2023-08-04 14:34:59 -07:00
dc560d6de5 libsysprof: add type system category
Include various introspection and GObject things within that.
2023-08-04 14:25:46 -07:00
6ac730629f libsysprof: add API to ignore the idle process (pid 0) 2023-08-04 12:39:12 -07:00
0ae8765c0e libsysprof: remove unused finalize 2023-08-04 12:31:33 -07:00
a286c2a8cb libsysprof: do process setup before recording starts
Otherwise we end up recording ourselves too much. Do it before even though
there is a small race condition chance to miss a process spawning at the
time between prepare and record.
2023-08-04 12:17:30 -07:00
b2ce9efbb4 libsysprof: get various process info during prepare
That way it doesn't show up on the profiles themselves.
2023-08-04 12:11:19 -07:00
2c0f055af1 build: make sysprof-journald-source.c conditional
Fixes #88
2023-08-02 11:57:32 -07:00
78f4d1b37e libsysprof: add capture time as metadata
This is actually readable to the user and doesn't require dealing with
SysprofCaptureFileHeader data.
2023-08-02 10:11:54 -07:00
61f94957d3 libsysprof: use #if instead of #ifdef for HAVE_LIBSYSTEMD
Fixes #88
2023-08-02 10:00:32 -07:00
181963fb73 libsysprof: swap fields for marks 2023-08-01 15:37:09 -07:00
b587e35ada libsysprof: add test to convert .ninja_log to trace marks 2023-08-01 15:33:17 -07:00
3c33ae06a0 sysprof: add dbus utility
This allows viewing the message contents that were captured in a textview
within the utility pane.

We already limit the max size of a message in the capture file, so
presumably messages are relatively small enough to fit here.
2023-08-01 11:20:24 -07:00
aaafa8e9ef libsysprof: start naming some bits as app store
Probably can come up with better naming here, but it'd be nice to lay
blame where it makes sense.
2023-07-31 13:29:34 -07:00
d5f9cecec5 libsysprof: provide escape patch for listing traceables
We don't want this to get out of hand, so limit it to 1000 for now.
2023-07-31 12:16:51 -07:00
6f6228b1b5 libsysprof: sort indexes by size from smallest
This is just to help ensure we are not doing extra work that would fall
out of the visible range of the index.
2023-07-31 12:07:17 -07:00