发明名称 Concurrent inline cache optimization in accessing dynamically typed objects
摘要 A method and an apparatus for concurrent accessing of dynamically type objects based on inline cache code are described. Inline cache initialization in a single thread may be off loaded to an interpreter without incurring unnecessary synchronization overhead. A thread bias mechanism may be provided to detect whether a code block is executed in a single thread. Further, the number of inline cache initializations performed via a compiler, such as baseline JIT compiler, can be reduced to improve processing performance.
申请公布号 US9251071(B2) 申请公布日期 2016.02.02
申请号 US201314096912 申请日期 2013.12.04
申请人 Apple Inc. 发明人 Pizlo Filip J.
分类号 G06F12/08;G06F9/44;G06F9/455;G06F9/45 主分类号 G06F12/08
代理机构 Blakely, Sokoloff, Taylor & Zafman LLP 代理人 Blakely, Sokoloff, Taylor & Zafman LLP
主权项 1. A machine-readable non-transitory storage medium having instructions therein, which when executed by a machine, cause the machine to perform a method, the method comprising: generating initial inline code from a source code block of a source code, the source code block specifying at least one access to an object, the initial inline code having serial inline cache code to perform the one access to the object, wherein the serial inline cache code includes a serial slow code path and a fast code path, the serial inline cache code embedding one or more parameters to determine whether to perform the one access to the object via the fast code path or the serial slow code path; generating concurrent inline code from the source code block, the concurrent inline code having concurrent inline cache code to perform the one access to the object, wherein the concurrent inline cache code includes a concurrent slow code path and the fast code path, the concurrent inline cache code embedding the parameters to determine whether to perform the access to the object via the fast code path or the concurrent slow code path; executing the initial inline code via a particular thread to perform the at least one access to the object, wherein the serial slow code path includes self modifying code to update the parameters of the serial inline cache code; and executing the concurrent inline code via one or more threads concurrently to perform the at least one access to the object, wherein the concurrent slow code path includes self modifying code to update the parameters of the concurrent inline cache code, wherein the fast code path is executed to perform the at least one access to the object if the updated parameters of the serial inline cache code or the updated parameters of the concurrent inline cache code correspond to an object type matching a type of the object, wherein the initial inline code is executed by the particular thread for initialization of the parameters and, wherein the concurrent inline code is generated subsequent to the execution of the initial inline code.
地址 Cupertino CA US