Automatic generation of software-controlled caching and ordered synchronization
View Patent ↗A method for applying software controlled caching and ordered thread optimizations in network applications includes collecting statistics for program variables, selecting program variable candidates for ordered synchronization and/or software controlled cache optimization, performing a safety check to ensure candidates can be properly optimized, and generating code for selected optimization candidates.
1. An article of manufacture comprising a machine-accessible storage medium having stored thereon instructions which, when executed by a machine, cause the machine to:
collect statistics for access frequency and cache hit rate to identify potential optimization candidates for software controlled caching;
select optimization candidates based on statistics which indicate an access frequency that is greater than a first predetermined value and a cache hit rate that is greater than a second predetermined value and based on statistics which indicate a variable that has a read frequency that is greater than a fourth predetermined value and a write frequency that is less than a fifth predetermined value; and
generate a code sequence for each of the selected optimization candidates.
2. The article of manufacture of claim 1 , wherein the instructions further cause the machine to perform a safety check to ensure that optimization of the selected optimization candidates will not cause an error.
3. The article of manufacture of claim 1 , wherein the instructions further cause the machine to collect statistics for lock acquire and release frequency to identify potential optimization candidates for ordered synchronization.
4. The article of manufacture of claim 3 , wherein the instructions further cause the machine to select optimization candidates based on statistics which indicate a lock acquire and release frequency that is greater than or equal to a third predetermined value.
5. The article of manufacture of claim 1 , wherein the potential optimization candidates are program variables.