Commit Graph

2687 Commits

Author SHA1 Message Date
874f2ca7ba Merge branch 'new-window2' into 'master'
Add "greeter" command-line option

See merge request GNOME/sysprof!135
2025-04-09 22:00:52 +00:00
660953d3d7 Add "greeter" command-line option
And specify the "new-window" action in the desktop file. This allows
application launchers to provide direct access to this action.
2025-04-08 06:34:31 +02:00
91f5a7c093 Merge branch 'varun-r-mallya/issue125' into 'master'
sysprof: Set document title based on file basename during save

See merge request GNOME/sysprof!137
2025-04-07 21:26:41 +00:00
821bda083d Merge branch 'varunrmallya/issue134' into 'master'
Change GtkSwitch on greeter to AdwSwitchRow

See merge request GNOME/sysprof!136
2025-04-07 21:25:40 +00:00
9bdf707b22 build: fix GCC warning 2025-04-07 14:21:50 -07:00
b2091926fe cli: Add sd-notify integration
Let's make sysprof-cli send a READY=1 sd-notify message when it's
finished its setup logic. This allows starting sysprof as a systemd
service and delaying startup of other services until sysprof has
finished its setup logic. This ensures we don't miss any profiling
data when running sysprof-cli in a systemd service as part of the
bootup process.

We skip this step for now when we're running a child process so that
we don't accidentally interfere with a child process that receives
an sd-notify socket and is supposed to send notifications on it instead
of sysprof-cli.
2025-04-07 14:21:24 -07:00
a4b985f4c9 sysprof-greeter: remove unnecessary activatable-widget properties from AdwSwitchRow elements 2025-04-07 02:30:11 +05:30
5c78124c67 sysprof: Set document title based on file basename during save
Signed-off-by: varun-r-mallya <varunrmallya@gmail.com>
2025-04-07 02:25:32 +05:30
420412ebed sysprof-greeter: replace GtkSwitch with AdwSwitchRow for improved a11y compliance 2025-04-06 14:33:44 +05:30
43f88bdc30 Merge branch 'about-version' into 'master'
sysprof: Show version in about dialog without GNOME prefix

See merge request GNOME/sysprof!131
2025-04-01 18:08:53 +00:00
b5459370d7 sysprof: Present the active window on activation
Actually it's not necessary to loop over the windows, we can simply
raise the active window. This is also apply when showing the about
dialog.
2025-04-01 00:22:35 +00:00
28acf990ff Merge branch 'new-window' into 'master'
sysprof: Implement new-window action

See merge request GNOME/sysprof!133
2025-04-01 00:22:04 +00:00
52dec92fc3 Merge branch 'gbsneto/sysprof-initial-counter-id' into 'master'
libsysprof-capture: Cut off first 8 bytes of initial counter id

See merge request GNOME/sysprof!134
2025-03-31 21:53:16 +00:00
14af6bab2e libsysprof-capture: Cut off first 8 bytes of initial counter id
This ensures that the id won't be screwed by the 32 → 24 bit conversion
that happens implicitly when using SysprofCaptureCounter & family of
structs.

These structs are tightly packed and declare the id field as a 24-bit
unsigned, which doesn't necessarily match the counting that is done
via SysprofCollector.

This is by no means a definitive solution, but this gets things in a
more usable state until a better solution is implemented.
2025-03-31 16:33:34 -03:00
e925428d33 sysprof: Implement new-window action
GNOME Shell uses the "new-window" action to open new main windows for an
application. Implementing it allows the application launcher to detect that
action, and provide a "New Window" menu entry for the user.
2025-03-31 03:00:38 +02:00
bcd3d03093 sysprof: Show version in about dialog without GNOME prefix 2025-03-30 16:25:31 +02:00
7db526fbd9 sysprof: Always present existing window on activation
This fixes the problem that a new greeter window is created on second
launch if the greeter window or the recording window is active.
2025-03-28 09:59:21 +01:00
21c9fd4f8c Merge branch 'gbsneto/filter-by-marks' into 'master'
Filter samples by marks

See merge request GNOME/sysprof!129
2025-03-26 17:55:54 +00:00
1612707d21 sysprof: Add filters popover
This allows visualizing currently applied filters, and remove individual
and all filters applied.

