trace-cmd library: Add cache functionality to network message handler
Network message handler is used to send trace metadata through a network
socket, instead writing it into a trace file. There are use cases,
that could require to do a lseek() on the metadata. It is hard to
implement lseek on a network socket, that's why for such use cases a
cache to a local file is introduced. Once the metadata is constructed,
the local cache is send to the socket. A new library API is used to
enable the local cache:
tracecmd_msg_handle_cache()
The local cache is flushed on the socket when the
tracecmd_msg_finish_sending_data()
is called.
Link: https://lore.kernel.org/linux-trace-devel/20220119082507.245600-3-tz.stoyanov@gmail.com
Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
4 files changed