linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] trace-cmd: Fix mappings when kvm vcpus do not match the guests CPU numbers
@ 2022-07-08  1:42 Steven Rostedt
  2022-07-08  1:42 ` [PATCH 1/2] trace-cmd: Do not use KVM debug vcpu directories as the CPU mapping Steven Rostedt
  2022-07-08  1:42 ` [PATCH 2/2] trace-cmd: Have the pid to vcpu mappings know about sparse maps Steven Rostedt
  0 siblings, 2 replies; 3+ messages in thread
From: Steven Rostedt @ 2022-07-08  1:42 UTC (permalink / raw)
  To: linux-trace-devel; +Cc: Vineeth Pillai, Steven Rostedt (Google)

From: "Steven Rostedt (Google)" <rostedt@goodmis.org>

The guest CPU numbers may not match what the kvm enter/exit events show.
This will prevent trace-cmd from saving what host threads map to which guest
vcpu.

Luckily, it seems that the mappings are sorted. That is, the vcpuX of kvm
has the X in the same order as the CPUs numbers of the guest. And currently,
the guests see consecutive numbers (not sparse).

This adds a mapping between the vcpuX and the consective numbers that allows
trace-cmd to find the host threads that map to the guests.

Steven Rostedt (Google) (2):
  trace-cmd: Do not use KVM debug vcpu directories as the CPU mapping
  trace-cmd: Have the pid to vcpu mappings know about sparse maps

 lib/trace-cmd/trace-timesync-kvm.c | 104 ++++++++++++++++-------------
 tracecmd/trace-tsync.c             | 100 ++++++++++++++++++++++++++-
 2 files changed, 157 insertions(+), 47 deletions(-)

-- 
2.35.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-07-08  1:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-08  1:42 [PATCH 0/2] trace-cmd: Fix mappings when kvm vcpus do not match the guests CPU numbers Steven Rostedt
2022-07-08  1:42 ` [PATCH 1/2] trace-cmd: Do not use KVM debug vcpu directories as the CPU mapping Steven Rostedt
2022-07-08  1:42 ` [PATCH 2/2] trace-cmd: Have the pid to vcpu mappings know about sparse maps Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).