mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-10 07:00:53 +00:00
libsysprof-ui: add hits column
This commit is contained in:
@ -79,6 +79,7 @@ enum {
|
|||||||
COLUMN_SELF,
|
COLUMN_SELF,
|
||||||
COLUMN_TOTAL,
|
COLUMN_TOTAL,
|
||||||
COLUMN_POINTER,
|
COLUMN_POINTER,
|
||||||
|
COLUMN_HITS,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -961,6 +962,7 @@ append_to_tree_and_free (SysprofCallgraphView *self,
|
|||||||
COLUMN_SELF, item->self * 100.0 / (gdouble)profile_size,
|
COLUMN_SELF, item->self * 100.0 / (gdouble)profile_size,
|
||||||
COLUMN_TOTAL, item->cumulative * 100.0 / (gdouble)profile_size,
|
COLUMN_TOTAL, item->cumulative * 100.0 / (gdouble)profile_size,
|
||||||
COLUMN_POINTER, node,
|
COLUMN_POINTER, node,
|
||||||
|
COLUMN_HITS, (guint)item->cumulative,
|
||||||
-1);
|
-1);
|
||||||
|
|
||||||
if (item->siblings != NULL)
|
if (item->siblings != NULL)
|
||||||
@ -974,7 +976,7 @@ append_to_tree_and_free (SysprofCallgraphView *self,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
sysprof_callgraph_view_update_descendants (SysprofCallgraphView *self,
|
sysprof_callgraph_view_update_descendants (SysprofCallgraphView *self,
|
||||||
StackNode *node)
|
StackNode *node)
|
||||||
{
|
{
|
||||||
SysprofCallgraphViewPrivate *priv = sysprof_callgraph_view_get_instance_private (self);
|
SysprofCallgraphViewPrivate *priv = sysprof_callgraph_view_get_instance_private (self);
|
||||||
GtkTreeStore *store;
|
GtkTreeStore *store;
|
||||||
@ -984,11 +986,12 @@ sysprof_callgraph_view_update_descendants (SysprofCallgraphView *self,
|
|||||||
if (g_queue_peek_head (priv->history) != node)
|
if (g_queue_peek_head (priv->history) != node)
|
||||||
g_queue_push_head (priv->history, node);
|
g_queue_push_head (priv->history, node);
|
||||||
|
|
||||||
store = gtk_tree_store_new (4,
|
store = gtk_tree_store_new (5,
|
||||||
G_TYPE_STRING,
|
G_TYPE_STRING,
|
||||||
G_TYPE_DOUBLE,
|
G_TYPE_DOUBLE,
|
||||||
G_TYPE_DOUBLE,
|
G_TYPE_DOUBLE,
|
||||||
G_TYPE_POINTER);
|
G_TYPE_POINTER,
|
||||||
|
G_TYPE_UINT);
|
||||||
|
|
||||||
if (priv->profile != NULL)
|
if (priv->profile != NULL)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -183,6 +183,21 @@
|
|||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkTreeViewColumn" id="function_hits_column">
|
||||||
|
<property name="expand">false</property>
|
||||||
|
<property name="sizing">fixed</property>
|
||||||
|
<property name="title" translatable="yes">Hits</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkCellRendererText">
|
||||||
|
<property name="xalign">1.0</property>
|
||||||
|
</object>
|
||||||
|
<attributes>
|
||||||
|
<attribute name="text">4</attribute>
|
||||||
|
</attributes>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
|
|||||||
Reference in New Issue
Block a user