Commit Graph

2644 Commits

Author SHA1 Message Date
b129c7dea2 mapped-ring-buffer: Round to the shared memory boundary on hppa
In map_head_and_body_twice(), the second mmap call fails:

mmap2(NULL, 135168, PROT_READ|PROT_WRITE, MAP_SHARED, 3, 0) = 0xf64a2000
mmap2(0xf64b3000, 65536, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_FIXED, 3, 0x1000) = -1 EINVAL (Invalid argument)

Due to cache issues, all shared mapping of a page must be equivalently
mapped.  This requires page mappings to be at the same virtual address
modulo 4 MB.  Due to a kernel limitation, all mappings to a file must
be equivalent.

The test can be fixed by rounding the buffer_size used in the mapped
ring buffer to 4 MB on hppa.  This makes the two mmap mappings equivalent.

Bug-Debian: https://bugs.debian.org/1021853
2025-03-17 11:53:28 -04:00
af3daadbdd Merge branch 'varunrmallya/issue136' into 'master'
Adds persistence to environment variables

See merge request GNOME/sysprof!125
2025-03-09 17:28:08 +00:00
9cf22bc906 sysprof-greeter: fix memory leak in sysprof_greeter_create_profiler
Signed-off-by: varun-r-mallya <varunrmallya@gmail.com>
2025-03-07 14:16:28 +05:30
8186cc464a sysprof-greeter: optimize environment variable handling in profiler creation
Signed-off-by: varun-r-mallya <varunrmallya@gmail.com>
2025-03-06 17:57:01 +05:30
775d7ae5eb sysprof-greeter: refactor environment variable handling in profiler creation
Signed-off-by: varun-r-mallya <varunrmallya@gmail.com>
2025-02-26 23:24:20 +05:30
05f78de383 sysprof-greeter: add environment variable handling in profiler creation. Refactor pending.
Signed-off-by: varun-r-mallya <varunrmallya@gmail.com>
2025-02-22 15:22:47 +05:30
VBB
3ac75d309d sysprof/chart: Translate origin of child chart layer 2025-02-22 13:43:31 +07:00
aaf4cc3d22 sysprof-power-profile: Use UPower DBus API
Since some time the power-profiles-daemon project has been moved under
the upower umbrella and renamed its API to follow that.

While the legacy name is still supported, there are plans to not support
it anymore in future [2]. So let's update gnome-shell code to use the
current main name instead.

[1] https://gitlab.freedesktop.org/upower/power-profiles-daemon/-/merge_requests/148
[2] https://gitlab.freedesktop.org/upower/power-profiles-daemon/-/merge_requests/166
2025-02-10 01:19:39 +01:00
10c1ae9381 live-unwinder: only enable live-unwinder on x86(_64)
Fixes: #135
2025-02-08 12:09:53 -08:00
4999ae8598 libsysprof: add SysprofSymbolsBundle:enable-debuginfod property
This adds a property instead of the global to key off if the debuginfod
resolver should be used to bundle symbols into the capture at the
augmentation point post-capture.

This defaults to off because we do not want to auto-include them when
recording from the GTK UI (as we'd spend a bunch of time not showing a
window) but we do want to include them from sysprof-cli as that could
be running on a remote machine/container/vm with different debug URLs.

In the future, that could be improved with a different UI flow though.

Related: #130
2025-02-06 22:23:24 -08:00
91c8bc7105 libsysprof: Add debuginfod toggle for sysprof-cli inside libsysprof
Signed-off-by: varun-r-mallya <varunrmallya@gmail.com>
2025-02-06 00:59:34 +05:30
202129e3b5 sysprof: Enable debuginfod option in tests
Signed-off-by: varun-r-mallya <varunrmallya@gmail.com>
2025-02-03 22:25:45 +05:30
333cd719f7 Revert "sysprof/greeter: add external URLs configuration for debuginfod"
This reverts commit b13d4acb98.
2025-02-03 21:34:43 +05:30
b13d4acb98 sysprof/greeter: add external URLs configuration for debuginfod
Signed-off-by: varun-r-mallya <varunrmallya@gmail.com>
2025-02-02 00:55:19 +05:30
7ed0668a66 sysprof/recording-template: Comment out debuginfod handling and clean up TODOs
Signed-off-by: varun-r-mallya <varunrmallya@gmail.com>
2025-02-01 23:34:05 +05:30
0c5f0c3c65 sysprof: Add debuginfod toggle on greeter and make it persist 2025-02-01 02:37:16 +05:30
3ed3d8e620 sysprof/greeter: apply default recording template to loader
This ensures that the document loader can apply settings from the recording
template (thusly applying future options such as debuginfod or extra debug
directories).

