IP Library Granted Patent US 7,310,718
Granted Patent B1
US 7,310,718 · App. 09/856,779 · Granted Dec 18, 2007

Method for enabling comprehensive profiling of garbage-collected memory systems

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 7,310,718
App. No.
09/856,779
Granted
Dec 18, 2007
Kind
B1
Abstract

A method and apparatus for profiling a heap. According to the method, a flexible and comprehensive general-purpose profiling interface that uniformly accommodates a wide variety of memory allocation and garbage collection methods is used. The profiling interface, among other things, employs a set of virtual machine profiling interface events that support all known types of garbage collection methods.

Claims (96)

1. A method for allowing a profiler to communicate with a virtual machine without regard to a specific implementation of the virtual machine, the method comprising the steps of:

creating one or more heap arenas in a heap; and

using at least one event to dynamically manage storage allocation and storage deallocation in the heap, wherein said at least one event is independent of any algorithm for dynamically managing storage allocation and storage deallocation in the heap.

2. The method of claim 1 , wherein the one or more heap arenas represent one or more logically partitioned portions in the heap.

3. The method of claim 1 , further comprising assigning a unique arena ID to each heap arena.

4. The method of claim 1 , further comprising at least one step of the following steps:

using a new_arena event when a new heap arena is created;

using a delete_arena event with respect to a particular heap arena when all objects within a logically partitioned portion of the heap represented by the particular heap arena have been deleted;

using one or more new_object events when one or more new objects are allocated in the new heap arena;

using one or more delete_object events when one or more dead objects are returned to a free pool in the heap; and

using one or more move_object events when one or more objects are moved from one heap arena to another heap arena.

5. The method of claim 4 , further comprising associating each object with a unique arena ID, a unique object ID, and a unique class ID.

6. The method of claim 1 , further comprising:

initiating a new_arena event to create a new heap arena to represent a logically partitioned portion of the heap;

initiating one or more new_object events when one or more new objects are allocated in the new heap arena; and

initiating one or more delete_object events when one or more dead objects are returned to a free pool in the heap.

7. The method of claim 1 , further comprising:

initiating a new_arena event to create a new heap arena to represent a logically partitioned portion of the heap;

initiating one or more new_object events when one or more new objects are allocated in the new heap arena;

initiating one or more move_object events when the heap is compacted; and

initiating one or more delete_object events when one or more dead objects are returned to a free pool in the heap.

8. The method of claim 1 , further comprising:

initiating two new_arena events to create a first and second heap arena to represent a corresponding first and second logically partitioned portions in the heap;

initiating one or more new_object events when one or more new objects are allocated in the first heap arena;

initiating one or more move_object events when one or more live objects are moved from the first heap arena to the second heap arena; and

initiating a delete_arena event with respect to the first heap arena when all objects within the first logically partitioned portion of the heap represented by the first heap arena have been deleted.

9. The method of claim 1 , further comprising:

initiating two or more new_arena events to create a plurality of heap arenas to represent a corresponding plurality of logically partitioned portions in the heap;

initiating one or more new_object events when one or more new objects are allocated in a youngest heap arena corresponding to a youngest logically partitioned portion of the heap;

initiating one or more move_object events when one or more objects are moved from a younger heap arena to an older heap arena; and

initiating a delete_arena event with respect to the youngest heap arena when all the objects within the youngest logically partitioned portion of the heap represented by the youngest heap arena have been deleted.

10. A computer-readable medium carrying one or more sequences of one or more instructions for allowing a profiler to communicate with a virtual machine without regard to a specific implementation of the virtual machine, the one or more sequences of one or more instructions including instructions which, when executed by one or more processors, cause the one or more processors to perform the steps of:

creating one or more heap arenas in a heap; and

using at least one event to dynamically manage storage allocation and storage deallocation in the heap, wherein said at least one event is independent of any algorithm for dynamically managing storage allocation and storage deallocation in the heap.

11. The computer-readable medium of claim 10 , wherein the one or more heap arenas represent one or more logically partitioned portions in the heap.

12. The computer-readable medium of claim 10 , further comprising assigning a unique arena ID to each heap arena.

13. The computer-readable medium of claim 10 , further comprising at least one step of the following steps:

using a new_event when a new heap arena is created;

using a delete_arena event with respect to a particular heap arena when all objects within a logically partitioned portion of the heap represented by the particular heap arena have been deleted;

using one or more new_object events when one or more new objects are allocated in the new heap arena;

using one or more delete_object events when one or more dead objects are returned to a free pool in the heap; and

using one or more move_object events when one or more objects are moved from one heap arena to another heap arena.

14. The computer-readable medium of claim 13 , further comprising associating each object with a unique arena ID, a unique object ID, and a unique class ID.

15. The computer-readable medium of claim 10 , further comprising:

