Wrap lttng init and fini methods

This commit is contained in:
Christophe Bedard 2019-06-23 15:51:13 +02:00
parent f5e35d347d
commit 5ecd96ab5c

View file

@ -43,14 +43,12 @@ class Trace(Action):
def _setup(self):
print('setting up tracing!')
lttng.lttng_setup(
lttng.lttng_init(
self.__session_name,
self.__path,
ros_events=self.__events_ust,
kernel_events=self.__events_kernel)
lttng.lttng_start(self.__session_name)
def _destroy(self, event: Event, context: LaunchContext):
print('destroying tracing session!')
lttng.lttng_stop(self.__session_name)
lttng.lttng_destroy(self.__session_name)
lttng.lttng_fini(self.__session_name)