发明名称 Autonomic hardware assist for patching code
摘要 Hardware assist to autonomically patch code. The present invention provides hardware microcode to a new type of metadata to selectively identify instructions to be patched for specific performance optimization functions. The present invention also provides a new flag in the machine status register (MSR) to enable or disable a performance monitoring application or process to perform code-patching functions. If the code patching function is enabled, the application or process may patch code at run time by associating the metadata with the selected instructions. The metadata includes pointers pointing to the patch code block code. The program code may be patched autonomically without modifying original code.
申请公布号 US8782664(B2) 申请公布日期 2014.07.15
申请号 US201213347876 申请日期 2012.01.11
申请人 International Business Machines Corporation 发明人 DeWitt, Jr. Jimmie E.;Levine Frank E.;Richardson Christopher M.;Urquhart Robert J.
分类号 G06F3/00;G06F13/00 主分类号 G06F3/00
代理机构 Yee & Associates, P.C. 代理人 Yee & Associates, P.C. ;Mims, Jr. David A.
主权项 1. A computer system having a processor configured to autonomically patch computer program code, comprising: checking a flag in a machine status register to determine whether code patching functionality is to be enabled; responsive to determining that code patching functionality is to be enabled, enabling the code patching functionality; executing a computer program instruction, wherein the computer program instruction is located at a start of a block of code of an execution sequence of original code instructions; determining whether metadata is associated with the computer program instruction, wherein the metadata identifies the computer program instruction as a computer program instruction having associated patch instructions, and indicates an address of the patch instructions, wherein the patch instructions are created by: copying instructions from the block of code to a new memory location; modifying the order of the instructions of the block of code; and populating metadata with a pointer to the patch instructions; responsive to determining that the metadata is associated with the computer program instruction, redirecting execution to the patch instructions at the address indicated by the metadata; executing the patch instructions; returning to an instruction of the execution sequence of original code instructions in the computer program; and storing a result of executing the execution sequence.
地址 Armonk NY US