Cache Trace Logging by Reference to Reduce File Size
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing debugging technologies face challenges in efficiently recording and replaying program execution across multiple processing units due to high performance overhead and large trace file sizes, particularly when dealing with cache misses and data logging across multiple processor caches.
Innovation Solution
The solution involves modifying processor hardware and microcode to detect cache misses in lower-layer caches and utilize upper-layer shared caches to determine if data has already been logged by another processing unit, allowing for logging by reference rather than value, thereby reducing trace file size and performance impact.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If trace data is recorded for every cache miss in lower-layer caches, then trace accuracy is improved, but trace file size increases significantly
Solution Approach 1:
The patent merges trace recording across multiple processing units by having the upper-layer cache coordinate logging activities. When data is logged by one processing unit, other processing units can reference this existing log entry instead of creating duplicate entries, thereby reducing trace file size while maintaining complete trace coverage.
Solution Approach 2:
The upper-layer cache serves multiple functions: it acts as a standard cache for data storage and simultaneously serves as a coordination mechanism for trace recording. By checking the upper-layer cache, processing units can determine whether data has already been logged, enabling a universal logging reference system across all processing units.
2Reliability
If comprehensive trace recording is performed across all processing units, then debugging capability is improved, but performance overhead increases
Solution Approach 1:
The system performs preliminary checking of the upper-layer cache before logging data. This preliminary action determines whether logging is necessary, preventing redundant logging operations and reducing performance overhead while ensuring that all necessary trace data is captured for debugging.
3Device complexity
If trace recording is performed without coordination between processing units, then implementation simplicity is maintained, but trace redundancy increases
Solution Approach 1:
The upper-layer cache acts as an intermediary between multiple processing units for trace coordination. It provides a centralized reference point that all processing units can query to determine whether data has already been logged, eliminating the need for complex peer-to-peer coordination while reducing trace redundancy.
Data Source
Figure 1
Figure 2A~2B
Figure 3
AI summary
Trace recording based on recording an influx to a lower-level cache by reference to prior log data, based on knowledge of an upper-level cache. A computing device includes a plurality of processing units, a plurality of N-level caches, and an (N+i)-level cache that is a backing store for the N-level caches. Based on activity of a first processing unit, the computing device detects an influx of data to a first N-level cache. The computing device checks the (N+i)-level cache to determine if the data was already logged for a second processing unit. Based on the check, the computing device (i) causes the data to be logged for the first processing unit by reference to log data (i.e., when the data was already logged), or causes the data to be logged by value for the first processing unit (i.e., when the data was not already logged).