Trace management during aborted speculative operations

US11061807B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-11061807-B2
Application numberUS-201816235489-A
CountryUS
Kind codeB2
Filing dateDec 28, 2018
Priority dateDec 28, 2018
Publication dateJul 13, 2021
Grant dateJul 13, 2021

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 method for tracing software code executing on a core of a processor is described. The method includes generating a set of packets for a trace packet stream based on a main cycle counter, which maintains a count of cycles elapsing in the core since a packet was emitted into the trace packet stream, and a commit cycle counter, which maintains a cycle count in the core since the last commit operation, wherein the generating comprises (1) storing a value of the main cycle counter in the commit cycle counter in response to detecting a commit operation and (2) storing a value of the commit cycle counter in the main cycle counter in response to detecting an abort in the core; and emitting the set of packets from the processor into the trace packet stream for tracing execution of the software code.

First claim

Opening claim text (preview).

What is claimed is: 1. A method for tracing software code executing on a core of a processor, the method comprising: generating a set of packets for a trace packet stream based on a main cycle counter, which maintains a count of cycles elapsing in the core since a packet was emitted into the trace packet stream, and a commit cycle counter, which maintains a cycle count in the core since the last commit operation, wherein the generating comprises (1) storing a value of the main cycle counter in the commit cycle counter in response to detecting a commit operation and (2) storing a value of the commit cycle counter in the main cycle counter in response to detecting an abort in the core; emitting the set of packets from the processor into the trace packet stream for tracing execution of the software code; updating, during each cycle of the core, a main take-not-taken (TNT) buffer with indications of all conditional branches that retired during the cycle; setting, in response to a commit, a commit TNT buffer equal to the main TNT buffer; and setting, in response to an abort, the main TNT buffer equal to the commit TNT buffer. 2. The method of claim 1 , wherein generating the set of packets for the trace packet stream further comprises: generating a cycle packet for the trace packet stream with a value of the main cycle counter, in response to retiring an instruction of the software code; and resetting the main cycle counter in response to generating the cycle packet. 3. The method of claim 1 , wherein generating the set of packets for the trace packet stream further comprises: determining whether a cycle has elapsed in the core; and setting, in response to determining that a cycle has elapsed in the core, the value of the main cycle counter to the minimum of (1) one more than a current value of the main cycle counter and (2) a limit of the main cycle counter. 4. The method of claim 3 , wherein generating the set of packets for the trace packet stream further comprises: setting, in response to determining that a cycle has elapsed in the core, the value of the commit cycle counter to the minimum of (1) one more than a current value of the commit cycle counter and (2) a limit of the commit cycle counter. 5. The method of claim 4 , wherein generating the set of packets for the trace packet stream further comprises: determining whether the core is performing speculative instruction execution, wherein the setting the value of the commit cycle counter is to be performed in response to determining that the core is performing speculative instruction execution. 6. The method of claim 4 , wherein generating the set of packets for the trace packet stream further comprises: generating an overflow packet for the trace packet stream in response to setting the commit cycle counter to the limit of the commit cycle counter and thereafter detecting an abort. 7. The method of claim 1 , further comprising: storing, in a trace information buffer, the set of packets of the trace packet stream prior to emission from the processor; setting a commit pointer to point to a last packet in the set of packets that has been committed, wherein packets in the set of packets older than the last packet are available for emission from the processor and packets in the set of packets younger than the last packet are unavailable for emission from the processor; setting a write pointer to point to a next write point in the trace information buffer; and setting the write pointer to a position of the commit pointer upon an abort. 8. A non-transitory computer readable medium that stores instructions, which when executed by a processor, cause the processor to: generate a set of packets for a trace packet stream based on a main cycle counter, which maintains a count of cycles elapsing in a core of the processor since a packet was emitted into the trace packet stream, and a commit cycle counter, which maintains a cycle count in the core since the last commit operation, wherein the generating comprises (1) storing a value of the main cycle counter in the commit cycle counter in response to detecting a commit operation and (2) storing a value of the commit cycle counter in the main cycle counter in response to detecting an abort in the core, wherein generating the set of packets includes: determining whether a cycle has elapsed in the core, setting, in response to determining that a cycle has elapsed in the core, the value of the commit cycle counter to the minimum of (1) one more than a current value of the commit cycle counter and (2) a limit of the commit cycle counter, and generating an overflow packet for the trace packet stream in response to setting the commit cycle counter to the limit of the commit cycle counter and thereafter detecting an abort; and emit the set of packets from the processor into the trace packet stream for tracing execution of the software code. 9. The non-transitory computer readable medium of claim 8 , wherein, for generating the set of packets for the trace packet stream, the instructions further cause the processor to: generate a cycle packet for the trace packet stream with a value of the main cycle counter, in response to retiring an instruction of the software code; and reset the main cycle counter in response to generating the cycle packet. 10. The non-transitory computer readable medium of claim 8 , wherein, for generating the set of packets for the trace packet stream, the instructions further cause the processor to: set, in response to determining that a cycle has elapsed in the core, the value of the main cycle counter to the minimum of (1) one more than a current value of the main cycle counter and (2) a limit of the main cycle counter. 11. The non-transitory computer readable medium of claim 8 , wherein, for generating the set of packets for the trace packet stream, the instructions further cause the processor to: determine whether the core is performing speculative instruction execution, wherein the setting the value of the commit cycle counter is to be performed in response to determining that the core is performing speculative instruction execution. 12. The non-transitory computer readable medium of claim 8 , wherein the instructions further cause the processor to: store, in a trace information buffer, the set of packets of the trace packet stream prior to emission from the processor; set a commit pointer to point to a last packet in the set of packets that has been committed, wherein packets in the set of packets older than the last packet are available for emission from the processor and packets in the set of packets younger than the last packet are unavailable for emission from the processor; set a write pointer to point to a next write point in the trace information buffer; and set the write pointer to a position of the commit pointer upon an abort. 13. The non-transitory computer readable medium of claim 8 , wherein the instructions further cause the processor to: update, during each cycle of the core, a main take-not-taken (TNT) buffer with indications of all conditional branches that retired during the cycle; set, in response to a commit, a commit TNT buffer equal to the main TNT buffer; and set, in response to an abort, the main TNT buffer equal to the commit TNT buffer. 14. A system comprising: a trace decoder; and a processing core, including trace logic to manage a main cycle counter, which maintains a count of cycles elapsing in the processing core since a packet was emitted into a trace packet stream, and a commit cycle counter, which maintains a cycle count in the processing core sinc

Assignees

Inventors

Classifications

  • Timestamp · CPC title

  • Performance evaluation by tracing or monitoring · CPC title

  • Circuit details, i.e. tracer hardware · CPC title

  • Monitoring of transactions · CPC title

  • by tracing the execution of the program · 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 US11061807B2 cover?
A method for tracing software code executing on a core of a processor is described. The method includes generating a set of packets for a trace packet stream based on a main cycle counter, which maintains a count of cycles elapsing in the core since a packet was emitted into the trace packet stream, and a commit cycle counter, which maintains a cycle count in the core since the last commit oper…
Who is the assignee on this patent?
Intel Corp
What technology area does this patent fall under?
Primary CPC classification G06F11/3636. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Jul 13 2021 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 3 related publications on this page (citations in our corpus or others sharing the same primary CPC).