Dynamic Instrumentation via Synchronization Mechanism

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current profiling systems for computer programs require navigating decision trees to switch between instrument functionalities, which impacts execution time and can be resource-intensive, especially in virtual machines with size restrictions.

Innovation Solution

The use of a synchronization mechanism, such as a volatile or synchronized field, allows for dynamic updating of instrumentation without a decision tree structure, enabling atomic and thread-visible updates, and the implementation of static instrumentation calls to reduce footprint and allow larger routines to be instrumented.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If multiple instrument routines are inserted into target program routines to provide different profiling functionality, then instrument versatility is improved, but execution time increases due to decision tree navigation

Engineering Contradiction:
Improveinstrument functionalityVSAvoidexecution time
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

Solution Approach 1:

The patent applies dynamics by making the instrument selection process dynamic rather than static. Instead of navigating a decision tree at runtime, the system dynamically updates a synchronization field (volatile or synchronized) that directly references the current instrument implementation. This allows the target program to directly call the appropriate instrument routine without conditional logic, resolving the contradiction between versatility and execution time.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The synchronization field acts as an intermediary between the target program and multiple instrument routines. Rather than the target program containing decision logic to select among multiple instruments, the synchronization field mediates by holding a reference to the currently selected instrument, simplifying the call path while maintaining access to multiple instrument functionalities.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If large routines are instrumented with multiple or large instrument calls, then profiling coverage is improved, but virtual machine routine size restrictions are violated

Engineering Contradiction:
Improveprofiling coverageVSAvoidroutine size
Core Design Contradiction:
ReliabilityVSLength of stationary object

Solution Approach 1:

The patent extracts the instrument selection logic from within the target program routines. By removing the decision tree structure from the instrumented code and placing it in the external instrumentation system (which updates the synchronization field), the routine size overhead is minimized. Only a single lightweight call to the instrument routine remains in the target code, well within virtual machine size restrictions.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

A single instrument routine call serves multiple profiling purposes through the synchronization field mechanism. The same instrument call infrastructure supports different profiling functionalities by changing which instrument implementation is referenced in the synchronization field, eliminating the need for multiple separate instrument call paths in the target code.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Data Source

PatentUS10372581B1Instrumentation of program code for dynamic analysis
Publication Date: 2019.08.06 QUEST SOFTWARE INC
  • US10372581B1 patent drawing
  • US10372581B1 patent drawing
  • US10372581B1 patent drawing

AI summary

Systems and methods for using a synchronization mechanism to dynamically update instrumentation during program execution are described herein. Using the synchronization mechanism, a decision tree structure of instruments can be avoided, saving processing resources. The synchronization mechanism can be a field or the like that is declared using a synchronization primitive. For example, the synchronization primitive can be a volatile or synchronized keyword in some programming languages. The field can refer to a currently-selected instrument implementation, thereby avoiding using a decision-tree structure to find a desired instrument implementation.