发明名称 Method of tracing object allocation site in program, as well as computer system and computer program therefor
摘要 A data structure of a run-time object having a hash value field. The data structure allows an object allocation site to be traced from the run-time object, the object allocation site being a site in a program allocating the run-time object. A method for allowing an object allocation site to be traced from a run-time object includes embedding a value corresponding to the object allocation site in the program. A hash-value field includes the embedded value and the object identifier, and the tracing is performed by identifying the object allocation site that corresponds to the embedded value. A computer system for tracing an object allocation site includes a memory that stores the run-time object; an acquirer that acquires the value from a hash value field; and an identification unit that identifies the object allocation site that corresponds to the acquired value.
申请公布号 US8782610(B2) 申请公布日期 2014.07.15
申请号 US201313969004 申请日期 2013.08.16
申请人 International Business Machines Corporation 发明人 Odaira Rei;Ogata Kazunori
分类号 G06F9/44 主分类号 G06F9/44
代理机构 Fleit Gibbons Gutman Bongini & Bianco PL 代理人 Giunta Jeffrey N.;Fleit Gibbons Gutman Bongini & Bianco PL
主权项 1. A computer implemented method for tracing an object allocation site from a run-time object, the method comprising: allocating in a memory, from an object allocation site, a run-time object having a hash-value field comprising a hash value identifying the run-time object from among other run-time objects of a class, wherein the object allocation site is a site in a program allocating the run-time object; embedding into the hash-value field as at least a part of the hash value identifying the run-time object from among other run-time objects of a class, in response to allocating the run-time object, an object allocation site identifier representing at least one of a line number and a relative position within the program of the object allocation site; acquiring the hash value from the hash-value field; generating a first value that is unrelated to the object allocation site; storing the first value as a first component of the hash value; recording, into a first correspondence table in response to generating the first value, a correspondence between the first value and object allocation site identifier; obtaining, from the first correspondence table, the correspondence between the first value and the hash value, and information for identifying the object allocation site that corresponds to the first value, thus identifying the object allocation site that corresponds to the first value; and identifying, in response to the acquiring and based on the first value and the correspondence, the object allocation site.
地址 Armonk NY US
您可能感兴趣的专利