Profile-driven data layout optimization
Summary by NHIP
Profile-driven data layout optimization
The method arranges object data members in memory by consulting profiling data to identify frequently referenced items. These items are grouped and assigned neighboring locations or contiguous virtual addresses based on reference frequency and temporal affinity.
Claim Score by NHIP
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.

Term
Term ended
Expired 29 June 2020, 6.2 years ago.
- Priority
- Filed
- Granted
- Expired
- Today
20 claims: 3 independent, 17 dependent
- 1Broadest claimClaim Score 62, broad(NHIP)One or more computer-readable media having computer-executable instructions for performing 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.
- 16One or more computer-readable media having computer-executable instructions for performing a 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.
- 19One or more computer-readable media having computer-executable instructions for performing 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.
Independent claims3
204 paragraphs in 6 sections, as filed
CROSS-REFERENCE TO PRIOR APPLICATIONS
0001This application is a continuation of U.S. patent application Ser. No. 09/542,525, filed Apr. 4, 2000, now U.S. Pat. No. 6,862,729 entitled “PROFILE-DRIVEN DATA LAYOUT OPTIMIZATION,” by inventors Gerald Dwayne Kuch et al., which application is hereby incorporated herein by reference.
TECHNICAL FIELD
0002The field relates to optimization of computer software, and more particularly relates to determining data layout based on data obtained by profiling the software.
BACKGROUND
0003Various techniques have evolved for improving the performance of computer software. A category of techniques commonly called “optimization” evaluates a piece of software and modifies its operation to improve performance while preserving the software's functionality.
0004For example, the architecture of many computer systems organizes memory into pages. Such systems may include a mechanism by which a limited number of pages can be loaded into primary memory for access by a processor. Additional pages can be stored in secondary memory; however, when the system accesses secondary memory, processing is suspended while moving the pages from secondary memory to primary memory.
0005For purposes of illustration, consider a piece of software having instructions for four procedures A, B, C, and D executing in sequence in a system having only one page of primary memory. If procedures A and C are on a first page, and procedures B and D are on a second page, the following eight actions take place when the piece of software is executed:
00061. Move first page to primary memory
00072. Execute procedure A
00083. Move second page to primary memory
00094. Execute procedure B
00105. Move first page to primary memory
00116. Execute procedure C
00127. Move second page to primary memory
00138. Execute procedure D.
0014One optimization technique places code portions which execute within a certain period of time in close proximity to each other. Thus, A and B are placed close to each other (e.g., on the same page) and C and D are place close to each other. Applying such optimization to the above piece of software, the following six actions take place when the piece of software is executed:
00151. Move first page to primary memory
00162. Execute procedure A
00173. Execute procedure B
00184. Move first page to primary memory
00195. Execute procedure C
00206. Execute procedure D.
0021Thus, optimization of the software has saved two actions. Since moving pages into primary memory typically requires a large amount of time in terms of processing cycles, the savings is significant. This optimization technique can be applied to large software projects to provide dramatic savings in processing resources.
0022Although manual optimization is possible, software developers employ a technique called profiling to automate the process. Profiling observes software's behavior during execution to assist in optimization. For example, information about which procedures are executed within a certain period of time can be collected for the above-described optimization technique.
SUMMARY
0023While the above-described techniques can lead to significant improvements in software performance, they focus on the code-related portions of software and fail to recognize inefficiencies related to the data-related portions of software. These techniques further fail to take into account various peculiarities of object-oriented software.
0024The invention includes a method and system for data layout optimization based on profiling. Various features provided by the system lead to better use of resources and improved performance. For example, data members of a software object can be divided into separate groups. Further, the system can provide feedback to assist in re-designing software object classes.
0025In one feature, data members of an object can be split into plural separate groups. For example, some data members of an object class can be designated as residing in a hot group, while others reside in a cold group. At runtime, the groups can be placed in separately-loadable units of a memory system. Data members from the same group can be placed at neighboring locations in the memory system. From the perspective of functions within the software, the division of the data members is inconsequential, but software performance can be improved.
0026In another feature, metadata describing the groups can be associated with an object class for consideration when the data members of an object are arranged in a memory system when the object is loaded into memory. In this way, the fields of an object can be stored in appropriate locations in the memory system, according to previously observed behavior of the software. For example, more frequently referenced data members can be placed at neighboring locations, and less frequently referenced data members can be placed at other locations separately loadable into the memory system.
0027In yet another feature, calculations for determining layout of data include the time domain to determine affinity of data members of one another with respect to time. Thus, “affinity” in such an arrangement means affinity in time. Analysis of the observation of software's behavior can determine that certain data members tend to be referenced at times close to each other. As a result of making such a determination, the data members can be placed close to each other in the memory system. Affinity-based layout can produce better results under certain circumstances.
0028In still another feature, a software developer can declaratively control optimization by including certain statements in source code or specifying options at a command line. For example, a programmer may wish to explicitly specify a particular layout scheme.
0029Another feature provides affinity information visually for consideration by developers. The information may lead to a re-design of the object classes to build a high-performance software object set.
0030Various aspects of the invention thus improve upon the above-described optimization technique, which focuses on optimizing the arrangement of data members of an object. The problem referred to as “dragging around dead data” is avoided. Performance is increased dramatically under certain circumstances, such as when some data members are quite frequently referenced, while others are referenced only a few times, once, or not at all.
0031Additional features and advantages of the invention will be made apparent from the following detailed description of illustrated embodiments, which proceeds with reference to the accompanying drawings.
BRIEF DESCRIPTION OF THE DRAWINGS
0032<figref idref="DRAWINGS">FIG. 1</figref> is a block diagram of a computer system that may be used to implement the described optimization system.
0033<figref idref="DRAWINGS">FIG. 2</figref> is a block diagram of an object conforming to the Component Object Model specification of Microsoft Corporation, which may be used for objects to be optimized according to the invention.
0034<figref idref="DRAWINGS">FIG. 3</figref> is a block diagram showing an exemplary computer system including an execution engine.
0035<figref idref="DRAWINGS">FIG. 4</figref> is a block diagram showing an exemplary memory system.
0036<figref idref="DRAWINGS">FIG. 5</figref> is a flowchart showing an exemplary method for implementing data layout optimization.
0037<figref idref="DRAWINGS">FIG. 6</figref> is a block diagram showing an exemplary arrangement for collecting profile data.
0038<figref idref="DRAWINGS">FIG. 7</figref> is a block diagram showing an exemplary arrangement for grouping data members based on collected profile data, such as that of <figref idref="DRAWINGS">FIG. 6</figref>.
0039<figref idref="DRAWINGS">FIG. 8</figref> is a block diagram showing an exemplary arrangement for executing software, grouping the data members of an object according to a grouping of data members, such as that of <figref idref="DRAWINGS">FIG. 7</figref>.
0040<figref idref="DRAWINGS">FIG. 9</figref> is a source code listing of a method for tracking the likelihood of a counter overflow during collection of profile data.
0041<figref idref="DRAWINGS">FIG. 10</figref> is a graph illustrating derivation of an overflow forecast method for use when tracking the likelihood of a counter overflow during collection of profile data, such as in <figref idref="DRAWINGS">FIG. 9</figref>.
0042<figref idref="DRAWINGS">FIG. 11</figref> is a block diagram showing an exemplary general layout of fields for the class Foo in a memory system.
0043<figref idref="DRAWINGS">FIG. 12</figref> is a block diagram showing a more detailed approximation of an exemplary layout of fields for the class Foo in a memory system.
0044<figref idref="DRAWINGS">FIG. 13</figref> is a block diagram showing a memory system during execution of software not optimized with data layout optimization.
0045<figref idref="DRAWINGS">FIG. 14</figref> is a block diagram showing a memory system during execution of software optimized with data layout optimization.
0046<figref idref="DRAWINGS">FIG. 15</figref> is a graph representing a cost matrix calculated for class Bar.
0047<figref idref="DRAWINGS">FIG. 16</figref> is a minimum-cost spanning tree for the graph of <figref idref="DRAWINGS">FIG. 15</figref>.
0048<figref idref="DRAWINGS">FIG. 17</figref> is a flowchart showing a method for ordering data members, such as those shown in the graph of <figref idref="DRAWINGS">FIG. 15</figref>.
DETAILED DESCRIPTION
0049The invention is directed toward a method and system for laying out data members of software objects. In one embodiment illustrated herein, the invention is incorporated into a runtime environment associated with the “COM+” component of an operating system entitled “MICROSOFT WINDOWS 2000,” both marketed by Microsoft Corporation of Redmond, Wash. Briefly described, this software is a scaleable, high-performance network and computer operating system providing an object execution environment for object programs conforming to COM and other specifications. COM+ also supports distributed client/server computing. The COM+ component incorporates new technology as well as object services from prior object systems, including the MICROSOFT Component Object Model (COM), the MICROSOFT Distributed Component Object Model (DCOM), and the MICROSOFT Transaction Server (MTS).
0000Exemplary Operating Environment
0050<figref idref="DRAWINGS">FIG. 1</figref> and the following discussion are intended to provide a brief, general description of a suitable computing environment in which the invention may be implemented. While the invention will be described in the general context of computer-executable instructions of a computer program that runs on a computer, the invention also may be implemented in combination with other programs. Generally, programs include routines, software objects (also called components), data structures, etc. that perform particular tasks or implement particular abstract data types. Moreover, the invention may be practiced with other computer system configurations, including single- or multiprocessor computer systems, minicomputers, mainframe computers, as well as personal computers, hand-held computing devices, microprocessor-based or programmable consumer electronics, and the like. The illustrated embodiment of the invention also is practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. But, some embodiments of the invention can be practiced on stand-alone computers. In a distributed computing environment, program modules may be located in both local and remote memory storage devices.
0051With reference to <figref idref="DRAWINGS">FIG. 1</figref>, an exemplary system for implementing the invention includes a conventional computer <b>20</b>, including a processing unit <b>21</b>, a system memory <b>22</b>, and a system bus <b>23</b> that couples various system components including the system memory to the processing unit <b>21</b>. The processing unit may be any of various commercially available processors, including Intel x86, Pentium and compatible microprocessors from Intel and others, including Cyrix, AMD and Nexgen; Alpha from Digital; MIPS from MIPS Technology, NEC, IDT, Siemens, and others; and the PowerPC from IBM and Motorola. Dual microprocessors and other multi-processor architectures also can be used as the processing unit <b>21</b>.
0052The system bus may be any of several types of bus structure including a memory bus or memory controller, a peripheral bus, and a local bus using any of a variety of conventional bus architectures such as PCI, VESA, Microchannel, ISA and EISA, to name a few. The system memory includes read only memory (ROM) <b>24</b> and random access memory (RAM) <b>25</b>. A basic input/output system (BIOS), containing the basic routines that help to transfer information between elements within the computer <b>20</b>, such as during start-up, is stored in ROM <b>24</b>.
0053The computer <b>20</b> further includes a hard disk drive <b>27</b>, a magnetic disk drive <b>28</b>, e.g., to read from or write to a removable disk <b>29</b>, and an optical disk drive <b>30</b>, e.g., for reading a CD-ROM disk <b>31</b> or to read from or write to other optical media. The hard disk drive <b>27</b>, magnetic disk drive <b>28</b>, and optical disk drive <b>30</b> are connected to the system bus <b>23</b> by a hard disk drive interface <b>32</b>, a magnetic disk drive interface <b>33</b>, and an optical drive interface <b>34</b>, respectively. The drives and their associated computer-readable media provide nonvolatile storage of data, data structures, computer-executable instructions, etc. for the computer <b>20</b>. Although the description of computer-readable media above refers to a hard disk, a removable magnetic disk and a CD, it should be appreciated by those skilled in the art that other types of media which are readable by a computer, such as magnetic cassettes, flash memory cards, digital video disks, Bernoulli cartridges, and the like, may also be used in the exemplary operating environment.
0054A number of programs may be stored in the drives and RAM <b>25</b>, including an operating system <b>35</b>, one or more application programs <b>36</b>, other programs <b>37</b>, and program data <b>38</b>. The operating system <b>35</b> in the illustrated computer may be the MICROSOFT WINDOWS NT Server operating system, together with the before mentioned MICROSOFT Transaction Server.
0055A user may enter commands and information into the computer <b>20</b> through a keyboard <b>40</b> and pointing device, such as a mouse <b>42</b>. Other input devices (not shown) may include a microphone, joystick, game pad, satellite dish, scanner, or the like. These and other input devices are often connected to the processing unit <b>21</b> through a serial port interface <b>46</b> that is coupled to the system bus, but may be connected by other interfaces, such as a parallel port, game port or a universal serial bus (USB). A monitor <b>47</b> or other type of display device is also connected to the system bus <b>23</b> via an interface, such as a video adapter <b>48</b>. In addition to the monitor, computers typically include other peripheral output devices (not shown), such as speakers and printers.
0056The computer <b>20</b> may operate in a networked environment using logical connections to one or more remote computers, such as a remote client computer <b>49</b>. The remote computer <b>49</b> may be a workstation, a terminal computer, another server computer, a router, a peer device or other common network node, and typically includes many or all of the elements described relative to the computer <b>20</b>, although only a memory storage device <b>50</b> has been illustrated in <figref idref="DRAWINGS">FIG. 1</figref>. The logical connections depicted in <figref idref="DRAWINGS">FIG. 1</figref> include a local area network (LAN) <b>51</b> and a wide area network (WAN) <b>52</b>. Such networking environments are commonplace in offices, enterprise-wide computer networks, intranets, extranets, and the Internet.
0057When used in a LAN networking environment, the computer <b>20</b> is connected to the local network <b>51</b> through a network interface or adapter <b>53</b>. When used in a WAN networking environment, the computer <b>20</b> typically includes a modem <b>54</b>, or is connected to a communications server on the LAN, or has other means for establishing communications over the wide area network <b>52</b>, such as the Internet. The modem <b>54</b>, which may be internal or external, is connected to the system bus <b>23</b> via the serial port interface <b>46</b>. In a networked environment, program modules depicted relative to the computer <b>20</b>, or portions thereof, may be stored in the remote memory storage device. It will be appreciated that the network connections shown are exemplary and other means of establishing a communications link between the computers may be used.
0058In accordance with the practices of persons skilled in the art of computer programming, the present invention is described below with reference to acts and symbolic representations of operations that are performed by the computer <b>20</b>, unless indicated otherwise. Such acts and operations are sometimes referred to as being computer-executed. It will be appreciated that the acts and symbolically represented operations include the manipulation by the processing unit <b>21</b> of electrical signals representing data bits which causes a resulting transformation or reduction of the electrical signal representation, and the maintenance of data bits at memory locations in the memory system (including the system memory <b>22</b>, hard drive <b>27</b>, floppy disks <b>29</b>, and CD-ROM <b>31</b>) to thereby reconfigure or otherwise alter the computer system's operation, as well as other processing of signals. The memory locations where data bits are maintained are physical locations that have particular electrical, magnetic, or optical properties corresponding to the data bits.
0000Object Overview
0059<figref idref="DRAWINGS">FIG. 2</figref> and the following discussion are intended to provide an overview of software objects, using the MICROSOFT Component Object Model (COM) as an exemplary object model. In the illustrated embodiments, a software management framework is implemented in an extension to the MICROSOFT COM Environment termed “COM+.” COM is a model for accommodating software objects and can be implemented on a variety of platforms, such as the MICROSOFT WINDOWS NT operating system. In the illustrated embodiments of the invention, the software objects conform to the MICROSOFT Component Object Model (“COM”) specification (i.e., are implemented as a “COM Object” <b>76</b>) and are executed using the COM+ services of the MICROSOFT WINDOWS 2000 operating system, but alternatively may be implemented according to other object standards (including the CORBA (Common Object Request Broker Architecture) specification of the Object Management Group and JAVABEANS by Sun Microsystems) and executed under object services of another operating system. The COM specification defines binary standards for objects and their interfaces which facilitate the integration of software objects into programs. (For a detailed discussion of COM and OLE, see Kraig Brockschmidt, <i>Inside OLE, Second Edition</i>, Microsoft Press, Redmond, Washington (1995)).
0060In accordance with COM, the COM object <b>60</b> is represented in the computer system <b>20</b> (<figref idref="DRAWINGS">FIG. 1</figref>) by an instance data structure <b>62</b>, a virtual function table <b>64</b>, and member methods (also called member functions) <b>66</b>–<b>68</b>. The instance data structure <b>62</b> contains a pointer <b>70</b> to the virtual function table <b>64</b> and data <b>72</b> (also referred to as data members, or properties of the object). A pointer is a data value that holds a reference to an item. As will be explained in greater detail below, the conventional instance data structure <b>70</b> is modified to accommodate grouping the data members into separate groups. The virtual function table <b>64</b> contains entries <b>76</b>–<b>78</b> for the member methods <b>66</b>–<b>68</b>. Each of the entries <b>76</b>–<b>78</b> contains a reference to the code <b>66</b>–<b>68</b> that implements the corresponding member methods.
0061The pointer <b>70</b>, the virtual function table <b>64</b>, and the member methods <b>66</b>–<b>68</b> implement an interface of the COM object <b>60</b>. By convention, the interfaces of a COM object are illustrated graphically as a plug-in jack as shown for the software object <b>1104</b> in <figref idref="DRAWINGS">FIG. 11</figref>. Also, interfaces conventionally are given names beginning with a capital “I.” In accordance with COM, the COM object <b>60</b> can include multiple interfaces, which are implemented with one or more virtual function tables. The member function of an interface is denoted as “IInterfaceName::MethodName.”
0062The virtual function table <b>64</b> and member methods <b>66</b>–<b>68</b> of the COM object <b>60</b> are provided by an object server program <b>80</b> (hereafter “object server DLL”) which is stored in the computer <b>20</b> (<figref idref="DRAWINGS">FIG. 1</figref>) as a dynamic link library file (denoted with a “.dll” file name extension). In accordance with COM, the object server DLL <b>80</b> includes code for the virtual function table <b>64</b> and member methods <b>66</b>–<b>68</b> of the classes that it supports, and also includes a class factory <b>82</b> that generates the instance data structure <b>62</b> for an object of the class.
0063Other objects and programs (referred to as a “client” of the COM object <b>60</b>) access the functionality of the COM object by invoking the member methods through the COM object's interfaces. Typically however, the COM object is first instantiated (i.e., by causing the class factory to create the instance data structure <b>62</b> of the object); and the client obtains an interface pointer to the COM object.
0064Before the COM object <b>60</b> can be instantiated, the object is first installed on the computer <b>20</b>. Typically, installation involves installing a group of related objects called a package. The COM object <b>60</b> is installed by storing the object server DLL file(s) <b>80</b> that provides the object in data storage accessible by the computer <b>20</b> (typically the hard drive <b>27</b>, shown in <figref idref="DRAWINGS">FIG. 1</figref>), and registering COM attributes (e.g., class identifier, path and name of the object server DLL file <b>80</b>, etc.) of the COM object in one or more data stores storing configuration information. Configuration data stores for the object include the registry and the catalog.
0065A client requests instantiation of the COM object using system-provided services and a set of standard, system-defined component interfaces based on class and interface identifiers assigned to the COM Object's class and interfaces. More specifically, the services are available to client programs as application programming interface (API) functions provided in the COM+ library, which is a component of the MICROSOFT WINDOWS 2000 operating system in a file named “OLE32.DLL.” Other versions of COM+ or other object services may use another file or another mechanism. Also in COM+, classes of COM objects are uniquely associated with class identifiers (“CLSIDs”), and registered by their CLSID in the registry (or the catalog, or both). The registry entry for a COM object class associates the CLSID of the class with information identifying an executable file that provides the class (e.g., a DLL file having a class factory to produce an instance of the class). Class identifiers are 128-bit globally unique identifiers (“GUIDs”) that the programmer creates with a COM+ service named “CoCreateGUID” (or any of several other APIs and utilities that are used to create universally unique identifiers) and assigns to the respective classes. The interfaces of a component additionally are associated with interface identifiers (“IDs”).
0066In particular, the COM+ library provides an API function, “CoCreateInstance( ),” that the client program can call to request creation of a component using its assigned CLSID and an IID of a desired interface. In response, the “CoCreateInstance( )” API looks up the registry entry of the requested CLSID in the registry to identify the executable file for the class. The “CoCreateInstance( )” API function then loads the class' executable file, and uses the class factory in the executable file to create an instance of the COM object <b>60</b>. Finally, the “CoCreateInstance( )” API function returns a pointer of the requested interface to the client program. The “CoCreateInstance( )” API function can load the executable file either in the client program's process, or into a server process which can be either local or remote (i.e., on the same computer or a remote computer in a distributed computer network) depending on the attributes registered for the COM object <b>60</b> in the system registry.
0067Once the client of the COM object <b>60</b> has obtained this first interface pointer of the COM object, the client can obtain pointers of other desired interfaces of the component using the interface identifier associated with the desired interface. COM+ defines several standard interfaces generally supported by COM objects including the “IUnknown” interface. This interface includes a member function named “QueryInterface( ).” The “QueryInterface( )” function can be called with an interface identifier as an argument, and returns a pointer to the interface associated with that interface identifier. The “IUnknown” interface of each COM object also includes member functions, “AddRef( )” and “Release( )”, for maintaining a count of client programs holding a reference (e.g., an interface pointer) to the COM object. By convention, the “IUnknown” interface's member functions are included as part of each interface on a COM object. Thus, any interface pointer that the client obtains to an interface of the COM object <b>60</b> can be used to call the QueryInterface function.
0000Execution Engine Overview
0068For purposes of illustration, data layout optimization is shown implemented in an execution engine. An exemplary computer system <b>302</b> with an exemplary execution engine <b>322</b> is shown in <figref idref="DRAWINGS">FIG. 3</figref>. In the computer system <b>302</b>, software <b>314</b> is provided by any of a number of means, such as by online or physical distribution. The software <b>314</b> includes one or more object class definitions <b>312</b>. In some systems, information relating to the object class definitions <b>312</b> is stored in a central configuration store called a registry or catalog.
0069When the functionality provided by the software <b>314</b> is desired, the software is executed via the execution engine <b>322</b>. The execution engine <b>322</b> is sometimes called a “virtual machine” because it provides processing services as if it were a computer system. The execution engine <b>322</b> typically offers more flexibility than an actual computer centered around a particular central processing unit. For instance, the execution engine <b>322</b> might process software in varying degrees of compilation (e.g., fully compiled, partially compiled, or uncompiled) in a variety of formats (e.g., in various languages or according to various native machine formats).
0070The execution engine <b>322</b> includes various components to perform its work. Typically, a class loader <b>326</b> and garbage collector <b>328</b> are included, although many other arrangements are possible. In the example, the class loader <b>326</b> performs the work of laying out objects of the class specified in the object class definition <b>312</b> in the memory system <b>332</b>. For example, when a new object is created, the class loader <b>326</b> places an instance data structure (e.g., the instance data structure <b>62</b> shown in <figref idref="DRAWINGS">FIG. 2</figref>) at a particular location within the memory system <b>332</b>. Further, the data members of an object (e.g., an integer field and an array) can be referenced in memory by referencing a particular address within the memory system <b>332</b>. Preferably, the software <b>314</b> is written without regard to where in the memory system <b>332</b> the data members will be located. The execution engine <b>322</b> handles the details of determining where the data members will be located and how to access them within the memory system <b>332</b>.
0071Although the memory system <b>332</b> is shown outside the execution engine <b>322</b>, in some scenarios, it may be more accurate to portray the memory system <b>332</b> as part of the execution engine <b>322</b>. In either case, the data members of an object are arranged within the memory system <b>332</b> in such a way that they can be referenced in memory for reading and writing by the software <b>314</b>.
0000Memory System Overview
0072The principles of the invention can be applied to a wide variety of memory systems having architectures with at least two hierarchically-related portions of memory. These two portions of memory are sometimes referred to as a primary memory and a secondary memory.
0073For example, a virtual memory system <b>402</b> with an exemplary hierarchical memory architecture is illustrated in <figref idref="DRAWINGS">FIG. 4</figref>. In the example, a processing unit <b>412</b> has an associated cache <b>414</b>, and the system <b>402</b> includes the main RAM <b>424</b> and the hard disk <b>434</b>. For example, the main RAM <b>424</b> might take the form of 512 megabytes of RAM, and the hard disk <b>434</b> might be in the form of an 8 gigabyte hard disk. Many other arrangements and forms of storage are possible.
0074In accordance with accepted memory terminology the main RAM <b>424</b> is said to be “closer” to the processing unit and exhibits a lower latency (i.e., is faster) than the hard disk <b>434</b>. Typically, elements of the memory system <b>402</b> closer to the processing unit <b>412</b> exhibit a lower latency but have less capacity than elements further away. Further, in a system having virtual memory, the processing unit <b>412</b> typically does not work directly on items on the hard disk <b>434</b>, but instead first loads them into the main RAM <b>424</b>.
0075In such a scenario, the main RAM <b>424</b> can be called the “primary” (or “main”) memory, and the memory pages stored on the hard disk <b>434</b> can be called the “secondary” memory. Other arrangements are possible; the primary memory generally exhibits a lower latency than the secondary memory. In some systems, the cache <b>414</b> in combination with the main RAM <b>424</b> are considered to be part of the primary memory; in others, the cache <b>414</b> is not considered part of the virtual memory system <b>402</b>, but is rather complementary to it. Further, there are often additional levels of cache within or in addition to the cache <b>414</b>. Further details of virtual memory systems are discussed at length in Denning, “Virtual Memory,” <i>Computer Science and Engineering Handbook </i>(Tucker, Ed.), Chapter 80, pp. 1747–1760, 1997.
0076In a virtual memory system, the memory system can, for example, use the hard disk <b>434</b> to supplement the main RAM <b>424</b>. Thus, the virtual address space available to a program is much larger than the RAM available to the program. In this way, a computer system with a virtual memory system can run programs that will not fit in the main RAM <b>424</b> alone. Ideally, the virtual memory system <b>402</b> is transparent to the program, which simply provides a virtual memory address that refers to memory anywhere in the virtual memory system <b>402</b>, whether it happens to reside in the main RAM <b>424</b> or on the hard disk <b>434</b>.
0077The virtual memory is typically divided into units called “pages” (sometimes called “blocks”). The pages of a memory system can be either of a fixed or variable size. The contents of a program can be spread out over multiple pages. Typically, pages representing the program instructions and program data initially reside on the hard disk <b>434</b>. As the program executes, the processing unit references data on these pages, so they are loaded into the main RAM <b>424</b>. The set of pages in the main RAM <b>424</b> is sometimes called the “resident set”. The virtual memory system <b>402</b> tracks which pages are available in the resident set. If an executing program specifies a virtual memory address referring to a page not in the resident set (i.e., not in main RAM <b>424</b>), the virtual memory system responds by loading the page into the main RAM <b>424</b> for access by the processing unit.
0078As a program executes, a memory reference to a portion of memory present at a particular level in the hierarchy is called a “hit”; otherwise, it is a “miss.” In the context of a cache, a cache hit means the item was present in cache when it was needed. If a memory reference is made to a virtual memory page not in primary memory, the miss is often referred to as a “page fault.” Excessive page faults can particularly degrade performance because the processing unit typically suspends execution of the program until the page is fetched from a high-latency device (e.g., a mechanical device such as a hard disk).
0079Typically, the resident set for a program is limited to a certain number of pages, which may be less than the total pages required by the program. In other words, the entire program might not fit into the main RAM <b>424</b>. Consequently, there will come a time when the processing unit requires access to a page, but the resident set has reached its limit. In such a situation, the virtual memory system <b>402</b> replaces a page in the resident set (i.e., in RAM <b>424</b>) with a new page. Various approaches sometimes called “replacement policies” have been formulated to determine which page should be replaced. For example, one approach replaces the least recently used page under the assumption that the least recently used page is least likely to be needed again soon. It would be inefficient, for example, to replace a page that is immediately reloaded back into the resident set.
0080Although a superior replacement policy can improve performance, performance improvement is bounded by how items are arranged within the pages (i.e., the layout of the items). The illustrated embodiments employ various techniques and features for determining an arrangement that results in better performance and further employ various techniques and features for achieving such an arrangement. The result is increased performance when a program is executed in an environment having primary and secondary memory such as the illustrated virtual memory system <b>402</b>.
0000Profiling Overview
0081In various illustrated embodiments, profiling operates to monitor memory references to the data members of an object. Profiling can be achieved by a variety of methods. For example, the code of a program can be provided to an instrumentor, which writes instrumented code. When executed, the instrumented code produces memory-reference trace data for memory references to data members, which can be stored, for example, in a database. The memory-reference trace data can then be used to determine how the class loader arranges the data members of an object.
0082An exemplary database of memory-reference trace data might have a record for each memory reference to a data member to indicate the data member being referenced and when it was referenced in memory. Since profiling is typically applied to software having multiple objects with multiple data members referenced multiple times in memory, the database may become quite large. So, various techniques can be used to reduce its size. In some illustrated embodiments, the arrangement can be determined solely based on how many times each data member was referenced alone (without information about when it was referenced), so the memory-reference trace data need only keep a count of how many memory references were made to each data member being monitored. In other embodiments (e.g., an affinity-based technique), information about when the memory references were made is recorded.
0083Alternatively, a technique called “static profiling” might be used. Static profiling analyzes code without running it to determine profiling data. For example, it might be apparent from the code that a memory reference to one data member is performed responsive to a memory reference to another data member in a conditional statement.
0000Data Member Grouping Overview
0084When a developer specifies a software object, the specification includes a set of data members. At some point after the program is developed, these data members are translated from a high level definition (e.g., a set of data structures defined in C++ or a definition according to a scripting language) to an actual layout in the memory system (e.g., a virtual memory system). Many translation scenarios are possible. For example, the translation can be partially handled by a compiler, partially handled by an interpreter, or otherwise handled in a partially-compiled language.
0085For example, in the illustrated embodiments, a class loader loads an object into the virtual memory system when a program references an object. The class loader assigns an arrangement for the data members of the object by specifying which data members will reside where in the virtual memory system. Generally, the loader places more frequently accessed data members into a set of groups (called “hot groups”) and less frequently accessed data members into another set of groups (called “cold groups”); however a group may fall anywhere in the spectrum between “hot” and “cold.” The loader can place data members in the same group in neighboring locations in the virtual memory system. Further, the memory system typically has a set units (e.g., pages or blocks) that are separately loadable into primary memory.
0086Neighboring members in the same group tend to fall in the same pages of the virtual memory system. Members of different groups tend to reside in different pages of the virtual memory system. Consequently, when a program references a data member in one group, the virtual memory system tends to move the pages associated with the group having the referenced data member into primary memory, but the pages associated with the other group tend to be left behind in secondary memory.
0087A class loader could be constructed to interface with the virtual memory system to specifically assign the data members to particular pages of the virtual memory system. Further analysis of the arrangement could be done based on the size of a page in the virtual memory system.
0000Overview of Some Advantages
0088Arranging the data members with the class loader as described above results in several advantages. For purposes of comparison, consider a scenario in which the data members are not explicitly arranged by the class loader. For example, consider software in which thousands of references are made to various data members of an object over the lifetime of the object. Further, the resident set for the software is of such a size that it cannot accommodate all the data members, so page faults cause pages to be constantly swapped in and out of primary memory.
0089Some of the data members are particularly active; 98 percent of the references to data members are made to them. Some of the other data members are accessed only once over the lifetime of the object.
0090A class loader might unfortunately happen to place one of the active data members and one of the once-only data members alone on a page of virtual memory. Since the active member is referenced often, there could be many page faults for the page. For each page fault, the once-only member is copied into primary memory, even though it is accessed only once over the lifetime of the object. This phenomenon can be called “dragging around dead data” because the once-only data member is being repetitively copied into primary memory, even when it is not needed.
0091Instead, a more advantageous arrangement is for the class loader to place the data members into groups as described above. If the active data members are placed in one group, they will likely reside in the same pages of virtual memory. Likewise, if the once-only data members are placed in a different group, they will likely reside in the same pages of virtual memory. Accordingly, the “dead data” is less likely to be “dragged around” as references are made to the data members. In this way, the space of the resident set is used more effectively, resulting in fewer page faults.
0092Similarly, data members in the same groups will tend to co-reside in any cache that may be in the memory system (including processing unit-resident cache). Thus, properly grouping the data will also lead to fewer cache misses, making more effective use of the cache.
Illustrated Embodiments
0093A shorthand name for techniques that group data members of objects within memory to enhance performance is “data layout optimization.” “Optimization” or “optimize” means improvement in the direction of optimal; an optimal layout may or may not be produced by a data layout optimization technique.
0094An overview of an exemplary data layout optimization method is shown in <figref idref="DRAWINGS">FIG. 5</figref>. At <b>502</b>, profile data for the object is collected. Examples of profile data are shown in the illustrated embodiments below. At <b>504</b>, the data members of an object are grouped based on the profile data. Techniques for achieving such grouping are shown below. Then, at <b>506</b>, at runtime, data members from the same groups are arranged at neighboring locations in the memory system; members from different groups are placed at locations separately loadable from each other (e.g., members from Group A are placed at locations in one page of memory, and members from Group B are placed at locations in another page of memory).
0095An overview of an exemplary architecture of a data layout optimization system is shown in <figref idref="DRAWINGS">FIGS. 6</figref>, <b>7</b>, and <b>8</b>. <figref idref="DRAWINGS">FIG. 6</figref> shows an exemplary arrangement for collecting profiling data. The software <b>602</b> to be profiled includes an object class definition <b>604</b>. For example, the object class definition <b>604</b> could specify a set of data members of varying sizes and types.
0096The instrumentor <b>606</b> takes the software <b>602</b> as input and produces the instrumented software <b>622</b> (which includes an object class definition <b>624</b> identical to or based on the object class definition <b>604</b>) for generating the profiling data <b>632</b>. Further, various options <b>612</b> can be specified to the instrumentor <b>606</b> to tailor the instrumented software <b>622</b> to generate various types of profiling data <b>632</b>. In this way, profiling data for an object can be collected.
0097<figref idref="DRAWINGS">FIG. 7</figref> shows an exemplary arrangement for grouping data members of an object based on profiling data. A data member grouper <b>712</b> consults the profiling data <b>702</b> (e.g., profiling data <b>632</b> from <figref idref="DRAWINGS">FIG. 6</figref>) to determine how the data members of the object class definition <b>722</b> should be grouped. The data member grouper <b>712</b> produces a decorated object class definition <b>732</b>, which indicates in what groups the data members of the object class definition <b>722</b> will be grouped. Various options <b>714</b> can be specified to the data member grouper <b>712</b> to tailor the data member grouping process.
0098An exemplary decorated object class definition <b>732</b> is represented on a basic level as shown in inset <b>734</b>. Data members m<sub>1 </sub>and m<sub>4 </sub>have been grouped into group G<sub>1</sub>, and data members m<sub>2</sub>, m<sub>3</sub>, and m<sub>5 </sub>have been grouped into group G<sub>2</sub>. A variety of other information can be included in the decorated object class definition <b>732</b> to further specify layout as described in more detail below.
0099<figref idref="DRAWINGS">FIG. 8</figref> shows an exemplary arrangement for arranging the data members in the same group at neighboring locations in the memory system at runtime. The software <b>802</b> includes a decorated object class definition <b>804</b>, such as the decorated object class definition <b>732</b> of <figref idref="DRAWINGS">FIG. 7</figref>. At runtime, an execution engine <b>810</b> executes the software. During execution, the class loader <b>812</b> arranges data members of the object in the memory system <b>822</b> by placing data members in the same group at neighboring locations in the memory system <b>822</b>. Further, data members from one group can be placed in a unit of memory separately loadable from data members of another group.
0100As the program is run, the memory system <b>822</b> may appear as generally shown in inset <b>824</b>. Two data members m<sub>1 </sub>and m<sub>4 </sub>of group G<sub>1 </sub>reside in one page <b>832</b> in primary memory of the memory system <b>822</b> and have also been placed in cache. Two other data members m<sub>2</sub>, m<sub>5</sub>, and m<sub>3 </sub>of group G<sub>2 </sub>reside in another page <b>834</b> in secondary memory of the memory system <b>822</b>. The data members of group G<sub>2 </sub>are separately loadable into primary memory, and are not currently loaded into primary memory.
0101An advantage to the arrangement shown in <figref idref="DRAWINGS">FIG. 8</figref> is that if the data member grouper has placed, for example, more frequently used data members in group G<sub>1 </sub>and less frequently used data members in group G<sub>2</sub>, fewer page faults and cache misses will result. This is partly because each page fault for the page <b>832</b> brings in the group G<sub>1 </sub>of the more referenced data members, while leaving the less referenced data members behind in page <b>834</b>. Thus, in effect, a page of primary memory is conserved for use by another page (e.g., one which would have been replaced to load in the data members in group G<sub>2</sub>).
0102The overview shown in <figref idref="DRAWINGS">FIGS. 5–8</figref> is a basic representation of possible implementations of a data layout optimization technique. In practice, the data layout may involve many more objects, data members, and pages (or other units of memory) in a memory system.
0000Instrumentation
0103A wide variety of instrumentation techniques can be used to generate profile data for use during data layout optimization. Some tools capture complete traces of software by generating a record in a database for each memory reference to any data. Such a trace can prove to be quite large, so various techniques can be used to reduce the size of the profile data. On a general level, the instrumentation attempts to measure the number of memory references to data members of an object (e.g., fields of an object).
0104An exemplary format for data captured during instrumentation appears in Table 1.
0105<tables id="TABLE-US-00001" num="00001"><table frame="none" colsep="0" rowsep="0"><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217pt" align="center" /><thead><row><entry namest="1" nameend="1" rowsep="1">TABLE 1</entry></row></thead><tbody valign="top"><row><entry namest="1" nameend="1" align="center" rowsep="1" /></row><row><entry>Logical Data Captured for Data References</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="3"><colspec colname="offset" colwidth="14pt" align="left" /><colspec colname="1" colwidth="63pt" align="left" /><colspec colname="2" colwidth="140pt" align="left" /><tbody valign="top"><row><entry /><entry>Field</entry><entry>Description</entry></row><row><entry /><entry namest="offset" nameend="2" align="center" rowsep="1" /></row><row><entry /><entry>ObjClass</entry><entry>Class of the Object having data being</entry></row><row><entry /><entry /><entry>referenced</entry></row><row><entry /><entry>FieldID</entry><entry>Identifier of the data member (e.g., field)</entry></row><row><entry /><entry /><entry>of the object being referenced</entry></row><row><entry /><entry>StaticOrNot</entry><entry>Boolean field to indicate whether the data</entry></row><row><entry /><entry /><entry>member is a static field</entry></row><row><entry /><entry>Width</entry><entry>Width of data member (e.g., byte, dword,</entry></row><row><entry /><entry /><entry>etc.)</entry></row><row><entry /><entry>RefType</entry><entry>Either “read” or “write”</entry></row><row><entry /><entry>Time</entry><entry>Indicates a time at which the data was</entry></row><row><entry /><entry /><entry>referenced (e.g., microsecond resolution</entry></row><row><entry /><entry /><entry>or better)</entry></row><row><entry /><entry>ObjectID</entry><entry>Identifier of the object instance</entry></row><row><entry /><entry namest="offset" nameend="2" align="center" rowsep="1" /></row></tbody></tgroup></table></tables><br /> Some of the described fields (e.g., Width, RefType, Time, and ObjectID) might be useful for research to further improve data layout optimization (e.g., to research more specialized reorganization heuristics), but need not be implemented in practice.
0106One way of reducing the size of the profile data is to track the number of memory references in counters (e.g., a read counter and a write counter) for each data member and then write one record to the database for each method call. Preferably, the counters are 64-bit integers. In such a system, repetitive entries of the format shown in Table 2 can be used.
0107<tables id="TABLE-US-00002" num="00002"><table frame="none" colsep="0" rowsep="0"><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217pt" align="center" /><thead><row><entry namest="1" nameend="1" rowsep="1">TABLE 2</entry></row></thead><tbody valign="top"><row><entry namest="1" nameend="1" align="center" rowsep="1" /></row><row><entry>Profiling Data Captured for References During a Method Call</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="1" colwidth="56pt" align="left" /><colspec colname="2" colwidth="161pt" align="left" /><tbody valign="top"><row><entry>Field</entry><entry>Description</entry></row><row><entry namest="1" nameend="2" align="center" rowsep="1" /></row><row><entry>ObjClass</entry><entry>Class of the Object having data being referenced</entry></row><row><entry>FieldID</entry><entry>Identifier of the data member (e.g., field) of the</entry></row><row><entry /><entry>object being referenced</entry></row><row><entry>StaticOrNot</entry><entry>Boolean field to indicate whether the data member</entry></row><row><entry /><entry>is a static field</entry></row><row><entry>Hits</entry><entry>Number of memory references to the data member</entry></row><row><entry>Width</entry><entry>Width of data member (e.g., byte, dword, etc.)</entry></row><row><entry>ReadHitCount</entry><entry>Number of memory references reading the data</entry></row><row><entry /><entry>member</entry></row><row><entry>WriteHitCount</entry><entry>Number of memory references writing to the data</entry></row><row><entry /><entry>member</entry></row><row><entry namest="1" nameend="2" align="center" rowsep="1" /></row></tbody></tgroup></table></tables><br /> Again, some of the fields are optional, and the field Hits can be derived from ReadHitCount+WriteHitCount (if used).
0108Another instrumentation technique involves setting a timer and then tracking the number of memory references to each data member in counters (e.g., read and write counters). Upon expiration of the timer, a record with a column for each data member is written to the database and the counters are reset to zero. For data members having zero references, space can be saved by omitting the number. The format of such records resembles those shown in Table 2.
0109Still another technique involves using an overflow interrupt. On machines supporting an overflow interrupt, a record is generated when such an overflow interrupt is generated due to a counter overflow. Upon overflow, a record is written to the database.
0110Still another technique possibly used in conjunction with the method-based or timer-based technique (or similar techniques) is one that generates a record for the database whenever an overflow of the counter is likely. The likelihood of overflow can be represented by saving the time trend of the counts and extrapolating. Example code for forecasting an overflow is shown in <figref idref="DRAWINGS">FIG. 9</figref>. The counter L tracks the number of memory references (i.e., “hits”) to a data member of a certain object class during, for example, a method call. The code shown in <figref idref="DRAWINGS">FIG. 9</figref> is executed upon exit from an object's method. The counter H is an overall counter tracking sums of L. Steps are taken to avoid an overflow of H.
0111Derivation of the forecaster formula “(H−H<b>1</b>)+H” is illustrated in the graph <b>1002</b> of <figref idref="DRAWINGS">FIG. 10</figref>. Assume <b>1012</b> represents a point at which the value of the overall counter was observed to be H<b>1</b> (the previous value of the overall counter) at time T−D<b>1</b>. Further, <b>1014</b> represents a point at which the overall counter was observed to be H at time T. Point <b>1016</b> represents a point at which the overall counter will be observed to be the forecast value F at time T+D<b>1</b> (e.g., after the next method call). Point <b>1016</b> can be extrapolated as shown in Table 3.
0112<tables id="TABLE-US-00003" num="00003"><table frame="none" colsep="0" rowsep="0"><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217pt" align="center" /><thead><row><entry namest="1" nameend="1" rowsep="1">TABLE 3</entry></row><row><entry namest="1" nameend="1" align="center" rowsep="1" /></row><row><entry>Extrapolation of Overflow Value</entry></row><row><entry namest="1" nameend="1" align="center" rowsep="1" /></row></thead><tbody valign="top"><row><entry /></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="35pt" align="left" /><colspec colname="1" colwidth="182pt" align="left" /><tbody valign="top"><row><entry /><entry><maths id="MATH-US-00001" num="00001"><math overflow="scroll"><mrow><mrow><mi>F</mi><mo></mo><mrow><mo>(</mo><mrow><mi>Forecast</mi><mo></mo><mstyle><mspace width="0.8em" height="0.8ex" /></mstyle><mo></mo><mi>value</mi></mrow><mo>)</mo></mrow></mrow><mo>=</mo><mrow><mstyle><mtext>H</mtext></mstyle><mo>+</mo><mrow><mfrac><mrow><mrow><mo>(</mo><mrow><mi>T</mi><mo>+</mo><mi>D2</mi></mrow><mo>)</mo></mrow><mo>-</mo><mi>T</mi></mrow><mrow><mi>T</mi><mo>-</mo><mrow><mo>(</mo><mrow><mi>T</mi><mo>-</mo><mi>D1</mi></mrow><mo>)</mo></mrow></mrow></mfrac><mo></mo><mrow><mo>(</mo><mrow><mi>H</mi><mo>-</mo><mi>H1</mi></mrow><mo>)</mo></mrow></mrow></mrow></mrow></math></maths><img file="US7013459B2_D0001.tif" /></entry></row><row><entry /><entry></entry></row><row><entry /><entry>Assuming D1 and D2 are both D, we have</entry></row><row><entry /><entry></entry></row><row><entry /><entry><maths id="MATH-US-00002" num="00002"><math overflow="scroll"><mrow><mtable><mtr><mtd><mrow><mi>F</mi><mo>=</mo><mrow><mi>H</mi><mo>+</mo><mrow><mfrac><mrow><mrow><mo>(</mo><mrow><mi>T</mi><mo>+</mo><mi>D</mi></mrow><mo>)</mo></mrow><mo>-</mo><mi>T</mi></mrow><mrow><mi>T</mi><mo>-</mo><mrow><mo>(</mo><mrow><mi>T</mi><mo>-</mo><mi>D</mi></mrow><mo>)</mo></mrow></mrow></mfrac><mo></mo><mrow><mo>(</mo><mrow><mi>H</mi><mo>-</mo><mi>H1</mi></mrow><mo>)</mo></mrow></mrow></mrow></mrow></mtd></mtr><mtr><mtd><mrow><mo>=</mo><mrow><mi>H</mi><mo>+</mo><mrow><mfrac><mrow><mi>T</mi><mo>+</mo><mi>D</mi><mo>-</mo><mi>T</mi></mrow><mrow><mi>T</mi><mo>-</mo><mi>T</mi><mo>+</mo><mi>D</mi></mrow></mfrac><mo></mo><mrow><mo>(</mo><mrow><mi>H</mi><mo>-</mo><mi>H1</mi></mrow><mo>)</mo></mrow></mrow></mrow></mrow></mtd></mtr><mtr><mtd><mrow><mo>=</mo><mrow><mi>H</mi><mo>+</mo><mrow><mfrac><mi>D</mi><mi>D</mi></mfrac><mo></mo><mrow><mo>(</mo><mrow><mi>H</mi><mo>-</mo><mi>H1</mi></mrow><mo>)</mo></mrow></mrow></mrow></mrow></mtd></mtr><mtr><mtd><mrow><mo>=</mo><mrow><mi>H</mi><mo>+</mo><mrow><mo>(</mo><mrow><mi>H</mi><mo>-</mo><mi>H1</mi></mrow><mo>)</mo></mrow></mrow></mrow></mtd></mtr></mtable><mo> </mo></mrow></math></maths><img file="US7013459B2_D0002.tif" /></entry></row><row><entry /><entry namest="offset" nameend="1" align="center" rowsep="1" /></row></tbody></tgroup></table></tables><br /> Thus, if it is determined that an overflow of the overall counter is likely, the counter is written to a database, and the overall counter is begun anew. The illustrated technique can be extended to construct forecasters of quadratic or higher degree.
Greedy Data Layout Optimization Technique
0113One data layout optimization technique, sometimes called “greedy,” groups the data members based on a simple ordering by the number of memory references as indicated by the profile data. The technique is greedy in the sense that data members having more references (as indicated by the profile data) are placed in a more favored group. The following illustrates various possible greedy data layout optimization techniques.
0114Using an instrumentation technique, such as one of the instrumentation techniques described above, profiling data such as that shown in Table 4 can be collected for an object class Foo during execution of a piece of software.
0115<tables id="TABLE-US-00004" num="00004"><table frame="none" colsep="0" rowsep="0"><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217pt" align="center" /><thead><row><entry namest="1" nameend="1" rowsep="1">TABLE 4</entry></row></thead><tbody valign="top"><row><entry namest="1" nameend="1" align="center" rowsep="1" /></row><row><entry>Profile Data for Class Foo</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="3"><colspec colname="offset" colwidth="42pt" align="left" /><colspec colname="1" colwidth="49pt" align="center" /><colspec colname="2" colwidth="126pt" align="center" /><tbody valign="top"><row><entry /><entry>Data Member</entry><entry>References</entry></row><row><entry /><entry namest="offset" nameend="2" align="center" rowsep="1" /></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="3"><colspec colname="offset" colwidth="42pt" align="left" /><colspec colname="1" colwidth="49pt" align="center" /><colspec colname="2" colwidth="126pt" align="char" char="." /><tbody valign="top"><row><entry /><entry>m<sub>1</sub></entry><entry>47</entry></row><row><entry /><entry>m<sub>2</sub></entry><entry>0</entry></row><row><entry /><entry>m<sub>3</sub></entry><entry>5</entry></row><row><entry /><entry>m<sub>4</sub></entry><entry>34</entry></row><row><entry /><entry>m<sub>5</sub></entry><entry>1</entry></row><row><entry /><entry namest="offset" nameend="2" align="center" rowsep="1" /></row></tbody></tgroup></table></tables><br /> In the example, the profile data generally indicates that certain data members are referenced more than others are. The profile data can thus be used to determine how to group the object's data members. <br /> Greedy Grouping Technique
0116In a greedy grouping technique, arrangement of data members is determined by sorting the fields from most referenced in memory to least referenced in memory. Various criteria can then be used to place the data members into “hot” (more referenced) and “cold” (lesser referenced) groups. Assuming the lesser referenced data members are less likely to be accessed at any given time, the greedy technique increases performance by facilitating loading the hotter groups into more readily accessible memory without having to move the data members in the colder groups along with them.
0000Data Layout Optimization Assistance Tools
0117Various techniques can be used to determine how to split a class (i.e., group the data members into groups). The examples listed here show splitting the data members into two groups, but a similar technique is used to split data members into three or more groups.
0118A simple splitting technique simply specifies a threshold (e.g., percentage of references) and splits the data members of a class into two groups: a hot group and a cold group. If the profiling data indicates a particular data member has at least the threshold (e.g., percentage of the references), it is placed in the hot group; data members having less than the threshold (e.g., percentage of references) are placed in the cold group.
0119In practice, however, the splitting technique can be more complex. A variety of techniques or mixture of techniques may result in superior performance. In some cases, it may not be advantageous to split the data members. For example, in an implementation in which splitting the data members introduces overhead, it is not advantageous to split a class into a hot group and a cold group if the size of the overhead in the hot group is not smaller than the size of the cold group.
0120An analysis of the profile data can be used to provide tools for assistance in deciding whether to split a class. These tools can be used, for example, by a developer to specify parameters during the data layout optimization process. Such tools include a threshold framework and a policy framework. The frameworks use formulas for hit-count statistics shown in Table 5 and global hit-count statistics shown in Table 6. The term “hit” is used to mean a memory reference to a data member (e.g., a object field).
0121<tables id="TABLE-US-00005" num="00005"><table frame="none" colsep="0" rowsep="0"><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217pt" align="center" /><thead><row><entry namest="1" nameend="1" rowsep="1">TABLE 5</entry></row><row><entry namest="1" nameend="1" align="center" rowsep="1" /></row><row><entry>Hit-Count Statistics for Class C<sub>i</sub></entry></row><row><entry namest="1" nameend="1" align="center" rowsep="1" /></row></thead><tbody valign="top"><row><entry /></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217pt" align="left" /><tbody valign="top"><row><entry>C<sub>i </sub>· NF = number of fields in class C<sub>i</sub></entry></row><row><entry>C<sub>i </sub>· HC<sub>j </sub>= number of hits on field j of class C<sub>i</sub>.</entry></row><row><entry></entry></row><row><entry><maths id="MATH-US-00003" num="00003"><math overflow="scroll"><mrow><mrow><mrow><msub><mi>C</mi><mi>i</mi></msub><mo>·</mo><mi>HC</mi></mrow><mo></mo><mstyle><mspace width="0.6em" height="0.6ex" /></mstyle><mo></mo><mrow><mo>(</mo><mrow><mstyle><mtext>total hit count in class </mtext></mstyle><mo></mo><msub><mi>C</mi><mi>i</mi></msub></mrow><mo>)</mo></mrow></mrow><mo>=</mo><mrow><munderover><mo>∑</mo><mrow><mi>j</mi><mo>=</mo><mn>1</mn></mrow><mrow><msub><mi>C</mi><mi>i</mi></msub><mo>·</mo><mi>NF</mi></mrow></munderover><mo></mo><mrow><msub><mi>C</mi><mi>i</mi></msub><mo>·</mo><msub><mi>HC</mi><mi>j</mi></msub></mrow></mrow></mrow></math></maths><img file="US7013459B2_D0003.tif" /></entry></row><row><entry></entry></row><row><entry><maths id="MATH-US-00004" num="00004"><math overflow="scroll"><mrow><mrow><mstyle><mtext>Then,</mtext></mstyle><mo></mo><mstyle><mspace width="0.6em" height="0.6ex" /></mstyle><mo></mo><mrow><msub><mi>C</mi><mi>i</mi></msub><mo>·</mo><mi>HA</mi></mrow><mo></mo><mstyle><mspace width="0.8em" height="0.8ex" /></mstyle><mo></mo><mstyle><mtext>(the average hit count in class </mtext></mstyle><mo></mo><msub><mi>C</mi><mi>i</mi></msub><mo></mo><mstyle><mspace width="0.8em" height="0.8ex" /></mstyle><mo></mo><mstyle><mtext>per field)</mtext></mstyle></mrow><mo>=</mo><mfrac><mrow><msub><mi>C</mi><mi>i</mi></msub><mo>·</mo><mi>HC</mi></mrow><mrow><msub><mi>C</mi><mi>i</mi></msub><mo>·</mo><mi>NF</mi></mrow></mfrac></mrow></math></maths><img file="US7013459B2_D0004.tif" /></entry></row><row><entry></entry></row><row><entry><maths id="MATH-US-00005" num="00005"><math overflow="scroll"><mrow><mrow><mrow><msub><mi>C</mi><mi>i</mi></msub><mo>·</mo><mi>HC2</mi></mrow><mo></mo><mstyle><mspace width="0.6em" height="0.6ex" /></mstyle><mo></mo><mstyle><mtext>(sum of squares of hit count in class </mtext></mstyle><mo></mo><msub><mi>C</mi><mi>i</mi></msub><mo></mo><mstyle><mtext>)</mtext></mstyle></mrow><mo>=</mo><mrow><munderover><mo>∑</mo><mrow><mi>j</mi><mo>=</mo><mn>1</mn></mrow><mrow><msub><mi>C</mi><mi>i</mi></msub><mo>·</mo><mi>NF</mi></mrow></munderover><mo></mo><msup><mrow><mo>(</mo><mrow><msub><mi>C</mi><mi>i</mi></msub><mo>·</mo><msub><mi>HC</mi><mi>j</mi></msub></mrow><mo>)</mo></mrow><mn>2</mn></msup></mrow></mrow></math></maths><img file="US7013459B2_D0005.tif" /></entry></row><row><entry></entry></row><row><entry><maths id="MATH-US-00006" num="00006"><math overflow="scroll"><mrow><mtable><mtr><mtd><mrow><mi>Then</mi><mo>,</mo></mrow></mtd></mtr><mtr><mtd><mtable><mtr><mtd><mrow><mtable><mtr><mtd><mrow><mrow><msub><mi>C</mi><mi>i</mi></msub><mo>·</mo><mi>SD</mi></mrow><mo></mo><mstyle><mspace width="0.6em" height="0.6ex" /></mstyle><mo></mo><mrow><mo>(</mo><mrow><mi>standard</mi><mo></mo><mstyle><mspace width="0.8em" height="0.8ex" /></mstyle><mo></mo><mi>deviation</mi><mo></mo><mstyle><mspace width="0.8em" height="0.8ex" /></mstyle><mo></mo><mi>of</mi></mrow></mrow></mrow></mtd></mtr><mtr><mtd><mrow><mrow><mi>hit</mi><mo></mo><mstyle><mspace width="0.8em" height="0.8ex" /></mstyle><mo></mo><mi>counts</mi><mo></mo><mstyle><mspace width="0.8em" height="0.8ex" /></mstyle><mo></mo><mi>in</mi><mo></mo><mstyle><mspace width="0.8em" height="0.8ex" /></mstyle><mo></mo><mi>class</mi><mo></mo><mstyle><mspace width="0.8em" height="0.8ex" /></mstyle><mo></mo><msub><mi>C</mi><mi>i</mi></msub></mrow><mo>)</mo></mrow></mtd></mtr></mtable><mo>=</mo><msqrt><mrow><mfrac><mn>1</mn><mrow><mi>Ci</mi><mo>·</mo><mi>NF</mi></mrow></mfrac><mo></mo><mrow><munderover><mo>∑</mo><mrow><mi>j</mi><mo>=</mo><mn>1</mn></mrow><mrow><msub><mi>C</mi><mi>i</mi></msub><mo>·</mo><mi>NF</mi></mrow></munderover><mo></mo><msup><mrow><mo>(</mo><mrow><mrow><msub><mi>C</mi><mi>i</mi></msub><mo>·</mo><msub><mi>HC</mi><mi>j</mi></msub></mrow><mo>-</mo><mrow><msub><mi>C</mi><mi>i</mi></msub><mo>·</mo><mi>HA</mi></mrow></mrow><mo>)</mo></mrow><mn>2</mn></msup></mrow></mrow></msqrt></mrow></mtd></mtr><mtr><mtd><mrow><mo>=</mo><msqrt><mrow><mrow><mfrac><mn>1</mn><mrow><mi>Ci</mi><mo>·</mo><mi>NF</mi></mrow></mfrac><mo></mo><mrow><msub><mi>C</mi><mi>i</mi></msub><mo>·</mo><mi>HC2</mi></mrow></mrow><mo>-</mo><msup><mrow><mo>(</mo><mrow><msub><mi>C</mi><mi>i</mi></msub><mo>·</mo><mi>HA</mi></mrow><mo>)</mo></mrow><mn>2</mn></msup></mrow></msqrt></mrow></mtd></mtr></mtable></mtd></mtr></mtable><mo> </mo></mrow></math></maths><img file="US7013459B2_D0006.tif" /></entry></row><row><entry namest="1" nameend="1" align="center" rowsep="1" /></row></tbody></tgroup></table></tables>
0122<tables id="TABLE-US-00006" num="00006"><table frame="none" colsep="0" rowsep="0"><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217pt" align="center" /><thead><row><entry namest="1" nameend="1" rowsep="1">TABLE 6</entry></row><row><entry namest="1" nameend="1" align="center" rowsep="1" /></row><row><entry>Global Hit-Count Statistics</entry></row><row><entry namest="1" nameend="1" align="center" rowsep="1" /></row></thead><tbody valign="top"><row><entry /></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217pt" align="left" /><tbody valign="top"><row><entry>NC = number of classes in profiling data for a program</entry></row><row><entry></entry></row><row><entry><maths id="MATH-US-00007" num="00007"><math overflow="scroll"><mrow><mrow><mi>GNF</mi><mo></mo><mstyle><mspace width="0.6em" height="0.6ex" /></mstyle><mo></mo><mstyle><mtext>(global number of fields in all classes) </mtext></mstyle></mrow><mo>=</mo><mrow><munderover><mo>∑</mo><mrow><mi>i</mi><mo>=</mo><mn>1</mn></mrow><mi>NC</mi></munderover><mo></mo><mrow><msub><mi>C</mi><mi>i</mi></msub><mo>·</mo><mi>NF</mi></mrow></mrow></mrow></math></maths><img file="US7013459B2_D0007.tif" /></entry></row><row><entry></entry></row><row><entry><maths id="MATH-US-00008" num="00008"><math overflow="scroll"><mrow><mrow><mi>GHC</mi><mo></mo><mstyle><mspace width="0.6em" height="0.6ex" /></mstyle><mo></mo><mrow><mo>(</mo><mrow><mi>global</mi><mo></mo><mstyle><mspace width="0.8em" height="0.8ex" /></mstyle><mo></mo><mi>hit</mi><mo></mo><mstyle><mspace width="0.8em" height="0.8ex" /></mstyle><mo></mo><mi>count</mi></mrow><mo>)</mo></mrow></mrow><mo>=</mo><mrow><munderover><mo>∑</mo><mrow><mi>i</mi><mo>=</mo><mn>1</mn></mrow><mi>NC</mi></munderover><mo></mo><mrow><msub><mi>C</mi><mi>i</mi></msub><mo>·</mo><mi>HC</mi></mrow></mrow></mrow></math></maths><img file="US7013459B2_D0008.tif" /></entry></row><row><entry></entry></row><row><entry><maths id="MATH-US-00009" num="00009"><math overflow="scroll"><mrow><mrow><mi>GHA</mi><mo></mo><mstyle><mspace width="0.6em" height="0.6ex" /></mstyle><mo>(</mo><mrow><mi>global</mi><mo></mo><mstyle><mspace width="0.8em" height="0.8ex" /></mstyle><mo></mo><mi>average</mi><mo></mo><mstyle><mspace width="0.8em" height="0.8ex" /></mstyle><mo></mo><mi>hit</mi><mo></mo><mstyle><mspace width="0.8em" height="0.8ex" /></mstyle><mo></mo><mi>count</mi><mo></mo><mstyle><mspace width="0.8em" height="0.8ex" /></mstyle><mo></mo><mi>per</mi><mo></mo><mstyle><mspace width="0.8em" height="0.8ex" /></mstyle><mo></mo><mi>field</mi></mrow><mo>)</mo></mrow><mo>=</mo><mfrac><mi>GHC</mi><mi>GNF</mi></mfrac></mrow></math></maths><img file="US7013459B2_D0009.tif" /></entry></row><row><entry></entry></row><row><entry><maths id="MATH-US-00010" num="00010"><math overflow="scroll"><mrow><mrow><mi>GHC2</mi><mo></mo><mstyle><mspace width="0.6em" height="0.6ex" /></mstyle><mo></mo><mstyle><mtext>(sum of squares of hit counts in all classes) </mtext></mstyle></mrow><mo>=</mo><mrow><munderover><mo>∑</mo><mrow><mi>i</mi><mo>=</mo><mn>1</mn></mrow><mi>NC</mi></munderover><mo></mo><msup><mrow><mo>(</mo><mrow><msub><mi>C</mi><mi>i</mi></msub><mo>·</mo><mi>HC</mi></mrow><mo>)</mo></mrow><mn>2</mn></msup></mrow></mrow></math></maths><img file="US7013459B2_D0010.tif" /></entry></row><row><entry></entry></row><row><entry><maths id="MATH-US-00011" num="00011"><math overflow="scroll"><mrow><mtable><mtr><mtd><mrow><mtable><mtr><mtd><mrow><mi>GSD</mi><mo></mo><mstyle><mspace width="0.6em" height="0.6ex" /></mstyle><mo></mo><mrow><mo>(</mo><mrow><mi>standard</mi><mo></mo><mstyle><mspace width="0.8em" height="0.8ex" /></mstyle><mo></mo><mi>deviation</mi><mo></mo><mstyle><mspace width="0.8em" height="0.8ex" /></mstyle><mo></mo><mi>of</mi></mrow></mrow></mrow></mtd></mtr><mtr><mtd><mrow><mrow><mi>hit</mi><mo></mo><mstyle><mspace width="0.8em" height="0.8ex" /></mstyle><mo></mo><mi>counts</mi><mo></mo><mstyle><mspace width="0.8em" height="0.8ex" /></mstyle><mo></mo><mi>in</mi><mo></mo><mstyle><mspace width="0.8em" height="0.8ex" /></mstyle><mo></mo><mi>all</mi><mo></mo><mstyle><mspace width="0.8em" height="0.8ex" /></mstyle><mo></mo><mi>classes</mi></mrow><mo>)</mo></mrow></mtd></mtr></mtable><mo>=</mo><msqrt><mrow><mfrac><mn>1</mn><mi>GNF</mi></mfrac><mo></mo><mrow><munderover><mo>∑</mo><mrow><mi>i</mi><mo>=</mo><mn>1</mn></mrow><mi>NC</mi></munderover><mo></mo><msup><mrow><mo>(</mo><mrow><mrow><msub><mi>C</mi><mi>i</mi></msub><mo>·</mo><mi>HC</mi></mrow><mo>-</mo><mi>GHA</mi></mrow><mo>)</mo></mrow><mn>2</mn></msup></mrow></mrow></msqrt></mrow></mtd></mtr><mtr><mtd><mrow><mo>=</mo><msqrt><mrow><mrow><mfrac><mn>1</mn><mi>GNF</mi></mfrac><mo></mo><mi>GHC2</mi></mrow><mo>-</mo><msup><mrow><mo>(</mo><mi>GHA</mi><mo>)</mo></mrow><mn>2</mn></msup></mrow></msqrt></mrow></mtd></mtr></mtable><mo> </mo></mrow></math></maths><img file="US7013459B2_D0011.tif" /></entry></row><row><entry namest="1" nameend="1" align="center" rowsep="1" /></row></tbody></tgroup></table></tables><br /> Given the above formulas, a threshold framework provides at least three ways to specify thresholds for determining when to split a class: absolute, specified in a scalar number of hit counts (e.g., “127 hits”), Gaussian, specified in standard deviations, and linear, specified as a multiple of average hit counts.
0123Absolute thresholds have the advantages of precision and convenience. Although absolute thresholds depend on the total number of hits in a profiling run, they can be normalized by dividing all hit count measurements by GHC.
0124Gaussian thresholds have the advantage of being in a manageable range (e.g., 1–3). However Gaussian thresholds assume the hit counts have a normal distribution, which is not the case if the distribution is bimodal (e.g., there are a large number of fields with many hits and a large number of fields with zero hits).
0125Linear thresholds are often larger numbers than the Gaussian thresholds, but do not assume a normal distribution. A number of other techniques (e.g., rank-order or non-parametric statistics) could also be used.
0126For example, consider the profiling data in Table 7 and the corresponding analysis of Table 8. For purposes of example, assume the global average hit count per field (GHA) is 34.
0127<tables id="TABLE-US-00007" num="00007"><table frame="none" colsep="0" rowsep="0"><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217pt" align="center" /><thead><row><entry namest="1" nameend="1" rowsep="1">TABLE 7</entry></row></thead><tbody valign="top"><row><entry namest="1" nameend="1" align="center" rowsep="1" /></row><row><entry>Profile Data for Class Foo</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="3"><colspec colname="offset" colwidth="56pt" align="left" /><colspec colname="1" colwidth="28pt" align="center" /><colspec colname="2" colwidth="133pt" align="center" /><tbody valign="top"><row><entry /><entry>Field</entry><entry>Hits</entry></row><row><entry /><entry namest="offset" nameend="2" align="center" rowsep="1" /></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="3"><colspec colname="offset" colwidth="56pt" align="left" /><colspec colname="1" colwidth="28pt" align="center" /><colspec colname="2" colwidth="133pt" align="char" char="." /><tbody valign="top"><row><entry /><entry>f<sub>1</sub></entry><entry>47</entry></row><row><entry /><entry>f<sub>2</sub></entry><entry>0</entry></row><row><entry /><entry>f<sub>3</sub></entry><entry>5</entry></row><row><entry /><entry>f<sub>4</sub></entry><entry>34</entry></row><row><entry /><entry>f<sub>5</sub></entry><entry>1</entry></row><row><entry /><entry namest="offset" nameend="2" align="center" rowsep="1" /></row></tbody></tgroup></table></tables>
0128<tables id="TABLE-US-00008" num="00008"><table frame="none" colsep="0" rowsep="0"><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217pt" align="center" /><thead><row><entry namest="1" nameend="1" rowsep="1">TABLE 8</entry></row><row><entry namest="1" nameend="1" align="center" rowsep="1" /></row><row><entry>Analysis of Profile Data for Class Foo</entry></row><row><entry namest="1" nameend="1" align="center" rowsep="1" /></row></thead><tbody valign="top"><row><entry /></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217pt" align="left" /><tbody valign="top"><row><entry>Foo.NF number of fields in class Foo = 5</entry></row><row><entry>Foo.HC<sub>1 </sub>number of hits on field 1 of class Foo = 47.</entry></row><row><entry>Foo.HC<sub>2 </sub>= 0, Foo.HC<sub>3 </sub>= 5, Foo.HC<sub>4 </sub>= 34, Foo.HC<sub>5 </sub>= 1.</entry></row><row><entry>Foo.HC (total hit count in class Foo) = 87</entry></row><row><entry>Foo.HA (the average hit count in class Foo per field) = 17.4</entry></row><row><entry>Foo.HC2 (sum of squares of hit count in class Foo) = 3391</entry></row><row><entry>Then, Foo.SD (standard deviation of hit counts in class Foo) = 19.4</entry></row><row><entry namest="1" nameend="1" align="center" rowsep="1" /></row></tbody></tgroup></table></tables><br /> An exemplary absolute threshold for the class Foo would be “10,” meaning group any field with a hit count less than 10 in the cold group. An exemplary linear threshold for class Foo would be “0.5,” meaning group any field with a hit count less than half the mean (i.e., 8.7) to the cold group. An example of a Gaussian threshold for Foo would be “−0.5,” meaning group any field with a hit count less than 7.7 (i.e., half a standard deviation below the average 17.4) in the cold group. However, it should be noted the distribution of the hit counts is not normal.
0129Using the above formulas, a policy framework can be constructed to help specify when a class should be split into groups of data members. Given a proposed (or “candidate”) cold group, a policy within the framework specifies whether or not the class should be split. Typically, the proposed cold group is specified via a threshold from the threshold framework.
0130The policy framework is useful, for example, to provide a way for a developer to provide guidance to the splitting process. In the policy framework, a default policy can be specified to apply to all classes. Further, the default policy can be overridden by specifying a policy for a particular class. Essentially, the policy specifies a Boolean result, which determines whether or not to split the class based on the proposed cold group. The policy framework provides the options shown in Table 9.
0131<tables id="TABLE-US-00009" num="00009"><table frame="none" colsep="0" rowsep="0"><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217pt" align="center" /><thead><row><entry namest="1" nameend="1" rowsep="1">TABLE 9</entry></row></thead><tbody valign="top"><row><entry namest="1" nameend="1" align="center" rowsep="1" /></row><row><entry>Global Policy Defaults</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="3"><colspec colname="1" colwidth="28pt" align="left" /><colspec colname="2" colwidth="98pt" align="left" /><colspec colname="3" colwidth="91pt" align="left" /><tbody valign="top"><row><entry /><entry>Split if the cold group</entry><entry /></row><row><entry>Policy</entry><entry>is bigger than . . .</entry><entry>Split if . . .</entry></row><row><entry namest="1" nameend="3" align="center" rowsep="1" /></row><row><entry>H( )</entry><entry>Hot group overhead only</entry><entry>size of cold group ></entry></row><row><entry /><entry>(this policy is the default</entry><entry>size of hot group</entry></row><row><entry /><entry>if no policy specified)</entry><entry>overhead</entry></row><row><entry>HC( )</entry><entry>Hot group overhead and</entry><entry>size of cold group ></entry></row><row><entry /><entry>cold group overhead</entry><entry>(cold group overhead +</entry></row><row><entry /><entry /><entry>hot group overhead)</entry></row><row><entry>HFC(f)</entry><entry>Hot group overhead and a</entry><entry>size of cold group ></entry></row><row><entry /><entry>fraction, f, of cold group</entry><entry>(f * cold group overhead +</entry></row><row><entry /><entry>overhead</entry><entry>hot group overhead)</entry></row><row><entry>HFA(f)</entry><entry>Hot group overhead and cold</entry><entry>(((hit count for cold</entry></row><row><entry /><entry>group overhead if cold is</entry><entry>group/number of fields in</entry></row><row><entry /><entry>warmer than fraction f of GHA</entry><entry>cold group) > (f * GHA))</entry></row><row><entry /><entry /><entry>&& HC( )) ∥ H( ))</entry></row><row><entry namest="1" nameend="3" align="center" rowsep="1" /></row></tbody></tgroup></table></tables><br /> The “Split if the cold group is bigger than . . . ” and “Split if . . . ” columns specify the same criteria in two different ways. The policies can be used to accommodate a wide variety of situations. For example, it is clear that a class should not be split if the overhead created in the hot group by splitting is greater to or equal to the size of the fields in the cold group. This fact is embodied in the policy H( ). However, how to proceed in light of the overhead created in the cold group is more challenging.
0132For example, if the cold group is very cold, the space overhead created in the cold group may be tolerable since the cold group will not be referenced much. However, if the cold group is merely “cool,” the cool group will be referenced more frequently, and it is more a matter of judgment on how to proceed. The above-described policy framework provides a way to specify how to proceed in light of such scenarios.
0133The threshold and policy frameworks can provide a way for the developer to guide the data layout optimization process. For example, a software developer may have identified a particular class as large and critical to performance. The software developer can contribute this knowledge to the automatic optimization process by specifying these classes (e.g., in a command line or in a file) in conjunction with instructions on what threshold and policy to use.
0134Thus, the developer can specify a threshold and policy for each class. Other tools provided to the developer include options for specifying that all or only a subset of the classes should be considered for splitting. An exemplary command line interface for specifying the options is shown in a later section.
0000Splitting a Class According to a Greedy Method
0135For each class specified as a candidate for splitting, the threshold and policy are applied to determine whether and how to split the class. For example, returning now to Table 7, assume a linear threshold was specified to indicate that fields with a hit count greater than or equal to the global average hit count (GHA=34) are to be placed in a hot group for the class; other fields are to be placed in a cold group. Thus, fields f<sub>1 </sub>and f<sub>4 </sub>are grouped in the hot group, and fields f<sub>3</sub>, f<sub>5</sub>, and f<sub>2 </sub>are grouped in the cold group.
0000Metadata Associated with the Execution Engine
0136The above-described grouping of data members can be used when the program is executed to arrange the data members from the same group into neighboring locations in a memory system and place data members from different groups into separately-loadable units of memory. One way of accomplishing such arrangement is to generate metadata for use by an execution engine at run time. The term “metadata” generally means, “data about the data.” In other words, the metadata provides information about the data members of an object, namely into what groups the data members have been placed and thus, how they should be arranged at runtime.
0137For example, a format such as that shown in Table 10 can be used to specify various options to be used by a class loader of an execution engine.
0138<tables id="TABLE-US-00010" num="00010"><table frame="none" colsep="0" rowsep="0"><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217pt" align="center" /><thead><row><entry namest="1" nameend="1" rowsep="1">TABLE 10</entry></row><row><entry namest="1" nameend="1" align="center" rowsep="1" /></row><row><entry>Metadata Format for Specifying Groups</entry></row><row><entry namest="1" nameend="1" align="center" rowsep="1" /></row></thead><tbody valign="top"><row><entry /></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217pt" align="left" /><tbody valign="top"><row><entry>Class C</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="14pt" align="left" /><colspec colname="1" colwidth="203pt" align="left" /><tbody valign="top"><row><entry /><entry>LayoutType = (AutoLayout, ExplicitLayout, or SequentialLayout)</entry></row><row><entry /><entry>Data Member m<sub>1</sub>:</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="28pt" align="left" /><colspec colname="1" colwidth="189pt" align="left" /><tbody valign="top"><row><entry /><entry>[Position]</entry></row><row><entry /><entry>Offset/Delta (offset if ExplicitLayout, shift if SequentialLayout)</entry></row><row><entry /><entry>SplitGroupID (zero means no grouping)</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="14pt" align="left" /><colspec colname="1" colwidth="203pt" align="left" /><tbody valign="top"><row><entry /><entry>Data Member m<sub>n</sub>:</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="28pt" align="left" /><colspec colname="1" colwidth="189pt" align="left" /><tbody valign="top"><row><entry /><entry>[Position]</entry></row><row><entry /><entry>Offset/Delta</entry></row><row><entry /><entry>SplitGroupID</entry></row><row><entry /><entry namest="offset" nameend="1" align="center" rowsep="1" /></row></tbody></tgroup></table></tables><br /> The Metadata format includes various layout directives. The LayoutType can specify AutoLayout, ExplicitLayout, or SequentialLayout. AutoLayout (typically the default) leaves the execution engine to arrange the data members as it sees fit (i.e., in any order and at any location). ExplicitLayout is one option useable when data members are grouped; when specified, this option causes the execution engine (and class loader) to place the data members at the locations (offsets) supplied. The data member grouper computes the appropriate values based on, for example, the size of the data members. SequentialLayout is another option useable when data members are grouped; when specified, this option causes the execution engine (and class loader) to place the data members in the order supplied, without specifying actual offsets.
0139Following the LayoutType is a specification for data members of the class. Position may be specified, or it can be implied by the order in which the data members appear (i.e., the first data member is assigned a position of 1).
0140Offset/Delta can take on different meanings. If the option ExplicitLayout has been specified, Offset/Delta specifies an actual offset (from the top of the object or group) at which the data member is located. Overlapping layout (e.g., for unions) can be permitted. If the option SequentialLayout has been specified, Offset/Delta specifies a shift indicating how far after the present data member the next data member starts (essentially, the data member's size). Another optional field, not shown, specifies the field preceding the present field (the PredecessorField).
0141Exemplary metadata for a class Foo that has been split into two groups of fields (f<sub>1 </sub>and f<sub>4</sub>) and (f<sub>3</sub>, f<sub>5</sub>, and f<sub>2</sub>) is shown in Table 11.
0142<tables id="TABLE-US-00011" num="00011"><table frame="none" colsep="0" rowsep="0"><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217pt" align="center" /><thead><row><entry namest="1" nameend="1" rowsep="1">TABLE 11</entry></row><row><entry namest="1" nameend="1" align="center" rowsep="1" /></row><row><entry>Metadata for Foo</entry></row><row><entry namest="1" nameend="1" align="center" rowsep="1" /></row></thead><tbody valign="top"><row><entry /></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="56pt" align="left" /><colspec colname="1" colwidth="161pt" align="left" /><tbody valign="top"><row><entry /><entry>Class Foo</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="70pt" align="left" /><colspec colname="1" colwidth="147pt" align="left" /><tbody valign="top"><row><entry /><entry>LayoutType = ExplicitLayout</entry></row><row><entry /><entry>Data Member f<sub>1</sub>:</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="84pt" align="left" /><colspec colname="1" colwidth="133pt" align="left" /><tbody valign="top"><row><entry /><entry>Offset/Delta: 0</entry></row><row><entry /><entry>SplitGroupID: 1</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="70pt" align="left" /><colspec colname="1" colwidth="147pt" align="left" /><tbody valign="top"><row><entry /><entry>Data Member f<sub>4</sub>:</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="84pt" align="left" /><colspec colname="1" colwidth="133pt" align="left" /><tbody valign="top"><row><entry /><entry>Offset/Delta: 3072</entry></row><row><entry /><entry>SplitGroupID: 1</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="70pt" align="left" /><colspec colname="1" colwidth="147pt" align="left" /><tbody valign="top"><row><entry /><entry>Data Member f<sub>3</sub>:</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="84pt" align="left" /><colspec colname="1" colwidth="133pt" align="left" /><tbody valign="top"><row><entry /><entry>Offset/Delta: 0</entry></row><row><entry /><entry>SplitGroupID: 2</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="70pt" align="left" /><colspec colname="1" colwidth="147pt" align="left" /><tbody valign="top"><row><entry /><entry>Data Member f<sub>5</sub>:</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="84pt" align="left" /><colspec colname="1" colwidth="133pt" align="left" /><tbody valign="top"><row><entry /><entry>Offset/Delta: 1024</entry></row><row><entry /><entry>SplitGroupID: 2</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="70pt" align="left" /><colspec colname="1" colwidth="147pt" align="left" /><tbody valign="top"><row><entry /><entry>Data Member f<sub>2</sub>:</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="offset" colwidth="84pt" align="left" /><colspec colname="1" colwidth="133pt" align="left" /><tbody valign="top"><row><entry /><entry>Offset/Delta: 1056</entry></row><row><entry /><entry>SplitGroupID: 2</entry></row><row><entry /><entry namest="offset" nameend="1" align="center" rowsep="1" /></row></tbody></tgroup></table></tables><br /> The metadata can, for example, reside with the respective class definition, or be specified in a central repository of metadata for the execution engine. An alternative to the above arrangement would be to specify a SequentialLayout while still specifying different groups for the fields. The above data format is an example of one of many possible formats for specifying how data members of an object can be placed into groups. Specifying such information for data members is sometimes called “decorating” the class (or software module) with metadata. <br /> Arranging the Data Members at Runtime
0143At runtime, the metadata can be consulted to determine how to actually arrange the data members in the memory system. From the perspective of software accessing an object, the data member arrangement is inconsequential. For example, an instance <b>1104</b> of an object of a class called “Foo” might appear to software as shown in <figref idref="DRAWINGS">FIG. 11</figref>. A class loader placing an instance of the class Foo in memory might layout the fields in separately-loadable groups <b>1106</b> if the class definition is decorated with metadata as described above. Fields f<sub>1 </sub>and f<sub>4 </sub>are placed at neighboring locations in a hot group <b>1122</b>, which has a pointer to the cold group <b>1132</b>, containing fields f<sub>3</sub>, f<sub>5</sub>, and f<sub>2 </sub>at neighboring locations separate from the hot group <b>1122</b>. The number of references for each of the fields is shown in <figref idref="DRAWINGS">FIG. 11</figref>; however, this data need not reside with the field in memory.
0144The layout in <figref idref="DRAWINGS">FIG. 11</figref> is meant as a general guide. A more detailed approximation of how the object would actually appear is shown in <figref idref="DRAWINGS">FIG. 12</figref>, which again shows how an instance <b>1200</b> of the class Foo might appear in memory. A hot group <b>1202</b> contains the fields f<sub>1 </sub>and f<sub>4 </sub>and a cold group <b>1212</b> contains the fields fields f<sub>3</sub>, f<sub>5</sub>, and f<sub>2</sub>. The hot group <b>1202</b> further includes a pointer to the object information set <b>1222</b>, and the cold group <b>1212</b> further includes a pointer to the object information set <b>1232</b>. The object information sets <b>1222</b> and <b>1232</b> provide, for example, information for garbage collection functions and VTableSlots that point to function members of the object. In some cases, there may be gaps between the fields, and an implementation could be constructed that uses an alternative VTable arrangement or an arrangement not using a VTable. The principle of data layout optimization can be implemented without various of the fields shown, including the fields related to garbage collection.
0145As a result of the arrangement described above, fields in the same group tend to reside in the same unit(s) (e.g., page or pages) of virtual memory in the memory system, and fields in different groups tend to reside in different units, separately loadable into primary memory from units for other groups. During execution, then, the fields in the hot group are more likely to occupy primary memory than fields in the cold group. Further, the software tends not to fill up its available primary memory (e.g., the resident set) with fields in the cold group, which are relatively seldom referenced.
0000Exemplary Operation
0146Data layout optimization of an object class increases performance during execution of a piece of software that makes use of the object class. For example, for purposes of comparison, the following two examples demonstrate how data layout optimization better utilizes primary memory and reduces page faults and cache misses. For purposes of the examples, when data is referenced, the cache copies the referenced data and a portion of the data following the referenced data.
0147In the first example, shown in <figref idref="DRAWINGS">FIG. 13</figref>, assume the exemplary class Foo were laid out (e.g., the fields f<sub>1</sub>, f<sub>2</sub>, f<sub>3</sub>, f<sub>4</sub>, and f<sub>5</sub>) without regard to the profile data and thus were arranged in sequential order by the class loader. Accordingly, fields f<sub>1</sub>, f<sub>2</sub>, and f<sub>3</sub>, have been placed in one memory page P<sub>1 </sub>and fields f<sub>4</sub>, and f<sub>5 </sub>have been placed in another memory page P<sub>2</sub>. Fields f<sub>10 </sub>and f<sub>11 </sub>are of another class called “baz” and reside in another memory page P<sub>3</sub>.
0148Each of the memory pages pictured is separately loadable into the primary memory <b>1304</b>. And, in fact, during execution, two pages P<sub>1 </sub>and P<sub>2 </sub>have been loaded into the primary memory <b>1304</b> since the software has been referencing fields f<sub>1 </sub>and f<sub>4 </sub>of the object Foo (as the profile data indicated was likely). Assume the most recent reference to a data member was to f<sub>1</sub>; accordingly, f<sub>1 </sub>and f<sub>2 </sub>(data following f<sub>1</sub>) have found their way into the cache <b>1302</b>. The software then references f<sub>4 </sub>(a likely memory reference, based on the profile data). At this point, a cache miss results. Further, when the second page P<sub>2 </sub>was loaded into memory, it replaced another page P<sub>3 </sub>having a field f<sub>11 </sub>that is about to be referenced shortly for the baz object. Accordingly, a page fault results when f<sub>11 </sub>is referenced, and P<sub>3 </sub>is copied from secondary memory <b>1306</b>. We thus have a cache miss and a page fault.
0149By contrast, consider the same software that has been optimized with data layout optimization as described above (e.g., the fields f<sub>1 </sub>and f<sub>4 </sub>reside in a hot group and f<sub>3</sub>, f<sub>5</sub>, and f<sub>2 </sub>reside in a cold group). During execution, the software has been referencing fields f<sub>1 </sub>and f<sub>4 </sub>of the object Foo, as the profile data indicated was likely. Such references resulted in the arrangement shown in <figref idref="DRAWINGS">FIG. 14</figref>, where one page P<sub>1 </sub>from the virtual memory system containing fields f<sub>1 </sub>and f<sub>4 </sub>has been loaded into the primary memory <b>1404</b> for the Foo object. Assume the most recent reference to a data member was to f<sub>1</sub>; accordingly, f<sub>1 </sub>and f<sub>4 </sub>have found their way into the cache <b>1402</b>. The software then references f<sub>4 </sub>(as in the example of <figref idref="DRAWINGS">FIG. 13</figref>). At this point, there is no cache miss. Further, since P<sub>2 </sub>has yet to be loaded into primary memory, the page P<sub>3 </sub>was permitted to stay in primary memory. Accordingly, there is no page fault when f<sub>11 </sub>is referenced, and P<sub>3 </sub>need not be copied from secondary memory <b>1406</b>. Thus there were no cache misses and no page faults.
0150As demonstrated by the above example, data layout optimization can result in loading fewer pages into primary memory (e.g., resulting in fewer page faults) and fewer cache misses. The above example is simplistic, but a more complex system exhibits similar benefits. Another way of describing the improvement in performance is to note that primary memory is not wasted by filling it with fields from the cold group every time there is a reference to the hot group. In this way, if the principles of data layout optimization are applied to a set of objects, primary memory tends to fill with fields that are frequently accessed (e.g., from the set of objects), and better use is made of the primary memory available to the software.
0000Using the Time Domain in an Affinity-Based Technique
0151Although the greedy technique described above may lead to dramatic improvements in performance in some instances, an affinity-based technique may be even better because it takes the time domain into account. Generally, the affinity-based technique strives to place data members referenced close in time close in location within the memory system. One embodiment described below performs a dot product calculation to determine affinity.
0152Again, various techniques can be used to determine how to split the data members into groups. For example, an embodiment described below finds the minimum-cost spanning tree of a graph defined in terms of affinity between the data members.
0000Instrumenting for an Affinity-Based Technique
0153Since the affinity-based technique takes the time domain into account, instrumentation of the software somehow represents the time domain in the profile data generated. Various techniques described in the section on a greedy technique can be used as long as they somehow incorporate the time domain. For example, the timer-based technique would work with an affinity-based data layout optimization technique.
0000Profile Data for an Affinity-Based Technique
0154Exemplary profile data for use in an affinity-based technique represents references to an object class called “Bar” and is shown in Table 12.
0155<tables id="TABLE-US-00012" num="00012"><table frame="none" colsep="0" rowsep="0"><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217pt" align="center" /><thead><row><entry namest="1" nameend="1" rowsep="1">TABLE 12</entry></row></thead><tbody valign="top"><row><entry namest="1" nameend="1" align="center" rowsep="1" /></row><row><entry>Profile Data for Class Bar</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="3"><colspec colname="offset" colwidth="14pt" align="left" /><colspec colname="1" colwidth="21pt" align="center" /><colspec colname="2" colwidth="182pt" align="center" /><tbody valign="top"><row><entry /><entry>Field</entry><entry>Hit Counts</entry></row><row><entry /><entry namest="offset" nameend="2" align="center" rowsep="1" /></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="9"><colspec colname="offset" colwidth="14pt" align="left" /><colspec colname="1" colwidth="21pt" align="center" /><colspec colname="2" colwidth="35pt" align="center" /><colspec colname="3" colwidth="21pt" align="center" /><colspec colname="4" colwidth="28pt" align="center" /><colspec colname="5" colwidth="21pt" align="center" /><colspec colname="6" colwidth="28pt" align="center" /><colspec colname="7" colwidth="21pt" align="center" /><colspec colname="8" colwidth="28pt" align="center" /><tbody valign="top"><row><entry /><entry>f<sub>1</sub></entry><entry>5</entry><entry>6</entry><entry>7</entry><entry /><entry /><entry /><entry /></row><row><entry /><entry>f<sub>2</sub></entry><entry /><entry>2</entry><entry /><entry>5</entry><entry>5</entry><entry>5</entry></row><row><entry /><entry>f<sub>3</sub></entry><entry /><entry /><entry /><entry /><entry>6</entry><entry>6</entry><entry>5</entry></row><row><entry /><entry>f<sub>4</sub></entry><entry>3</entry><entry>4</entry><entry>5</entry></row><row><entry /><entry namest="offset" nameend="8" align="center" rowsep="1" /></row></tbody></tgroup></table></tables><br /> The hit counts in Table 12 represent references made to the data members (e.g., fields) of a particular class during various (e.g., sequential) observation periods. Thus, for instance, the first column of Hit Counts indicates that the fields f<sub>1 </sub>and f<sub>4 </sub>were referenced 5 and 3 times respectively during a particular observation period. In other words, each cell in Table 12 represents the number of references to a field between two times, t<sub>1 </sub>and t<sub>2</sub>. In this way, Table 12 incorporates the time domain into the profile data because memory references near in time appear in the same column. <br /> Transforming the Profile Data into a Minimum-Cost Spanning Tree
0156In order to determine how to group the data members of a class based on profile data such as that shown in Table 12, the profile data can be transformed into a minimum-cost spanning tree problem, the solution to which is established and well-known. Such transformation is accomplished by constructing an affinity matrix for the profile data, then transforming the affinity matrix into a cost matrix, which represents a graph for which a minimum-cost spanning tree can be found and traversed to determine an appropriate data member order.
0000Constructing the Affinity Matrix
0157An affinity matrix indicates which fields are referenced near each other in time. For example, treating the entries for the fields shown in Table 12 as time vectors, an affinity matrix can be constructed by calculating the dot product of the vectors. Thus, the affinity of data member A to data member B can be calculated as shown in Formula 1, where T is the number of time samples. <maths id="MATH-US-00012" num="00012"><math overflow="scroll"><mtable><mtr><mtd><mrow><mrow><mrow><mi>A</mi><mo>·</mo><mi>B</mi></mrow><mo>≡</mo><mrow><munderover><mo>∑</mo><mrow><mi>t</mi><mo>=</mo><mn>1</mn></mrow><mi>T</mi></munderover><mo></mo><mrow><mrow><mi>A</mi><mo></mo><mrow><mo>[</mo><mi>t</mi><mo>]</mo></mrow></mrow><mo></mo><mrow><mi>B</mi><mo></mo><mrow><mo>[</mo><mi>t</mi><mo>]</mo></mrow></mrow></mrow></mrow></mrow><mo>=</mo><mrow><mrow><mrow><mi>A</mi><mo></mo><mrow><mo>[</mo><mn>1</mn><mo>]</mo></mrow></mrow><mo></mo><mrow><mi>B</mi><mo></mo><mrow><mo>[</mo><mn>1</mn><mo>]</mo></mrow></mrow></mrow><mo>+</mo><mrow><mrow><mi>A</mi><mo></mo><mrow><mo>[</mo><mn>2</mn><mo>]</mo></mrow></mrow><mo></mo><mrow><mi>B</mi><mo></mo><mrow><mo>[</mo><mn>2</mn><mo>]</mo></mrow></mrow></mrow><mo>+</mo><mi>…</mi><mo>+</mo><mrow><mrow><mi>A</mi><mo></mo><mrow><mo>[</mo><mi>T</mi><mo>]</mo></mrow></mrow><mo></mo><mrow><mi>B</mi><mo></mo><mrow><mo>[</mo><mi>T</mi><mo>]</mo></mrow></mrow></mrow></mrow></mrow></mtd><mtd><mrow><mo>(</mo><mn>1</mn><mo>)</mo></mrow></mtd></mtr></mtable></math></maths><img file="US7013459B2_D0012.tif" /><br /> Self-affinities (e.g., A•A and B•B) allow the affinity-based approach to degrade to a simply greedy technique when there is no affinity between the data members.
0158One way of describing the profile data is to call it a matrix V, of size N×T, where N is the number of data members, and T is the number of time samples. Then the affinity matrix is the matrix V matrix multiplied by V transpose. The affinity matrix is thus square (N×N). Typically, N is smaller than T, so the affinity matrix will be smaller than V (the profile data) and more easily stored. In the example, calculation of the affinity matrix is of complexity N*N*T. To reduce time complexity or reduce the amount of storage needed for the profile data, T (the number of time samples) can be reduced. Preferably, the affinities are computed using 128-bit integers (e.g., a pair of native 64-bit integers).
0159If there are N fields in an object class definition, then there are N(N+1)/2 meaningful entries in the affinity matrix (the matrix is symmetric). A numerically larger entry in the affinity matrix indicates greater mutual locality of the two fields corresponding to the indexes of the entry, and therefore, generally, a greater desirability to lay them out nearby in space (e.g., at neighboring locations or on the same page in memory).
0160When the above-described calculations are performed on Table 12, the result is as that shown in Table 13.
0161<tables id="TABLE-US-00013" num="00013"><table frame="none" colsep="0" rowsep="0"><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217pt" align="center" /><thead><row><entry namest="1" nameend="1" rowsep="1">TABLE 13</entry></row><row><entry namest="1" nameend="1" align="center" rowsep="1" /></row><row><entry>Affinity Matrix for Class Bar</entry></row><row><entry namest="1" nameend="1" align="center" rowsep="1" /></row></thead><tbody valign="top"><row><entry><chemistry id="CHEM-US-00001" num="00001"><img file="US7013459B2_D0013.tif" /></chemistry></entry></row><row><entry namest="1" nameend="1" align="center" rowsep="1" /></row></tbody></tgroup></table></tables><br /> According to Table 13, then, f<sub>1</sub>'s affinity with f<sub>2 </sub>is 12 (less than f<sub>1</sub>'s affinity with f<sub>4</sub>, which is 74). The self-affinities are included on the diagonal. If any field has a self-affinity of zero (there are none in Table 13), the field was not accessed during profiling and can be put at the bottom of the layout list. Further, an internal consistency check (sometimes called an “ASSERT”) is available because any field with a zero self-affinity should also have a zero dot product with every other vector. So, for a field with a zero on the diagonal, an assert can be made that entries in the same row also be zero.
0162One way of describing the affinity matrix is to call the vectors represented in Table 12 geometrical vectors in a Euclidean space. This space has a number of dimensions equal to the number of time samples, T. Each dimension, then, is a time-slice in which objects may be active. The magnitude of a vector in Euclidean space is the root sum of squares of the components. Thus, self-affinities in Table 13 are squared magnitudes of the time vector for objects of a particular class. The off-diagonal affinities are dot products in the geometrical sense under this approach.
0163Thus, the off-diagonal affinities can be related to the magnitudes of two vectors and an angle between them as shown in formula 2. <br /><i>A·B=∥A∥∥B</i>∥cos(θ) (2)<br /> This angle can be described as a measure of the nearness of two time vectors in Euclidean space, independent of their magnitudes. The nearness can be generally called “co-locality.” <br /> Conversion of the Affinity Matrix to a Cost Matrix
0164Typically, techniques for finding a solution to a cost matrix are posed in terms of minimizing cost; however, the aim of a data layout optimization technique is to maximize affinity. Therefore, the following illustrated example calculates a cost matrix by subtracting each affinity from the maximum affinity plus one (this approach is known as additive reflection). Thus, the lowest cost in the matrix will be one. The cost matrix for class Bar calculated using additive reflection is shown in Table 14. An alternative would be to calculate reciprocals (e.g., 1/affinity) or rationalization about the least common multiple of the affinities.
0165<tables id="TABLE-US-00014" num="00014"><table frame="none" colsep="0" rowsep="0"><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217pt" align="center" /><thead><row><entry namest="1" nameend="1" rowsep="1">TABLE 14</entry></row><row><entry namest="1" nameend="1" align="center" rowsep="1" /></row><row><entry>Cost Matrix for Class Bar</entry></row><row><entry namest="1" nameend="1" align="center" rowsep="1" /></row></thead><tbody valign="top"><row><entry><chemistry id="CHEM-US-00002" num="00002"><img file="US7013459B2_D0014.tif" /></chemistry></entry></row><row><entry namest="1" nameend="1" align="center" rowsep="1" /></row></tbody></tgroup></table></tables><br /> The cost matrix can be described as representing a graph. The graph uses self affinities as values for the vertices, and affinities between data members as the values for the edges. Affinities of zero are left as zero and represent absence of connection in the graph. Zero values can save on storage (i.e., under a sparseness technique) and provide other advantages, such as the ability to detect connected components of the graph.
0166Accordingly, a graph representing the cost matrix of Table 14 is shown in <figref idref="DRAWINGS">FIG. 15</figref>, the minimum-cost spanning tree is shown in <figref idref="DRAWINGS">FIG. 16</figref>, and a method for ordering the data members is shown in <figref idref="DRAWINGS">FIG. 17</figref>.
0167The method of <figref idref="DRAWINGS">FIG. 17</figref> uses a minimum-cost, depth-first approach (which degrades to a greedy approach under certain circumstances), although other approaches (e.g., minimum-cost, breadth first) may yield better performance in some instances. At <b>1702</b>, a minimum-cost spanning tree is constructed from the graph representing the cost matrix (e.g., the graph shown in <figref idref="DRAWINGS">FIG. 15</figref>). Techniques for constructing a minimum-cost spanning tree include Kruskal's and Prim's algorithms. These algorithms have running times of O(E 1g V) and O(E+V 1g V), respectively (where E is the number of edges, and V is the number of vertices). The minimum-cost spanning tree of the graph shown in <figref idref="DRAWINGS">FIG. 15</figref> is shown in <figref idref="DRAWINGS">FIG. 16</figref>.
0168The vertices are then traversed and the order of visitation recorded. At <b>1712</b>, traversal begins with the vertex of lowest cost (e.g. f<sub>1 </sub>in the tree shown in <figref idref="DRAWINGS">FIG. 16</figref>). The method then repetitively applies the technique <b>1722</b>, which involves traversing the subtree connected by the lowest cost edge at <b>1732</b> (e.g., initially the edge connecting f<sub>1 </sub>to f<sub>4</sub>) according to the technique <b>1722</b> (e.g., recursively), then traversing the subtree connected by the other edge at <b>1742</b> according to the technique <b>1722</b>. Such a traversal results in the ordering shown in Table 15. For purposes of example, an edge cost is also shown as a mechanism for deciding how to split the data members into groups.
0169<tables id="TABLE-US-00015" num="00015"><table frame="none" colsep="0" rowsep="0"><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217pt" align="center" /><thead><row><entry namest="1" nameend="1" rowsep="1">TABLE 15</entry></row></thead><tbody valign="top"><row><entry namest="1" nameend="1" align="center" rowsep="1" /></row><row><entry>Data Member Ordering for Class Bar</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="3"><colspec colname="offset" colwidth="42pt" align="left" /><colspec colname="1" colwidth="56pt" align="center" /><colspec colname="2" colwidth="119pt" align="center" /><tbody valign="top"><row><entry /><entry>Data Member</entry><entry>Edge Cost</entry></row><row><entry /><entry namest="offset" nameend="2" align="center" rowsep="1" /></row><row><entry /><entry>f<sub>1</sub></entry><entry /></row><row><entry /><entry>f<sub>4</sub></entry><entry>37</entry></row><row><entry /><entry>f<sub>2</sub></entry><entry>99</entry></row><row><entry /><entry>f<sub>3</sub></entry><entry>51</entry></row><row><entry /><entry namest="offset" nameend="2" align="center" rowsep="1" /></row></tbody></tgroup></table></tables><br /> Splitting the data members can be done any number of ways, such as going through the ordering and choosing a cutoff when the edge cost exceeds an arbitrary cost threshold (e.g., the average edge cost of 62⅓). Under such an approach, the data members shown in Table 15 would be grouped into the following groups: Group 1 (f<sub>1 </sub>and f<sub>4</sub>) and Group 2 (f<sub>2 </sub>and f<sub>3</sub>). This approach can be extended to arrangements having more than two groups. For example, providing an additional group whenever the edge cost exceeds a specified threshold.
0170In some cases, there will be disconnected components of the graph. The data members can be grouped according to the disconnected components (e.g., data members in the same disconnected component are placed into the same group; data members in different disconnected components are placed into different groups). Additionally, more than one group can be used for a particular disconnected component if appropriate.
0171The affinity-based approach can be used in combination with various of the features described for the greedy approach, such as calculating averages (e.g., average edge cost), specifying an absolute value, or calculating standard deviations.
0000Declarative Layout Directives
0172To provide a software developer with further control over the data layout optimization process, declarative layout directives can be provided. For example, a developer can place a directive in source code to indicate that a particular class should not be optimized. In this way, the developer can explicitly opt out of the data layout optimization process for data members that, for example, may not function properly if rearranged or separated.
0000Display of Affinity Information
0173To provide a software developer with further information about affinities between data members, the affinity data can be displayed. For example, a graded color scheme shows the various data members as vertices in a graph, with colored lines according to the scheme (e.g., red represents a high affinity) connecting the vertices of the graph. Also, a graph (e.g., a pie chart) shows which data members are being referenced how often. Activating a part of the graph relating to a data member displays the data member's affinity with the other data members also in the form of a graph (e.g., another pie chart).
0174In this way, the developer is provided with information about the behavior of an object and can better craft a high-performance object set.
0000Inheritance
0175Supporting inheritance while grouping the data members poses some special problems. Generally, one way of solving these problems is to combine data concerning a parent class (including children of the parent class) and choose a single layout.
0000Static Fields
0176Static fields typically present a special case because there is only one value per class for a set of instances of the class. One alternative is to group static fields together or use different splitting thresholds for static fields.
0000Exemplary Command Line Options for Instrumentation and Grouping
0177As explained in the section on instrumentation, various options can be chosen when instrumenting code. Table 16 shows a possible command line scheme for specifying such options. Table 17 shows a possible command line scheme for a data member grouper for specifying options during the grouping process.
0178<tables id="TABLE-US-00016" num="00016"><table frame="none" colsep="0" rowsep="0"><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217pt" align="center" /><thead><row><entry namest="1" nameend="1" rowsep="1">TABLE 16</entry></row></thead><tbody valign="top"><row><entry namest="1" nameend="1" align="center" rowsep="1" /></row><row><entry>Command line options for the instrumentor</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="1" colwidth="119pt" align="left" /><colspec colname="2" colwidth="98pt" align="left" /><tbody valign="top"><row><entry>Example</entry><entry>Description</entry></row><row><entry namest="1" nameend="2" align="center" rowsep="1" /></row><row><entry>Instrument/TimeDriven: sampleRate</entry><entry>Use a timer-based profile</entry></row><row><entry>Program.exe</entry><entry>data collection technique; set</entry></row><row><entry /><entry>the time to expire every</entry></row><row><entry /><entry>sampleRate milliseconds</entry></row><row><entry>Instrument/MethodDriven</entry><entry>Use a method-based profile</entry></row><row><entry>Program.exe</entry><entry>data collection technique</entry></row><row><entry>Instrument/OverflowDriven</entry><entry>Use an overflow-driven</entry></row><row><entry>Program.exe</entry><entry>profile data collection</entry></row><row><entry /><entry>technique (if supported)</entry></row><row><entry namest="1" nameend="2" align="center" rowsep="1" /></row></tbody></tgroup></table></tables>
0179<tables id="TABLE-US-00017" num="00017"><table frame="none" colsep="0" rowsep="0"><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217pt" align="center" /><thead><row><entry namest="1" nameend="1" rowsep="1">TABLE 17</entry></row></thead><tbody valign="top"><row><entry namest="1" nameend="1" align="center" rowsep="1" /></row><row><entry>Command line options for the Data Member Grouper</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="1" colwidth="126pt" align="left" /><colspec colname="2" colwidth="91pt" align="left" /><tbody valign="top"><row><entry>Example</entry><entry>Description</entry></row><row><entry namest="1" nameend="2" align="center" rowsep="1" /></row><row><entry>DataOptimizer/greedy Program.exe</entry><entry>Use a simple greedy</entry></row><row><entry /><entry>technique to order the data</entry></row><row><entry /><entry>members</entry></row><row><entry>DataOptimizer/greedy/</entry><entry>Use a greedy technique to</entry></row><row><entry>GlobalLinearThreshold:</entry><entry>order the data members,</entry></row><row><entry>multiplesOfMean Program.exe</entry><entry>and split at the specified</entry></row><row><entry /><entry>multiplesOfMean</entry></row><row><entry>DataOptimizer/greedy/</entry><entry>Use a greedy technique to</entry></row><row><entry>GlobalAbsoluteThreshold: hitCounts</entry><entry>order the data members,</entry></row><row><entry>Program.exe</entry><entry>and split at the specified</entry></row><row><entry /><entry>hitCounts</entry></row><row><entry>DataOptimizer/greedy/</entry><entry>Use a greedy technique to</entry></row><row><entry>GlobalGaussianThreshold:</entry><entry>order the data members,</entry></row><row><entry>standardDeviations Program.exe</entry><entry>and split at the specified</entry></row><row><entry /><entry>standardDeviations</entry></row><row><entry>DataOptimizer/affinity Program.exe</entry><entry>Use an affinity-based</entry></row><row><entry /><entry>technique to order the data</entry></row><row><entry /><entry>members</entry></row><row><entry>DataOptimizer/affinity/</entry><entry>Use an affinity-based</entry></row><row><entry>GlobalLinearThreshold:</entry><entry>technique to order the data</entry></row><row><entry>multiplesOfMean Program.exe</entry><entry>members, and split at the</entry></row><row><entry /><entry>specified multiplesOfMean</entry></row><row><entry>DataOptimizer/affinity/</entry><entry>Use an affinity-based</entry></row><row><entry>GlobalAbsoluteThreshold: hitCounts</entry><entry>technique to order the data</entry></row><row><entry>Program.exe</entry><entry>members, and split at the</entry></row><row><entry /><entry>specified hitCounts</entry></row><row><entry>DataOptimizer/affinity/</entry><entry>Use an affinity-based</entry></row><row><entry>GlobalGaussianThreshold:</entry><entry>technique to order the data</entry></row><row><entry>standardDeviations Program.exe</entry><entry>members, and split at the</entry></row><row><entry /><entry>specified</entry></row><row><entry /><entry>standardDeviations</entry></row><row><entry>/ClassLinearThreshold: className,</entry><entry>A per-class threshold</entry></row><row><entry>multiplesOfMean</entry><entry>overriding the globally-</entry></row><row><entry /><entry>specified option</entry></row><row><entry>/ClassAbsoluteThreshold: className,</entry><entry>A per-class threshold</entry></row><row><entry>hitcounts</entry><entry>overriding the globally-</entry></row><row><entry /><entry>specified option</entry></row><row><entry>/ClassGaussianThreshold: className,</entry><entry>A per-class threshold</entry></row><row><entry>standardDeviations</entry><entry>overriding the globally-</entry></row><row><entry /><entry>specified option</entry></row><row><entry>/splitOnly: className</entry><entry>splits only the class</entry></row><row><entry /><entry>specified (may be specified</entry></row><row><entry /><entry>zero or more times in the</entry></row><row><entry /><entry>command line)</entry></row><row><entry>/splitOnly: *</entry><entry>split all classes</entry></row><row><entry>/globalQualification: x</entry><entry>Where x is H; HC;</entry></row><row><entry /><entry>HCF, realNumber; or</entry></row><row><entry /><entry>HCA, realNumber</entry></row><row><entry>/classQualification: x</entry><entry>Where x is H; HC;</entry></row><row><entry /><entry>HCF, realNumber; or</entry></row><row><entry /><entry>HCA, realNumber</entry></row><row><entry>/responseFile: filename</entry><entry>take options from fileName</entry></row><row><entry /><entry>instead of the command</entry></row><row><entry /><entry>line</entry></row><row><entry namest="1" nameend="2" align="center" rowsep="1" /></row></tbody></tgroup></table></tables><br /> A wide variety of other techniques can be used to achieve similar control over the data layout optimization process, including a graphical user interface or a scripting language. <br /> Dynamic Data Layout Optimization
0180Another way of achieving data layout optimization is to include profiling functionality in an execution engine. In this way, data member grouping is based on behavior of the object as observed in its actual environment, rather than a test environment. Data member grouping might therefore change over time, leading to dynamic data layout optimization.
0181Having described and illustrated the principles of our invention with reference to illustrated embodiments, it will be recognized that the illustrated embodiments can be modified in arrangement and detail without departing from such principles. It should be understood that the programs, processes, or methods described herein are not related or limited to any particular type of computer apparatus, unless indicated otherwise. Various types of general purpose or specialized computer apparatus may be used with or perform operations in accordance with the teachings described herein. Elements of the illustrated embodiment shown in software may be implemented in hardware and vice versa. Although reference is sometimes made to “an” object class or “a” data member, multiple object classes with a plurality of fields can be used. In view of the many possible embodiments to which the principles of our invention may be applied, it should be recognized that the detailed embodiments are illustrative only and should not be taken as limiting the scope of our invention. Rather, we claim as our invention all such embodiments as may come within the scope and spirit of the following claims and equivalents thereto.
Contents6
33 sheets
Sheet 1 Sheet 2 Sheet 3 Sheet 4 Sheet 5 Sheet 6 Sheet 7 Sheet 8 Sheet 9 Sheet 10 Sheet 11 Sheet 12 Sheet 13 Sheet 14 Sheet 15 Sheet 16 Sheet 17 Sheet 18 Sheet 19 Sheet 20 Sheet 21 Sheet 22 Sheet 23 Sheet 24 Sheet 25 Sheet 26 Sheet 27 Sheet 28 Sheet 29 Sheet 30 Sheet 31 Sheet 32 Sheet 33
Every citation, both ways
| Document | Relation | Office | Cited during |
|---|---|---|---|
| US2014351802A1 | Cited by | United States of America | Pre-grant |
| US9971579B2 | Cited by | United States of America | Search report |
| US10095491B2 | Cited by | United States of America | Applicant |
| US2016291971A1 | Cited by | United States of America | Pre-grant |
| US8621468B2 | Cited by | United States of America | Applicant |
| US2009019425A1 | Cited by | United States of America | Pre-grant |
| US7730477B2 | Cited by | United States of America | Search report |
| US9298448B2 | Cited by | United States of America | Search report |
| US7496909B2 | Cited by | United States of America | Search report |
| US2005166207A1 | Cited by | United States of America | Pre-grant |
| US2005177822A1 | Cited by | United States of America | Pre-grant |
| US2009172338A1 | Cited by | United States of America | Pre-grant |
| US7752651B2 | Cited by | United States of America | Applicant |
| US9110684B2 | Cited by | United States of America | Applicant |
| US2007073785A1 | Cited by | United States of America | Pre-grant |
| US7856626B2 | Cited by | United States of America | Search report |
| US2008034349A1 | Cited by | United States of America | Pre-grant |
| US10235164B2 | Cited by | United States of America | Search report |
| US2009300712A1 | Cited by | United States of America | Pre-grant |
| US8769605B2 | Cited by | United States of America | Applicant |
| US2007198697A1 | Cited by | United States of America | Pre-grant |
| US2016291971A1 | Cited by | United States of America | Search report |
| US2016170807A1 | Cited by | United States of America | Pre-grant |
| EP0755003A2 | Cites | European Patent Office (EPO) | Applicant |
| US5075848A | Cites | United States of America | Applicant |
| US5579520A | Cites | United States of America | Search report |
| US5752038A | Cites | United States of America | Search report |
| US5790858A | Cites | United States of America | Search report |
| US5790865A | Cites | United States of America | Search report |
| US5884316A | Cites | United States of America | Applicant |
| US6059838A | Cites | United States of America | Applicant |
| US6189141B1 | Cites | United States of America | Search report |
| US6230312B1 | Cites | United States of America | Applicant |
| US6263491B1 | Cites | United States of America | Applicant |
| US6269477B1 | Cites | United States of America | Applicant |
| US6321240B1 | Cites | United States of America | Search report |
| US6324620B1 | Cites | United States of America | Search report |
| US6332275B1 | Cites | United States of America | Applicant |
| US6381628B1 | Cites | United States of America | Applicant |
| US6381735B1 | Cites | United States of America | Applicant |
| US6381739B1 | Cites | United States of America | Search report |
| US6381740B1 | Cites | United States of America | Applicant |
| US6401097B1 | Cites | United States of America | Search report |
| US6499137B1 | Cites | United States of America | Applicant |
| US6594678B1 | Cites | United States of America | Search report |
| US6629123B1 | Cites | United States of America | Applicant |
| US6631496B1 | Cites | United States of America | Search report |
| US6651243B1 | Cites | United States of America | Search report |
| US6658648B1 | Cites | United States of America | Applicant |
| US6681387B1 | Cites | United States of America | Search report |
| EP755003A | Cites | European Patent Office (EPO) | Third party observation |
| T.M. Chilimbi and J. R. Larus, "Using Generational Garbage Collection To Implement Cache-Conscious Data Placement", 1998, ACM, p. 37-48. | Non-patent | – | Search report |
| B. Calder, C. Krintz, S. John, T. Austin, "Cache-Conscious Data Placement", 1998, ACM, p. 139-149. | Non-patent | – | Search report |
| S. Carr, K. S. McKinley, C-W Tseng, "Compiler Optimizations for Improving Data Locality", 1994, ACM, p. 252-262. | Non-patent | – | Search report |
| C-K Luk, T. C. Mowry, "Memory Forwarding: Enabling Aggressive Layout Optimizations by Guaranteeing the Safety of Data Relocation", 1999, IEEE, p. 88-99. | Non-patent | – | Search report |
| U.S. Appl. No. 09/196,836, filed Nov. 20, 1998, Hunt. | Non-patent | – | Applicant |
| U.S. Appl. No. 09/197,080, filed Nov. 20, 1998, Hunt. | Non-patent | – | Applicant |
| "Basic Techniques for Design and Analysis of Algorithms," The Computer Science and Engineering Handbook, Tucker (ed.), CRC Press, pp. 64-85, 1997. | Non-patent | – | Applicant |
| "BIBOP (also known as big bag of pages)," p. 1, Dec. 20, 2000. | Non-patent | – | Applicant |
| "Big bag of pages," http://wombat.doc.ic.ac.uk/foldoc/foldoc.cgi?Big+bag+of+pages, p. 1, Mar. 3, 2000. | Non-patent | – | Applicant |
| "Graph and Network Algorithms," The Computer Science and Engineering Handbook, Tucker (ed.), CRC Press, pp. 203-225, 1997. | Non-patent | – | Applicant |
| "Memory Management," Microsoft Win32 Programmer's Reference, vol. 2, System Services, Multimedia, Extensions, and Application Notes, Microsoft Press, pp. 3-16, 1993. | Non-patent | – | Applicant |
| Babonneau et al., "Automatic and general solution to the adaptation of programs in a paging environment," Proceedings of the Sixth Symposium on Operating Systems Principles, West Lafayette, In, vol. 11, No. 5: 109-116, Nov. 16-18, 1977. | Non-patent | – | Applicant |
| Baier, "Dynamic Improvement of Locality in Virtual Memory Systems," IEEE Transactions on Software Engineering, vol. SE-2, No. 1, pp. 54-62, Mar. 1976. | Non-patent | – | Applicant |
| Baker, Jr. et al., "Optimizing Allocation and Garbage Collection of Spaces," http://linux.rice.edu/~rahul/hbaker/OptAlloc.html, pp. 1-4, 1979. | Non-patent | – | Applicant |
| Brewer, "High-Level Optimization Via Automated Statistical Modeling," Proceedings of the Fifth ACM SIGPLAN Symposium on Principles & Practice of Parallel Programming, pp. 80-91, 1995. | Non-patent | – | Applicant |
| Burger et al., "Memory Systems," The Computer Science and Engineering Handbook, Tucker (ed.), CRC Press, pp. 447-461, 1997. | Non-patent | – | Applicant |
| Calder et al., "Cache-Conscious Data Placement," ACM, pp. 139-149, 1998. | Non-patent | – | Applicant |
| Carr et al., "Compiler Optimizations for Improving Data Locality," ACM, pp. 252-262, 1994. | Non-patent | – | Applicant |
| Chilimbi et al., "Using Generational Garbage Collection to Implement Cache-Conscious Data Placement," ACM, pp. 37-48, 1998. | Non-patent | – | Applicant |
| Denning, "Virtual Memory," The Computer Science and Engineering Handbook, Tucker (ed.), CRC Press, pp. 1747-1760, 1997. | Non-patent | – | Applicant |
| Franz et al., "Splitting Data Objects to Increase Cache Utilization," Technical Report-University of California-Department of Information and Computer Science, No. 98-34: Oct. 1-11, 1998, URL:http://www.ics.uci.edu/z/pubs-pdf/ICS-TR-98-34.pdf. | Non-patent | – | Applicant |
| Gloy et al., "Procedure Placement Using Temporal Ordering Information," IEEE, pp. 303-313, 1997. | Non-patent | – | Applicant |
| Gosling et al., "The Java Language Environment. A White Paper," Sun Delivers Java Workshop: 1, 4-85, Oct. 1, 1995. | Non-patent | – | Applicant |
| Hanson, "A Portable Storage Management System for the Icon Programming Language," Software-Practice and Experience, vol. 10, pp. 489-500, 1980. | Non-patent | – | Applicant |
| Kistler et al., "Automated Layout of Data Members for Type-Safe Languages," Technical Report (Revised Version)-University of California-Department of Information and Computer Science: Sep. 1-10, 1998, URL:http://caesar.ics.uci.edu/kistler/papers/ics-tr-98-22-R.pdf. | Non-patent | – | Applicant |
| Kistler et al., "Computing the Similarity of Profiling Data," Proceedings of the Workshop on Profile and Feedback-Directed Compilation, Paris, France, pp. 1-6, Sep. 1998. | Non-patent | – | Applicant |
| Kistler et al., "The Case for Dynamic Optimization," Department of Information and Computer Science, pp. 1-21, May 12, 1999. | Non-patent | – | Applicant |
| Luk et al., "Memory Forwarding: Enabling Aggressive Layout Optimizations by Guaranteeing the Safety of Data Relocation," IEEE Proceedings, 26<SUP>th </SUP>Annual International Symposium on Computer Architecture, pp. 88-99, May 1999. | Non-patent | – | Applicant |
| Norman et al., "Memory Tracing of Algebraic Calculations," Proceedings of the 1996 International Symposium on Symbolic and Algebraic Computation, pp. 113-119, 1996. | Non-patent | – | Applicant |
| Reiss, "Software Tools and Environments," The Computer Science and Engineering Handbook, Tucker (ed.), CRC Press, pp. 2419-2439, 1997. | Non-patent | – | Applicant |
| Seidl et al., "Segregating Heap Objects by Reference Behavior and Lifetime," Proceeding of the Eighth International Conference on Architectural Support for Programming Languages and Operating Systems: Oct. 1-12, 1998. | Non-patent | – | Applicant |
| Tomiyama et al., "Code Placement Techniques for Cache Miss Rate Reduction," ACM Trans. Des. Autom. Electron. Syst. 2, 4:410-429, Oct., 1997. | Non-patent | – | Applicant |
| Xia et al., "Instruction Prefetching of Systems Codes With Layout Optimized for Reduced Cache Misses," Proceedings of the 23<SUP> rd </SUP>Annual International Symposium on Computer Architecture, pp. 271-282, 1996. | Non-patent | – | Applicant |
| T.M. Chilimbi and J. R. Larus, “Using Generational Garbage Collection To Implement Cache-Conscious Data Placement”, 1998, ACM, p. 37-48. | Non-patent | – | Search report |
| B. Calder, C. Krintz, S. John, T. Austin, “Cache-Conscious Data Placement”, 1998, ACM, p. 139-149. | Non-patent | – | Search report |
| S. Carr, K. S. McKinley, C-W Tseng, “Compiler Optimizations for Improving Data Locality”, 1994, ACM, p. 252-262. | Non-patent | – | Search report |
| C-K Luk, T. C. Mowry, “Memory Forwarding: Enabling Aggressive Layout Optimizations by Guaranteeing the Safety of Data Relocation”, 1999, IEEE, p. 88-99. | Non-patent | – | Search report |
| U.S. Appl. No. 09/196,836, filed Nov. 20, 1998, Hunt. | Non-patent | – | Third party observation |
| U.S. Appl. No. 09/197,080, filed Nov. 20, 1998, Hunt. | Non-patent | – | Third party observation |
| “Basic Techniques for Design and Analysis of Algorithms,” <i>The Computer Science and Engineering Handbook</i>, Tucker (ed.), CRC Press, pp. 64-85, 1997. | Non-patent | – | Third party observation |
| “BIBOP (also known as big bag of pages),” p. 1, Dec. 20, 2000. | Non-patent | – | Third party observation |
| “Big bag of pages,” http://wombat.doc.ic.ac.uk/foldoc/foldoc.cgi?Big+bag+of+pages, p. 1, Mar. 3, 2000. | Non-patent | – | Third party observation |
| “Graph and Network Algorithms,” <i>The Computer Science and Engineering Handbook</i>, Tucker (ed.), CRC Press, pp. 203-225, 1997. | Non-patent | – | Third party observation |
| “Memory Management,” <i>Microsoft Win32 Programmer's Reference</i>, vol. 2, System Services, Multimedia, Extensions, and Application Notes, Microsoft Press, pp. 3-16, 1993. | Non-patent | – | Third party observation |
| Babonneau et al., “Automatic and general solution to the adaptation of programs in a paging environment,” <i>Proceedings of the Sixth Symposium on Operating Systems Principles, West Lafayette</i>, In, vol. 11, No. 5: 109-116, Nov. 16-18, 1977. | Non-patent | – | Third party observation |
| Baier, “Dynamic Improvement of Locality in Virtual Memory Systems,” <i>IEEE Transactions on Software Engineering</i>, vol. SE-2, No. 1, pp. 54-62, Mar. 1976. | Non-patent | – | Third party observation |
| Baker, Jr. et al., “Optimizing Allocation and Garbage Collection of Spaces,” http://linux.rice.edu/˜rahul/hbaker/OptAlloc.html, pp. 1-4, 1979. | Non-patent | – | Third party observation |
| Brewer, “High-Level Optimization Via Automated Statistical Modeling,” <i>Proceedings of the Fifth ACM SIGPLAN Symposium on Principles </i>& <i>Practice of Parallel Programming</i>, pp. 80-91, 1995. | Non-patent | – | Third party observation |
| Burger et al., “Memory Systems,” <i>The Computer Science and Engineering Handbook</i>, Tucker (ed.), CRC Press, pp. 447-461, 1997. | Non-patent | – | Third party observation |
10 members in 4 offices
Priority claims6
| Document | Office | Kind | Date |
|---|---|---|---|
| 54252500 | United States of America | A | |
| 54252500 | United States of America | A | |
| 98740804 | United States of America | A | |
| 09542525 | – | – | – |
| US20000542525 | – | – | – |
| US20040987408 | – | – | – |
Members10
| Document | Office | Kind | |
|---|---|---|---|
| WO0175590A2 | World Intellectual Property Organization (WIPO) | A2 | |
| AU4968201A | Australia | A | |
| WO0175590A3 | World Intellectual Property Organization (WIPO) | A3 | |
| EP1269311A2 | European Patent Office (EPO) | A2 | |
| US6862729B1 | United States of America | B1 | |
| US2005172278A1 | United States of America | A1 | |
| US2005177822A1 | United States of America | A1 | |
| US7013459B2This record | United States of America | B2 | |
| US7496909B2 | United States of America | B2 | |
| EP1269311B1 | European Patent Office (EPO) | B1 |
38 transactions on the USPTO file
Allowed without a rejection on record.
- Non-final rejections
- 0
- Final rejections
- 0
- RCEs
- 0
- Appeals
- 0
Over time
Point at a mark for the transactionTransactions
| Event | Code | |
|---|---|---|
| Correspondence Address ChangeC.ADB | C.ADB | |
| Payment of Maintenance Fee, 12th Year, Large EntityM1553 | M1553 | |
| Post Issue Communication - Certificate of CorrectionN423 | N423 | |
| Recordation of Patent Grant MailedPGM/ | PGM/ | |
| Patent Issue Date Used in PTA CalculationAllowedPTAC | PTAC | |
| Issue Notification MailedAllowedWPIR | WPIR | |
| Dispatch to FDCD1935 | D1935 | |
| Application Is Considered Ready for IssuePILS | PILS | |
| Response to Reasons for AllowanceREAS | REAS | |
| Issue Fee Payment VerifiedN084 | N084 | |
| Issue Fee Payment ReceivedIFEE | IFEE | |
| Mail Notice of AllowanceAllowedMN/=. | MN/=. | |
| Mail Notification of Terminal Disclaimer - AcceptedMN574 | MN574 | |
| Notice of Allowance Data Verification CompletedAllowedN/=. | N/=. | |
| Paralegal or electronic terminal disclaimer approvedP574 | P574 | |
| Notification of Terminal Disclaimer - AcceptedN574 | N574 | |
| IFW TSS Processing by Tech Center CompleteTSSCOMP | TSSCOMP | |
| Case Docketed to Examiner in GAUDOCK | DOCK | |
| Application Return from OIPEWROIPE | WROIPE | |
| Application Is Now CompleteCOMP | COMP | |
| Application Return TO OIPEROIPE | ROIPE | |
| Application Is Now CompleteCOMP | COMP | |
| Application Dispatched from OIPEOIPE | OIPE | |
| Cleared by L&R (LARS)L128 | L128 | |
| Referred to Level 2 (LARS) by OIPE CSRL198 | L198 | |
| IFW Scan & PACR Auto Security ReviewSCAN | SCAN | |
| IFW Scan & PACR Auto Security ReviewSCAN | SCAN | |
| Reference capture on IDSRCAP | RCAP | |
| Information Disclosure Statement (IDS) FiledM844 | M844 | |
| Information Disclosure Statement (IDS) FiledWIDS | WIDS | |
| Preliminary AmendmentA.PE | A.PE | |
| Reference capture on IDSRCAP | RCAP | |
| Information Disclosure Statement (IDS) FiledM844 | M844 | |
| Information Disclosure Statement (IDS) FiledWIDS | WIDS | |
| Terminal Disclaimer FiledDIST | DIST | |
| Terminal Disclaimer FiledDIST | DIST | |
| Preliminary AmendmentA.PE | A.PE | |
| Initial Exam Team nnIEXX | IEXX |
1 recorded assignment at the USPTO, latest first
- Now
Now: Held by
MICROSOFT TECHNOLOGY LICENSING LLC - 2014-12-09
Assignment of assignors interest.
Ownership change- From
- MICROSOFT CORPMICROSOFT CORPORATION
- To
- MICROSOFT TECHNOLOGY LICENSING LLC
Recorded 2014-12-09, Signed 2014-10-14
7 legal events, as the office reported them to INPADOC
Over the term
Point at a mark for the eventEvents
| Event | Code | |
|---|---|---|
| Maintenance fee paymentMAFP | MAFP | |
| AssignmentAS | AS | |
| Fee paymentFPAY | FPAY | |
| Certificate of correctionCC | CC | |
| Fee paymentFPAY | FPAY | |
| Information on status: patent grantGrantedPATENTED CASESTCF | STCF | |
| Fee payment procedurePAYOR NUMBER ASSIGNED (ORIGINAL EVENT CODE: ASPN); ENTITY STATUS OF PATENT OWNER: LARGE ENTITYFEPP | FEPP |
Numbers
- Publication
- 07013459
- Publication, DOCDB
- 7013459
- Publication, EPODOC
- US7013459
- Application
- 10987408
- Application, DOCDB
- 98740804
- Application, EPODOC
- US20040987408
Titles
- English
- Profile-driven data layout optimization
Patent term adjustment
- A delay
- +86 daysthe office missed an examination deadline
- Net adjustment
- 86 days
Classification
- CPC, 3
- G06F9/44557
- G06F9/445
- G06F9/4488
- IPC, 4
- G06F9 44
- G06F9 45
- G06F9 445
- G06F12 00
- USPC, 3
- 717158000
- 711165000
- 717151000