diff --git a/lisa/datautils.py b/lisa/datautils.py index a9f59c0318..ecf9f2f3cc 100644 --- a/lisa/datautils.py +++ b/lisa/datautils.py @@ -2315,7 +2315,7 @@ def _from_event(cls, event, fields=None): # for traces before the events from the lisa module got renamed to # lisa__ from lisa.trace import _NamespaceTraceView - events = _NamespaceTraceView._do_expand_namespaces(event, namespaces=('lisa', None)) + events = _NamespaceTraceView._do_expand_namespaces(event, namespaces=('lisa__', None)) for event in events: try: diff --git a/lisa/trace.py b/lisa/trace.py index d92b73a5b3..5c27f66cb9 100644 --- a/lisa/trace.py +++ b/lisa/trace.py @@ -2896,7 +2896,7 @@ def get_view(self, **kwargs): :param events_namespaces: List of namespaces of the requested events. Each namespace will be tried in order until the event is found. The ``None`` namespace can be used to specify no namespace. The full - event name is formed with ``__``. + event name is formed with ````. :type events_namespaces: list(str or None) :param events: Preload the given events when creating the view. This @@ -3698,7 +3698,7 @@ def trace_state(self): @memoized def events_namespaces(self): """ - Namespaces evens will be looked up in. + Namespaces events will be looked up in. """ try: base_namespaces = self.base_trace.events_namespaces @@ -3731,15 +3731,10 @@ def _do_expand_namespaces(cls, event, namespaces): def expand_namespace(event, namespace): if namespace: - if namespace.endswith('_'): - ns_prefix = namespace - else: - ns_prefix = f'{namespace}__' - - if event.startswith(ns_prefix): + if event.startswith(namespace): return event else: - return f'{ns_prefix}{event}' + return f'{namespace}{event}' else: return event @@ -6291,7 +6286,7 @@ def _view_from_user_kwargs(cls, normalize_time=False, strict_events=False, events=None, - events_namespaces=('lisa', None), + events_namespaces=('lisa__', None), sanitization_functions=None, write_swap=None, @@ -7449,7 +7444,7 @@ class FtraceCollector(CollectorBase, Configurable): TOOLS = ['trace-cmd'] _COMPOSITION_ORDER = 0 - def __init__(self, target, *, events=None, functions=None, buffer_size=10240, output_path=None, autoreport=False, trace_clock=None, saved_cmdlines_nr=8192, tracer=None, kmod_auto_load=True, events_namespaces=('lisa', None), **kwargs): + def __init__(self, target, *, events=None, functions=None, buffer_size=10240, output_path=None, autoreport=False, trace_clock=None, saved_cmdlines_nr=8192, tracer=None, kmod_auto_load=True, events_namespaces=('lisa__', None), **kwargs): kconfig = target.plat_info['kernel']['config'] if not kconfig.get('FTRACE'):