Method and system for analyzing memory leaks occurring in java virtual machine data storage heaps

Uloženo v:
Podrobná bibliografie
Název: Method and system for analyzing memory leaks occurring in java virtual machine data storage heaps
Patent Number: 7,979,748
Datum vydání: July 12, 2011
Appl. No: 12/756508
Application Filed: April 08, 2010
Abstrakt: A plurality of heap dump requests associated with an operating virtual machine (VM) program is received from a VM profiler interface module at a heap dump request processing module. In response to receipt of each heap dump request at the heap dump request processing module, a dynamic modifiable library identified within a dynamic modifiable configuration file is loaded into a memory, where the dynamic modifiable library comprises instructions associated with processing a current heap dump request. The instructions associated with processing the current heap dump request are executed. The dynamic modifiable library is unloaded from the memory. A plurality of heap dump files and a plurality of object movement event files generated by execution of the instructions are analyzed. A memory leak associated with the operating VM program is automatically identified based upon the analyzed plurality of heap dump files and the plurality of object movement event files.
Inventors: Brady, Michael J. (Gosford, AU)
Assignees: International Business Machines Corporation (Armonk, NY, US)
Claim: 1. A method, comprising: receiving, at a heap dump request processing module, a plurality of heap dump requests associated with an operating virtual machine (VM) program from a VM profiler interface module; in response to receipt of each heap dump request at the heap dump request processing module: loading a dynamic modifiable library identified within a dynamic modifiable configuration file into a memory, where the dynamic modifiable library comprises instructions associated with processing a current heap dump request; executing the instructions associated with processing the current heap dump request; and unloading the dynamic modifiable library from the memory; analyzing a plurality of heap dump files and a plurality of object movement event files generated by execution of the instructions; and automatically identifying a memory leak associated with the operating VM program based upon the analyzed plurality of heap dump files and the plurality of object movement event files.
Claim: 2. The method of claim 1 , where executing the instructions associated with processing the current heap dump request comprises: generating one of the plurality of heap dump files, each associated with one of the plurality of heap dump requests, and where each of the plurality of heap dump files comprises memory objects previously allocated by the operating VM program; and generating, beginning with a second of the plurality of heap dump requests, one of the plurality of object movement event files that identifies memory objects associated with the operating VM program moved within the memory relative to a previous heap dump request.
Claim: 3. The method of claim 1 , where executing the instructions associated with processing the current heap dump request comprises: switching an event handler control block to point to the loaded dynamic modifiable library; obtaining compiled instructions from the loaded dynamic modifiable library, where the obtained compiled instructions indicate to issue additional heap dump requests; and issuing, via the heap dump request processing module, the additional heap dump requests.
Claim: 4. The method of claim 3 , further comprising restoring the event handler control block to point to the heap dump request processing module upon completion of issuing, via the heap dump request processing module, the additional heap dump requests.
Claim: 5. The method of claim 1 , further comprising changing at least one of the dynamic modifiable library and the dynamic modifiable configuration file between at least two of the plurality of heap dump requests.
Claim: 6. The method of claim 1 , where automatically identifying a memory leak associated with the operating VM program based upon the analyzed plurality of heap dump files and the plurality of object movement event files comprises automatically identifying the memory leak without requiring multiple shutdown and restart actions of the operating VM program.
Claim: 7. The method of claim 1 , where executing the instructions associated with processing the current heap dump request comprises: determining whether each memory object within each of the plurality of heap dump files exists within an object tracker cache; adding each memory object within each of the plurality of heap dump files determined not to exist within the object tracker cache to the object tracker cache; and incrementing a generation counter for each of the memory objects determined to exist within the object tracker cache.
Claim: 8. The method of claim 7 , where automatically identifying a memory leak associated with the operating VM program based upon the analyzed plurality of heap dump files and the plurality of object movement event files comprises automatically identifying a memory object within the object tracker cache with a generation counter associated with the memory object of at least a specific generation number.
Claim: 9. A system, comprising: a memory; and a processor programmed to execute a heap dump request processing module and to: receive a plurality of heap dump requests associated with an operating virtual machine (VM) program from a VM profiler interface module; in response to receipt of each heap dump request: load a dynamic modifiable library identified within a dynamic modifiable configuration file into the memory, where the dynamic modifiable library comprises instructions associated with processing a current heap dump request; execute the instructions associated with processing the current heap dump request; and unload the dynamic modifiable library from the memory; analyze a plurality of heap dump files and a plurality of object movement event files generated by execution of the instructions; and automatically identify a memory leak associated with the operating VM program based upon the analyzed plurality of heap dump files and the plurality of object movement event files.
Claim: 10. The system of claim 9 , where, in being programmed to execute the instructions associated with processing the current heap dump request, the processor is programmed to: generate one of the plurality of heap dump files, each associated with one of the plurality of heap dump requests, and where each of the plurality of heap dump files comprises memory objects previously allocated by the operating VM program; and generate, beginning with a second of the plurality of heap dump requests, one of the plurality of object movement event files that identifies memory objects associated with the operating VM program moved within the memory relative to a previous heap dump request.
Claim: 11. The system of claim 9 , where, in being programmed to execute the instructions associated with processing the current heap dump request, the processor is programmed to: switch an event handler control block to point to the loaded dynamic modifiable library; obtain compiled instructions from the loaded dynamic modifiable library, where the obtained compiled instructions indicate to issue additional heap dump requests; and issue the additional heap dump requests.
Claim: 12. The system of claim 11 , where the processor is further programmed to restore the event handler control block to point to the heap dump request processing module upon completion of issuing the additional heap dump requests.
Claim: 13. The system of claim 9 , where the processor is further programmed to change at least one of the dynamic modifiable library and the dynamic modifiable configuration file between at least two of the plurality of heap dump requests.
Claim: 14. The system of claim 9 , where, in being programmed to automatically identify a memory leak associated with the operating VM program based upon the analyzed plurality of heap dump files and the plurality of object movement event files, the processor is programmed to automatically identify the memory leak without requiring multiple shutdown and restart actions of the operating VM program.
Claim: 15. The system of claim 9 , where, in being programmed to execute the instructions associated with processing the current heap dump request, the processor is programmed to: determine whether each memory object within each of the plurality of heap dump files exists within an object tracker cache; add each memory object within each of the plurality of heap dump files determined not to exist within the object tracker cache to the object tracker cache; and increment a generation counter for each of the memory objects determined to exist within the object tracker cache.
Claim: 16. The system of claim 15 , where, in being programmed to automatically identify a memory leak associated with the operating VM program based upon the analyzed plurality of heap dump files and the plurality of object movement event files, the processor is programmed to automatically identify a memory object within the object tracker cache with a generation counter associated with the memory object of at least a specific generation number.
Claim: 17. A computer program product comprising a non-transitory computer readable storage medium including computer readable program code, where the computer readable program code when executed on a computer causes the computer to: receive a plurality of heap dump requests associated with an operating virtual machine (VM) program from a VM profiler interface module; in response to receipt of each heap dump request: load a dynamic modifiable library identified within a dynamic modifiable configuration file into the memory, where the dynamic modifiable library comprises instructions associated with processing a current heap dump request; execute the instructions associated with processing the current heap dump request; and unload the dynamic modifiable library from the memory; analyze a plurality of heap dump files and a plurality of object movement event files generated by execution of the instructions; and automatically identify a memory leak associated with the operating VM program based upon the analyzed plurality of heap dump files and the plurality of object movement event files.
Claim: 18. The computer program product of claim 17 , where, in causing the computer to execute the instructions associated with processing the current heap dump request, the computer readable program code when executed on the computer causes the computer to: generate one of the plurality of heap dump files, each associated with one of the plurality of heap dump requests, and where each of the plurality of heap dump files comprises memory objects previously allocated by the operating VM program; and generate, beginning with a second of the plurality of heap dump requests, one of the plurality of object movement event files that identifies memory objects associated with the operating VM program moved within the memory relative to a previous heap dump request.
Claim: 19. The computer program product of claim 17 , where, in causing the computer to execute the instructions associated with processing the current heap dump request, the computer readable program code when executed on the computer causes the computer to: switch an event handler control block to point to the loaded dynamic modifiable library; obtain compiled instructions from the loaded dynamic modifiable library, where the obtained compiled instructions indicate to issue additional heap dump requests; and issue the additional heap dump requests.
Claim: 20. The computer program product of claim 19 , where the computer readable program code when executed on the computer further causes the computer to restore the event handler control block to point to the heap dump request processing module upon completion of issuing the additional heap dump requests.
Claim: 21. The computer program product of claim 17 , where the computer readable program code when executed on the computer further causes the computer to change at least one of the dynamic modifiable library and the dynamic modifiable configuration file between at least two of the plurality of heap dump requests.
Claim: 22. The computer program product of claim 17 , where, in causing the computer to automatically identify a memory leak associated with the operating VM program based upon the analyzed plurality of heap dump files and the plurality of object movement event files, the computer readable program code when executed on the computer causes the computer to automatically identify the memory leak without requiring multiple shutdown and restart actions of the operating VM program.
Claim: 23. The computer program product of claim 17 , where, in causing the computer to execute the instructions associated with processing the current heap dump request, the computer readable program code when executed on the computer causes the computer to: determine whether each memory object within each of the plurality of heap dump files exists within an object tracker cache; add each memory object within each of the plurality of heap dump files determined not to exist within the object tracker cache to the object tracker cache; and increment a generation counter for each of the memory objects determined to exist within the object tracker cache.
Claim: 24. The computer program product of claim 23 , where, in causing the computer to automatically identify a memory leak associated with the operating VM program based upon the analyzed plurality of heap dump files and the plurality of object movement event files, the computer readable program code when executed on the computer causes the computer to automatically identify a memory object within the object tracker cache with a generation counter associated with the memory object of at least a specific generation number.
Current U.S. Class: 714/38
Patent References Cited: 6167535 December 2000 Foote et al.
7313661 December 2007 Dmitriev
7325106 January 2008 Dmitriev et al.
7444484 October 2008 Achanta et al.
2004/0107385 June 2004 Bates et al.
2005/0081190 April 2005 Betancourt et al.
2005/0091645 April 2005 Chilimbi et al.
2005/0289307 December 2005 Achanta et al.
2006/0253845 November 2006 Achanta et al.
2006/0265438 November 2006 Shankar et al.
2006/0277440 December 2006 Minshall et al.

