Selective Program Instrumentation for Performance Overhead
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current methods for determining performance overhead attributed to instrumentation in computer programs are inefficient, as they require manual trial and error to assess and adjust instrumentation, leading to suboptimal performance and difficulty in attributing overhead to specific segments.
Innovation Solution
An overhead assessment system that dynamically identifies instruction counts and runtime coverage for separate functions, generating overhead scores to attribute performance overhead to instrumentation, and selectively modifies instrumentation based on predefined thresholds to improve program performance.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If instrumentation is added indiscriminately to each function, then functionality and security are improved, but overall program performance deteriorates due to increased overhead
Solution Approach 1:
The system applies different instrumentation strategies to different functions based on their individual performance characteristics. Instead of uniform instrumentation, the system identifies functions with high performance impact and applies instrumentation selectively only to those functions, allowing each function to have appropriate instrumentation level tailored to its specific needs and performance profile
2Productivity
If manual trial and error is used to adjust instrumentation, then overhead can be reduced, but the process becomes inefficient and suboptimal
Solution Approach 1:
The system automatically measures performance overhead by executing the program with and without instrumentation, dynamically identifies which functions have the highest performance impact, and autonomously determines the optimal instrumentation strategy without requiring manual intervention. The system self-adjusts instrumentation based on measured data, eliminating the need for manual trial and error processes
Solution Approach 2:
The system implements a feedback loop where performance metrics are collected during program execution, the system analyzes which functions have the highest overhead, and automatically adjusts instrumentation accordingly. This closed-loop feedback mechanism continuously optimizes instrumentation based on actual performance data rather than relying on manual estimation
3Reliability
If instrumentation is integrated alongside source code, then functionality is enhanced, but attributing overhead to specific segments becomes difficult
Solution Approach 1:
The system segments the program into individual functions and measures performance overhead at the function level. By breaking down the program structure into discrete functional units, the system can attribute overhead to specific functions rather than the entire program. This segmentation enables precise identification of which functions benefit most from instrumentation and which have the highest performance impact
Data Source
AI summary
System, methods, and other embodiments described herein relate to determining performance overhead for instrumentation within a program. In one embodiment, a method includes, in response to compiling the program from source code into machine code, analyzing the program to generate overhead scores associated with segments of instrumentation within separate functions of the program. The instrumentation is combined with the source code to provide functionality in addition to a base functionality of the program. The method includes selectively modifying the segments in the source code for the separate functions according to whether the overhead scores for respective ones of the segments satisfies an instrumentation threshold associated with respective ones of the separate functions.