Currently the only filter that can show up is the mark filter, but in
the future new filters may be applied.
2025-03-26 14:43:31 -03:00
d80188f019 sysprof: Implement markchartrow.filter-by-mark action
This finally allows setting a session-wide mark filter.
2025-03-26 14:43:31 -03:00
23dacf954d sysprof: Add sysprof_session_filter_by_mark
This will be used to set a global marks filter in the session filter.
2025-03-26 14:43:31 -03:00
02b1d9603b sysprof: Add stub context menu to SysprofMarkChartRow
This will expose the action to set this row's mark catalog as a session
filter.
2025-03-26 14:43:31 -03:00
fb30dd2300 sysprof: Move GtkInscription to SysprofMarkChartRow
No functional changes.
2025-03-26 14:43:31 -03:00
c73f4fa40d sysprof: Apply session filter to sample's scrubber
So that the actual filtered samples are properly represented in the
time scrubber. This will be useful for filtering by marks.
2025-03-26 14:43:31 -03:00
d637c55214 sysprof: Introduce SysprofMarkFilter
It's a GtkFilter implementation that takes a marks catalog, and filters
frames based on whether the timestamps of the frames hit any mark in
the catalog.

Internally this uses an augmented RB tree based on sys/tree.h. The
augment is a timestamp interval. This tree is used to store the mark
intervals and perform the hit test.

This can probably be optimized / improved by building the tree on
demand but as is, this code seems to be able to handle dozens of
thousands of marks without any visible choke.
2025-03-26 14:43:31 -03:00
a7afaf5559 libsysprof: move tree.h to contrib/
Soon src/sysprof will use it as well.
2025-03-26 14:43:22 -03:00
2c08b404ff sysprof/greeter: use GtkFileDialog to select debug directories 2025-03-24 16:56:34 +00:00
163406ccfe sysprof-cli: add --no-sysprofd command line option
This tells the SysprofProfiler that it should avoid using sysprofd unless
for some reason that instrument simply cannot work without it. Currently
that is at least the RAPL and user-space stack decoding instruments
but there may be others.
2025-03-21 12:08:16 -07:00
8ee9784188 libsysprof: add SysprofProfiler:acquire-privileges property
If this property is set to TRUE (the default) it queries sysprofd and
policy-kit for appropriate privileges. That generally means that the
instruments will use sysprofd to get access to things like /proc files,
perf event streams, and what not.

If set to FALSE, then this tells the instruments that they should try to
do that work locally instead of querying the sysprofd instance via D-Bus.
2025-03-21 12:08:16 -07:00
f7eb2134ad libsysprof/instruments: use provided D-Bus connection for sysprofd
If we were provided a D-Bus connection to use for sysprofd then use that.
Otherwise, try to fallback to doing the work in process without the help
of sysprofd.
2025-03-21 12:08:16 -07:00
94af48094d libsysprof/perf-event-stream: do local syscall when DBus is unavailable
If we are setup without a D-Bus connection to use to talk to sysprofd then
try to perform the syscall() directly for perf_event_open.

Generally that means you need to be root.
2025-03-21 12:08:15 -07:00
637dfceb85 libsysprof/instruments: add set_connection() vfunc
This is used to tell the instruments what GDBusConnection they should use
to query sysprofd. Lack of a connection means they should try to do things
in process without querying sysprofd.
2025-03-21 12:08:15 -07:00
2971f34541 libsysprof/util: add helper to get proc file
This helper allows us to get the file locally or via sysprofd when the
GDBusConnection is provided.

Be careful about use as your local /proc may be different than the
"system" /proc where sysprofd lives.
2025-03-21 12:08:12 -07:00
ae58643f4d build: add GNOME 49 version macros 2025-03-21 11:59:18 -07:00
50036d26fd sysprof/greeter: fixup g_auto usage and trailing space 2025-03-20 13:02:45 -07:00
0c406167dc sysprof-greeter: add debug directory handling in profiler creation
Signed-off-by: varun-r-mallya <varunrmallya@gmail.com>
2025-03-20 13:02:45 -07:00
6424bd35aa sysprof-greeter: improve code quality and UI in greeter
Signed-off-by: varun-r-mallya <varunrmallya@gmail.com>
2025-03-20 13:02:45 -07:00
78c6a5ad49 sysprof-recording-template: add debugdirs property for external debug directories
Signed-off-by: varun-r-mallya <varunrmallya@gmail.com>
2025-03-20 13:02:44 -07:00
db914e8c63 sysprof-greeter: validate directory existence in debug directory entry
Signed-off-by: varun-r-mallya <varunrmallya@gmail.com>
2025-03-20 13:02:44 -07:00
530aff1d50 sysprof-greeter: replicate UI for managing debug directories with wrong key
Signed-off-by: varun-r-mallya <varunrmallya@gmail.com>
2025-03-20 13:02:44 -07:00
19547e96e6 DESIGN.md: add some information on how sysprof is built 2025-03-17 18:47:08 -07:00
05dface80a Merge branch 'wip/hppa' into 'master'
mapped-ring-buffer: Round to the shared memory boundary on hppa

See merge request GNOME/sysprof!127
2025-03-18 01:31:25 +00:00
745c5c28c4 build: add check for asm/perf_regs.h
Related: #127
2025-03-17 18:28:19 -07:00
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