mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
memprof: add section for allocation leaks
These are defined by allocation records that do not have a corresponding release record.
This commit is contained in:
@ -62,6 +62,7 @@ typedef struct
|
||||
GtkRadioButton *summary;
|
||||
GtkRadioButton *all_allocs;
|
||||
GtkRadioButton *temp_allocs;
|
||||
GtkRadioButton *leaked_allocs_button;
|
||||
GtkLabel *temp_allocs_count;
|
||||
GtkLabel *num_allocs;
|
||||
GtkLabel *leaked_allocs;
|
||||
@ -1029,6 +1030,8 @@ mode_notify_active (SysprofMemprofPage *self,
|
||||
do_allocs (self, SYSPROF_MEMPROF_MODE_ALL_ALLOCS);
|
||||
else if (button == priv->temp_allocs)
|
||||
do_allocs (self, SYSPROF_MEMPROF_MODE_TEMP_ALLOCS);
|
||||
else if (button == priv->leaked_allocs_button)
|
||||
do_allocs (self, SYSPROF_MEMPROF_MODE_LEAKED_ALLOCS);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1147,6 +1150,7 @@ sysprof_memprof_page_class_init (SysprofMemprofPageClass *klass)
|
||||
gtk_widget_class_bind_template_child_private (widget_class, SysprofMemprofPage, temp_allocs_count);
|
||||
gtk_widget_class_bind_template_child_private (widget_class, SysprofMemprofPage, num_allocs);
|
||||
gtk_widget_class_bind_template_child_private (widget_class, SysprofMemprofPage, leaked_allocs);
|
||||
gtk_widget_class_bind_template_child_private (widget_class, SysprofMemprofPage, leaked_allocs_button);
|
||||
gtk_widget_class_bind_template_child_private (widget_class, SysprofMemprofPage, peak_allocs);
|
||||
|
||||
bindings = gtk_binding_set_by_class (klass);
|
||||
@ -1182,6 +1186,11 @@ sysprof_memprof_page_init (SysprofMemprofPage *self)
|
||||
G_CALLBACK (mode_notify_active),
|
||||
self,
|
||||
G_CONNECT_SWAPPED);
|
||||
g_signal_connect_object (priv->leaked_allocs_button,
|
||||
"notify::active",
|
||||
G_CALLBACK (mode_notify_active),
|
||||
self,
|
||||
G_CONNECT_SWAPPED);
|
||||
g_signal_connect_object (priv->summary,
|
||||
"notify::active",
|
||||
G_CALLBACK (mode_notify_active),
|
||||
|
||||
@ -44,6 +44,15 @@
|
||||
<property name="group">summary</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRadioButton" id="leaked_allocs_button">
|
||||
<property name="label" translatable="yes">Leaked Allocations</property>
|
||||
<property name="draw-indicator">false</property>
|
||||
<property name="visible">true</property>
|
||||
<property name="active">false</property>
|
||||
<property name="group">summary</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
||||
Reference in New Issue
Block a user