Identifying program phase changes through program working set analysis
First Claim
1. An apparatus comprising:
- a processing unit of a processor;
a memory coupled to the processor; and
an instruction set operable on the processing unit of the processor and including instructions;
to instantiate a data structure in the memory to collect a representation of a working set; and
to define a hash unit operable on the processing unit to map a plurality of working set elements into the data structure using a hash function,wherein, in a program, the working set W(ti, τ
) for i=1, 2 . . . , where i is an integer, is a set of distinct memory segments {s1, s2 . . . sω
} accessed over the ith window of size τ
within a time interval ti;
wherein the window is a sequence of τ
consecutive memory accesses;
wherein the working set size is ω
, the cardinality of the set of unique segments that are accessed by members of the window.
2 Assignments
0 Petitions
Accused Products
Abstract
The disclosure presents systems and methods to identify program workings sets, detect working set changes and estimate working set sizes. The system generates a highly compressed representation of the working set, called a working set signature, by hashing working set elements into a data structure and setting the entries touched. The working set signature identifies, or is a representation of, the working set. The system can detect a working set change by comparing the signatures of consecutive working sets using a metric called a relative signature distance. The working set size is estimated by counting the number of bits set in the signature. The system can be used to compactly represent various types of working sets such as instruction, data and branch working sets. The system can detect program working set changes (or phase changes) independent of any micro-architectural specification.
6 Citations
23 Claims
-
1. An apparatus comprising:
-
a processing unit of a processor; a memory coupled to the processor; and an instruction set operable on the processing unit of the processor and including instructions; to instantiate a data structure in the memory to collect a representation of a working set; and to define a hash unit operable on the processing unit to map a plurality of working set elements into the data structure using a hash function, wherein, in a program, the working set W(ti, τ
) for i=1, 2 . . . , where i is an integer, is a set of distinct memory segments {s1, s2 . . . sω
} accessed over the ith window of size τ
within a time interval ti;wherein the window is a sequence of τ
consecutive memory accesses;wherein the working set size is ω
, the cardinality of the set of unique segments that are accessed by members of the window. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A computerized method of creating a representation of a working set, the computerized method comprising:
-
mapping a plurality of working set elements into fields of a data structure using a hash function, wherein, in a program, the working set W(ti, τ
) for i=1, 2 . . . , where i is an integer, is a set of distinct memory segments {s1, s2 . . . sω
} accessed over the ith window of size τ
within a time interval ti;wherein the window is a sequence of τ
consecutive memory accesses;wherein the working set size is ω
, the cardinality of the set of unique segments that are accessed by members of the window. - View Dependent Claims (9, 10, 11)
-
-
12. A computerized method of creating a representation of a working set, the computerized method comprising:
-
executing a program for a fixed interval, the program comprising instructions identified by a program counter; performing a hash function on the program counter to create a hash value for each instruction executed during the fixed interval; and updating a field of a table indexed by the hash value wherein the table represents the working set, wherein, in a second program, the working set W(ti, τ
) for i=1, 2 . . . , where i is an integer, is a set of distinct memory segments {s1, s2 . . . sω
} accessed over the ith window of size τ
within a time interval ti;wherein the window is a sequence of τ
consecutive memory accesses;wherein the working set size is ω
, the cardinality of the set of unique segments that are accessed by members of the window.
-
-
13. A computer system comprising:
-
a bus; a memory coupled to the bus; and a processor coupled to the memory and the bus;
the processor comprising;a data structure to collect a representation of a working set; and a hash unit to map a plurality of working set elements into the data structure using a hash function, wherein, in a program, the working set W(ti, τ
) for i=1, 2 . . . , where i is an integer, is a set of distinct memory segments {s1, s2 . . . sω
} accessed over the ith window of size τ
within a time interval ti;wherein the window is a sequence of τ
consecutive memory accesses;wherein the working set size is ω
, the cardinality of the set of unique segments that are accessed by members of the window. - View Dependent Claims (14)
-
-
15. A computerized method of estimating size of a working set, the method comprising:
-
receiving a signature for a working set; and estimating the size of the working set based on the size of the signature, wherein, in a program, the working set W(ti, τ
) for i=1, 2 . . . , where i is an integer, is a set of distinct memory segments {s1, s2 . . . sω
} accessed over the ith window of size τ
within a time interval ti;wherein the window is a sequence of τ
consecutive memory accesses;wherein the working set size is ω
, the cardinality of the set of unique segments that are accessed by members of the window. - View Dependent Claims (16)
-
-
17. A computerized method of detecting working set changes, the method comprising:
-
comparing a current working set signature to a previous working set signature; calculating a relative signature distance between the current working set signature and the previous working set signature; and identify a working set change when the relative signature distance exceeds a predetermined threshold, wherein, in a program, the working set W(ti, τ
) for i=1, 2 . . . , where i is an integer, is a set of distinct memory segments {s1, s2 . . . sω
} accessed over the ith window of size τ
within a time interval ti;wherein the window is a sequence of τ
consecutive memory accesses;wherein the working set size is ω
, the cardinality of the set of unique segments that are accessed by members of the window. - View Dependent Claims (18)
-
-
19. A computerized method of identifying a recurring working set, the method comprising:
-
comparing a current working set signature to one or more previous working set signatures; calculating a relative signature distance between the current working set signature and the one or more previous working set signatures; and identifying a recurring working set when the relative signature distance between the current working set signature and one of the previous working set signatures is within a predetermined threshold, wherein, in a program, the working set W(ti, τ
) for i=1, 2 . . . , where i is an integer, is a set of distinct memory segments {s1, s2 . . . sω
} accessed over the ith window of size τ
within a time interval ti;wherein the window is a sequence of τ
consecutive memory accesses;wherein the working set size is ω
, the cardinality of the set of unique segments that are accessed by members of the window. - View Dependent Claims (20, 21)
-
-
22. A hardware reconfiguration method comprising:
-
maintaining a table comprising a plurality of working set signatures for a program; upon detecting a working set change, looking up a working set signature for a current working set in the table; if the working set signature is in the table, reinstating a hardware configuration for the current working set; and if the working set signature is not in the table;
identifying a new hardware configuration for the current working set and saving the working set signature and the new hardware configuration,wherein, in a program, the working set W(ti, τ
) for i=1, 2 . . . , where i is an integer, is a set of distinct memory segments {s1, s2 . . . sω
} accessed over the ith window of size τ
within a time interval ti;wherein the window is a sequence of τ
consecutive memory accesses;wherein the working set size is ω
, the cardinality of the set of unique segments that are accessed by members of the window. - View Dependent Claims (23)
-
Specification