Non-Precise Event Based Sampling for Processor Monitoring
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current performance monitoring mechanisms for processing devices are limited in managing non-precise events, as they require performance monitoring interrupts (PMIs) which can lead to incorrect instruction pointer capture and increased overhead, especially when interrupts are masked, affecting system stability and security.
Innovation Solution
The introduction of a Non-Precise Event Based Sampling (NPEBS) module that allows the generation of PEBS records for non-precise events without using PMIs, enabling the capture of architectural metadata without interrupting the system and reducing the number of interrupts needed for sampling.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If performance monitoring interrupts (PMIs) are used to capture non-precise events, then performance monitoring can be achieved, but system stability deteriorates and overhead increases due to incorrect instruction pointer capture and increased interrupt frequency
Solution Approach 1:
The patent extracts the performance monitoring function from the interrupt mechanism by introducing a dedicated performance monitoring unit (PMU) that can capture non-precise events directly without triggering PMIs. The PMU includes separate capture logic for precise and non-precise events, allowing non-precise event monitoring to proceed independently of the interrupt system, thereby eliminating the stability issues caused by PMI-based capture.
Solution Approach 2:
The patent introduces an intermediary mechanism - the performance monitoring unit with its own event capture logic and buffer - that mediates between the non-precise events and the performance monitoring software. This intermediary captures events using architectural state information without requiring PMIs, thus preventing the harmful effects of incorrect instruction pointer capture while maintaining monitoring accuracy.
2Measurement precision
If performance monitoring interrupts (PMIs) are used to sample non-precise events, then event detection can be performed, but overhead increases due to the large number of interrupts required
Solution Approach 1:
The patent extracts the event detection function from the interrupt system by implementing a dedicated performance monitoring unit that can detect and capture non-precise events directly. The PMU maintains separate capture logic for precise and non-precise events, allowing continuous monitoring without generating interrupts, thereby eliminating the energy overhead associated with frequent PMIs.
Solution Approach 2:
The performance monitoring unit serves itself by implementing internal capture logic that does not require external interrupt intervention. The unit can autonomously capture non-precise events using architectural state information and store them in buffers, eliminating the need for software-driven PMI handling and reducing the overall monitoring overhead.
3Reliability
If performance monitoring interrupts are masked to improve system stability, then system stability improves, but performance monitoring capability deteriorates because PMIs cannot be delivered
Solution Approach 1:
The patent introduces an intermediary performance monitoring unit that captures events directly without requiring interrupt delivery. The PMU monitors architectural state information and captures non-precise events independently of the interrupt system, allowing performance monitoring to continue even when PMIs are masked, thus resolving the contradiction between system stability and monitoring capability.
Solution Approach 2:
The patent segments the performance monitoring function into independent capture logic for precise and non-precise events within the PMU. This segmentation allows non-precise event capture to operate independently from the PMI mechanism, enabling monitoring capability to be maintained separately from interrupt delivery, so masking PMIs does not affect non-precise event monitoring.
Data Source
AI summary
Embodiments disclosed herein provide for monitoring performance of a processing device to manage non-precise events. A processing device includes a performance counter to track a non-precise event and to increment upon occurrence of the non-precise event, wherein the non-precise event comprises a first type of performance event that is not linked to an instruction in an instruction trace. The processing device also includes a first handler circuit to generate and store a first record, the first record comprising architectural metadata defining a state of the processing device at a time of generation of the first record, wherein the first handler circuit to generate records corresponding to precise events. The processing device further includes a second handler circuit communicably coupled to the first handler circuit, the second handler circuit to cause the first handler circuit to generate a second record for the non-precise event upon overflow of the performance counter.


