mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
sysprof: add listing of threads seen in a process
This is useful just so we can look at a table of what threads we discovered (via sampling). We might also want to add a new Thread frame that allows us to see that data from Perf. Especially once we start doing scheduler information.
This commit is contained in:
50
src/sysprof/icons/scalable/actions/threads-symbolic.svg
Normal file
50
src/sysprof/icons/scalable/actions/threads-symbolic.svg
Normal file
@ -0,0 +1,50 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
height="16px"
|
||||
viewBox="0 0 16 16"
|
||||
width="16px"
|
||||
version="1.1"
|
||||
id="svg5033"
|
||||
sodipodi:docname="threads-symbolic.svg"
|
||||
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<defs
|
||||
id="defs5037" />
|
||||
<sodipodi:namedview
|
||||
id="namedview5035"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
showgrid="false"
|
||||
inkscape:zoom="51.007547"
|
||||
inkscape:cx="7.1754088"
|
||||
inkscape:cy="8.5575572"
|
||||
inkscape:window-width="1551"
|
||||
inkscape:window-height="1288"
|
||||
inkscape:window-x="26"
|
||||
inkscape:window-y="23"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="svg5033" />
|
||||
<path
|
||||
d="M 2.188,2 C 0.982,2 0,3.018 0,4.219 v 7.562 C 0,12.982 0.982,14 2.188,14 H 13.812 C 15.018,14 16,12.981999 16,11.781 V 4.22 C 16,3.018 15.018,2 13.812,2 Z m 0,2 H 13.812 C 13.932,4 14,4.08 14,4.219 v 7.562 C 14,11.919999 13.933,12 13.812,12 H 2.188 C 2.068,12 2,11.919999 2,11.781 V 4.22 C 2,4.08 2.067,4 2.188,4 Z"
|
||||
style="font-weight:400;line-height:normal;-inkscape-font-specification:'Bitstream Vera Sans';text-indent:0;text-align:start;text-decoration-line:none;text-transform:none;fill:#2e3436;marker:none"
|
||||
color="#bebebe"
|
||||
font-family="'Bitstream Vera Sans'"
|
||||
overflow="visible"
|
||||
id="path113" />
|
||||
<path
|
||||
d="m 3,5 h 8 V 7 H 3 Z m 0,0"
|
||||
id="path5029"
|
||||
style="stroke-width:1.1094" />
|
||||
<path
|
||||
d="m 3,9 h 4 v 2 H 3 Z m 0,0"
|
||||
id="path5029-3"
|
||||
style="stroke-width:0.784474" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.9 KiB |
@ -114,6 +114,8 @@ sysprof_process_dialog_class_init (SysprofProcessDialogClass *klass)
|
||||
|
||||
gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/sysprof/sysprof-process-dialog.ui");
|
||||
gtk_widget_class_bind_template_callback (widget_class, format_address);
|
||||
|
||||
g_type_ensure (SYSPROF_TYPE_THREAD_INFO);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@ -556,6 +556,112 @@
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="AdwViewStackPage">
|
||||
<property name="icon-name">threads-symbolic</property>
|
||||
<property name="title" translatable="yes">Threads</property>
|
||||
<property name="child">
|
||||
<object class="GtkScrolledWindow">
|
||||
<property name="vexpand">true</property>
|
||||
<child>
|
||||
<object class="GtkColumnView" id="threads_column_view">
|
||||
<property name="show-column-separators">true</property>
|
||||
<property name="show-row-separators">true</property>
|
||||
<style>
|
||||
<class name="data-table"/>
|
||||
</style>
|
||||
<property name="model">
|
||||
<object class="GtkMultiSelection">
|
||||
<property name="model">
|
||||
<object class="GtkSortListModel">
|
||||
<binding name="sorter">
|
||||
<lookup name="sorter">threads_column_view</lookup>
|
||||
</binding>
|
||||
<binding name="model">
|
||||
<lookup name="threads" type="SysprofDocumentProcess">
|
||||
<lookup name="process">SysprofProcessDialog</lookup>
|
||||
</lookup>
|
||||
</binding>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</property>
|
||||
<child>
|
||||
<object class="GtkColumnViewColumn" id="pid">
|
||||
<property name="title" translatable="yes">Thread ID</property>
|
||||
<property name="sorter">
|
||||
<object class="GtkNumericSorter">
|
||||
<property name="expression">
|
||||
<lookup name="thread-id" type="SysprofThreadInfo"/>
|
||||
</property>
|
||||
</object>
|
||||
</property>
|
||||
<property name="factory">
|
||||
<object class="GtkBuilderListItemFactory">
|
||||
<property name="bytes"><![CDATA[
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<template class="GtkListItem">
|
||||
<property name="child">
|
||||
<object class="GtkLabel">
|
||||
<property name="xalign">1</property>
|
||||
<binding name="label">
|
||||
<lookup name="thread-id" type="SysprofThreadInfo">
|
||||
<lookup name="item">GtkListItem</lookup>
|
||||
</lookup>
|
||||
</binding>
|
||||
</object>
|
||||
</property>
|
||||
</template>
|
||||
</interface>
|
||||
]]>
|
||||
</property>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkColumnViewColumn" id="main_thread_column">
|
||||
<property name="title" translatable="yes">Main Thread</property>
|
||||
<property name="expand">true</property>
|
||||
<property name="sorter">
|
||||
<object class="GtkNumericSorter">
|
||||
<property name="expression">
|
||||
<lookup name="is-main-thread" type="SysprofThreadInfo"/>
|
||||
</property>
|
||||
</object>
|
||||
</property>
|
||||
<property name="factory">
|
||||
<object class="GtkBuilderListItemFactory">
|
||||
<property name="bytes"><![CDATA[
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<template class="GtkListItem">
|
||||
<property name="child">
|
||||
<object class="GtkImage">
|
||||
<property name="halign">start</property>
|
||||
<property name="icon-name">object-select-symbolic</property>
|
||||
<binding name="visible">
|
||||
<lookup name="is-main-thread" type="SysprofThreadInfo">
|
||||
<lookup name="item">GtkListItem</lookup>
|
||||
</lookup>
|
||||
</binding>
|
||||
</object>
|
||||
</property>
|
||||
</template>
|
||||
</interface>
|
||||
]]>
|
||||
</property>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
|
||||
@ -12,6 +12,7 @@
|
||||
<file preprocess="xml-stripblanks">icons/scalable/actions/process-mounts-symbolic.svg</file>
|
||||
<file preprocess="xml-stripblanks">icons/scalable/actions/storage-symbolic.svg</file>
|
||||
<file preprocess="xml-stripblanks">icons/scalable/actions/system-log-symbolic.svg</file>
|
||||
<file preprocess="xml-stripblanks">icons/scalable/actions/threads-symbolic.svg</file>
|
||||
<file preprocess="xml-stripblanks">sysprof-callgraph-view.ui</file>
|
||||
<file preprocess="xml-stripblanks">sysprof-counters-section.ui</file>
|
||||
<file preprocess="xml-stripblanks">sysprof-cpu-section.ui</file>
|
||||
|
||||
Reference in New Issue
Block a user