Before 1.2:
+* Make sure there aren't leftover stacktraces from last time when
+ profiling begins.
+
* Is the move-to-front in process_locate_map() really worth it?
* Whenever we fail to lock the atomic variable, track this, and send the information
static void
collect_traces (Collector *collector)
{
- int n;
-
/* After a reset we ignore samples for a short period so that
* a reset will actually cause 'samples' to become 0
*/
#endif
unsigned long i;
int j;
+#if 0
int n_bytes = minimum (eos - esp, (SYSPROF_MAX_ADDRESSES - 1) * sizeof (void *));
+#endif
j = 1;
for (i = esp; i < eos && j < SYSPROF_MAX_ADDRESSES; i += sizeof (void *)) {
break;
vma = find_vma (current->mm, x);
- if (vma && vma->vm_flags & VM_EXEC && vma->vm_start <= x && x <= vma->vm_end) {
- trace->addresses[j++] = x;
- }
-
+
+ if (vma && vma->vm_flags & VM_EXEC)
+ if (vma->vm_start <= x && x <= vma->vm_end)
+ trace->addresses[j++] = x;
}
#if 0
heuristic_trace (regs, trace);
#elif CONFIG_X86
framepointer_trace (regs, trace);
+#else
+#error Sysprof only supports the i386 and x86-64 architectures
#endif
}