Commit Graph

1168 Commits

Author SHA1 Message Date
d2af3d72ac chore: fix typo in comment: psuedo -> pseudo 2023-02-11 20:24:47 +01:00
7c378668e1 libsysprof: update radix tree sources 2023-01-26 11:03:39 -08:00
1e1a719895 Revert "libsysprof: Avoid a use-after-free in raxRemove"
This reverts commit bb83598b12.

See !63 and #84
2023-01-26 10:59:22 -08:00
c65dc2fa4d libsysprof-ui: Avoid to rely on g_object_set_data to associate header and group
Actually add a construct-only property on SysprofVisualizerGroupHeader
2023-01-18 22:12:52 +01:00
bb83598b12 libsysprof: Avoid a use-after-free in raxRemove
As we are freeing the child, make sure to set it to NULL so that we are not
trying to remove it again.
2023-01-18 17:26:20 +01:00
2df6bd6fe0 Merge branch 'tintou/mark-details-treeview' into 'master'
display: Use gatomicrefcount to track the active tasks

See merge request GNOME/sysprof!56
2023-01-17 19:28:22 +00:00
5695a3afd5 display: Use gatomicrefcount to track the active tasks
Without this we can have some racing and release the GTask without returning
a value.
2023-01-17 15:17:39 +01:00
8967b2db33 details-page: Use a GtkColumnView instead of a GtkTreeView
Remove the use of the now deprecated GtkTreeView and allow the colums to be sorted.
2023-01-17 15:16:56 +01:00
ee71fb58b1 Fix LD_PRELOAD syntax
From ld.so(8): The items of the list can be separated
by spaces or colons...
2023-01-15 15:01:21 -05:00
6d50f3ca7b meson: Override dependencies to improve usage as a subproject
With this change, sysprof can be consumed as a subproject without
making any changes to the build files of a project. All you need to do
is provide a wrap file with a `[provide]` section:

https://mesonbuild.com/Wrap-dependency-system-manual.html#provide-section

This is also necessary because otherwise projects need to hard-code
the subproject name, which might be `sysprof` when using `wrap-git` or
`sysprof-3.46.0` when using `wrap-file` (to build from a release
tarball). This can cause conflicts between different subprojects that
consume sysprof differently.

Other projects like glib, cairo, pango, etc already do this.
2022-12-18 10:04:00 +05:30
8d3838d3aa help-overlay: Some shortcuts improvements 2022-12-09 23:19:42 +00:00
6212396483 libsysprof: Actually set spawnable flags to inherit stdin
The code calculated flags but never actually set them on the spawnable,
so the `inherit-stdin` property did not work.

