Ensuring determinism during programmatic replay in a virtual machine

US10489168B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-10489168-B2
Application numberUS-201816121105-A
CountryUS
Kind codeB2
Filing dateSep 4, 2018
Priority dateJun 29, 2010
Publication dateNov 26, 2019
Grant dateNov 26, 2019

How to read this patent

A practical reading order for non-experts. Skip the full description unless you need deep technical detail.

  1. Title

    What the patent document calls the invention.

  2. Abstract

    A short plain-language summary of the technical disclosure.

  3. Assignees and inventors

    Who owns or filed the patent and who is credited as inventor.

  4. Key dates

    Filing, priority, publication, and grant dates set the timeline.

  5. First independent claim

    The legal scope of protection — read this for what is actually claimed.

  6. CPC / IPC classifications

    Technology tags used to group this patent with similar filings.

  7. Citations and related patents

    Prior art links and similar publications in this corpus.

Abstract

Official abstract text for this publication.

Aspects of an application program's execution which might be subject to non-determinism are performed in a deterministic manner while the application program's execution is being recorded in a virtual machine environment so that the application program's behavior, when played back in that virtual machine environment, will duplicate the behavior that the application program exhibited when originally executed and recorded. Techniques disclosed herein take advantage of the recognition that only minimal data needs to be recorded in relation to the execution of deterministic operations, which actually can be repeated “verbatim” during replay, and that more highly detailed data should be recorded only in relation to non-deterministic operations, so that those non-deterministic operations can be deterministically simulated (rather than attempting to re-execute those operations under circumstances where the outcome of the re-execution might differ) based on the detailed data during replay.

First claim

Opening claim text (preview).

