Commit Graph

4310 Commits

Author SHA1 Message Date
02377939f0 Merge branch 'gbsneto/mark-tooltips-duration' into 'master'
Show mark duration in tooltip

See merge request GNOME/sysprof!113
2024-11-14 18:37:07 +00:00
33b010f92b libsysprof: Show mark duration in tooltip
This helps (a lot!) with the Waterfall view. In fact, I cannot think
of a situation where knowing the duration (in addition to the start
and end times) won't help.
2024-11-14 13:52:29 +01:00
75cf8450b3 sysprof: Use sysprof_document_mark_get_end_time
It does exactly what this line of code does already.
2024-11-14 13:51:13 +01:00
f41263c23a build: lower libpanel requirement to ease some build systems 2024-11-13 15:54:12 -08:00
ddf13ca3d8 sysprofd: remove unused code 2024-11-13 15:53:12 -08:00
5b1f676853 sysprof-live-unwinder: error out on capture failure 2024-11-13 15:51:50 -08:00
083b2edbc0 libsysprof: provide unwind pipe from client
We don't need a socketpair for this. Additionally, things seem to work
better from the service when the client provides the pipe. Otherwise, when
running as a dbus service I often have issues with things getting closed
out from under us.
2024-11-13 15:51:42 -08:00
8995c65444 sysprof-user-sampler: implement await for FDs
This allows us to not need libdex 0.9+ for use by the sampler.
2024-11-13 15:51:34 -08:00
9c7ede8ad8 unwinder: wait for completion of subprocess 2024-11-13 15:46:01 -08:00
a07e7297d6 sysprof-live-unwinder: handle large stack unwind sizes 2024-11-13 15:29:15 -08:00
fc2d06d64b sysprof-live-unwinder: fix source func prototype
While this looks like a GSource, the implementation type requires that
it actually be a GUnixFDSourceFunc.
2024-11-12 14:45:57 -08:00
ea340e3c61 libsysprof: check for PERF_REG_EXTENDED_MASK availability 2024-11-08 11:43:32 -08:00
fcbe2b29c1 Update Slovenian translation 2024-11-07 07:51:20 +00:00
b41cb5785e Update Slovenian translation 2024-11-05 14:01:09 +00:00
e7939da3a2 sysprof: only show user stack sampling on x86
That is the only place it works currently (and is necessary).
2024-11-04 14:25:07 -08:00
2e3d2fb743 sysprof-live-unwinder: ifdef unused code off x86
Fixes a compiler warning about unused functions.
2024-11-04 14:24:36 -08:00
9800dd68b9 Merge branch 'wip/chergert/translate' into 'master'
Add support for unwinding without frame-pointers

See merge request GNOME/sysprof!110
2024-11-03 22:41:43 +00:00
f2b2dcf29d sysprof: add UI for live unwinding
This adds UI to specify the amount of stack contents to copy along with
the CPU registers so that you may unwind in user-space.
2024-11-03 10:59:05 -08:00
c3cb2f71bc sysprof-cli: add support for live unwinding
This allows you to specify --stack-size=(multiple_of_page_size) to unwind
from captured stack contents. It will use the new SysprofUserSampler to
unwind stack traces via sysprof-live-unwinder.
2024-11-03 10:59:05 -08:00
6e3e1637be libsysprof: add SysprofUserSampler for live unwinding
This instrument triggers the live unwinder in sysprofd to capture a
pre-configured amount of stack contents and CPU registers. You can use
this instead of SysprofSampler in cases where you do not have frame-
pointers but want a useful trace.

It does have a moderate amount of CPU overhead compared to just relying
on frame-pointers so keep that in mind. Generally useful on platforms
that do not have frame pointers such as CentOS.
2024-11-03 10:59:05 -08:00
1bd79af439 sysprofd: add support for unwinding without frame pointers
This provides a new sysprof-live-unwinder subprocess that runs as root to
allow accessing all processes on the system via /proc/$pid/. It is spawned
by sysprofd with various perf event FDs and a FD to write captures to.

Ideally the capture_fd is something that will naturally error if the client
application crashes (such as a socketpair() having the peer close). This
is not enforced but encouraged. Additionally, an event_fd is used to allow
the client application to signal the live-unwinder to exit.

Unwinding is performed by looking at the modules loaded into the target
pid and using libdwfl to access DWARF/CFI/etc state machinery. Stack data
does not touch the disk as it exists in a mmap buffer from perf and is
then translated into a callchain and sent to the Sysprof client.

Unwinding occurs as normal post-mortem though is improved through the use
of debuginfod to locate the appropriate symbols.
2024-11-03 10:59:05 -08:00
39b96f47f5 libsysprof: add support for stack/regs options in attr
This requires a coordinating sysprofd that knows how to handle reading the
new attributes. Setting these fields will allow snapshotting the contents
of the stack and registers to do offline unwinding.

