Claims
- 1. A method for using references within a first object to prefetch a second object into a cache memory, comprising:
receiving a first cache line containing at least a portion of the first object; locating a reference to the second object within the first cache line; and using the reference to the second object to perform a prefetching operation for the second object.
- 2. The method of claim 1, wherein performing the prefetching operation for the second object involves:
examining the cache memory to determine if the second object is already present within the cache memory; and if not, performing the prefetching operation for the second object.
- 3. The method of claim 1, wherein locating the reference to the second object involves examining type information associated with data items in the first cache line to determine whether the data items contain references.
- 4. The method of claim 1, wherein locating the reference to the second object involves using the offsets of data items within the first object to determine whether the data items contain references.
- 5. The method of claim 1, wherein locating the reference to the second object involves locating a class pointer within the first object that points to a class object associated with the first object.
- 6. The method of claim 1, wherein performing the prefetching operation for the second object involves prefetching a second cache line containing at least a portion of the second object.
- 7. The method of claim 1,
wherein performing the prefetching operation for the second object involves prefetching an object table entry for the second object; and wherein the object table entry maps an object ID to an address where the second object is located.
- 8. The method of claim 1, wherein if the first cache line contains a portion of the first object, the method further comprises prefetching another portion of the first object.
- 9. The method of claim 8, wherein prefetching another portion of the first object involves prefetching a header for the first object.
- 10. The method of claim 1, wherein the first object and the second object are defined within an object-oriented programming system.
- 11. An apparatus that uses references within a first object to prefetch a second object, comprising:
a cache memory; a prefetching mechanism operatively coupled to the cache memory, wherein the prefetching mechanism is configured to,
receive a first cache line containing at least a portion of the first object, locate a reference to the second object within the first cache line, and to use the reference to the second object to perform a prefetching operation for the second object.
- 12. The apparatus of claim 11, wherein the prefetching mechanism is additionally configured to:
examine the cache memory to determine if the second object is already present within the cache memory, and if not, to perform the prefetching operation for the second object.
- 13. The apparatus of claim 11, wherein the prefetching mechanism is configured to examine type information associated with data items in the first cache line to determine whether the data items contain references.
- 14. The apparatus of claim 11, wherein the prefetching mechanism is configured to use the offsets of data items within the first object to determine whether the data items contain references.
- 15. The apparatus of claim 11, wherein the prefetching mechanism is configured to prefetch a class object associated with the first object through a class pointer within the first object.
- 16. The apparatus of claim 11, wherein the prefetching mechanism is additionally configured to prefetch a second cache line containing at least a portion of the second object.
- 17. The apparatus of claim 11,
wherein the prefetching mechanism is configured to prefetch an object table entry for the second object; and wherein the object table entry maps an object ID to an address where the second object is located.
- 18. The apparatus of claim 11, wherein if the first cache line contains a portion of the first object, the prefetching mechanism is configured to prefetch another portion of the first object.
- 19. The apparatus of claim 18, wherein the prefetching mechanism is configured to prefetch a header for the first object.
- 20. The apparatus of claim 11, wherein the first object and the second object are defined within an object-oriented programming system.
- 21. An computer system that uses references within a first object to prefetch a second object, comprising:
a processor; a cache memory; a main memory; a prefetching mechanism coupled to the cache memory, wherein the prefetching mechanism is configured to,
receive a first cache line containing at least a portion of the first object, locate a reference to the second object within the first cache line, and to use the reference to the second object to perform a prefetching operation for the second object.
- 22. The computer system of claim 21, wherein the prefetching mechanism is additionally configured to:
examine the cache memory to determine if the second object is already present within the cache memory, and if not, to perform the prefetching operation for the second object.
- 23. The computer system of claim 21, wherein the prefetching mechanism is configured to examine type information associated with data items in the first cache line to determine whether the data items contain references.
- 24. The computer system of claim 21, wherein the prefetching mechanism is configured to use the offsets of data items within the first object to determine whether the data items contain references.
- 25. The computer system of claim 21, wherein the prefetching mechanism is configured to prefetch a class object associated with the first object through a class pointer within the first object.
- 26. The computer system of claim 21, wherein the prefetching mechanism is additionally configured to prefetch a second cache line containing at least a portion of the second object.
- 27. The computer system of claim 21, wherein if the first cache line contains a portion of the first object, the prefetching mechanism is configured to prefetch another portion of the first object.
- 28. The computer system of claim 27, wherein the prefetching mechanism is configured to prefetch a header for the first object.
- 29. The computer system of claim 21, wherein the first object and the second object are defined within an object-oriented programming system.
- 30. The computer system of claim 21, wherein the prefetching mechanism is located within a translator interposed between the cache memory and the main memory, wherein the translator maps an object ID to a physical address within the main memory.
- 31. The computer system of claim 30, further comprising:
an object table coupled to the translator; wherein the object table maps object IDs to physical addresses where the objects are located in the main memory; and wherein the prefetching mechanism is configured to prefetch an object table entry for the second object.
- 32. The computer system of claim 21, wherein the cache memory is an object cache in which an object can be referenced based on an object ID.
RELATED APPLICATION
[0001] The subject matter of this application is related to the subject matter in a co-pending non-provisional application by the same inventors as the instant application entitled, “Object Addressed Memory Hierarchy” having serial number TO BE ASSIGNED, and filing date Feb. 7, 2002 (Attorney Docket No. 116159.072001).