[lttng-dev] [barectf] How to ensure that last events before a crash get recorded

RADERMACHER Ansgar Ansgar.RADERMACHER at cea.fr
Thu Mar 4 10:06:12 EST 2021


Hi,

when doing tracing with barectf, the trace elements are written into a buffer first and only written when the buffer is full - or if the function barectf_platform_fs_fini gets called.
In case of a crash, it's therefore possible to loose some events. What is the best option to prevent this issue? I've used signal handlers that call the function barectf_platform_fs_fini. This seems to work well with Linux, but is not portable. When using the provided sample platform, there is also the option to reduce the buffer size, but this is not ideal, as trace events that are too big for the buffer are not written.

Best regards

Ansgar


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.lttng.org/pipermail/lttng-dev/attachments/20210304/34cc77ea/attachment.htm>


More information about the lttng-dev mailing list