发明名称 |
Trap-based mechanism for tracking accesses of object class names |
摘要 |
In general, the invention relates to a method. The method includes receiving notification, which includes context information, of a trap. The method further includes accessing, based at least partially upon the context information, a particular instruction that caused the trap, determining, based at least partially upon the context information, a particular address that is to be accessed by the particular instruction, updating a set of log information to indicate accessing of the particular address, causing subsequent accesses of the particular address to not give rise to a trap, after causing subsequent accesses of the particular address to not give rise to a trap, accessing the particular address, after accessing the particular address, causing subsequent accesses of the particular address to give rise to a trap, and causing the particular instruction to not be executed. |
申请公布号 |
US8769250(B2) |
申请公布日期 |
2014.07.01 |
申请号 |
US200912554595 |
申请日期 |
2009.09.04 |
申请人 |
Oracle America, Inc. |
发明人 |
Fresko Nedim;Long Dean R.;Zhou Jiangli |
分类号 |
G06F9/00 |
主分类号 |
G06F9/00 |
代理机构 |
Osha Liang LLP |
代理人 |
Osha Liang LLP |
主权项 |
1. A machine-implemented method, comprising:
receiving, by a trap handler, notification of a trap triggered by an attempt to access a particular virtual address by a process, the notification comprising a set of context information; determining, based at least partially upon the context information, a particular instruction that caused the trap, wherein the particular instruction has a particular program counter value associated therewith; determining, based at least partially upon the context information, the particular virtual address that is to be accessed by the particular instruction; mapping, by the trap handler, the particular virtual address to a corresponding logical component targeted by the process via the particular instruction, wherein mapping the particular virtual address to the corresponding logical component comprises determining a class name of an object targeted by the process via the particular instruction; updating, by the trap handler, a set of log information for the process to indicate accessing of the particular virtual address and the corresponding logical component targeted by the process; causing subsequent accesses of the particular virtual address to not give rise to the trap by instructing an operating system to set a particular virtual address page associated with the particular virtual address to an unprotected status; after causing subsequent accesses of the particular virtual address to not give rise to the trap, accessing the particular virtual address; after accessing the particular virtual address:
causing subsequent accesses of the particular virtual address to give rise to the trap by instructing the operating system to set the particular virtual address page to a protected status;deriving a new program counter value that is greater than the particular program counter value; andcausing the new program counter value to be stored into a program counter, thereby causing the particular instruction to be skipped and not executed. |
地址 |
Redwood City CA US |