Context-Enriched Class Names for Heap Dump Error Diagnosis
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Identifying errors in executable programs, particularly memory leaks, is challenging due to the absence of context information in heap dumps, making it difficult for service teams to determine how program objects are being used when errors occur.
Innovation Solution
A method that inserts an object reference into suspected program code, generates a new class name using context information, and creates a record in computer memory, allowing for the inclusion of context information in heap dumps to facilitate error location.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If heap dump is created to capture program state at error occurrence, then error diagnosis capability is improved, but context information about program object usage is lost
Solution Approach 1:
The system performs preliminary actions by inserting object references and generating context-enriched class names before the error occurs. During normal program execution, the system proactively instruments the code to capture usage context, so that when an error happens, the context information is already embedded in the heap dump data structures, eliminating the need for post-error investigation.
Solution Approach 2:
The system introduces an intermediary mechanism - context information capture and processing module - that sits between the program execution and the heap dump generation. This intermediary enriches the standard heap dump data with context information by generating new class names that encode usage patterns, thereby preserving context information that would otherwise be lost.
2Measurement precision
If context information is added to heap dumps, then error identification accuracy is improved, but heap dump complexity increases
Solution Approach 1:
Instead of adding comprehensive context information to all objects in the heap dump, the system applies local quality by selectively enriching only those objects that are relevant to error diagnosis. The context information is embedded locally in the class names of specific objects that are suspected of causing errors, rather than uniformly across the entire heap dump structure.
Solution Approach 2:
The system changes the parameter of class names from simple type identifiers to context-enriched identifiers that include usage information. By transforming the class name parameter to include contextual descriptors, the system encodes additional information without adding separate data structures, thereby improving error identification while maintaining relative structural simplicity.
3Reliability
If object references are instrumented with context information, then program object usage tracking is improved, but program code complexity increases
Solution Approach 1:
The system implements self-service by having the program objects automatically generate and maintain their own context information. Each object reference instruments itself to capture usage context and encode it in its class name, eliminating the need for external instrumentation code. The objects serve their own diagnostic needs by autonomously tracking and reporting their usage patterns.
Data Source
AI summary
A method and apparatus for locating errors is disclosed. A computer inserts an object reference into program code suspected of causing an error, the object reference having an initial class name. Responsive to execution of the program code, the computer generates a new class name for the object reference comprising the context information. The computer sets an object with the new class name as the object reference inserted into the program code suspected of causing the error, wherein the new class name of the object is located in computer memory in use by the executing program code. The computer then creates a record of the computer memory in use by the executing program code, the record including the context information in the form of the new class name of the object.


