Method and apparatus for managing profile data
First Claim
1. In a computer system having a compiler for compiling source code, a method for developing and providing a heuristic predicting compiler for predicting run-time behavior of source code being compiled comprising the steps of:
- (a) compiling a plurality of source programs;
(b) generating profile data for each said plurality of programs compiled;
(c) generating attribute-vectors for each said programs compiled;
(d) forming rules responsive to said attribute-vectors generated for each of said compiled programs and said profile data corresponding to each of said compiled programs; and
(e) creating a database of said rules, wherein said database is incorporated in said compiler to predict said run-time behavior of programs being compiled.
1 Assignment
0 Petitions
Accused Products
Abstract
A heuristic prediction method of generating profile information for compilers in a computer system that associates profile information to attribute-vectors of a source code derived from observation points in the code during compilation. The prediction method of the present invention enables the compiler to predict the code run-time behavior even before the code has been compiled, therefore providing an ideal way to maintain profile information. In addition to heuristically predicting code run-time behavior, the compiler of the present invention includes features that allow the compiler user to generate profile information of code being compiled using conventional profile generation methods.
164 Citations
30 Claims
-
1. In a computer system having a compiler for compiling source code, a method for developing and providing a heuristic predicting compiler for predicting run-time behavior of source code being compiled comprising the steps of:
-
(a) compiling a plurality of source programs; (b) generating profile data for each said plurality of programs compiled; (c) generating attribute-vectors for each said programs compiled; (d) forming rules responsive to said attribute-vectors generated for each of said compiled programs and said profile data corresponding to each of said compiled programs; and (e) creating a database of said rules, wherein said database is incorporated in said compiler to predict said run-time behavior of programs being compiled. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. In a computer system, a method for compiling source code comprising the steps of:
-
(a) identifying observation points in said source code; (b) assigning one or more attribute-vectors to said observation points, wherein said assigned attribute-vectors uniquely identify said observation points; (c) comparing said attribute-vectors of said code with rules in a heuristic predictor table comprising a map of attribute-vectors with accompanying profile data; (d) if said attribute-vectors of said code in said step (c) matches said rules in said predictor table, said profile data for said attribute-vectors of said code are predicted; and (e) if said attribute-vectors in said step (c) mismatches said rules in said predictor table, said code is then compiled using an alternate method of profiling. - View Dependent Claims (9, 10, 11)
-
-
12. A heuristic predicting compiler for predicting the run-time behavior of source programs being compiled by said compiler comprising:
-
(a) a heuristic predicting means for heuristically predicting run-time behavior of source programs, said heuristic predicting means including generating means for generating attribute vectors responsive to each of said source program; (b) a switching logic means for allowing said compiler to alternate between said predicting means and an alternate means of generating profile data for said program being compiled; and (c) a logic circuit means for conventionally generating profile data for said source program responsive to said predicting means mispredicting said run-time behavior of said source program, said logic circuit means includes a rule creating means for creating rules responsive to said conventionally compiled source program, and wherein said rules are used in subsequent compilation of said source program by said compiler. - View Dependent Claims (13, 14)
-
-
15. A heuristic profile prediction compiler for predicting run-time behavior of source programs being compiled, said compiler comprising:
-
(a) a heuristic predictor for predicting said run-time behavior of said source program, (b) attribute-vectors responsive to static program regions of said source program; (c) a logic switch circuit for allowing said compiler alternate between a heuristic predicting mode and a conventional compilation mode; and (d) a conventional profile data generating circuit for conventionally generating profile data of said source program in response to said predictor failing to predict said run-time behavior of said source program, wherein said conventional profile data generating circuit includes a database of execution counter values of said source program, and wherein said counter values are used as said compiler directives in subsequent source program compilations. - View Dependent Claims (16)
-
-
17. In a computer system having a compiler, a method for developing and providing a heuristic predictor for predicting run-time behavior of programs being compiled, the method comprising the steps of:
-
(a) compiling a variety of programs within different programming categories to generate profile data and static attribute-vectors responsive to each of said compiled programs; (b) generating said heuristic predictor based on said compiled variety of programs, said heuristic predictor being incorporated into said compiler to predict said run-time behavior of programs, the generating of said heuristic predictor including the step of creating a rules list from said compiled programs, said step of creating rules including; (b1) mapping said attribute-vector, for code entities including basic blocks, branch instructions, and control flow statements, within each of said programs with said profile data for each of said compiled programs into an attribute-vector, profile data pair; (b2) forming a rule by consolidating said profile data from each of said variety of programs associated with the same attribute-vector; (b3) merging rules from said variety of programs by concatenating said rules and combining rules with the same attribute-vectors; (b4) creating a hash table of said rules using said attribute-vectors as indices; and (b5) creating said predictor based on a database of said rules from said hash table responsive to said compiled programs to predict subsequent run-time behavior of programs compiled by said compiler.
-
-
18. A heuristic predicting compiler for predicting the run-time behavior of source programs being compiled by said compiler comprising:
-
(a) heuristic predicting means for heuristically predicting run-time behavior of source programs, said heuristic predicting means comprising, (a1) generating means for generating attribute vectors responsive to each of said source programs, (a2) mapping means for mapping said attribute-vectors generated for each of said source programs to a corresponding profile data of each of said source program to form a rule, (a3) merging means for merging said rules with the same attribute-vector into a rules list, (a4) predictor generation means for generating a heuristic predictor responsive to said source programs, wherein said heuristic predictor is created from a hash table of said rules using said attribute-vector as an index; (b) switching logic means for allowing said compiler to alternate between said predicting means and an alternate means of generating profile data for said program being compiled; and (c) logic circuit means for conventionally generating profile data for said source program responsive to said predicting means mispredicting said run-time behavior of said source program. - View Dependent Claims (19, 20)
-
-
21. A heuristic profile prediction compiler for predicting run-time behavior of source programs being compiled, said compiler comprising:
-
(a) a heuristic predictor for predicting said run-time behavior of said source program, said heuristic predictor comprising, (a1) attribute-vectors responsive to static program regions of said source program, (a2) a rule responsive to a pair of said attribute-vectors and profile data responsive to said source program, (a3) a database of said rules merged from a variety of source programs with same attribute-vectors, wherein the predictor is based on said database of said rules from a hash table; (b) a logic switch circuit for allowing said compiler to alternate between said heuristic predicting mode and a conventional compilation mode; and (c) a conventional profile data generating circuit for conventionally generating profile data of said source program in response to said predictor failing to predict said run-time behavior of said source program. - View Dependent Claims (22)
-
-
23. In a computer system having a compiler for compiling source code, a method for developing and providing a heuristic predicting compiler for predicting run-time behavior of source code being compiled comprising the steps of:
-
(a) compiling a plurality of source programs; (b) generating profile data for each said plurality of programs compiled; (c) generating attribute-vectors for each said programs compiled; and (d) forming rules responsive to said attribute-vectors generated for each of said compiled programs and said profile data corresponding to each of said compiled programs. - View Dependent Claims (24, 25, 26, 27, 28, 29, 30)
-
Specification