libsysprof-ui: add local symbol decoder source to profiler

This allows us to decode symbols locally at the end of a capture so that
we avoid trying to decode them on a machine without the info.
This commit is contained in:
Christian Hergert
2019-05-28 12:16:59 -07:00
parent b2b3b48b52
commit 6e3632c0e5

View File

@ -187,6 +187,7 @@ sysprof_profiler_assistant_record_clicked_cb (SysprofProfilerAssistant *self,
{
g_autoptr(SysprofProfiler) profiler = NULL;
g_autoptr(SysprofCaptureWriter) writer = NULL;
g_autoptr(SysprofSource) symbols_source = NULL;
#ifdef __linux__
g_autoptr(SysprofSource) proc_source = NULL;
#endif
@ -245,6 +246,10 @@ sysprof_profiler_assistant_record_clicked_cb (SysprofProfilerAssistant *self,
sysprof_profiler_add_source (profiler, proc_source);
#endif
/* Always add symbol decoder to save to file immediately */
symbols_source = sysprof_symbols_source_new ();
sysprof_profiler_add_source (profiler, symbols_source);
/* Now allow the aids to add their sources */
gtk_container_foreach (GTK_CONTAINER (self->aid_flow_box),
(GtkCallback) sysprof_profiler_assistant_foreach_cb,