|
In order to sort records from different files into a single
stream (in order of timestamp), unit-trace uses per-cpu buffers;
the length of the buffers was previously hardcoded. If that
length proved insufficient (resulting in out-of-order records),
before this commit, unit-trace produced a FATAL ERROR and
terminated.
Now, unit-trace merely keeps a record of all out-of-order
records and prints a warning at the end, listing them.
The motivation for this change was the observation that
at least some times, grossly out-of-order errors were at
the very beginning of the trace (e.g. task system release),
so they don't really matter. If we know the IDs of the records
that are unordered, we are able to check (with the -o output)
to see if their misordering actually matters or not.
Moreover, the buffer size can now be specified with -b, and
the previously hard-coded value (200) is the default. Making
this number smaller greatly improves runtime, and vice versa.
I suspect that further investigation into the problem of sorting
records will show that the current method is overkill; down the
road, we may be able to replace this method with something much
faster. (The current method has the advantage that it is extremely
scalable, but I don't think that pays off for the size of traces
we typically examine.)
|