mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
Call back after collecting all traces.
2008-03-24 Soren Sandmann <sandmann@daimi.au.dk> * collector.c (collect_traces): Call back after collecting all traces. * TODO: update * process.c: Simpler code to find vmlinux svn path=/trunk/; revision=406
This commit is contained in:
committed by
Søren Sandmann Pedersen
parent
d2a6151f8d
commit
62ffe734b0
10
collector.c
10
collector.c
@ -170,6 +170,8 @@ in_dead_period (Collector *collector)
|
||||
static void
|
||||
collect_traces (Collector *collector)
|
||||
{
|
||||
gboolean first;
|
||||
|
||||
/* After a reset we ignore samples for a short period so that
|
||||
* a reset will actually cause 'samples' to become 0
|
||||
*/
|
||||
@ -179,6 +181,8 @@ collect_traces (Collector *collector)
|
||||
return;
|
||||
}
|
||||
|
||||
first = collector->n_samples == 0;
|
||||
|
||||
while (collector->current != collector->map_area->head)
|
||||
{
|
||||
const SysprofStackTrace *trace;
|
||||
@ -211,10 +215,10 @@ collect_traces (Collector *collector)
|
||||
collector->current = 0;
|
||||
|
||||
collector->n_samples++;
|
||||
|
||||
if (collector->callback)
|
||||
collector->callback (collector->n_samples == 1, collector->data);
|
||||
}
|
||||
|
||||
if (collector->callback)
|
||||
collector->callback (first, collector->data);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
Reference in New Issue
Block a user