Also make the conversion to GVariant available outside the module so that
we can consume it for live unwinding.
2024-11-03 10:59:00 -08:00
fde9f5868c libsysprof: add muxer GSource
This allows copying events from a capture stream transparently into the
destination. No processing of the stream is performed, but that may change
in the future to accomidate JIT/Counter translations.

Internal only as support for upcoming live unwinding via external process.
2024-11-03 10:37:20 -08:00
a6b90e5a40 Update Dutch translation
(cherry picked from commit 047295e41c48c68336cfde81927c11abc42f6695)
2024-10-28 15:47:47 +00:00
d435c42666 libsysprof: actually unmap our event stream 2024-10-24 18:01:43 -07:00
571eb5f85b sysprof/logs: ignore -1 for cpu/pid in cells
They just mean empty, so show it as such in the cells.
2024-10-24 12:55:24 -07:00
c9a1b322cd libsysprof/sampler: track lost records as a counter/log
This makes it much easier to see what happened from the capture file which
may originate from a user different than the person inspecting it.
2024-10-24 12:49:48 -07:00
2838024227 libsysprof: add union for perf "lost" records 2024-10-24 12:42:55 -07:00
ef32a3c921 sysprof-diff: load document asynchronously 2024-10-23 11:56:30 -07:00
d5d3c71879 libsysprof: remove unnecessary address calculation
We are only fallback symbols here, which is 1 address-wide.
2024-10-23 11:54:33 -07:00
21ebc8f1af sysprof-cat: use single finally to exit main loop 2024-10-23 11:40:54 -07:00
6d10a4337f sysprof-cat: load document asynchronously from load fiber 2024-10-23 11:40:54 -07:00
051559dbca Update Slovenian translation 2024-10-14 14:12:15 +00:00
65f307eb2e Update POTFILES.in 2024-10-13 12:11:08 +02:00
29fc388824 build: always build debuginfod symbolizer
Even if it is disabled, we want the GType enabled and part of our ABI. We
will return NULL if one is created and debuginfod is not supported or if
we failed to create a client.
2024-10-11 11:46:26 -07:00
e70a5b076c libsysprof: return NULL instance unless debuginfod works
If we are configured with support for debuginfod and it fails to initialize
or we are not configured to use debuginfod, always ensure g_object_new()
will return a NULL instance back.

This helps prevent against misconfigured instances so we do not need to
do so many checks in vfuncs as well as allowing us to have the GType be
available always even when not built with debuginfod.
2024-10-11 11:45:41 -07:00
0d8e004558 libsysprof: fix building with -Ddebuginfod=auto 2024-10-11 11:26:20 -07:00
c009532c91 libsysprof: ensure access to process info 2024-10-11 11:09:48 -07:00
24619651af Merge branch 'wip/chergert/debuginfod' into 'master'
Add support for debuginfod

See merge request GNOME/sysprof!109
2024-10-11 00:15:58 +00:00
d2471d4bf5 libsysprof: add debuginfod symbolizer
This is based on a debuginfod_client provided by Barnabás Pőcze in !73.
It extends it to use the new task infrastructure to elevate the download
process to the user while loading a capture file.
2024-10-10 17:12:30 -07:00
1464e3a48e libsysprof: hoist fallback symbol creation
This makes sure that we get that even when not using the Elf symbolizer
but also means we can fallback through the Elf symbolizer into the
debuginfod symbolizer.
2024-10-10 17:04:19 -07:00
25b539de54 libsysprof: add setup hooks for symbolizers
This gives the symbolizer access to the loader so we can propagate tasks
back to it.
2024-10-10 17:03:30 -07:00
50d556b13e sysprof: add SysprofDocumentTask abstraction
This provides a task abstraction to SysprofDocumentLoader so that we can
elevate information about tasks to the user interface. It also moves the
spinner to a menu button w/ popover to display those tasks.
2024-10-10 17:02:06 -07:00
0c77d61c89 Update Slovenian translation 2024-10-10 16:04:32 +00:00
788b1995b9 libsysprof-capture: add version macros for 48 2024-10-09 21:42:36 -07:00
fcfd8c1d68 sysprof: update to AdwSpinner 2024-10-09 16:39:50 -07:00
1c4c266a05 libsysprof: elf: do not generate fallback names
Fallback names are only used in `SysprofElfSymbolizer` at the
moment, but it also has code to generate fallback symbols.
2024-10-09 16:37:02 -07:00
aef623cf15 libsysprof: elf: do not allow setting self as debug link
That will cause infinite recursion in `sysprof_elf_get_symbol_at_address_internal()`.
Also note that loops are still possible, this change
only prevents one way of creating loops.
2024-10-09 16:37:02 -07:00
e0fdbf65cf Merge branch 'rafaelff-PRIi64' into 'master'
sysprof: Use PRIi64 instead of G_GINT64_FORMAT

See merge request GNOME/sysprof!108
2024-10-09 18:04:39 +00:00
7b7317ead2 sysprof: Use PRIi64 instead of G_GINT64_FORMAT 2024-10-09 17:36:49 +00:00