Commit Graph

26 Commits

Author SHA1 Message Date
b90ec5fd9f sysprof: fix memory leak in GDateTime 2025-01-27 16:31:30 +05:30
1a497564e0 sysprof:fix UTC recording time to local 2025-01-25 01:18:58 +05:30
c6cb5473ae libsysprof: add serialize symbols helper 2024-11-25 14:15:58 -08:00
4142472984 libsysprof: collapse recursive functions 2024-09-12 12:44:08 -07:00
9c896e0bb4 libsysprof: use gtk_tim_sort() for packed symbols 2024-08-16 12:39:41 -07:00
6b34ea2118 libsysprof: fix merging of similar processes
We want the "similar process" key to be the argv[0] or something close
to it so that we can coalesce across processes with different arguments.
2023-09-01 14:26:10 -07:00
5f94e09f9c libsysprof: avoid duplicate process records
We want the first process record, but subsequent records should
be ignored, except that we want to take the appropriate comm[]
action from them.
2023-09-01 14:14:25 -07:00
30123284b6 libsysprof: use whole cmdline for process name
This is just more useful than artificially truncating it.
2023-09-01 13:35:39 -07:00
480543fe87 libsysprof: add SysprofDocument:busy property
This currently only toggles on/off when a callgraph is being generated or
the document is being saved.

See #94
2023-08-29 09:51:24 -07:00
f3b4e1ca92 libsysprof: propagate devices to processinfo
We need access to this from the process info but can share the instance.
It sucks to walk the hashtable here, but the alternative is to make these
recursive so that we can check a parent mount namespace.

Until then, take the hit and iterate all the pids to populate them with
the additional device.

Related GNOME/gnome-builder#2090
2023-08-28 21:56:56 -07:00
fd980eca68 libsysprof: always create pid0 info
That way we don't risk showing "Unknown Process" if we get stack traces
recorded with a 0 pid (which can happen from Perf).
2023-08-28 14:55:43 -07:00
cdfae5f7b9 libsysprof: add callgraph flag to merge similar processes
This is the backing implementation to allow for merging multiple processes
which have identical comm[] fields.
2023-08-28 13:34:11 -07:00
00c02f0f18 libsysprof: handle missing process gracefully
If we get a request for a process that we have not captured any information
about then give it the "Unknown Process" symbol. That way we do not crash
and we also maintain our invariant of not mutating the hash table.
2023-08-28 13:34:11 -07:00
a3a2b02b0d libsysprof: assert hashtable stays read-only
We only mutate this during loading of the document so that we can be
confident in multi-threaded workers after loading. This just asserts
that invariant holds true.
2023-08-28 12:19:16 -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
c576df92db libsysprof: allow specifying type in index model 2023-08-14 21:48:51 -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
7ec7cb9b84 libsysprof: add a subtitle property
To make things easier to bind from the window.
2023-08-07 14:47:13 -07:00
053271f946 sysprof: implement document saving 2023-08-06 17:59:50 -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
6e4b0ace8b libsysprof: add sysprof_document_list_dbus_messages()
Another indexed helper to get just dbus messages.
2023-07-27 13:43:02 -07:00
8dd2d3d73c libsysprof: add support for dbus messages as a document type 2023-07-27 12:22:31 -07:00
29a1ec952f libsysprof: add API to lookup a process by PID 2023-07-25 19:31:40 -07:00
91d48b87d6 libsysprof: calculate min/max/avg/median durations for marks 2023-07-22 16:43:32 -07:00
dbb7833cbf libsysprof: join libsysprof-analyze and libsysprof-profile
This brings together the two libraries back into one now that the whole
design is pretty well sorted out. They depend on roughly the same libraries
anyway and it's way easier of the single library can both read and write
the capture files (along with bringing in libsysprof-capture symbols in
a single place).
2023-07-19 17:40:41 -07:00