Trace Generation Circuitry for Branch Behavior Setting Instructions
Find Innovative SolutionsGenerate 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
Engineering 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
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.
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
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.
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
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.
Data Source
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.


