Virtualizing precise event based sampling

US9965375B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-9965375-B2
Application numberUS-201615194881-A
CountryUS
Kind codeB2
Filing dateJun 28, 2016
Priority dateJun 28, 2016
Publication dateMay 8, 2018
Grant dateMay 8, 2018

How to read this patent

A practical reading order for non-experts. Skip the full description unless you need deep technical detail.

  1. Title

    What the patent document calls the invention.

  2. Abstract

    A short plain-language summary of the technical disclosure.

  3. Assignees and inventors

    Who owns or filed the patent and who is credited as inventor.

  4. Key dates

    Filing, priority, publication, and grant dates set the timeline.

  5. First independent claim

    The legal scope of protection — read this for what is actually claimed.

  6. CPC / IPC classifications

    Technology tags used to group this patent with similar filings.

  7. Citations and related patents

    Prior art links and similar publications in this corpus.

Abstract

Official abstract text for this publication.

A core includes a memory buffer and executes an instruction within a virtual machine. A processor tracer captures trace data and formats the trace data as trace data packets. An event-based sampler generates field data for a sampling record in response to occurrence of an event of a certain type as a result of execution of the instruction. The processor tracer, upon receipt of the field data: formats the field data into elements of the sampling record as a group of record packets; inserts the group of record packets between the trace data packets as a combined packet stream; and stores the combined packet stream in the memory buffer as a series of output pages. The core, when in guest profiling mode, executes a virtual machine monitor to map output pages of the memory buffer to host physical pages of main memory using multilevel page tables.

First claim

Opening claim text (preview).