Fixes: 8799d2f0ca
See: https://gitlab.gnome.org/GNOME/sysprof/-/issues/76#note_1531919
2022-10-07 17:55:09 +00:00
ceab63f694 sysprof-agent: improve messaging a bit 2022-09-21 17:18:29 -07:00
1ef9fc1e30 elf: handle NULL lookaside
This code uses the hashtable directly to avoid the overhead of calling
the path which creates ProcessInfo entries. So we need to also handle
the chance the lookaside is NULL.
2022-09-05 20:51:58 -07:00
c03c964ec2 agent: add --decode command line option
This requests that symbols are decoded at the end of the capture.
2022-09-04 00:22:39 -07:00
749dfbd57e tools: make sysprof-cli statically linked
We don't need to dynamically link against libsysprof for sysprof-cli as
we can do the same thing that sysprof-agent does. In fact, we can probably
even make sysprof-cli wrap sysprof-agent in the future (or be the same
binary that looks at it's argv[0]).
2022-08-17 15:07:47 -07:00
475e513b7f tools/sysprof-cli: cleanup header includes
Fixes double inclusion of <signal.h> as well.
2022-08-01 10:15:56 -07:00
1a8a9adc97 tools/sysprof-agent: handle SIGINT like we do for sysprof-cli
This just forces the profiler to exit, but lets subsequent ^C usage to
actually exit the program.
2022-08-01 10:15:36 -07:00
2f325fbf54 tools/sysprof-agent: set cwd to . unless --directory specified 2022-08-01 10:04:59 -07:00
51e9123f6f libsysprof/preload: add example for tracing with -finstrument-functions
If we have tooling that can toggle -finstrument-functions, Builder for
example, then we'd be able to use an LD_PRELOAD to inject the various
function callbacks to record samples.

I dont think we want to use the sample frame type for this though. We
really want something focused on tracing instead and visualize it a bit
differently than the stack trace visualizer.
2022-07-25 23:37:34 -07:00
7ca2fef8ff libsysprof: cleanup backtrace helper types 2022-07-25 23:37:34 -07:00
3d02ea81fa libsysprof-ui: remove EggThreeGrid from build 2022-07-22 14:50:14 -07:00
1a628d6469 libsysprof-ui: move memprof button box to bottom
This is just too hit-target dense at the top, so try to get it out of
the way a bit.
2022-07-22 14:49:40 -07:00
131953150c libsysprof-ui: add spacing around toggle buttons 2022-07-22 14:48:20 -07:00
cd4a22ed4b libsysprof-ui: use AdwPreferencesPage for memprof page 2022-07-22 14:46:59 -07:00
3e2a704231 libsysprof-ui: remove use of EggTreeGrid in details page 2022-07-22 14:32:24 -07:00
950f746150 sysprof: port to GBindingGroup
We aren't using any of the special getter API here, so we can just drop
our use of the EggBindingGroup and use the upstream'd version.
2022-07-22 14:06:46 -07:00
9e2743fa76 build: gate capture pkgconfig by install-static 2022-07-22 13:45:55 -07:00
099330db90 build: allow disabling installation of static libraries 2022-07-22 13:43:54 -07:00
feccf5fbeb css: fix object select image styling for profiler assistant
Fixes #79
2022-07-22 13:30:43 -07:00
3002640c50 build: use app-id to determine installed icon
This means we don't install org.gnome.Sysprof.svg anymore when building
with -Ddevelopment=true (and vice versa). We do use org.gnome.Sysprof.svg
from libsysprof-ui, but that embeds the appropriate resources.
2022-07-22 13:13:59 -07:00
4b68b9180b build: define APP_ID and APP_ID_S in config.h
This allows us to change the app-id in sysprof based on the configuration
so that nightlies do not get the same app-id as regular builds.
2022-07-22 12:54:31 -07:00
1945660912 build: move application id to org.gnome.Sysprof
We use org.gnome.Sysprof3 for the sysprofd daemon, but we need not
complicate the application with such an application id.
2022-07-22 12:24:42 -07:00
0dc0a5b3de build: fix -Dagent=true -Dlibsysprof=false
The agent is statically linked so that it doesn't require using a properly
working libsysprof to be installed. This ensures that it continues to build
properly in that case so it can be used from org.gnome.Sdk.
2022-07-22 11:54:42 -07:00
c3035efd52 tools: add -Dagent=true option
This also builds the agent statically with libsysprof_static_dep since
we'd need that to avoid installing libsysprof when that isn't wanted.
It also ensures the LD_PRELOAD libraries are installed for use by the
agent.
2022-07-21 18:35:35 -07:00
dc829087d4 tools: add sysprof-agent
This is a program that can be communicated with over private D-Bus using
pipes to control a process. It is useful in an automated fashion from
tooling such as Builder.

This allows, when installed into SDKs like GNOMEs, to profile from inside
the container rather than from the outside. Such is useful when you need
to ensure you have access to LD_PRELOAD/etc within the context.
2022-07-21 18:28:18 -07:00
e772197253 libsysprof: add signals for spawn/exit/term of subprocess
This is useful so that we can know when a subprocess has spawned by the
profiler in tooling which allows sysprof to spawn a process and monitor
said process. Additionally, we need to know when it exits so that we can
be correct in when we can call get_if_exited() from tooling.
2022-07-21 11:53:14 -07:00
d3076d1161 libsysprof: and always emit finished 2022-07-20 16:28:06 -07:00
5a88d5a0a1 libsysprof: handle NULL governor case gracefully 2022-07-20 16:25:09 -07:00
JMS
16a456a8dd Use AdwAboutWindow 2022-07-16 21:23:57 +00:00
d8b2dee297 libsysprof-ui: cleanup failed state view 2022-07-11 13:11:22 -07:00
475cd45fe4 sysprof: use gtk widget actions for window 2022-07-11 13:11:09 -07:00
0be07b989e libsysprof-ui: remove grid include from assistant 2022-07-11 13:04:54 -07:00
c9eb230cb2 sysprof: set default window width 2022-07-11 12:55:18 -07:00
c6ae3221a1 libsysprof-ui: use adwaita rows for assistant
This isn't exactly ideal in our use, but it's transitionary so that we
can get rid of the EggThreeGrid which is very out of place in a libadwaita
world.
2022-07-11 12:55:12 -07:00
dd7d080642 libsysprof-ui: be more specific in environment label 2022-07-11 12:52:02 -07:00
672a15b734 libsysprof-ui: make aid icons smaller 2022-07-11 12:51:50 -07:00
757d36ae8e Cleanup the build a bit
Makes the Meson build a little bit better and cleans up some of the
formatting.
2022-05-25 14:07:02 -05:00
808b957682 libsysprof-ui: fix can-replay notification
Otherwise we don't get this until we switch tabs.
2022-05-18 15:53:57 -07:00
aae829741e libsysprof-ui: avoid splashing the assistant view 2022-05-17 15:45:59 -07:00