Trace Unit Speculative Instruction Consistency

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Tracing speculative instructions in data processing systems can result in inconsistent trace data output due to cancellation of speculatively executed instructions, making it difficult to understand the actual processing activities.

Innovation Solution

A trace unit is implemented with trace circuitry and data storage to store and retrieve trace control data associated with executed instructions, using sticky values, previous-traced values, initial-traced values, and trace start/stop values to maintain trace consistency and accuracy even when speculative instructions are cancelled.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If speculative instructions are traced to improve processing speed analysis, then diagnostic capability is enhanced, but trace data consistency deteriorates due to instruction cancellation

Engineering Contradiction:
Improvetrace data consistencyVSAvoidprocessing speed
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The trace control data is saved in advance before speculative instruction execution begins. When speculation is cancelled, the pre-saved trace control data is restored, allowing the trace unit to quickly revert to the correct state without complex real-time adjustments, thus maintaining trace data consistency while supporting speculative execution for processing speed improvement

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

A trace control data storage unit is introduced as an intermediary between the trace unit and the speculative execution mechanism. This storage unit holds trace control data and enables the trace unit to retrieve or restore data as needed, decoupling the trace consistency from the speculative execution state and allowing both trace reliability and processing speed to coexist

Inventive Principle:
Principle #24Intermediary (Mediator)

2Measurement precision

If complete step-by-step activity is monitored to improve diagnostic accuracy, then measurement precision is enhanced, but data storage requirements increase prohibitively

Engineering Contradiction:
Improvediagnostic accuracyVSAvoidtrace data volume
Core Design Contradiction:
Measurement precisionVSQuantity of substance

Solution Approach 1:

Only the essential trace control data needed for maintaining diagnostic accuracy is extracted and stored, rather than storing complete step-by-step activity data. This selective extraction of critical control information maintains measurement precision while significantly reducing the quantity of data that needs to be stored and managed

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The trace unit applies different treatment to different types of instructions by storing trace control data selectively. Trace control data is saved and restored based on instruction groups and speculation status, rather than uniformly storing all instruction data, thus achieving high diagnostic accuracy for critical paths while minimizing overall data volume

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS9639361B2Tracing speculatively executed instructions
Publication Date: 2017.05.02 ARM LTD
  • US9639361B2 patent drawing
  • US9639361B2 patent drawing
  • US9639361B2 patent drawing

AI summary

A trace unit for generating items of trace data indicative of processing activities of a processor executing a stream of instructions, the unit includes trace circuitry for monitoring a behavior of the processor; storage circuitry for storing current trace control data for controlling the trace circuitry; a data store for storing at least some of the trace control data; the trace circuitry being configured to store the trace control data in the data store in response to detection of execution of the group of instructions, wherein the trace circuitry is responsive to detecting the at least one processor cancelling at least one group of the speculatively executed instructions to retrieve at least some of the trace control data stored in the data store for the group of instructions executed before the cancelled speculatively executed instructions and to store the retrieved trace control data in the storage circuitry.