Memory Leak Diagnosis via Call Path Intersection
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional execution profile techniques cannot determine why an object's memory consumption is problematic or how it became problematic, limiting the ability to identify and address memory leaks in programs.
Innovation Solution
A method that acquires and compares call paths related to object creation and connection, identifying a common part between these paths to determine the cause of memory consumption, which involves storing IDs corresponding to these call paths and calculating their intersection to pinpoint memory issues.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If conventional execution profile techniques are used to trace object creation and method call stacks, then the user can identify problematic objects and their creation paths, but the user cannot understand why the object stays in memory or how it became problematic
Solution Approach 1:
The system performs preliminary actions by recording not only object creation call stacks but also subsequent method calls that reference the object throughout its lifecycle. This preliminary recording of comprehensive call history enables later analysis of why objects remain in memory without requiring additional instrumentation during problem diagnosis.
Solution Approach 2:
The system implements feedback by analyzing recorded call stack information to generate insights about memory retention patterns. The analysis feedback includes identifying which methods hold references to objects, the duration objects remain in memory, and the paths through which objects flow between methods, thereby explaining why objects become problematic.
2Measurement precision
If the system records detailed call stacks for every object creation and reference, then the user can comprehensively analyze memory usage patterns, but the overhead at the time of execution profile acquisition increases
Solution Approach 1:
The system extracts only the essential call stack information needed for memory analysis - specifically the creation call stack and subsequent reference call stacks - rather than recording all possible execution details. This selective extraction maintains analytical comprehensiveness while reducing the volume of recorded data and associated overhead.
Solution Approach 2:
The system creates simplified copies of call stack information in the form of object IDs and associated method reference data, rather than maintaining complete and complex call stack traces for every object. This copying approach preserves the necessary information for memory pattern analysis while reducing storage requirements and processing overhead.
Data Source
AI summary
A method of holding information for identifying a cause for an object becoming problematic and presenting the information to a user. The method ascertains the cause of memory consumption by a program in a computer system. This method includes: acquiring a first call path related to the creation of an object from a memory; acquiring a second call path related to the connection to the object from the memory; and determining a common part of the acquired first and second call paths, wherein the common part indicates the cause in the program.


