On Mon, 26 Apr 2021 13:35:28 +0300 "Tzvetomir Stoyanov (VMware)" <tz.stoyanov@xxxxxxxxx> wrote: > Current host-guest tracing implementation assumes that qemu runs the VMs > and uses qemu specific logic to collect various information: > - PID of the process, running the guest VM. In case of KVM, this PID > is used to get the KVM guest TSC clock parameters, needed for better > host and guest trace timestamps synchronization. > - PIDs of each thread, running a guest virtual CPU. This is used for > better trace visualisation. It helps to map the host task to a vCPU > and to visualise them together. > In case qemu is not used to run the VMs, host-guest tracing fails. As > that information is not mandatory, we can easily support non-qemu VMs. > Changes, proposed by the patch: > - if PID of the process, running the guest VM, is not available - fail > back to a PTP-like algorithm for trace timestamps synchronization. > - if PIDs of the threads, running guest virtual CPUs, are not available > write -1 in the trace file metadata. > > Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@xxxxxxxxx> > --- We need to fix this for qemu as well. I just upgraded my test box to Fedora-33 and it renamed qemu from qemu-system-x86 to qemu-kvm, and I hit the same issue that Joel did with his code. And this patch just removes the use of KVM synchronization for my box. I'll try to find other ways to get this information than the hack we currently have. Relying on the application name is not robust at all. But unfortunately, there's currently no way that I can find that exports the CID of tasks. Perhaps this is going to require a kernel change. To have a netstat functionality for vsockets. -- Steve