mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-12 16:10:54 +00:00
updates
2007-11-16 Soren Sandmann <sandmann@daimi.au.dk> * TODO: updates * module/sysprof-module.c (sysprof_poll): Only select readable when there is at least eight traces available * collector.c (collect_traces): New function, old on_read() * collector.c (collector_create_profile): Collect traces here as well. svn path=/trunk/; revision=388
This commit is contained in:
committed by
Søren Sandmann Pedersen
parent
d82fe2e474
commit
c00ccd69c7
24
collector.c
24
collector.c
@ -167,14 +167,8 @@ in_dead_period (Collector *collector)
|
||||
}
|
||||
|
||||
static void
|
||||
on_read (gpointer data)
|
||||
collect_traces (Collector *collector)
|
||||
{
|
||||
Collector *collector = data;
|
||||
char c;
|
||||
|
||||
/* Make sure poll() doesn't fire immediately again */
|
||||
read (collector->fd, &c, 1);
|
||||
|
||||
/* After a reset we ignore samples for a short period so that
|
||||
* a reset will actually cause 'samples' to become 0
|
||||
*/
|
||||
@ -183,7 +177,7 @@ on_read (gpointer data)
|
||||
collector->current = collector->map_area->head;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
while (collector->current != collector->map_area->head)
|
||||
{
|
||||
const SysprofStackTrace *trace;
|
||||
@ -213,6 +207,18 @@ on_read (gpointer data)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
on_read (gpointer data)
|
||||
{
|
||||
Collector *collector = data;
|
||||
char c;
|
||||
|
||||
/* Make sure poll() doesn't fire immediately again */
|
||||
read (collector->fd, &c, 1);
|
||||
|
||||
collect_traces (collector);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
load_module (void)
|
||||
{
|
||||
@ -479,6 +485,8 @@ collector_create_profile (Collector *collector)
|
||||
{
|
||||
ResolveInfo info;
|
||||
Profile *profile;
|
||||
|
||||
collect_traces (collector);
|
||||
|
||||
info.resolved_stash = stack_stash_new ((GDestroyNotify)g_free);
|
||||
info.unique_symbols = g_hash_table_new (g_direct_hash, g_direct_equal);
|
||||
|
||||
Reference in New Issue
Block a user