Profile-driven data layout optimization
First Claim
1. In a computer, a method of arranging a plurality of data members of an object class in a virtual memory system having units separately loadable from secondary memory into primary memory, the method comprising:
- consulting metadata indicating how the data members of the object class are to be grouped into a plurality of separate groups comprising a first group and a second group;
responsive to said consulting metadata indicating how the data members of the object class are to be grouped into a plurality of separate groups comprising a first group and a second group, assigning memory locations for data members of the first group of the object class within a first unit of memory in the virtual memory system; and
responsive to said consulting metadata indicating how the data members of the object class are to be grouped into a plurality of separate groups comprising a first group and a second group, assigning memory locations for data members of the second group of the object class within a second unit of memory in the virtual memory system separately loadable into primary memory from the first unit.
2 Assignments
0 Petitions
Accused Products
Abstract
Data layout optimization arranges data members within memory to enhance software performance. Profiling data is consulted to determine how to group data members for an object class into groups. One technique groups the data members based on how frequently the data members are referenced in memory. Another technique groups the data members based on their affinities for one another in time as determined by observing when references to the data members take place. A variety of options when collecting the profiling data and grouping the data members is supported. The data member grouping is recorded in metadata associated with a definition of the object class. At runtime, a class loader places the data members of an object in memory according to the metadata. Data members of different groups can be placed in separately-loadable units of memory in the memory system. Subsequently, when the data members are referenced in memory, more frequently referenced data members, including those that tend to be referenced at times close to each other, reside at neighboring locations in the memory system.
-
Citations
53 Claims
-
1. In a computer, a method of arranging a plurality of data members of an object class in a virtual memory system having units separately loadable from secondary memory into primary memory, the method comprising:
-
consulting metadata indicating how the data members of the object class are to be grouped into a plurality of separate groups comprising a first group and a second group;
responsive to said consulting metadata indicating how the data members of the object class are to be grouped into a plurality of separate groups comprising a first group and a second group, assigning memory locations for data members of the first group of the object class within a first unit of memory in the virtual memory system; and
responsive to said consulting metadata indicating how the data members of the object class are to be grouped into a plurality of separate groups comprising a first group and a second group, assigning memory locations for data members of the second group of the object class within a second unit of memory in the virtual memory system separately loadable into primary memory from the first unit. - View Dependent Claims (2, 3, 4, 5)
-
-
6. In a computer, a method of arranging a plurality of data members of an object in a memory system, the method comprising:
-
identifying more frequently referenced data members out of the plurality of data members of the object by consulting profiling data for the object;
responsive to said identifying the more frequently referenced data members out of the plurality of data members of the object, grouping the more frequently referenced data members out of the plurality of data members of the object together into a group of more frequently referenced data members; and
responsive to said grouping the more frequently referenced data members into a group, assigning the data members from the group of more frequently referenced data members neighboring locations within the memory system. - View Dependent Claims (7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20)
-
-
21. In a computer, a method of arranging a plurality of data members of an object in a memory system by separating the plurality of data members, wherein the memory system comprises a primary and a secondary memory and the memory system comprises a set of memory units separately loadable into the primary memory, the method comprising:
-
identifying more frequently referenced data members out of the plurality of data members of the object and less frequently referenced data members out of the plurality of data members of the object by consulting profiling data for the object;
responsive to said identifying the more frequently referenced data members out of the plurality of data members of the object and less frequently referenced data members out of the plurality of data members of the object, grouping the more frequently referenced data members out of the plurality of data members of the object together into first group of data members and the less frequently referenced data members out of the plurality of data members of the object together into a second group of data members; and
responsive to said grouping, assigning the data members from the first group of data members locations within a first set of memory units in the memory system and the data members from the second group of data members locations within a second set of memory units in the memory system separate from the first set. - View Dependent Claims (22, 23, 24, 25, 26)
-
-
27. In a computer, a method of splitting data members of an object class into a set of groups to be placed at separately-loadable units of memory in a memory system by consulting profile data indicating how many times the data members were referenced in memory, the method comprising:
-
assembling a list of the data members indicating how many times each data member in the list was referenced in memory;
selecting a threshold value to be applied to the list of data members according to a threshold framework;
applying the threshold value to the list of data members to identify a candidate cold group;
determining whether to split the data members based whether the candidate cold group is acceptable to a policy framework; and
responsive to said determining, selecting between splitting the data members into a set of groups comprising a hot group and a cold group based on the threshold framework having affirmatively determined to split the data members and omitting to split the data members into a set of groups having determined not to split the data members. - View Dependent Claims (28, 29, 30)
-
-
31. A computer-implemented method for optimizing the data layout of software comprising a set of object class definitions, the method comprising:
-
instrumenting the software to generate profile data indicating how frequently data members of the object class definitions are referenced in memory;
grouping the data members of the object class definitions into groups according to how frequently the data members of the object class definitions are referenced in memory, wherein the groups comprise a more frequently referenced group and a less frequently referenced group;
associating metadata indicative of the groups with the set of object class definitions; and
at runtime, consulting the metadata indicative of the groups to determine how to arrange the data members within memory, placing the data members in the more frequently referenced group in a first unit of memory and the data members in the less frequently referenced group in a second unit of memory separately loadable from the first unit of memory into primary memory. - View Dependent Claims (32, 33)
-
-
34. A method of specifying data layout optimization for software comprising a set of objects belonging to object classes, the method comprising:
-
profiling the software to generate profile data indicating how many times each data member of each of the set of objects was referenced in memory during the profiling;
specifying a default threshold selected from the group consisting of a linear threshold, an absolute threshold, and a Gaussian threshold;
for at least one object class, specifying a threshold selected from the group consisting of a linear threshold, an absolute threshold, and a Gaussian threshold, wherein the threshold of the at least one object class is other than the default threshold; and
splitting the data members of the objects into at least two groups based according to the thresholds, wherein each of the at least two groups is to reside in a unit of memory separately loadable in a virtual memory system. - View Dependent Claims (35)
-
-
36. A computer-implemented method for optimizing the layout of data members of an object class within a memory system comprising primary memory and secondary memory, the method comprising:
-
generating profiling data by recording how frequently memory references are made to data members defined for the object class during profiling;
separating the data members into a hot group and a cold group based on how frequently memory references are made to the data members defined for the object during profiling;
at runtime, assigning data members in the hot group locations in a first unit of memory of the memory system and assigning data members in the cold group locations in a second unit of memory of the memory system, wherein the first unit of memory can be loaded into primary memory without loading the second unit of memory; and
at runtime, loading the first unit of memory into primary memory and not loading the second unit of memory into primary memory.
-
-
37. A computer-implemented method for optimizing the layout of data members of an object class within a memory system comprising primary memory and secondary memory, the method comprising:
-
generating profiling data by recording how many memory references are made to data members defined for the object class at successive time intervals;
generating an affinity matrix indicating affinities between the data members defined for the object;
transforming the affinity matrix into a minimum-cost spanning tree, wherein the data members defined for the object are vertices in the minimum-cost spanning tree;
traversing the minimum-cost spanning tree to visit each data member in a connected graph and recording the order of visiting each data member;
dividing the data members into a hot group and a cold group based on a threshold edge cost;
recording said dividing in metadata associated with a definition of the object class; and
at runtime, consulting the metadata to place data members of the hot group into a unit of memory separately loadable into primary memory from a unit of memory into which the cold group are placed. - View Dependent Claims (38)
-
-
39. In a computer, a method of monitoring affinity among a plurality of data members of an object class in a memory system, the method comprising:
-
constructing a table indicating how many times data members of the object were, referenced during each of a plurality of time periods during profiling;
computing an affinity matrix for the object class with a dot product operation, wherein the affinity matrix indicates an affinity between a first data member of the object and a second data member of the object; and
displaying the affinity matrix as a graph for consideration by a user. - View Dependent Claims (40)
-
-
41. In a computer having a virtual memory system, a system for performing data layout optimization on software comprising a set of object class definitions, the system comprising:
-
profile data for the object class definitions indicating how many times data members of objects instantiated according to the object class definitions were referenced in memory during profiling;
a data member grouper operative to consult the profile data and group the data members of an object into at least two groups, wherein the groups comprise a more frequently referenced group of data members and a less frequently referenced group of data members, wherein the data member grouper is further operative to annotate the object class definitions to indicate into which of the groups data members defined in the object class definitions fall.
-
-
42. One or more computer-readable media having computer-executable instructions implementing an execution engine operable to perform operations on an object of an object class defined by an object class definition and residing in a virtual memory system having units separately loadable into primary memory, the execution engine comprising:
-
means for receiving a request from software to load the object of the object class;
means for maintaining information about a plurality of data members of the object class, wherein the information explicitly indicates the plurality of data members are to be placed on different plural units within the virtual memory system; and
means for arranging the plurality of data members of the object of the object class within plural units of memory in the virtual memory system according to the information about the plurality of data members of the object class, wherein the means for arranging is operative to consult the information indicating information about the data members responsive to the request to arrange. - View Dependent Claims (43, 44, 45)
-
-
46. In a computer-readable medium, a data structure for indicating how a plurality of data members defined by an object class definition of an object class are to be arranged in a memory system at runtime of an object, wherein the object is an instance of the object class, wherein the memory system supports separately-loadable units, the data structure comprising:
-
for the object class, a layout directive field indicating whether layout of the data members of the object class is to be performed according to a scheme specified in the data structure; and
for at least two data members of the object class, a grouping field indicating a group into which data members are to be placed at runtime, wherein the grouping field for a first at least one data member of the object class indicates the at first at least one data member of the object class is to be placed into a first group residing in a first unit of the memory system at runtime, and the grouping field for a second at least one data member of the object class indicates the at second at least one data member of the object class is to be placed into a second group residing in a second unit of the memory system separately-loadable from the first unit at runtime. - View Dependent Claims (47, 48, 49)
-
-
50. In a computer-readable medium, a set of data structures for a respective set of object classes, wherein a data structure out of the set indicates how data members of the respective object class out of the set are to be arranged in a memory system at runtime of an instance of an object of the respective object class, wherein the memory system supports separately-loadable units, the data structure for the respective object class comprising:
-
a layout directive field indicating whether to use an automatic layout, an explicit layout, or a sequential layout when arranging the data members of the respective object class at run time;
grouping fields for the data members of the respective object class, the grouping fields indicating how data members of the respective object are to be divided into the separately-loadable units of the memory system at runtime. - View Dependent Claims (51)
-
-
52. In a computer, a method of laying out data members of an object having a plurality of data members, the method comprising:
-
collecting profiling data for the object, wherein the profiling data indicates more frequently and less frequently accessed data members of the object;
recording the more frequently and less frequently accessed data member of the object in metadata associated with a definition of the object;
responsive to consulting the metadata, arranging the data members of the object into a plurality of separately loadable blocks to group at least one more frequently accessed member into a first one of the plurality of separately loadable blocks and at least one less frequently accessed data member into a second one of the plurality of separately loadable blocks.
-
-
53. In a computer system having a memory system, a method of dividing an object comprising a plurality of data members into plural units of memory in the memory system, the method comprising:
-
observing execution of the object to determine a set of more referenced data members out of the plurality of data members and a set of lesser referenced data members out of the plurality of data members;
responsive to said observing, loading the more referenced data members into a first unit of memory in the memory system; and
responsive to said observing, loading the lesser reference data members into a second unit of memory in the memory system, wherein the second unit of memory in the memory system is loadable in the memory system separately from the first unit of memory in the memory system.
-
Specification