主权项 |
1. A computer-implemented method for identifying virtual machine trace data related to a virtual machine hosted by a processing node of a computer, the virtual machine trace data being a subset of computer trace data acquired by a tracer node of the computer, the computer trace data being indicative of each memory access made of a memory apparatus of the tracer node, the method comprising:
recording a first page fault log, by the processing node that is hosting the virtual machine, wherein the first page fault log includes a mapping between guest virtual addresses and guest physical addresses; starting, by the tracer node, to record the computer trace data containing information of the trace of the access to the memory apparatus; migrating, by the tracer node, the virtual machine from the processing node to the tracer node, wherein the migrating comprises: copying, by an hypervisor of the tracer node, entire memory contents of the virtual machine from the processing node to the memory apparatus of the tracer node, which results in a single page fault at the hypervisor of the tracer node; assigning a physical address of the memory apparatus of the tracer node to copy the entire memory contents of the virtual machine, in response to the page fault; and storing, by the hypervisor, in a second page fault log corresponding to the hypervisor, information identifying the physical address of the memory apparatus of the tracer node at which the entire contents are copied in response to the migration of the virtual machine from the processing node to the tracer node, the physical address being assigned to the virtual machine, and wherein the second page fault log includes a mapping between guest physical addresses and physical addresses of the memory apparatus of the tracer node; adding, by the tracer node, in an entry of the computer trace data, a first correspondence information between the guest physical address and the physical address of the memory apparatus that the entry is for, wherein the first correspondence information is obtained from the second page fault log; adding, by the tracer node, in the entry of the computer trace data, a second correspondence information between the guest virtual address and the guest physical address corresponding to the physical address of the memory apparatus that the entry is for, wherein the second correspondence information is obtained from the first page fault log; and identifying the virtual machine trace data relating to the virtual machine from the computer trace data, using the assigned physical address of the memory apparatus of the tracer node. |