Just-in-time Dynamic Instrumentation for Software Systems
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional dynamic instrumentation techniques for software systems are impractical due to performance overhead, require root privileges, and lack the ability to easily activate or deactivate instrumentation from user-space applications, making them inefficient for runtime diagnosis.
Innovation Solution
A just-in-time dynamic instrumentation method that registers probe handlers in an inactive state, allowing for activation and deactivation based on tags, enabling flexible and efficient instrumentation without altering the software system's execution flow.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If conventional dynamic instrumentation is implemented using an operating system kernel module, then instrumentation functionality is provided, but performance overhead increases and root privileges are required
Solution Approach 1:
The patent implements dynamic instrumentation by allowing probe handlers to be registered in an inactive state and activated only when needed. This dynamic approach enables the system to switch between instrumented and non-instrumented states, reducing performance overhead during normal operation while maintaining instrumentation capability when required for diagnosis.
Solution Approach 2:
The patent changes the operational state parameter of probe handlers from permanently active to dynamically controllable. By introducing activation and deactivation mechanisms, the system can adjust the instrumentation state based on diagnostic needs, thereby optimizing the balance between functionality and performance overhead.
2Reliability
If conventional dynamic instrumentation is implemented using an operating system kernel module, then instrumentation functionality is provided, but ease of operation deteriorates due to requiring root privileges and inability to activate from user-space
Solution Approach 1:
The patent segments the instrumentation system into kernel-space probe handler registration and user-space activation control. This separation allows user-space applications to activate and deactivate instrumentation without requiring root privileges, while the kernel module maintains the actual instrumentation functionality. The segmentation resolves the contradiction by enabling easy user-space operation while preserving kernel-level functionality.
Solution Approach 2:
The patent introduces an intermediary mechanism that allows user-space applications to control kernel-space instrumentation. The activation and deactivation requests from user-space are mediated through the kernel interface, enabling ease of operation from user-space while maintaining the reliability of kernel-level instrumentation functionality.
3Loss of information
If instrumentation is activated continuously, then diagnostic information is always available, but performance overhead increases
Solution Approach 1:
The patent implements periodic activation of instrumentation through on-demand activation and deactivation. Instead of continuous instrumentation, the system activates probe handlers only when diagnostic information is needed and deactivates them when not needed, creating a periodic pattern of instrumentation that reduces overall performance overhead while maintaining information availability when required.
Solution Approach 2:
The patent makes the instrumentation state dynamic rather than static. Probe handlers can be activated and deactivated based on diagnostic needs, allowing the system to adapt the level of instrumentation dynamically. This dynamic approach ensures diagnostic information is available when needed while minimizing performance overhead during normal operation.
4Productivity
If probe handlers are registered in an inactive state, then performance overhead is reduced, but instrumentation functionality is not immediately available
Solution Approach 1:
The patent applies preliminary action by pre-registering probe handlers in an inactive state. The probe handlers are prepared and registered in advance but remain inactive until activation is requested. This preliminary registration reduces the overhead of activation while ensuring that the instrumentation functionality is ready to be activated immediately when needed, resolving the contradiction between performance and availability.
Data Source
AI summary
Just-in-time dynamic instrumentation of a running software system may be achieved by registering one or more instrumentation probe handlers in an inactive state wherein the probe handlers reside in a memory space associated with the software system but are not instrumented into the software system. The probe handlers may each have one or more probe handler tags representing categories to which the probe handlers have been assigned. Tag query requests are periodically received and processed in order to provide information to a caller about registered probe handlers associated with a probe handler tag specified in the tag query request. A probe handler activation request can be made by specifying a probe handler or a probe handler tag. The request can be processed by placing the specified probe handler, or probe handlers associated with the tag, in an active state. The software system thus becomes dynamically instrumented to execute the probe handler(s) as part of the software system's execution flow. The activated probe handler(s) may be returned to the inactive state in response to a probe handler deactivation request specifying a probe handler or a probe handler tag.


