module documentation
Module related to trace filter. See the Trace
object.
Class |
|
Enum describing the ring policy to apply in a filter |
Function | filter |
Get all context ranges that are associated to the given processes and given ring policy |
Function | _backward |
Undocumented |
Function | _forward |
Undocumented |
Function | _pack |
Undocumented |
Function | _pack |
Undocumented |
def filter(_rvn, trace, ossi, processes=None, ring_policy=RingPolicy.All, from_context=None, to_context=None, is_forward=True, fetch_count=10):
Get all context ranges that are associated to the given processes and given ring policy
A valid list of `ossi.Process` object must be given. To get one, use the `Ossi.executed_processes` method.
Warnings
This function is not meant to be call directly. Use RevenServer.trace.filter (Trace.filter
) instead.
Depends on the ossi range resource. If unavailable, this function will raise an error.
Examples
>>> # iterate on ranges in ring 0 >>> for range in reven_server.trace.filter(ring_policy=reven2.filter.RingPolicy.R0Only): ... print(range) [Context before #853196, Context before #857514] [Context before #5113265, Context before #5118308] [Context before #8202545, Context before #8208679] [Context before #16222616, Context before #16229012]
>>> # iterate on any contexts associated to process `foo.exe` with pid 1234 >>> process = next(reven_server.ossi.executed_processes('foo.exe', 1234)) >>> for range in reven_server.trace.filter([process]): ... for context in range: ... print(context) Context before #1000 Context before #1001 Context before #1002 Context before #1003 Context before #1004 Context before #1005 ...
Information
Parameters | |
_rvn:_reven_api.reven_connection | Undocumented |
trace:_trace.Trace | Undocumented |
ossi:_Ossi | Undocumented |
processes:_Optional[ | the list of processes to filter. If None, all processes will be filtered. |
ringRingPolicy | the rings to filter. Must be a filter.RingPolicy value. By default, all rings will be filtered. |
from_Optional[ | the first included context where the filter starts. Must be a trace.Context . If None, start at the first context of trace. |
to_Optional[ | the first excluded context where the filter stops. Must be a trace.Context . If None, stop at the last context of the trace (included). `from_context` must be strictly lower than `to_context`. |
isbool | whether the results are returned in the forward or backward order. By default, the forward order is used. |
fetchint | Undocumented |
Returns | |
_Union[ | A generator of trace.ContextRange if `is_forward` equal `True`. Otherwise, a generator of trace.BackwardContextRange . |
Raises | |
ValueError | if `to_context` is lower or equal to `from_context`. |
RuntimeError | if the ossi ranges ressource is unavailable. |
def _backward_filter(_rvn, processes, ring_policy, from_context, to_context, fetch_count, trace):
Undocumented
Parameters | |
_rvn:_reven_api.reven_connection | Undocumented |
processes:_Iterable[ | Undocumented |
ringRingPolicy | Undocumented |
fromint | Undocumented |
toint | Undocumented |
fetchint | Undocumented |
trace:_trace.Trace | Undocumented |
Returns | |
_Iterator[ | Undocumented |
def _forward_filter(_rvn, processes, ring_policy, from_context, to_context, fetch_count, trace):
Undocumented
Parameters | |
_rvn:_reven_api.reven_connection | Undocumented |
processes:_Iterable[ | Undocumented |
ringRingPolicy | Undocumented |
fromint | Undocumented |
toint | Undocumented |
fetchint | Undocumented |
trace:_trace.Trace | Undocumented |
Returns | |
_Iterator[ | Undocumented |