I have a trace producer that runs continuously, and the number of trace events is not known. (I also use two buffers for traces, and switch them inside close_packet.) I tried to call close_packet when I want to flush the buffer (i.e. from time to time, even if the initial provided buffer is not yet filled). But the generated file is not ok, since it seems that packet size, stored inside packet header, is not the real size of the packet filled up to that point, but the initially provided buffer size.
Is there a way to achieve this deterministic close/flush of packets at certain moments, or just when the buffer is filled or platform_fini called?
Hi,
I have a trace producer that runs continuously, and the number of trace events is not known. (I also use two buffers for traces, and switch them inside close_packet.) I tried to call close_packet when I want to flush the buffer (i.e. from time to time, even if the initial provided buffer is not yet filled). But the generated file is not ok, since it seems that packet size, stored inside packet header, is not the real size of the packet filled up to that point, but the initially provided buffer size.
Is there a way to achieve this deterministic close/flush of packets at certain moments, or just when the buffer is filled or platform_fini called?