Other References: United States Patent and Trademark Office, Office Action for U.S. Appl. No. 11/679,725, Sep. 15, 2009, pp. 1-9, Alexandria, VA, USA. cited by other
United States Patent and Trademark Office, Notice of Allowance for U.S. Appl. No. 11/679,725, Feb. 16, 2010, pp. 1-6, Alexandria, VA, USA. cited by other
Primary Examiner: Maskulinski, Michael C
Attorney, Agent or Firm: Lee Law, PLLC
Lee, Christopher B.
Přístupové číslo: edspgr.07979748
Databáze: USPTO Patent Grants
Popis
Abstrakt:A plurality of heap dump requests associated with an operating virtual machine (VM) program is received from a VM profiler interface module at a heap dump request processing module. In response to receipt of each heap dump request at the heap dump request processing module, a dynamic modifiable library identified within a dynamic modifiable configuration file is loaded into a memory, where the dynamic modifiable library comprises instructions associated with processing a current heap dump request. The instructions associated with processing the current heap dump request are executed. The dynamic modifiable library is unloaded from the memory. A plurality of heap dump files and a plurality of object movement event files generated by execution of the instructions are analyzed. A memory leak associated with the operating VM program is automatically identified based upon the analyzed plurality of heap dump files and the plurality of object movement event files.