Dynamic prefetching of hot data streams
First Claim
1. A computer implemented method of dynamically instrumenting a computer program to detect that plural data fetches comprise a prefix of data fetches in a given stream of data fetches, and to prefetch a suffix of data fetches in the stream, the method comprising:
- creating instructions that detect when the prefix of elements in the stream have been fetched by the computer program;
creating instructions that prefetch elements in a suffix of the stream when the prefix is detected; and
instrumenting the computer program with the created instruction;
wherein a prefix is detected when a created instruction determines that an operation performed on two or more consecutive prefix element values is equivalent to a key value in a table.
2 Assignments
0 Petitions
Accused Products
Abstract
A method and system for creating and injecting code into a running program that identifies a hot data stream, and prefetching data elements in the stream so they are available when needed by the processor. The injected code identifies the first few elements in a hot data stream (i.e. the prefix), and prefetches the balance of the elements in the stream (i.e., the suffix). Since the hot data stream identification code and prefetch code is injected at run time, pointer related time-dependencies inherent in earlier prefetch systems are eliminated. A global deterministic finite state machine (DFSM) is used to help create conceptual logic used to generate the code injected into the program for prefix detection.
-
Citations
20 Claims
-
1. A computer implemented method of dynamically instrumenting a computer program to detect that plural data fetches comprise a prefix of data fetches in a given stream of data fetches, and to prefetch a suffix of data fetches in the stream, the method comprising:
-
creating instructions that detect when the prefix of elements in the stream have been fetched by the computer program; creating instructions that prefetch elements in a suffix of the stream when the prefix is detected; and instrumenting the computer program with the created instruction; wherein a prefix is detected when a created instruction determines that an operation performed on two or more consecutive prefix element values is equivalent to a key value in a table. - View Dependent Claims (2, 3, 4, 5)
-
-
6. A computer system for reducing data fetch latency by dynamically determining in advance, data object fetch requests that will be executed by a computer program before the fetch requests are made, the system comprising:
-
a central processing unit, a main memory and a secondary memory, transferring data and instructions via a bus; a computer program executing in the system comprising fetching data elements in sequences; an optimization program that is provided with plural sequences of data elements fetched by the computer program, and that pauses the executing computer program in order to inject instructions into the computer program that optimize the computer program'"'"'s performance as follows; determine when a prefix of data elements in a sequence have been fetched by the computer program; and prefetch a suffix of the data elements in the sequence upon making the determination; wherein the prefix of data elements is determined to be fetched when an injected instruction determines that an operation performed on two or more consecutive prefix element values is equivalent to a key value in a table. - View Dependent Claims (7, 8, 9, 10)
-
-
11. A computer readable medium comprising a method for performing an optimization on an executing computer program, the method comprising:
-
pausing the executing computer program; constructing computer executable instructions that determine when a prefix of data fetches in a stream of data accesses have been fetched by the computer program; constructing computer executable instructions that prefetch a suffix of the stream; injecting instructions into the computer program that direct execution to procedures containing the constructed executable instructions; and resuming execution of the computer program; wherein the prefix determination is made when an injected instruction determines that an operation performed on plural consecutive prefix element values corresponds with a key value in a table. - View Dependent Claims (12, 13, 14)
-
-
15. A computer implemented method of dynamically instrumenting a computer program to detect that plural data fetches comprise a prefix of data fetches in a given stream of data fetches, and to prefetch a suffix of data fetches in the stream, the method comprising:
-
creating instructions that detect when the prefix of elements in the stream have been fetched by the computer program; creating instructions that prefetch elements in a suffix of the stream when the prefix is detected; and instrumenting the computer program with the created instructions; wherein instructions that detect when the prefix is fetched comprise a series of state transitions to an accepting state, one such transition for each data fetch seen in the prefix, and wherein elements in the prefix of elements comprise an address of a program counter and an address where a data object is fetched. - View Dependent Claims (16)
-
-
17. A computer system for reducing data fetch latency by dynamically determining in advance, data object fetch requests that will be executed by a computer program before the fetch requests are made, the system comprising:
-
a central processing unit, a main memory and a secondary memory, transferring data and instructions via a bus; a computer program executing in the system comprising fetching data elements in sequences; an optimization program that is provided with plural sequences of data elements fetched by the computer program, and that pauses the executing computer program in order to inject instructions into the computer program that optimize the computer program'"'"'s performance as follows; determine when a prefix of data elements in a sequence have been fetched by the computer program; and prefetch a suffix of the data elements in the sequence upon making the determination; wherein instructions that determine when the prefix of data elements have been fetched comprise a series of state transitions to an accepting state, one such transition for each data fetch seen in the prefix, and wherein data elements in the prefix of data elements comprise an address of a program counter and an address of a data object. - View Dependent Claims (18)
-
-
19. A computer readable medium comprising a method for performing an optimization on an executing computer program, the method comprising:
-
pausing the executing computer program; constructing computer executable instructions that determine when a prefix of data fetches in a stream of data accesses have been fetched by the computer program; constructing computer executable instructions that prefetch a suffix of the stream; injecting instructions into the computer program that direct execution to procedures containing the constructed executable instructions; and resuming execution of the computer program; wherein instructions that determine when the prefix of data fetches have been fetched comprise a series of state transitions to an accepting state, one such transition for each data fetch seen in the prefix, and wherein fetches in the prefix of data fetches comprise an address of a program counter and an address of a data object. - View Dependent Claims (20)
-
Specification