sysprof/0021-sysprof-only-show-user-stack-sampling-on-x86.patch
Christian Hergert 857a3982f5 Update to 47.2
Resolves: RHEL-69379
2024-11-27 09:59:15 -08:00

59 lines
2.7 KiB
Diff

From f5613c77d162340ae33877d04c23195587ce6c31 Mon Sep 17 00:00:00 2001
From: Christian Hergert <chergert@redhat.com>
Date: Mon, 4 Nov 2024 14:25:07 -0800
Subject: [PATCH 21/33] sysprof: only show user stack sampling on x86
That is the only place it works currently (and is necessary).
---
src/sysprof/sysprof-greeter.c | 6 ++++++
src/sysprof/sysprof-greeter.ui | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/sysprof/sysprof-greeter.c b/src/sysprof/sysprof-greeter.c
index 52eff370..e0313e81 100644
--- a/src/sysprof/sysprof-greeter.c
+++ b/src/sysprof/sysprof-greeter.c
@@ -58,6 +58,7 @@ struct _SysprofGreeter
GtkButton *record_to_memory;
AdwComboRow *power_combo;
AdwComboRow *sample_user_stack_size;
+ AdwExpanderRow *user_stacks;
SysprofRecordingTemplate *recording_template;
};
@@ -516,6 +517,7 @@ sysprof_greeter_class_init (SysprofGreeterClass *klass)
gtk_widget_class_bind_template_child (widget_class, SysprofGreeter, sample_native_stacks);
gtk_widget_class_bind_template_child (widget_class, SysprofGreeter, sample_user_stack_size);
gtk_widget_class_bind_template_child (widget_class, SysprofGreeter, sidebar_list_box);
+ gtk_widget_class_bind_template_child (widget_class, SysprofGreeter, user_stacks);
gtk_widget_class_bind_template_child (widget_class, SysprofGreeter, view_stack);
gtk_widget_class_bind_template_callback (widget_class, sidebar_row_activated_cb);
@@ -572,6 +574,10 @@ sysprof_greeter_init (SysprofGreeter *self)
/* Set to 16KB */
adw_combo_row_set_selected (self->sample_user_stack_size, 1);
+#if !defined(__x86_64__) && !defined(__i386__)
+ gtk_widget_set_visible (GTK_WIDGET (self->user_stacks), FALSE);
+#endif
+
gtk_widget_grab_focus (GTK_WIDGET (self->record_to_memory));
}
diff --git a/src/sysprof/sysprof-greeter.ui b/src/sysprof/sysprof-greeter.ui
index f7ebbc29..92ade34d 100644
--- a/src/sysprof/sysprof-greeter.ui
+++ b/src/sysprof/sysprof-greeter.ui
@@ -107,7 +107,7 @@
</object>
</child>
<child>
- <object class="AdwExpanderRow">
+ <object class="AdwExpanderRow" id="user_stacks">
<property name="title" translatable="yes">Unwind Stacks in User Space</property>
<property name="subtitle" translatable="yes">Copy stack contents and registers for unwinding in user-space</property>
<property name="expanded" bind-source="sample_user_stack" bind-property="active" bind-flags="sync-create|bidirectional"/>
--
2.45.2