diff mbox series

[1/2] trace-cruncher: Cleanup in class event

Message ID 20220126123114.214956-1-y.karadz@gmail.com (mailing list archive)
State Accepted
Headers show
Series [1/2] trace-cruncher: Cleanup in class event | expand

Commit Message

Yordan Karadzhov Jan. 26, 2022, 12:31 p.m. UTC
The 'instance_list' field of the class event is a legacy from an old
implementation of the cleanup that was done in the destructor of the
class. Currently this field is useless and has to be removed.

Signed-off-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com>
---
 tracecruncher/ft_utils.py | 7 -------
 1 file changed, 7 deletions(-)
diff mbox series

Patch

diff --git a/tracecruncher/ft_utils.py b/tracecruncher/ft_utils.py
index ed4bdcd..e1126ad 100644
--- a/tracecruncher/ft_utils.py
+++ b/tracecruncher/ft_utils.py
@@ -43,7 +43,6 @@  class event:
         """
         self.system = system
         self.name = name
-        self.instance_list = []
         if static:
             self.evt_id = find_event_id(system, name)
             if self.evt_id < 0:
@@ -61,22 +60,16 @@  class event:
         """
         if instance is None:
             ft.enable_event(system=self.system, event=self.name)
-            self.instance_list.append('top')
         else:
             ft.enable_event(instance=instance, system=self.system, event=self.name)
-            self.instance_list.append(instance)
-
-        self.instance_list = list(set(self.instance_list))
 
     def disable(self, instance=None):
         """ Disable this event.
         """
         if instance is None:
             ft.disable_event(system=self.system, event=self.name)
-            self.instance_list.remove('top')
         else:
             ft.disable_event(instance=instance,system=self.system, event=self.name)
-            self.instance_list.remove(instance)
 
     def set_filter(self, filter, instance=None):
         """ Define a filter for this event.