mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
sysprof/greeter: add external URLs configuration for debuginfod
Signed-off-by: varun-r-mallya <varunrmallya@gmail.com>
This commit is contained in:
@ -625,7 +625,7 @@
|
||||
<object class="AdwActionRow">
|
||||
<property name="activatable-widget">debuginfod</property>
|
||||
<property name="title" translatable="yes">Debuginfod</property>
|
||||
<property name="subtitle" translatable="yes">Enable Debuginfod</property>
|
||||
<property name="subtitle" translatable="yes">Enable Debuginfod to automatically fetch debug symbols</property>
|
||||
<child type="suffix">
|
||||
<object class="GtkSwitch" id="debuginfod">
|
||||
<property name="active" bind-source="recording_template" bind-flags="bidirectional|sync-create" bind-property="debuginfod"/>
|
||||
@ -636,6 +636,27 @@
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="AdwPreferencesGroup">
|
||||
<child>
|
||||
<object class="AdwEntryRow" id="debuginfod_external_urls">
|
||||
<property name="title" translatable="yes">Debuginfod External URLs</property>
|
||||
<property name="text" bind-source="recording_template" bind-flags="bidirectional|sync-create" bind-property="debuginfod-external-urls"/>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Comma-separated list of external debuginfod servers to query for debug information.</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="margin-top">8</property>
|
||||
<style>
|
||||
<class name="caption"/>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
|
||||
@ -35,6 +35,7 @@ struct _SysprofRecordingTemplate
|
||||
char *cwd;
|
||||
char *power_profile;
|
||||
char **environ;
|
||||
char *debuginfod_external_urls;
|
||||
|
||||
guint stack_size;
|
||||
|
||||
@ -65,6 +66,7 @@ enum {
|
||||
PROP_BATTERY_CHARGE,
|
||||
PROP_BUNDLE_SYMBOLS,
|
||||
PROP_DEBUGINFOD,
|
||||
PROP_DEBUGINFOD_EXTERNAL_URLS,
|
||||
PROP_CLEAR_ENVIRON,
|
||||
PROP_COMMAND_LINE,
|
||||
PROP_CPU_USAGE,
|
||||
@ -103,6 +105,7 @@ sysprof_recording_template_finalize (GObject *object)
|
||||
g_clear_pointer (&self->cwd, g_free);
|
||||
g_clear_pointer (&self->power_profile, g_free);
|
||||
g_clear_pointer (&self->environ, g_free);
|
||||
g_clear_pointer (&self->debuginfod_external_urls, g_free);
|
||||
|
||||
G_OBJECT_CLASS (sysprof_recording_template_parent_class)->finalize (object);
|
||||
}
|
||||
@ -129,6 +132,10 @@ sysprof_recording_template_get_property (GObject *object,
|
||||
g_value_set_boolean (value, self->debuginfod);
|
||||
break;
|
||||
|
||||
case PROP_DEBUGINFOD_EXTERNAL_URLS:
|
||||
g_value_set_string (value, self->debuginfod_external_urls);
|
||||
break;
|
||||
|
||||
case PROP_CLEAR_ENVIRON:
|
||||
g_value_set_boolean (value, self->clear_environ);
|
||||
break;
|
||||
@ -244,6 +251,10 @@ sysprof_recording_template_set_property (GObject *object,
|
||||
self->debuginfod = g_value_get_boolean (value);
|
||||
break;
|
||||
|
||||
case PROP_DEBUGINFOD_EXTERNAL_URLS:
|
||||
g_set_str (&self->debuginfod_external_urls, g_value_get_string (value));
|
||||
break;
|
||||
|
||||
case PROP_CLEAR_ENVIRON:
|
||||
self->clear_environ = g_value_get_boolean (value);
|
||||
break;
|
||||
@ -361,6 +372,11 @@ sysprof_recording_template_class_init (SysprofRecordingTemplateClass *klass)
|
||||
g_param_spec_boolean ("debuginfod", NULL, NULL,
|
||||
TRUE,
|
||||
(G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
|
||||
properties[PROP_DEBUGINFOD_EXTERNAL_URLS] =
|
||||
g_param_spec_string ("debuginfod-external-urls", NULL, NULL,
|
||||
NULL,
|
||||
(G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
|
||||
|
||||
properties[PROP_CLEAR_ENVIRON] =
|
||||
g_param_spec_boolean ("clear-environ", NULL, NULL,
|
||||
@ -491,6 +507,7 @@ sysprof_recording_template_init (SysprofRecordingTemplate *self)
|
||||
self->system_log = TRUE;
|
||||
self->command_line = g_strdup ("");
|
||||
self->cwd = g_strdup("");
|
||||
self->debuginfod_external_urls = g_strdup("");
|
||||
self->stack_size = DEFAULT_STACK_SIZE;
|
||||
}
|
||||
|
||||
@ -624,9 +641,6 @@ sysprof_recording_template_apply (SysprofRecordingTemplate *self,
|
||||
|
||||
if (self->bundle_symbols)
|
||||
sysprof_profiler_add_instrument (profiler, sysprof_symbols_bundle_new ());
|
||||
|
||||
// if (self->debuginfod) /*TODO: This just uses an a preexisting function.*/
|
||||
// sysprof_profiler_add_instrument (profiler, this_should_be_a_handler_function());
|
||||
|
||||
if (self->cpu_usage)
|
||||
sysprof_profiler_add_instrument (profiler, sysprof_cpu_usage_new ());
|
||||
|
||||
Reference in New Issue
Block a user