Related: #130
2025-01-28 13:29:53 -08:00
72df41485d sysprof/greeter: remove open/quit menu items
These are both available in other ways from the window. The close button
will quit the app if it's the last window. The Open File button at the
bottom handles Open and makes it more clear you can tweak things using the
profiler settings now.

Related: #130
2025-01-28 12:47:13 -08:00
17b91ddf70 sysprof/greeter: load/save recording template for persistence
This sets things up to save the state to disk if the greeter suceeded at
creating a profiler instance so that it may be used again on the next
run. Additionally, when loading the greeter it attempts to load from disk
the saved state.

We may want to extend this in the future to allow using sysprof-cli with
a recording template instead of command line options.
2025-01-28 12:33:50 -08:00
5904667c45 sysprof: add missing constructor for recording template 2025-01-28 12:32:26 -08:00
55bbee1ce1 sysprof/greeter: hide user-stack caption on non-x86_64 2025-01-28 12:18:32 -08:00
3181172e72 sysprof: add restore/save API for recording template 2025-01-28 12:14:44 -08:00
f671654382 build: remove menus.ui
This isn't used anymore.
2025-01-27 15:50:32 -08:00
921ba9d87b Merge branch 'varunrmallya/issue132' into 'master'
sysprof: fix about sysprof window error in greeter window

Closes #132

See merge request GNOME/sysprof!118
2025-01-27 23:03:52 +00:00
b90ec5fd9f sysprof: fix memory leak in GDateTime 2025-01-27 16:31:30 +05:30
9ae36808f2 sysprof: fix about sysprof window error in greeter window 2025-01-26 17:00:11 +05:30
1a497564e0 sysprof:fix UTC recording time to local 2025-01-25 01:18:58 +05:30
5151345ef4 libsysprof-capture: fix license of mapped-ring-buffer 2025-01-20 13:08:07 -08:00
0e1effcdcc libsysprof: ignore cancellable during IO parsing 2024-11-26 22:08:55 -08:00
6f5d119539 libsysprof: guard message string and dup contents 2024-11-26 21:46:54 -08:00
252d627888 sysprof: ensure layout_y is always initialized 2024-11-26 19:26:31 +00:00
67c1d858dc sysprof: add unload hooks for callgraph view
We want to ensure that the sorters can clear their private state before
the callgraph itself is released.

Related: #131
2024-11-26 09:23:31 -08:00
673ab1b944 sysprof: ensure we add range to the bitset
We need to still call add, but we only want to do it when the added values
are necessary. Otherwise we can get UB.
2024-11-25 17:12:08 -08:00
2ea689c299 sysprof/series: guard against invalid item 2024-11-25 16:43:33 -08:00
a8aeac135d sysprof/normalized-series: fix bitset miss-use 2024-11-25 16:43:18 -08:00
112343aef3 sysprof: some resiliency checks 2024-11-25 16:42:49 -08:00
4bd113402b libsysprof: avoid UB on bsearch 2024-11-25 16:24:39 -08:00
45b3f99e55 libsysprof-capture: unsigned cast before shift 2024-11-25 16:24:28 -08:00
c6cb5473ae libsysprof: add serialize symbols helper 2024-11-25 14:15:58 -08:00
105dc0d0be libsysprof: add loading helper 2024-11-25 14:15:47 -08:00
be1eea492b Merge branch 'gbsneto/collector-pid-id' into 'master'
libsysprof-capture: Set initial counter id to pid

See merge request GNOME/sysprof!111
2024-11-15 09:36:52 +00:00
10c38a5799 Merge branch 'gbsneto/counters-ui-improvements' into 'master'
Small improvements to the Graphics view

See merge request GNOME/sysprof!112
2024-11-14 18:50:58 +00:00
3a654ed959 recording: track DEBUGINFOD_URLS environment variable
This is handy to know in case we want to use it to find symbols after
the fact with a capture.
2024-11-14 10:49:27 -08: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
7d8bc661c1 graphics-section: Increase graph height
As per feedback from WebKit developers. This helps visualizing these
graphs slightly.
2024-11-14 13:03:14 +01:00
a7dc2b5061 chart: Don't clip
It doesn't seem necessary, and gets rid of the line cutoff in some
graphs.
2024-11-14 12:57:28 +01:00
d305812932 libsysprof-capture: Set initial counter id to pid
This avoids collisions when using Sysprof collector in multiprocess
apps that share the same controlfd, such as WebKit.
2024-11-14 10:03:46 +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