Java Stack Machine Dynamic Instrumentation via Register Monitoring

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing code instrumentation methods for Java applications result in code expansion and increased runtime overhead, leading to performance degradation and potential application timeouts, especially when used for monitoring purposes like Dynamic Adaptive Compilation and hotspot detection.

Innovation Solution

A processor-based system with a Java Stack Machine (JSM) that executes Java bytecodes and a complementary instruction set architecture (C-ISA) for efficient execution, incorporating software monitoring handlers that allow for dynamic instrumentation without code expansion, using a dual program counter mechanism to trigger and execute monitoring handlers during execution.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If code instrumentation is implemented by modifying the Java Virtual Machine or expanding code, then monitoring capability is improved, but runtime overhead increases and performance degrades

Engineering Contradiction:
Improvemonitoring capabilityVSAvoidruntime performance
Core Design Contradiction:
Measurement precisionVSProductivity

Solution Approach 1:

The system separates monitoring functionality from the main execution path by implementing software monitoring handlers that are triggered only when specific monitor values are detected in register values. This segmentation allows the JVM to execute normally without instrumentation overhead, while monitoring occurs asynchronously when needed.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces an intermediary mechanism using monitor values stored in processor registers that act as triggers. When the program counter equals a monitor value, a software monitoring handler is invoked. This intermediary approach enables monitoring without directly instrumenting the application code or modifying the JVM core execution path.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Adaptability or versatility

If code instrumentation is implemented by expanding code, then monitoring functionality is added, but code size increases and execution time increases

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

Solution Approach 1:

The system performs preliminary setup by storing monitor values in processor registers before execution begins. These pre-configured monitor values serve as triggers that require no additional processing during normal execution, eliminating the need for runtime code expansion or interpretation overhead.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The processor's existing register values and program counter mechanism are utilized for monitoring purposes without requiring external instrumentation infrastructure. The system leverages the processor's natural execution state (program counter and register values) to self-identify when monitoring should occur, eliminating the need for separate instrumentation code.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS8806459B2Java stack machine execution kernel dynamic instrumentation
Publication Date: 2014.08.12 TEXAS INSTRUMENTS INC
  • US8806459B2 patent drawing
  • US8806459B2 patent drawing
  • US8806459B2 patent drawing

AI summary

A method and system for performing dynamic instrumentation. At least some of the illustrative embodiments are methods comprising setting at least one monitor value (wherein the at least one monitor value is associated with a software monitoring handler), detecting a value within a register equal to the at least one monitor value, and executing the software monitoring handler based on the detecting.