Legal claims defining the scope of protection, as filed with the USPTO.
1. A computer-implemented method for processing memory access events, comprising: executing an extended program including instrumented memory tracking code for tracking memory access events of a plurality of objects; allocating a unique identifier for each of the plurality of tracked objects; creating a weak reference for each of the plurality of tracked objects, wherein a mapping relationship is established between the identifier of the weak reference and that of the corresponding tracked object; binding the weak reference of the object with a reference queue: recording and storing the memory access events of the plurality of tracked objects; in response to the object being garbage collected, putting the weak reference of the object into the reference queue: and reading-out the identifier of the weak reference of the object from the reference queue, and including it in a notification of garbage collection: in response to receiving the notification of memory garbage collection, which includes an identifier of a weak reference of a collected object, determining the identifier of the collected object based on the mapping relationship between the identifier of the weak reference and that of the corresponding tracked object, and searching the stored memory access events for the memory access events of the collected object; and deleting the memory access events of the collected object.
2. The method according to claim 1 , further comprising: deleting the identifier of the weak reference from the reference queue.
3. The method according to claim 1 , wherein other objects have access to the tracked object by using strong references.
4. The method according to claim 1 , wherein before deleting the memory access events of the collected object, the method further comprises: analyzing the memory access events of the collected object in real time.
5. The method according to claim 4 , wherein analyzing the memory access events of the collected object in real time is further configured to: in response to receiving a notification of memory garbage collection, analyze the memory access events of the garbage collected object while the program is running.
6. The method according to claim 4 , wherein analyzing the memory access events of the collected object in real time is further configured to: in response to recording and storing the memory access events of the plurality Of tracked objects, analyzing the memory access events of the plurality of objects in real time.
7. The method according to claim 4 , wherein analyzing the memory access events of the collected object includes performing data race analysis, memory leakage analysis, or memory overflow analysis.
8. The method according to claim 1 , wherein the identifier of the weak reference and that of the corresponding tracked object are identical, and the program is an object-oriented program.
9. A computer-implemented method for processing memory access events, comprising: executing an extended program including instrumented memory tracking code for tracking memory access events of a plurality of objects; allocating a unique identifier for each of the plurality of tracked objects; creating a weak reference for each of the plurality of tracked objects, wherein a mapping relationship is established between the identifier of the weak reference and that of the corresponding tracked object; recording and storing the memory access events of the plurality of tracked objects; in response to receiving a notification of memory garbage collection, which includes an identifier of a weak reference of a collected object, determining the identifier of the collected object based on the mapping relationship between the identifier of the weak reference and that of the corresponding tracked object, and searching the stored memory access events for the memory access events of the collected object; and deleting the memory access events of the collected object; wherein the collected object can be referenced by multiple weak references and multiple strong references simultaneously and only when the collected object is not referenced by any strong reference allowing it to be garbage collected.
10. A system for processing memory access events, comprising: execution means for executing an extended program including instrumented memory tracking code for tracking memory access events of a plurality of objects; identifier allocation means for allocating a unique identifier for each of the plurality of tracked objects; weak reference creation means for creating a weak reference for each of the plurality of tracked objects, wherein a mapping relationship is established between the identifier of the weak reference and that of the corresponding tracked object; weak reference identifier processing means configured to for a tracked object. binding the weak reference of the object with a reference queue: when the object is garbage collected, putting the weak reference of the object into the reference queue: and reading out the identifier of the weak reference of the object from the reference queue and including it in the notification of garbage collection: recording means for recording and storing the memory access events of the plurality of tracked objects; searching means for, in response to receiving a notification of memory garbage collection, which includes an identifier of a weak reference of a collected object, determining the identifier of the collected object based on the mapping relationship between the identifier of the weak reference and that of the corresponding tracked object, and searching the stored memory access events for the memory access events of the collected object; and deleting means for deleting the memory access events of the collected object.
11. The system according to claim 10 , wherein the weak reference identifier processing, means is further configured to after reading out the identifier of the weak reference of the object from the reference queue, deleting the identifier of the weak reference from the reference queue.
12. The system according to claim 10 , wherein other objects have access to the tracked object using strong references.
13. The system according to claim 10 , further comprising analysis means for analyzing the memory access events of the collected object in real time.
14. The system according to claim 13 , wherein the analysis means is further configured to, in response to receiving a notification of memory garbage collection, analyze the memory access events of the garbage collected object while the program is running.
15. The system according to claim 13 , wherein the analysis means is further configured to, in response to recording and storing the memory access events of the plurality of tracked objects, analyze the memory access events of the plurality of objects in real time.
16. The system according to claim 13 , wherein analyzing the memory access events of the collected object includes performing data race analysis, memory leakage analysis, or memory overflow analysis.
17. The system according to claim 10 , wherein the identifier of the weak reference and that of the corresponding tracked object are identical, and the program is an object-oriented program.
18. A system for processing memory access events. comprising: execution means for executing an extended program including instrumented memory tracking code for tracking memory access events of a plurality of objects; identifier allocation means for allocating a unique identifier for each of the plurality of tracked objects: weak reference creation means for creating a weak reference for each of the plurality of tracked objects, wherein a mapping relationship is established between the identifier of the weak reference and that of the corresponding tracked object: recording means for recording and storing the memory access events of the plurality of tracked objects; searching means for, in response to receiving a notification of memory garbage collection, which includes an identifier of a weak reference of a collected object, determining the identifier of the collected object based on the mapping relationship between the identifier of the weak reference and that of the corresponding tracked object. and searching the stored memory access events for the memory access events of the collected object: and deleting means for deleting the memory access events of the collected object; wherein the collected object can be referenced by multiple weak references and multiple strong references simultaneously, and only when the collected object is not referenced by any strong reference, allowing it to be garbage collected.
19. A computer program product comprising a computer-readable storage device having encoded thereon: computer-readable program instructions for executing an extended program including instrumented memory, tracking code for tracking memory access events of a plurality of objects; computer-readable program instructions for allocating a unique identifier for each of the plurality of tracked objects; computer-readable program instructions for creating a weak reference for each of the plurality of tracked objects, wherein a mapping relationship is established between the identifier of the weak reference and that of the corresponding tracked object; computer-readable program instructions for binding the weak reference of the object with a reference queue: computer-readable program instructions for recording and storing the memory access events of the plurality of tracked objects; computer-readable program instructions-for putting, the weak reference of the object into the reference queue in response to the object being garbage collected, and reading out the identifier of the weak reference of the object from the reference queue, and including it in a notification of garbage collection: computer-readable program instructions for, in response to receiving a notification of memory garbage collection, which includes an identifier of a weak reference of a collected object, determining the identifier of the collected object based on the mapping relationship between the identifier of the weak reference and that of the corresponding tracked object, and searching the stored memory access events for the memory access events of the collected object; and computer-readable program instructions for deleting the memory access events of the collected object.
Unknown
December 4, 2012
Browse 5M+ US patents with plain-English claim translations and AI-generated analysis.