2007-11-16  Soren Sandmann <sandmann@daimi.au.dk>

	* TODO: Updates
	
	* process.c (process_locate_map): Move map to front

	* profile.c (profile_load): Ignore the toplevel field in the file
	since we can compute it ourselves.

	* stackstash.c (stack_stash_decorate): New function
	
	* stackstash.c (stack_stash_add_trace): Decorate the tree lazily
	instead of on each sample.



svn path=/trunk/; revision=387
This commit is contained in:
Soren Sandmann
2007-11-16 07:47:22 +00:00
committed by Søren Sandmann Pedersen
parent 0118fb459b
commit d82fe2e474
5 changed files with 120 additions and 77 deletions

View File

@ -127,13 +127,13 @@ read_maps (int pid, int *n_maps)
g_array_append_val (result, map);
}
}
g_free (name);
fclose (in);
if (n_maps)
*n_maps = result->len;
return (Map *)g_array_free (result, FALSE);
}
@ -241,6 +241,18 @@ process_locate_map (Process *process, gulong addr)
if ((addr >= map->start) &&
(addr < map->end))
{
if (i > 4)
{
/* FIXME: Is this move-to-front really worth it? */
Map tmp = *map;
memmove (process->maps + 1, process->maps, i * sizeof (Map));
*(process->maps) = tmp;
map = process->maps;
}
return map;
}
}