From 9b52e88d3a0c9311fd63fd9d812a20a156f1c210 Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Fri, 21 Feb 2020 12:39:13 -0800 Subject: [PATCH] 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 daee5480..3f9fcbda 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 c7373a39..aaedcd9b 100644 --- a/src/libsysprof-ui/sysprof-details-page.ui +++ b/src/libsysprof-ui/sysprof-details-page.ui @@ -133,7 +133,6 @@ True - 12 Counters Captured 1 + + + left + 9 + + 35 @@ -255,7 +269,6 @@ True False start - 12 0 True @@ -264,6 +277,20 @@ 8 + + + True + False + start + 12 + 0 + True + + + center + 9 + + True @@ -347,7 +374,7 @@ center - 9 + 10