发明名称 Feedback directed optimized compiling of optimized executable code
摘要 For optimizing executable code, during a first compilation of a source code, a set of signatures is inserted in a first executable code. A signature in the set of signatures includes a combination of executable instructions. During an execution of the first executable in a debugger an instruction to call a counter code is executed from a location of the signature to increment a counter corresponding to the signature. A value of the counter is provided to a compiler to correspond with the location of the signature in the first executable code. The source code is recompiled into a second executable code, optimizing a portion of the second executable code responsive to the value exceeding a threshold. The portion is related to the location of the signature in the first executable code.
申请公布号 US9547483(B1) 申请公布日期 2017.01.17
申请号 US201514934457 申请日期 2015.11.06
申请人 INTERNATIONAL BUSINESS MACHINES CORPORATION 发明人 Boxall Alan S.;Cooper Steven;Kielstra Allan H.;Truong Trong
分类号 G06F9/45 主分类号 G06F9/45
代理机构 Garg Law Firm, PLLC 代理人 Garg Law Firm, PLLC ;Garg Rakesh;Gooshaw Issac
主权项 1. A method comprising: causing a compiler to self-determine a hot section in a source code during a first compilation of the source code; sending a command to the compiler, the command causing the compiler to determine a set of insertion points corresponding to a set of hot sections in the source code, an insertion point in the set of insertion points corresponding to a determined hot section; situating, during the first compilation of the source code into a first executable code, the insertion point corresponding to the hot section near a portion of the first executable code corresponding to the hot section; inserting, during the first compilation of the source code, a set of signatures in the first executable code, wherein a signature in the set of signatures is located at the insertion point and comprises a combination of executable no-op instructions which when examined by a debugger inform the debugger that the signature has been inserted by the compiler and not a code in the source code to mark the insertion point, wherein a first signature in the set of signatures comprises a first sequence of only a first number of consecutive no-op instructions to cause a first operation at the debugger, and wherein a second signature in the set of signatures comprises a second sequence of only a second number of consecutive no-op instructions to cause a second operation at the debugger, wherein the correspondence between the first signature and the first operation and the correspondence between the second signature and the second operation are mutually agreed between the compiler and the debugger; executing, during an execution of the first executable in a debugger using a processor and a memory, an instruction to call a counter code; incrementing, responsive to the executing, a counter corresponding to the signature, wherein the counter code is configured to increment the counter in response to the instruction to call the counter code being executed from a location of the signature in the first executable code; providing, to a compiler, a value of the counter corresponding to the location of the signature in the first executable code; and recompiling the source code to form a second executable code, the recompiling optimizing a portion of the second executable code responsive to the value exceeding a threshold, wherein the portion is related to the location of the signature in the first executable code.
地址 Armonk NY US