发明名称 Code instrumentation method and code instrumentation apparatus
摘要 A code instrumentation method and a code instrumentation apparatus for instrumenting object codes of programs to enable memory access tracing. The code instrumentation method includes: identifying an object code block to be executed circularly in object codes; identifying at least one memory access instruction in the object code block where a memory address to be accessed during the circular execution of the object code block keeps unchanged; and inserting a routine for tracing the memory access to be executed by the at least one memory access instruction outside the object code block.
申请公布号 US8756584(B2) 申请公布日期 2014.06.17
申请号 US200912411547 申请日期 2009.03.26
申请人 International Business Machines Corporation 发明人 Zhou Wu
分类号 G06F9/44 主分类号 G06F9/44
代理机构 Jordan IP Law, LLC 代理人 Jordan IP Law, LLC
主权项 1. A processor-implemented code instrumentation method for instrumenting object codes of a program to enable memory access tracing, comprising: identifying an object code block to be executed circularly in the object codes; identifying, without modifying said object code block, at least one memory access instruction in the object code block where a memory address to be accessed during the circular execution of the object code block remains unchanged; inserting a routine for tracing the memory access to be executed by the at least one memory access instruction outside the object code block without modifying said object code block; wherein the at least one memory access instruction comprises at least two memory access instructions; wherein the memory address to be accessed by the at least one memory access instruction is addressed by using the same register; wherein addressing mode for the memory address to be accessed by the at least one memory access instruction comprises one or more of direct addressing, register indirect addressing, register relative addressing, base-plus-index addressing and base relative-plus-index addressing; and wherein the inserting comprising inserting an instruction for saving the present execution context that occurs at the inserting position; inserting an instruction for recording information required for tracing the memory access to be executed by the at least one memory access instruction; and inserting an instruction for restoring the saved present execution context.
地址 Armonk NY US