Trace Generation Circuitry for Branch Behavior Setting Instructions

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The presence of branch behavior setting instructions disrupts the ability to accurately trace the execution behavior of processing circuitry using traditional trace stream approaches, as these instructions can cause arbitrary instructions to branch, leading to incorrect interpretation of instruction flow changes.

Innovation Solution

An apparatus and method that generate a trace stream with additional trace elements to indicate the execution of branch behavior setting instructions and their triggered branch behaviors, allowing the trace analyser to correctly interpret the sequence of instructions executed by the processing circuitry, even when branch behavior setting instructions are present.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Quantity of substance

If trace elements are only produced for certain predetermined instructions (reduced volume approach), then the volume of trace information is reduced, but the ability to accurately trace execution behavior is compromised when branch behaviour setting instructions are present

Engineering Contradiction:
Improvevolume of trace informationVSAvoidaccuracy of tracing execution behavior
Core Design Contradiction:
Quantity of substanceVSMeasurement precision

Solution Approach 1:

The trace generation circuitry proactively generates trace elements for branch behaviour setting instructions when they are executed, before the actual branch occurs. This preliminary tracing action ensures that when arbitrary instructions later trigger branches through the branch behaviour setting mechanism, the trace analyser has advance knowledge of this special branch type and can correctly interpret the instruction flow changes, maintaining measurement precision while keeping the trace volume reduced.

Inventive Principle:
Principle #10Preliminary action

2Device complexity

If traditional trace stream approach is used without additional trace elements for branch behavior setting instructions, then the trace stream remains compact, but correct interpretation of instruction flow changes becomes unreliable

Engineering Contradiction:
Improvesimplicity of trace streamVSAvoidreliability of tracing
Core Design Contradiction:
Device complexityVSReliability

Solution Approach 1:

The invention introduces trace elements as intermediary markers in the trace stream that mediate between the branch behaviour setting instruction and the subsequent branch execution. These trace elements carry specific information about the branch behaviour setting, acting as a communication bridge that allows the trace analyser to correctly interpret instruction flow changes caused by arbitrary instructions, thereby maintaining reliability without significantly increasing trace stream complexity.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Loss of information

If trace elements are generated for all instructions, then complete instruction execution information is captured, but the volume of trace information becomes excessively large

Engineering Contradiction:
Improvecompleteness of instruction execution informationVSAvoidvolume of trace information
Core Design Contradiction:
Loss of informationVSQuantity of substance

Solution Approach 1:

The trace generation circuitry applies local quality by selectively generating trace elements based on the specific characteristics of instructions executed. Instead of uniformly tracing all instructions or only predetermined types, the circuitry locally adapts its tracing behavior to generate elements for branch behaviour setting instructions when encountered, capturing necessary information about these special instructions while maintaining the reduced volume approach for other instructions.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS11561882B2Apparatus and method for generating and processing a trace stream indicative of instruction execution by processing circuitry
Publication Date: 2023.01.24 ARM LTD
  • US11561882B2 patent drawing
  • US11561882B2 patent drawing
  • US11561882B2 patent drawing

AI summary

An apparatus and method are provided for generating and processing a trace stream indicative of instruction execution by processing circuitry. An apparatus has an input interface for receiving instruction execution information from the processing circuitry indicative of a sequence of instructions executed by the processing circuitry, and trace generation circuitry for generating from the instruction execution information a trace stream comprising a plurality of trace elements indicative of execution by the processing circuitry of instruction flow changing instructions within the sequence. The sequence may include a branch behaviour setting instruction that indicates an identified instruction within the sequence, where execution of the branch behaviour setting instruction enables a branch behaviour to be associated with the identified instruction that causes the processing circuitry to branch to a target address identified by the branch behaviour setting instruction when the identified instruction is encountered in the sequence. The trace generation circuitry is further arranged to generate, from the instruction execution information, a trace element indicative of execution behaviour of the branch behaviour setting instruction, and a trace element to indicate that the branch behaviour has been triggered on encountering the identified instruction within the sequence. This enables a very efficient form of trace stream to be used even in situations where the instruction sequence executed by the processing circuitry includes such branch behaviour setting instructions.