CPU Execution History Tracing via Trace Buffer Segmentation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing debugging systems face challenges in recording trace information without loss, especially when multiple events occur simultaneously, and in presenting this information in a user-friendly format that distinguishes between branch and data access executions.
Innovation Solution
A method involving a tracing system that records execution history for each instruction cycle in a semiconductor device, using a trace buffer to store target information and employing software-based data sorting to group trace information by instruction execution, allowing for the presentation of trace information in a format arranged for each branch and data access execution.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Loss of information
If trace information is recorded for multiple simultaneous events, then information completeness is improved, but data organization complexity increases
Solution Approach 1:
The patent segments trace information by creating separate storage areas within the trace buffer for different event types (branch events, data access events, etc.). Each event type is recorded in a dedicated region, allowing simultaneous events to be captured without mixing or loss, while simplifying subsequent processing by maintaining clear organizational boundaries.
Solution Approach 2:
The patent introduces a trace buffer as an intermediary data structure that temporarily holds trace information from multiple simultaneous events. This buffer acts as a mediator between the complex event generation process and the simpler analysis process, absorbing the complexity of simultaneous events while presenting organized data for debugging.
2Ease of operation
If trace information is organized for each event type, then user understanding is improved, but recording complexity increases
Solution Approach 1:
The trace buffer is segmented into distinct regions for different event types (branch, data access, etc.). Each region stores events of its type in a consistent format, making it easy for users to understand and analyze specific event categories without being confused by mixed event types. The segmentation handles recording complexity internally while presenting simplicity to the user.
Solution Approach 2:
Different regions of the trace buffer have specialized structures optimized for their specific event types. Branch event regions use formats suitable for control flow analysis, while data access regions use formats optimized for memory operation analysis. This local optimization improves user understanding for each event type while the overall system manages recording complexity through standardized buffer management.
Data Source
AI summary
An execution history tracing method includes tracing an execution history of a CPU upon executing, in a semiconductor device including the CPU, a program by using the CPU, for one or a tracing target, from outside the semiconductor device via software. The execution history tracing method includes recording, in a buffer, target information as trace information about an execution of the one or the tracing target, for each instruction cycle in which the target information is produced as the execution history; and performing data sorting by using the software to group the trace information about the execution of the one or the tracing target, the trace information being recorded for the each instruction execution cycle, for each of the one or the tracing target.


