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
This commit is contained in:
Christian Hergert
2025-02-06 22:19:55 -08:00
parent 91c8bc7105
commit 4999ae8598
3 changed files with 121 additions and 32 deletions

View File

@ -33,11 +33,14 @@ typedef struct _SysprofSymbolsBundle SysprofSymbolsBundle;
typedef struct _SysprofSymbolsBundleClass SysprofSymbolsBundleClass;
SYSPROF_AVAILABLE_IN_ALL
GType sysprof_symbols_bundle_get_type (void) G_GNUC_CONST;
GType sysprof_symbols_bundle_get_type (void) G_GNUC_CONST;
SYSPROF_AVAILABLE_IN_ALL
SysprofInstrument *sysprof_symbols_bundle_new (void);
SYSPROF_AVAILABLE_IN_ALL
SysprofInstrument *sysprof_symbols_bundle_new_without_debuginfod (void);
SysprofInstrument *sysprof_symbols_bundle_new (void);
SYSPROF_AVAILABLE_IN_48
gboolean sysprof_symbols_bundle_get_enable_debuginfod (SysprofSymbolsBundle *self);
SYSPROF_AVAILABLE_IN_48
void sysprof_symbols_bundle_set_enable_debuginfod (SysprofSymbolsBundle *self,
gboolean enable_debuginfod);
G_DEFINE_AUTOPTR_CLEANUP_FUNC (SysprofSymbolsBundle, g_object_unref)