Handle Tracking Code Insertion for Memory Leak Diagnosis

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current debugging environments for electronic system design face inefficiencies in tracking and managing handles or memory pointers during simulation, leading to resource-intensive or failed simulations due to retained references in test benches, which are impractical to diagnose manually, especially in large data spaces.

Innovation Solution

A computing system that tracks handles or memory pointers of class objects during simulation by inserting handle tracking code at relevant locations in the test bench source code, generating handle occupancies with reference information, and synchronizing these with the source code for visualization in a debug window, allowing designers to review and isolate issues.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If manual debugging methods are used to review test bench code and identify memory leaks, then debugging capability is maintained, but debugging efficiency deteriorates and time consumption increases significantly

Engineering Contradiction:
Improvedebugging capabilityVSAvoiddebugging time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent introduces an intermediary tool that automatically tracks handle occupancies and generates visual reports. This intermediary system bridges the gap between the test bench code and the debugger, automatically identifying memory leaks without requiring manual code review, thus maintaining debugging precision while significantly reducing time consumption.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent replaces the mechanical manual debugging process with an automated computational system. Instead of manually reviewing code lines and tracking memory allocations, the system automatically instruments the code to track handle occupancies, generates visual reports, and identifies memory leaks, substituting human manual labor with automated computational analysis.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

2Adaptability or versatility

If test benches dynamically generate class objects during simulation, then test bench functionality and coverage are improved, but memory consumption increases and resource management complexity worsens

Engineering Contradiction:
Improvetest bench functionalityVSAvoidmemory consumption
Core Design Contradiction:
Adaptability or versatilityVSQuantity of substance

Solution Approach 1:

The patent implements a feedback mechanism that continuously monitors handle occupancies during simulation. The system tracks which handles are active, which are deleted, and identifies any handles that are improperly retained. This feedback loop provides real-time information about memory usage patterns, enabling automatic detection of memory leaks and improper resource management in dynamically generated test bench objects.

Inventive Principle:
Principle #23Feedback

3Ease of operation

If garbage collection functionality is relied upon to free memory, then automatic memory management is achieved, but memory leaks from retained handles cause simulation performance to deteriorate

Engineering Contradiction:
Improveautomatic memory managementVSAvoidsimulation performance
Core Design Contradiction:
Ease of operationVSProductivity

Solution Approach 1:

The patent introduces an intermediary tracking system that monitors handle occupancies between the test bench code and the garbage collection mechanism. This intermediary layer identifies when handles are improperly retained and prevents them from being automatically collected, allowing the system to maintain automatic memory management while preventing performance degradation from memory leaks.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS10019337B2Class object handle tracking
Publication Date: 2018.07.10 SIEMENS INDUSTRY SOFTWARE INC
  • US10019337B2 patent drawing
  • US10019337B2 patent drawing
  • US10019337B2 patent drawing

AI summary

This application discloses a computing system to identify portions of source code in a test bench that correspond to class objects, and insert handle tracking code at locations in the test bench associated with the identified portions of source code. During simulation of the test bench, the computing system can execute the handle tracking code, which generates handle occupancies corresponding to memory pointers associated with the class objects. Each of the handle occupancies can include a handle reference or memory pointer for a class object, a location in the test bench corresponding to usage of the memory pointer, and a simulation time associated with the generation of the handle occupancy. The computing system can arrange the handle occupancies, synchronize the handle occupancies to portions of source code in the test bench, and display the handle occupancies and the test bench source code in a debug window.