Software Synthesized Performance Counters for Multi-Core Bottleneck Detection
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Traditional profiling tools fail to effectively detect bottlenecks in modern multi-core, multi-threaded systems, particularly in the memory subsystem, and do not provide mechanisms to operate on context-specific data, leading to inefficiencies in performance analysis and optimization.
Innovation Solution
A system and method that synthesizes performance-related counters in software using data collected from a hardware event agent, including a hardware event agent and software event agents, to monitor and profile computing systems, allowing for the detection of bottlenecks and optimization of code and data structures by analyzing data motion and context-specific costs.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If hardware event counters are provided in advanced processor implementations, then performance monitoring capability is improved, but device complexity and cost increase
Solution Approach 1:
The patent creates software copies of hardware event counters by synthesizing counter values from sampled instruction execution data. The software synthesized counters replicate the functionality of hardware counters without requiring additional hardware components, thereby maintaining measurement precision while reducing device complexity and cost.
Solution Approach 2:
The patent replaces the mechanical/hardware counter system with a software-based synthesis system. Instead of using physical hardware event counters that increment with each processed instruction, the system uses software algorithms to calculate and synthesize counter values from sampled execution data, eliminating the need for complex hardware while preserving the monitoring capability.
2Loss of information
If code instrumentation techniques are used to profile code, then profiling data is obtained, but overhead is imposed on original program code and behavior may be altered
Solution Approach 1:
The patent extracts only the essential information needed for profiling from the program execution by sampling instruction execution at specific points. Instead of instrumenting every instruction with profiling code, the system extracts key execution characteristics from a representative sample, reducing the impact on original program behavior while maintaining sufficient profiling data completeness.
Solution Approach 2:
The patent applies partial action by sampling only a portion of instruction executions rather than monitoring every single instruction. This partial sampling approach reduces the overhead imposed on the original program code and minimizes behavior alteration, while still gathering sufficient data to derive accurate synthesized counter values through statistical analysis.
3Measurement precision
If hardware event counters are used for every performance measurement, then measurement precision is improved, but cost and resource consumption increase
Solution Approach 1:
The patent makes a single hardware sampling mechanism universal by using it to gather data for multiple synthesized counters simultaneously. The sampled instruction execution data is processed to derive multiple different performance metrics (instruction counts, cycle counts, cache miss counts, etc.), allowing one hardware resource to support multiple measurement functions, thereby reducing overall hardware resource consumption while maintaining measurement precision.
Solution Approach 2:
The patent creates multiple software copies of counter functionality from a single hardware sampling source. Instead of implementing separate hardware counters for each performance metric, the system synthesizes multiple counter types through software processing of the sampled data, reducing hardware resource consumption while preserving the accuracy and precision of each individual measurement.
Data Source
AI summary
A system and method for performance monitoring may use data collected from a hardware event agent comprising a hardware sampling mechanism and/or one or more hardware counters to increment one or more synthesized performance counters by an amount dependent on an expression involving the collected data. Each synthesized performance counter may be configured to count events of a different type and may comprise a machine addressable storage location. The event types may include various memory references or misses, branches, branch mispredictions, or any other event of interest in performance monitoring. The hardware event agent may comprise one or more instruction counters, cycle counters, timers, or other hardware performance counters. One hardware performance counter may be used in a time-multiplexed or data-multiplexed manner to monitor events of multiple event types. The hardware sampling mechanism may return a statistical packet for sampled instructions, which may be examined to determine the event type.