What is claimed is: 1. A computer-implemented method supported by a computing system having at least one processing core having thereon memory-stored instructions, which when executed by the processing core, cause the core to perform the method steps, comprising: detecting an event that indicates that a class of a computer program is being prepared during a linking process; in response to detecting the event, obtaining a method list of all method signatures of methods of the class; determining a class list of one or more classes that are identified by a particular method signature in the method list; and for each particular class in the class list, invoking a class loader of the particular class prior to runtime in order to load, in a deterministic order, classes that could have been loaded due to just-in-time (JIT) compilation during runtime of the computer program; wherein the steps are performed by a replay core executing on a computing device. 2. The computer-implemented method of claim 1 , wherein the steps are performed by the replay core at both a record time and a replay time in order to load classes that could have been loaded due to the JIT compilation in the same order at both the record time and the replay time. 3. The computer-implemented method of claim 1 , wherein the JIT compilation, if performed, causes classes to be loaded in a non-deterministic manner at runtime. 4. The computer-implemented method of claim 3 , wherein invoking the class loader for each particular class in the class list prior to runtime prevents the JIT compilation from causing any of the classes in the class list from being loaded during runtime of the computer program. 5. The computer-implemented method of claim 1 , further comprising the steps of: locating, within bytecode of the computer program, a particular instruction that is either a “checkcast” instruction or an “instanceof” instruction, wherein the particular instruction identifies a class; and in response to locating the particular instruction, injecting, into the bytecode of the computer program, prior to the particular instruction, an additional instruction, which, when executed by a virtual machine, will cause the virtual machine to load the class to thereby prevent the JIT compilation from loading the class identified by the particular instruction from being loaded non-deterministically; wherein the steps of locating and injecting are performed by the replay core. 6. The computer-implemented method of claim 5 , wherein the steps of locating and injecting are performed by the replay core at both a record time and a replay time in order to load classes that could have been loaded due to the JIT compilation in the same order at both the record time and the replay time. 7. The computer-implemented method of claim 5 , wherein the additional instruction is a JAVA “LDC” bytecode that identifies the class, wherein the virtual machine is a JAVA Virtual Machine (JVM). 8. A computer-readable storage medium storing instructions which, when executed by one or more processors, cause the one or more processors to: locate, within bytecode of a computer program, a plurality of particular instructions that are either a “checkcast” instruction or an “instanceof” instruction; wherein each of the particular instructions identifies a class; and in response to locating each particular instruction, inject, into the bytecode of the computer program, prior to the particular instruction, an additional instruction, which, when executed by a virtual machine, will cause the virtual machine to load at runtime the class identified by the particular instruction to thereby prevent just-in-time (JIT) compilation from causing the classes identified by the particular instructions from being loaded non-deterministically at runtime of the computer program; where the class loading comprises execution by one or more processors executing steps to: detect an event that indicates that a class of the computer program is being prepared during a linking process; in response to detecting the event, obtain a method list of all method signatures of methods of the class; determine a class list of one or more classes that are identified by a particular method signature in the method list; and for each particular class in the class list, invoke a class loader of the particular class prior to runtime in order to load, in a deterministic order, classes that could have been loaded due to just-in-time (JIT) compilation during runtime of the computer program. 9. The computer-readable storage medium of claim 8 , wherein the instructions are performed by a replay core at both a record time and a replay time in order to load classes that could have been loaded due to the JIT compilation in the same order at both the record time and the replay time. 10. The computer-readable storage medium of claim 8 , wherein the additional instruction for each particular instruction is a JAVA “LDC” bytecode that identifies the class for each particular instruction, wherein the virtual machine is a JAVA Virtual Machine (JVM). 11. The computer-readable storage medium of claim 8 , wherein the instructions are performed by a replay core at both a record time and a replay time in order to load, in the same order at both the record time and the replay time, classes that could have been loaded due to the JIT compilation. 12. The computer-readable storage medium of claim 8 , wherein the JIT compilation, if performed, would cause classes to be loaded in a non-deterministic manner at runtime of the computer program. 13. The computer-readable storage medium of claim 8 , wherein invoking the class loader for each particular class in the class list prior to runtime prevents the JIT compilation from causing any of the one or more classes in the class list from being loaded during runtime of the computer program. 14. A computer-readable storage medium storing instructions which, when executed by one or more processors, cause the one or more processors to: detect an event that indicates that a class of a computer program is being prepared during a linking process; in response to detecting the event, obtain a method list of all method signatures of methods of the class; determine a class list of one or more classes that are identified by a particular method signature in the method list; and for each particular class in the class list, invoke a class loader of the particular class prior to runtime in order to preemptively load, in a deterministic order, classes that could have been loaded due to just-in-time (JIT) compilation during runtime of the computer program. 15. The computer-readable storage medium of claim 14 , wherein the instructions are performed by a replay core executing on a computing device at both a record time and a replay time in order to load classes that could have been loaded due to the JIT compilation in the same order at both the record time and the replay time. 16. The computer-readable storage medium of claim 14 , wherein the JIT compilation, if performed, would cause classes to be loaded in a non-deterministic manner at runtime of the computer program. 17. The computer-readable storage medium of claim 14 , wherein invoking the class loader for each particular class in the class list prior to the runtime prevents the JIT compilation from causing any of the classes in the class list from being loaded during runtime of the computer program. 18. The computer-readable storage medium of claim 14 , wherein the instructions which, when executed by one or more processors,

Assignees

Inventors

Classifications

  • Program code verification, e.g. Java bytecode verification, proof-carrying code (high-level semantic checks G06F8/43; prevention of errors by analysis, debugging or testing of software G06F11/36) · CPC title

  • Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines · CPC title

  • Instruction operation extension or modification · CPC title

  • by tracing the execution of the program · CPC title

  • Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading · CPC title

Patent family

Related publications grouped by family.

External sources

Frequently asked questions

Answers are generated from the same data shown on this page.

What does patent US10489168B2 cover?
Aspects of an application program's execution which might be subject to non-determinism are performed in a deterministic manner while the application program's execution is being recorded in a virtual machine environment so that the application program's behavior, when played back in that virtual machine environment, will duplicate the behavior that the application program exhibited when origin…
Who is the assignee on this patent?
Ca Inc
What technology area does this patent fall under?
Primary CPC classification G06F9/44521. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Nov 26 2019 00:00:00 GMT+0000 (Coordinated Universal Time) (B2). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 1 related publication on this page (citations in our corpus or others sharing the same primary CPC).