Memory Leak Diagnosis via Call Path Intersection

Resolve Bottlenecks,
Find Innovative Solutions
Generate 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

VSEngineering 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

Engineering Contradiction:
Improveability to identify problematic objectsVSAvoidlack of information about memory retention cause
Core Design Contradiction:
Measurement precisionVSLoss of information

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.

Inventive Principle:
Principle #10Preliminary action

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.

Inventive Principle:
Principle #23Feedback

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

Engineering Contradiction:
Improvecomprehensiveness of memory analysisVSAvoidexecution profile acquisition overhead
Core Design Contradiction:
Measurement precisionVSLoss of time

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.

Inventive Principle:
Principle #2Taking out (Extraction)

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.

Inventive Principle:
Principle #26Copying

Data Source

PatentUS10031840B2Method of ascertaining primary cause of memory consumption in program, and computer system and computer program for the same
Publication Date: 2018.07.24 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US10031840B2 patent drawing
  • US10031840B2 patent drawing
  • US10031840B2 patent drawing

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.