The logic for host-guest time synchronization is moved from trace-cmd application context to the trace-cmd library. Additional logic is added, to ensure the first pass of the synchronization is completed before starting the trace. v2 changes: - Coding style and gramar fixes. Tzvetomir Stoyanov (VMware) (2): trace-cmd: Move time sync logic in the trace-cmd library trace-cmd: Wait for first time sync before the trace lib/trace-cmd/Makefile | 2 - .../include/private/trace-cmd-private.h | 33 +- lib/trace-cmd/include/trace-tsync-local.h | 16 + lib/trace-cmd/trace-timesync.c | 515 ++++++++++++++++-- tracecmd/Makefile | 3 - tracecmd/include/trace-local.h | 5 +- tracecmd/trace-agent.c | 19 +- tracecmd/trace-record.c | 70 ++- tracecmd/trace-tsync.c | 294 ---------- 9 files changed, 576 insertions(+), 381 deletions(-) delete mode 100644 tracecmd/trace-tsync.c -- 2.29.2