initiating a new_arena event to create a new heap arena to represent a logically partitioned portion of the heap;

initiating one or more new_object events when one or more new objects are allocated in the new heap arena; and

initiating one or more delete_object events when one or more dead objects are returned to a free pool in the heap.

16. The computer-readable medium of claim 10 , further comprising:

initiating a new_arena event to create a new heap arena to represent a logically partitioned portion of the heap;

initiating one or more new_object events when one or more new objects are allocated in the new heap arena;

initiating one or more move_object events when the heap is compacted; and

initiating one or more delete_object events when one or more dead objects are returned to a free pool in the heap.

17. The computer-readable medium of claim 10 , further comprising:

initiating two new_arena events to create a first and second heap arena to represent a corresponding first and second logically partitioned portions in the heap;

initiating one or more new_object events when one or more new objects are allocated in the first heap arena;

initiating one or more move_object events when one or more live objects are moved from the first heap arena to the second heap arena; and

initiating a delete_arena event with respect to the first heap arena when all objects within the first logically partitioned portion of the heap represented by the first heap arena have been deleted.

18. The computer-readable medium of claim 10 , further comprising:

initiating two or more new_arena events to create a plurality of heap arenas to represent a corresponding plurality of logically partitioned portions in the heap;

initiating one or more new_object events when one or more new objects are allocated in a youngest heap arena corresponding to a youngest logically partitioned portion of the heap;

initiating one or more move_object events when one or more objects are moved from a younger heap arena to an older heap arena; and

initiating a delete_arena event with respect to the youngest heap arena when all the objects within the youngest logically partitioned portion of the heap represented by the youngest heap arena have been deleted.

19. A system for profiling a heap, the system comprising:

a memory;

one or more processors coupled to the memory; and

at least one processor configured to:

create one or more heap arenas in a heap; and

use at least one event to dynamically manage storage allocation and storage deallocation in the heap, wherein said at least one event is independent of any algorithm for dynamically managing storage allocation and storage deallocation in the heap.

20. The system of claim 19 , wherein the one or more heap arenas represent one or more logically partitioned portions in the heap.

21. The system of claim 19 , further comprising assigning a unique arena ID to each heap arena.

22. The system of claim 19 , further comprising at least one step of the following steps:

using a new_arena event when a new heap arena is created;

using a delete_arena event with respect to a particular heap arena when all objects within a logically partitioned portion of the heap represented by the particular heap arena have been deleted;

using one or more new_object events when one or more new objects are allocated in the new heap arena;

using one or more delete_object events when one or more dead objects are returned to a free pool in the heap; and

using one or more move_object events when one or more objects are moved from one heap arena to another heap arena.

23. The system of claim 22 , further comprising associating each object with a unique arena ID, a unique object ID, and a unique class ID.

24. The system of claim 19 , further comprising:

initiating a new_arena event to create a new heap arena to represent a logically partitioned portion of the heap;

initiating one or more new_object events when one or more new objects are allocated in the new heap arena; and

initiating one or more delete_object events when one or more dead objects are returned to a free pool in the heap.

25. The system of claim 19 , further comprising:

initiating a new_arena event to create a new heap arena to represent a logically partitioned portion of the heap;

initiating one or more new_object events when one or more new objects are allocated in the new heap arena;

initiating one or more move_object events when the heap is compacted; and

initiating one or more delete_object events when one or more dead objects are returned to a free pool in the heap.

26. The system of claim 19 , further comprising:

initiating two new_arena events to create a first and second heap arena to represent a corresponding first and second logically partitioned portions in the heap;

initiating one or more new_object events when one or more new objects are allocated in the first heap arena;

initiating one or more move_object events when one or more live objects are moved from the first heap arena to the second heap arena; and

initiating a delete_arena event with respect to the first heap arena when all objects within the first logically partitioned portion of the heap represented by the first heap arena have been deleted.

27. The system of claim 19 , further comprising:

initiating two or more new_arena events to create a plurality of heap arenas to represent a corresponding plurality of logically partitioned portions in the heap;

initiating one or more new_object events when one or more new objects are allocated in a youngest heap arena corresponding to a youngest logically partitioned portion of the heap;

initiating one or more move_object events when one or more objects are moved from a younger heap arena to an older heap arena; and

initiating a delete_arena event with respect to the youngest heap arena when all the objects within the youngest logically partitioned portion of the heap represented by the youngest heap arena have been deleted.

Assignments (2)
MERGER AND CHANGE OF NAME Recorded Dec 16, 2015
From: ORACLE USA, INC.; SUN MICROSYSTEMS, INC.; ORACLE AMERICA, INC.
To: ORACLE AMERICA, INC.
Reel/Frame 037302/0869 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 14, 2003
From: LIANG, SHENG; GRARUP, STEFFEN
To: SUN MICROSYSTEMS, INC.
Reel/Frame 014828/0880 →