Adds linear regression based clock correction of a group of traces. This is
mostly a reimplementation of the work presented in
[1] Clément, E.: Synchronisation de traces dans un réseau distribué, École
Polytechnique de montréal, 2006
This implementation does not use a synchronization "window" and timeouts as
described in figure 3.3 of [1]. Not using that algorithm, we don't have to
rely on the system time to be loosely synchronized; events can be processed
regardless of the order the traces are merge-sorted. The downside is that
there is no limit to the number of events that could be queued up, waiting for
their matching event from another trace. The solution to this would be to
insert extra logic (like a plugable module) that controls the merge-sort;
upstream of event delivery to the syncrhonization code. Many possibilities
come to mind:
1) reimplement something like what is found in [1] that relies on system time
for a weak pre-synchronization
2) use a heuristic based on the size of the current queue for each trace in
the synchronization code. If a trace's queue is growing and growing, deliver
events to other traces.
This implementation also does not need to keep track of the IP adresses
assigned to local interfaces. If a packet is processed by the network
subsystem it can be used for synchronization. There is no need to know if the
node really the packet's final destination.
Signed-off-by: Benjamin Poirier <benjamin.poirier@polymtl.ca>