Hardware Watchpoint Random Branching Instrumentation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The increasing speed and functionality of processors make it difficult to efficiently collect dynamic behavior information of software applications due to the overhead of instrumentation and analysis code, which can significantly increase execution time and require costly sampling decisions.

Innovation Solution

A computing system that allocates a memory region for creating 'random branches' in computer code using existing memory access instructions, generating interrupts to transfer control flow to instrumentation code, and utilizing watchpoint registers to monitor and update pointers and data values, allowing for efficient collection of information without extensive hardware modifications.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If instrumentation code is added to collect dynamic behavior information, then measurement precision is improved, but execution time increases significantly

Engineering Contradiction:
Improvedynamic behavior information collectionVSAvoidexecution time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent implements periodic sampling of program execution states using watchpoints triggered at regular intervals or based on event conditions. Instead of continuous instrumentation, the system periodically checks specific memory locations or register states to collect dynamic behavior information, reducing the overhead while maintaining measurement accuracy through strategic sampling points.

Inventive Principle:
Principle #19Periodic action

Solution Approach 2:

The patent extracts only the essential information needed for dynamic behavior analysis by setting specific watchpoints on critical memory locations and registers. Rather than instrumenting the entire program, the system selectively monitors key variables and control flow points, extracting minimal but sufficient data to characterize application behavior without the overhead of full instrumentation.

Inventive Principle:
Principle #2Taking out (Extraction)

2Loss of time

If sampling decisions are made to reduce instrumentation overhead, then execution time is reduced, but the complexity of selecting when to execute instrumentation increases

Engineering Contradiction:
Improveexecution timeVSAvoidsampling decision process
Core Design Contradiction:
Loss of timeVSDevice complexity

Solution Approach 1:

The patent employs the processor's own hardware watchpoint mechanism to automatically generate interrupts when specified memory locations are accessed. This self-service approach eliminates the need for complex software-based sampling decision logic, as the hardware itself determines when instrumentation should execute based on pre-configured watchpoint conditions, reducing both time and decision-making complexity.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The patent introduces hardware watchpoints as an intermediary between the program execution and instrumentation activation. Instead of software logic directly deciding when to execute instrumentation, the watchpoint mechanism serves as a mediator that automatically triggers interrupts based on memory access patterns, simplifying the sampling decision process while maintaining control over instrumentation timing.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Ease of operation

If hardware watchpoints are used to reduce software complexity, then ease of operation is improved, but device complexity increases due to hardware circuitry requirements

Engineering Contradiction:
Improveinstrumentation setupVSAvoidhardware circuitry
Core Design Contradiction:
Ease of operationVSDevice complexity

Solution Approach 1:

The patent leverages existing hardware watchpoint resources that are already present in modern processors for multiple purposes: traditional debugging, performance monitoring, and now program instrumentation. By making these resources multi-functional, the system avoids adding dedicated instrumentation hardware while still achieving ease of operation through hardware-based automation.

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

Solution Approach 2:

The patent uses software-based memory access instructions to simulate or replicate the effect of hardware instrumentation. Instead of requiring specialized hardware circuits for every instrumentation function, the system uses standard memory operations combined with watchpoint interrupts to achieve similar effects, reducing hardware complexity while maintaining operational simplicity.

Inventive Principle:
Principle #26Copying

Data Source

PatentUS9483379B2Randomly branching using hardware watchpoints
Publication Date: 2016.11.01 ADVANCED MICRO DEVICES INC
  • US9483379B2 patent drawing
  • US9483379B2 patent drawing
  • US9483379B2 patent drawing

AI summary

A system and method for efficiently performing program instrumentation. A processor processes instructions stored in a memory. The processor allocates a memory region for the purpose of creating “random branches” in the computer code utilizing existing memory access instructions. When the processor processes a given instruction, the processor both accesses a first location in the memory region and may determine a condition is satisfied. In response, the processor generates an interrupt. The corresponding interrupt handler may transfer control flow from the computer program to instrumentation code. The condition may include a pointer storing an address pointing to locations within the memory region equals a given address after the point is updated. Alternatively, the condition may include an updated data value stored in a location pointed to by the given address equals a threshold value.