[sysprof] libsysprof-ui: add label for number of allocations



commit 9b52e88d3a0c9311fd63fd9d812a20a156f1c210
Author: Christian Hergert <chergert redhat com>
Date:   Fri Feb 21 12:39:13 2020 -0800

    libsysprof-ui: add label for number of allocations

 src/libsysprof-ui/sysprof-details-page.c  |  3 +++
 src/libsysprof-ui/sysprof-details-page.ui | 33 ++++++++++++++++++++++++++++---
 2 files changed, 33 insertions(+), 3 deletions(-)
---
diff --git a/src/libsysprof-ui/sysprof-details-page.c b/src/libsysprof-ui/sysprof-details-page.c
index daee548..3f9fcbd 100644
--- a/src/libsysprof-ui/sysprof-details-page.c
+++ b/src/libsysprof-ui/sysprof-details-page.c
@@ -44,6 +44,7 @@ struct _SysprofDetailsPage
   GtkLabel     *counters;
   GtkLabel     *duration;
   GtkLabel     *filename;
+  GtkLabel     *allocations;
   GtkLabel     *forks;
   GtkLabel     *marks;
   GtkLabel     *processes;
@@ -85,6 +86,7 @@ sysprof_details_page_class_init (SysprofDetailsPageClass *klass)
   GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
 
   gtk_widget_class_set_template_from_resource (widget_class, 
"/org/gnome/sysprof/ui/sysprof-details-page.ui");
+  gtk_widget_class_bind_template_child (widget_class, SysprofDetailsPage, allocations);
   gtk_widget_class_bind_template_child (widget_class, SysprofDetailsPage, counters);
   gtk_widget_class_bind_template_child (widget_class, SysprofDetailsPage, cpu_label);
   gtk_widget_class_bind_template_child (widget_class, SysprofDetailsPage, duration);
@@ -250,6 +252,7 @@ sysprof_details_page_set_reader (SysprofDetailsPage   *self,
       SET_FRAME_COUNT (processes, SYSPROF_CAPTURE_FRAME_PROCESS);
       SET_FRAME_COUNT (forks, SYSPROF_CAPTURE_FRAME_FORK);
       SET_FRAME_COUNT (counters, SYSPROF_CAPTURE_FRAME_CTRSET);
+      SET_FRAME_COUNT (allocations, SYSPROF_CAPTURE_FRAME_ALLOCATION);
 
 #undef SET_FRAME_COUNT
     }
diff --git a/src/libsysprof-ui/sysprof-details-page.ui b/src/libsysprof-ui/sysprof-details-page.ui
index c7373a3..aaedcd9 100644
--- a/src/libsysprof-ui/sysprof-details-page.ui
+++ b/src/libsysprof-ui/sysprof-details-page.ui
@@ -133,7 +133,6 @@
             <child>
               <object class="GtkLabel">
                 <property name="visible">True</property>
-                <property name="margin-bottom">12</property>
                 <property name="label" translatable="yes">Counters Captured</property>
                 <property name="xalign">1</property>
                 <style>
@@ -145,6 +144,21 @@
                 <property name="row">8</property>
               </packing>
             </child>
+            <child>
+              <object class="GtkLabel">
+                <property name="visible">True</property>
+                <property name="margin-bottom">12</property>
+                <property name="label" translatable="yes">Allocations Captured</property>
+                <property name="xalign">1</property>
+                <style>
+                  <class name="dim-label"/>
+                </style>
+              </object>
+              <packing>
+                <property name="column">left</property>
+                <property name="row">9</property>
+              </packing>
+            </child>
             <child>
               <object class="GtkLabel" id="filename">
                 <property name="width-chars">35</property>
@@ -255,7 +269,6 @@
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="ellipsize">start</property>
-                <property name="margin-bottom">12</property>
                 <property name="xalign">0</property>
                 <property name="selectable">True</property>
               </object>
@@ -264,6 +277,20 @@
                 <property name="row">8</property>
               </packing>
             </child>
+            <child>
+              <object class="GtkLabel" id="allocations">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="ellipsize">start</property>
+                <property name="margin-bottom">12</property>
+                <property name="xalign">0</property>
+                <property name="selectable">True</property>
+              </object>
+              <packing>
+                <property name="column">center</property>
+                <property name="row">9</property>
+              </packing>
+            </child>
             <child>
               <object class="GtkFrame">
                 <property name="visible">True</property>
@@ -347,7 +374,7 @@
               </object>
               <packing>
                 <property name="column">center</property>
-                <property name="row">9</property>
+                <property name="row">10</property>
               </packing>
             </child>
           </object>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]