What is claimed is: 1. A processor comprising: a core having a memory buffer and that is to execute an instruction within a virtual machine, wherein the core executes a virtual machine monitor (VMM) to manage the virtual machine and further comprises: a processor tracer including first circuitry to capture trace data produced by execution of the instruction and to format the trace data as a plurality of trace data packets; an event-based sampler including second circuitry to generate field data for elements of a sampling record in response to occurrence of an event of a certain type as a result of execution of the instruction; wherein the first circuitry is further to, upon receipt of the field data from the second circuitry: format the field data into a group of record packets corresponding to the elements; insert the group of record packets between ones of the plurality of trace data packets of the trace data, to generate a combined packet stream; and store the combined packet stream in the memory buffer as a series of output pages using guest physical addresses; and wherein the VMM is to, when in a guest profiling mode, map the series of output pages of the memory buffer to host physical pages of main memory using multilevel page tables. 2. The processor claim 1 , wherein the core is further to generate a page fault when accessing a guest physical address for an output page of the series of output pages that is not mapped to a host physical address of the main memory, and wherein the VMM is further to pause the virtual machine to handle the page fault. 3. The processor of claim 1 , wherein the VMM is further to, when in a system-wide profiling mode, directly address the series of output pages as host physical pages in the main memory, and wherein the memory buffer is one of a Table of Physical Addresses (ToPA) or a Single Range memory. 4. The processor of claim 1 , wherein the group of record packets includes an instruction pointer value corresponding to an address of the instruction that has caused the occurrence of the event, and wherein the core is further to execute a trace decoder to: retrieve, from one of the VMM or an operating system of the virtual machine, an identity of a binary program being executed on the virtual machine during the occurrence of the event; retrieve metadata related to the binary program from the operating system, wherein the metadata references a function being executed at or before the occurrence of the event; and determine, from the metadata and the instruction pointer, an identity of the function being executed; and send the identity of the function being executed to a performance analysis tool with the group of record packets. 5. The processor of claim 1 , wherein to store the combined packet stream in the memory buffer as the series of output pages, the first circuitry is to: while filling a first output page, prefetch a second output page; test whether the second output page is mapped to a host physical page of the main memory; and trigger a virtual machine exit to request the VMM to map the second output page to the main memory responsive to detecting that the second output page is not mapped to the main memory. 6. The processor of claim 1 , wherein the second circuitry is further to, upon detection of the event, trigger a pause of execution of the virtual machine while generating the field data for the fields of the sampling record. 7. The processor of claim 1 , further comprising a second memory buffer comprising a port that is coupled to an output pin that connects to one of a debugger or off-chip analyzer. 8. The processor of claim 1 , further comprising a performance monitoring interrupt (PMI) register, which is to cause an interrupt in the core upon detecting the group of record packets, to enable transfer of control of the virtual machine to a debugger tool or analyzer that retrieves the group of record packets. 9. The processor of claim 1 , wherein each of the group of record packets includes a header indicating a type of payload data as being event-based data. 10. The processor of claim 1 , wherein the event-based sampler is further to execute one of hardware or microcode to perform a series of signal operations that transmit the field data for the elements of the sampling record in a predetermined order to the processor tracer. 11. A method comprising: executing, by a processor core, a plurality of instructions for a virtual machine; capturing, using a processor tracer of the processor core, trace data from execution of the plurality of instructions; formatting , using the processor tracer, the trace data into a plurality of trace data packets; generating, using an event-based sampler of the processor core, field data for elements of a sampling record in response to occurrence of an event of a certain type as a result of execution of the plurality of instructions; formatting, using the processor tracer, the field data into a group of record packets corresponding to the elements; inserting, using the processor tracer, the group of record packets between ones of the plurality of trace data packets of the trace data to generate a combined packet stream; storing, by the processor tracer in a memory buffer of the processor core, the combined packet stream as a series of output pages; and executing, by the processor core when in a guest profiling mode, a virtual machine monitor (VMM) to map the series of output pages of the memory buffer to host physical pages of main memory using multilevel page tables. 12. The method of claim 11 , wherein storing the combined packet stream in the memory buffer as the series of output pages comprises: while filling a first output page, prefetching a second output page; testing whether the second output page is mapped to a host physical page of the main memory; and triggering a virtual machine exit to request the VMM to map the second output page to the main memory responsive to detecting that the second output page is not mapped to the main memory. 13. The method of claim 11 , further comprising detecting the occurrence of the event after overflow of a performance monitoring counter (PMC) register for the event of the certain type. 14. The method of claim 11 , wherein the group of record packets includes an instruction pointer value corresponding to an address of the instruction that has caused the occurrence of the event, wherein the method further comprises: retrieving, from one of the VMM or an operating system of the virtual machine, an identity of a binary program being executed during the occurrence of the event; retrieving metadata related to the binary program from the operating system, wherein the metadata references a function being executed at or before the occurrence of the event; determining, from the metadata and the instruction pointer, an identity of the function being executed; and sending the identity of the function being executed to a performance analysis tool with the group of record packets. 15. The method of claim 11 , further comprising executing microcode, by the event-based sampler, to perform a series of signal operations that transmit the field data for the elements of the sampling record in a predetermined order to the processor tracer. 16. The method of claim 11 , further comprising: loading a reload value into a performance monitoring counter (PMC) register upon reset of the virtual machine; incrementing the PMC register after detecting each occurrence of the event as a result of execution of the plurality of instructions; detecting an occurrence

Assignees

Inventors

Classifications

  • using additional hardware · CPC title

  • based on the type or category of the network elements · CPC title

  • Monitoring specific for caches · CPC title

  • Event-based monitoring · CPC title

  • Hypervisor-specific management and integration aspects · CPC title

Patent family

Related publications grouped by family.

External sources

Frequently asked questions

Answers are generated from the same data shown on this page.

What does patent US9965375B2 cover?
A core includes a memory buffer and executes an instruction within a virtual machine. A processor tracer captures trace data and formats the trace data as trace data packets. An event-based sampler generates field data for a sampling record in response to occurrence of an event of a certain type as a result of execution of the instruction. The processor tracer, upon receipt of the field data: f…
Who is the assignee on this patent?
Intel Corp
What technology area does this patent fall under?
Primary CPC classification G06F9/45558. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue May 08 2018 00:00:00 GMT+0000 (Coordinated Universal Time) (B2). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 9 related publications on this page (citations in our corpus or others sharing the same primary CPC).