US 9,811,324 B2
Code caching system
Yang Guo, Unterhaching (DE); Daniel Vogelheim, Unterhaching (DE); and Jochen Mathias Eisinger, Munich (DE)
Assigned to Google Inc., Mountain View, CA (US)
Filed by Google Inc., Mountain View, CA (US)
Filed on May 29, 2015, as Appl. No. 14/726,376.
Prior Publication US 2016/0350089 A1, Dec. 1, 2016
Int. Cl. G06F 9/45 (2006.01); G06F 9/30 (2006.01); G06F 17/30 (2006.01); G06F 9/455 (2006.01); H04L 29/08 (2006.01)
CPC G06F 8/4441 (2013.01) [G06F 8/4434 (2013.01); G06F 9/3017 (2013.01); G06F 9/45529 (2013.01); G06F 17/30902 (2013.01); H04L 67/2842 (2013.01)] 22 Claims
OG exemplary drawing
 
1. A code caching system comprising:
a memory comprising instructions; and
one or more processors configured to execute the instructions to:
upon a cache miss in a resource cache:
obtain first executable code compiled from primary source code awaiting execution;
obtain second executable code compiled from secondary source code referenced in the primary source code and selected based on one or more of a size of the secondary source code or compile time of the secondary source code;
serialize the first executable code and the second executable code into serialized code that is configured to be reconstructed in multiple execution contexts;
store the serialized code, an object referenced in the selected secondary source code, an access method for accessing the object referenced in the selected secondary source code, and a type of the object as cached data in the resource cache, wherein the instructions cause the one or more processors to use the access method to access the cached object when a cache hit occurs for the cached object and when the type of the object matches an object type of a data access for the cache hit;
obtain an execution history of the selected secondary source code; and
replace the selected secondary source code with other secondary source code that has been more frequently executed than the selected secondary source code based on the execution history of the selected secondary source code.