kernel-shark-qt: Define Data collections
Data collections are used to optimize the search for an entry having
an abstract property, defined by a Matching condition function and a
value.
When a collection is processed, the data which is relevant for the
collection is enclosed in "Data intervals", defined by pairs of
"Resume" and "Break" points. It is guaranteed that the data outside of
the intervals contains no entries satisfying the abstract matching
condition. In the same time the interval may (will) contain data that
do not satisfy the matching condition. Keep in mind that the Collection
is defined over an array of kshark_entries, sorted in time. Each
interval will start (resume) at the index of the first appearance of an
entry satisfying the matching condition. The definition of the Break
point of the interval is a bit more complicated. The interval will be
closed when we have an entry which still satisfies the condition, but
the next entry on the same CPU no longer satisfies this condition.
Once defined, the Data collection can be used when searching for an entry
having the same (ore related) abstract property. The collection allows to
ignore the irrelevant data, thus it eliminates the linear worst-case time
complexity of the search.
The user has the possibility to inflate each of the interval, by appending
additional data which do not satisfy the matching condition (margin data).
This data will be added to each interval at the beginning and at the end of
the data which is relevant for the collection, as well as at the beginning
and at the end of data-set. The margin data can be useful in the case when
the user wants to be able to see what is happening before and after the
appearance of his data of interest.
Signed-off-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
4 files changed