Fix some spelling errors

2007-10-22  Soren Sandmann <sandmann@daimi.au.dk>

	* sfile.c: Fix some spelling errors

	* profile.[ch], sysprof.[ch]: Change "non_recursive" to
	"cumulative" to match the UI

	* profile.c (add_trace_to_tree): Add a couple of asserts.

	* TODO: updates


svn path=/trunk/; revision=383
This commit is contained in:
Soren Sandmann
2007-10-22 13:48:30 +00:00
committed by Søren Sandmann Pedersen
parent 686baf3304
commit 002f00a950
6 changed files with 46 additions and 13 deletions

View File

@ -1,3 +1,14 @@
2007-10-22 Soren Sandmann <sandmann@daimi.au.dk>
* sfile.c: Fix some spelling errors
* profile.[ch], sysprof.[ch]: Change "non_recursive" to
"cumulative" to match the UI
* profile.c (add_trace_to_tree): Add a couple of asserts.
* TODO: updates
2007-10-22 Soren Sandmann <sandmann@daimi.au.dk>
* elfparser.c (read_table): Don't discard weak symbols.

13
TODO
View File

@ -156,6 +156,19 @@ Before 1.2:
- etc.
done: HEAD will not load files with the wrong inode now.
* In profile.c, change "non_recursive" to "cumulative", and
"marked_non_recursive" to a boolean "charged". This is tricky code,
so be careful. Possibly make it a two-pass operation:
- first add the new trace
- then walk from the leaf, charging nodes
That would allow us to get rid of the marked field altogether. In fact,
maybe the descendants tree could become a stackstash. We'll just have
to make stack_stash_add_trace() return the leaf.
Hmm, not quite - we still need the "go-back-on-recursion" behavior.
That could be added of course, but that gets complex.
DONE: the name is now "cumulative"
* Add spew infrastructure to make remote debugging easier.
* Make it compile and work on x86-64

View File

@ -291,8 +291,11 @@ add_trace_to_tree (GList *trace, gint size, gpointer data)
for (node = parent; node != seen_tree_node->parent; node = node->parent)
{
node->non_recursion -= size;
node->cumulative -= size;
--node->marked_non_recursive;
g_assert (node->marked_non_recursive == 0 ||
node->marked_non_recursive == 1);
}
match = seen_tree_node;
@ -304,7 +307,7 @@ add_trace_to_tree (GList *trace, gint size, gpointer data)
match = g_new (ProfileDescendant, 1);
match->name = address;
match->non_recursion = 0;
match->cumulative = 0;
match->self = 0;
match->children = NULL;
match->marked_non_recursive = 0;
@ -313,10 +316,13 @@ add_trace_to_tree (GList *trace, gint size, gpointer data)
*tree = match;
}
g_assert (match->marked_non_recursive == 0 ||
match->marked_non_recursive == 1);
if (!match->marked_non_recursive)
{
g_ptr_array_add (nodes_to_unmark, match);
match->non_recursion += size;
match->cumulative += size;
++match->marked_non_recursive;
}
@ -331,6 +337,9 @@ add_trace_to_tree (GList *trace, gint size, gpointer data)
for (i = 0; i < len; ++i)
{
ProfileDescendant *tree_node = nodes_to_unmark->pdata[i];
g_assert (tree_node->marked_non_recursive == 0 ||
tree_node->marked_non_recursive == 1);
tree_node->marked_non_recursive = 0;
}

View File

@ -43,7 +43,7 @@ struct ProfileDescendant
{
char * name;
guint self;
guint non_recursion;
guint cumulative;
ProfileDescendant * parent;
ProfileDescendant * siblings;
ProfileDescendant * children;

View File

@ -448,7 +448,7 @@ handle_text (GMarkupParseContext *context,
{
if (!get_number (text, &instruction.u.pointer.target_id))
{
set_invalid_content_error (err, "Contents '%s' of pointer element is not a number", text);
set_invalid_content_error (err, "Content '%s' of pointer element is not a number", text);
return;
}
}
@ -456,7 +456,7 @@ handle_text (GMarkupParseContext *context,
{
if (!get_number (text, &instruction.u.integer.value))
{
set_invalid_content_error (err, "Contents '%s' of integer element not a number", text);
set_invalid_content_error (err, "Content '%s' of integer element is not a number", text);
return;
}
}
@ -464,7 +464,7 @@ handle_text (GMarkupParseContext *context,
{
if (!decode_text (text, &instruction.u.string.value))
{
set_invalid_content_error (err, "Contents '%s' of text element is illformed", text);
set_invalid_content_error (err, "Content '%s' of text element is ill-formed", text);
return;
}
}

View File

@ -405,7 +405,7 @@ enum
{
DESCENDANTS_NAME,
DESCENDANTS_SELF,
DESCENDANTS_NON_RECURSE,
DESCENDANTS_CUMULATIVE,
DESCENDANTS_OBJECT
};
@ -496,10 +496,10 @@ add_node (GtkTreeStore *store,
gtk_tree_store_set (store, &iter,
DESCENDANTS_NAME, node->name,
DESCENDANTS_SELF, 100 * (node->self)/(double)size,
DESCENDANTS_NON_RECURSE, 100 * (node->non_recursion)/(double)size,
DESCENDANTS_CUMULATIVE, 100 * (node->cumulative)/(double)size,
#if 0
DESCENDANTS_SELF, (double)node->self,
DESCENDANTS_NON_RECURSE, (double)node->non_recursion,
DESCENDANTS_CUMULATIVE, (double)node->non_recursion,
#endif
DESCENDANTS_OBJECT, node->name,
-1);
@ -539,7 +539,7 @@ fill_descendants_tree (Application *app)
}
tree_view_set_model_with_default_sort (app->descendants_view, GTK_TREE_MODEL (tree_store),
DESCENDANTS_NON_RECURSE, GTK_SORT_DESCENDING);
DESCENDANTS_CUMULATIVE, GTK_SORT_DESCENDING);
g_object_unref (G_OBJECT (tree_store));
@ -1021,7 +1021,7 @@ get_data (GtkTreeView *view,
model, iter,
DESCENDANTS_NAME, name? name : &dummy1,
DESCENDANTS_SELF, self? self : &dummy2,
DESCENDANTS_NON_RECURSE, cumulative? cumulative : &dummy3,
DESCENDANTS_CUMULATIVE, cumulative? cumulative : &dummy3,
-1);
}
@ -1514,7 +1514,7 @@ build_gui (Application *app)
gtk_tree_view_set_enable_search (app->descendants_view, FALSE);
col = add_plain_text_column (app->descendants_view, _("Descendants"), DESCENDANTS_NAME);
add_double_format_column (app->descendants_view, _("Self"), DESCENDANTS_SELF, "%.2f ");
add_double_format_column (app->descendants_view, _("Cumulative"), DESCENDANTS_NON_RECURSE, "%.2f ");
add_double_format_column (app->descendants_view, _("Cumulative"), DESCENDANTS_CUMULATIVE, "%.2f ");
g_signal_connect (app->descendants_view, "row-activated",
G_CALLBACK (on_descendants_row_activated), app);
g_signal_connect (app->descendants_view, "row_expanded",