US20100274551A1 - Support for a non-native application - Google Patents

Support for a non-native application Download PDF

Info

Publication number
US20100274551A1
US20100274551A1 US12/429,399 US42939909A US2010274551A1 US 20100274551 A1 US20100274551 A1 US 20100274551A1 US 42939909 A US42939909 A US 42939909A US 2010274551 A1 US2010274551 A1 US 2010274551A1
Authority
US
United States
Prior art keywords
binary
native
guest
information
translated
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
US12/429,399
Other versions
US9766911B2 (en
Inventor
Abhinav Das
Jiwei Lu
William Y. Chen
Chandramouli Banerjee
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Oracle America Inc
Original Assignee
Sun Microsystems Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sun Microsystems Inc filed Critical Sun Microsystems Inc
Priority to US12/429,399 priority Critical patent/US9766911B2/en
Assigned to SUN MICROSYSTEMS, INC. reassignment SUN MICROSYSTEMS, INC. ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS). Assignors: BANERJEE, CHANDRAMOULI, CHEN, WILLIAM Y., DAS, ABHINAV, LU, JIWEI
Publication of US20100274551A1 publication Critical patent/US20100274551A1/en
Assigned to Oracle America, Inc. reassignment Oracle America, Inc. MERGER AND CHANGE OF NAME (SEE DOCUMENT FOR DETAILS). Assignors: Oracle America, Inc., ORACLE USA, INC., SUN MICROSYSTEMS, INC.
Assigned to Oracle America, Inc. reassignment Oracle America, Inc. CORRECTIVE ASSIGNMENT TO CORRECT THE MERGED ENTITY'S ADDRESS PREVIOUSLY RECORDED AT REEL: 038247 FRAME: 0671. ASSIGNOR(S) HEREBY CONFIRMS THE ASSIGNMENT. Assignors: ORACLE USA, INC., SUN MICROSYSTEMS, INC.
Application granted granted Critical
Publication of US9766911B2 publication Critical patent/US9766911B2/en
Active legal-status Critical Current
Adjusted expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45504Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45504Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators
    • G06F9/45516Runtime code conversion or optimisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3604Software analysis for verifying properties of programs
    • G06F11/3612Software analysis for verifying properties of programs by runtime analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3636Software debugging by tracing the execution of the program

Definitions

  • aspects of the present invention relate to operating computer applications in a non-native environment. More particularly, aspects of the present invention relate to supporting a non-native application in a translation environment.
  • each architecture has software applications and programs that are specifically created to properly operate within that particular architecture.
  • the applications operate in an architecture they were designed to operate within, it is commonly referred to as operating in a “native” environment.
  • it may be beneficial or desirable to operate some programs in a non-native environment i.e., in an architecture for which they were not specifically designed.
  • Binary translation and, specifically, dynamic binary translation provides translation of binary code so that applications may operate in a non-native environment.
  • a guest process running on a host system through a dynamic translator may appear as a native process to the host operating system.
  • the host system may have little or no knowledge that the process is being translated.
  • architectural differences may make it difficult to monitor, debug, and/or control the guest process.
  • a computer program product in a computer readable medium.
  • the product includes program code for receiving a non-native binary in a computer readable medium and program code for translating the non-native binary. Additionally, the product includes program code for executing the translated non-native binary, the non-native binary including one or more threads, and program code for pausing execution of the translated non-native binary.
  • the product also includes program code for providing guest instruction boundary information to a monitoring process and program code for analyzing the state of each thread of the translated non-native binary. Moreover, the product includes program code for fast-forwarding at least one thread so that its state is consistent with the guest instruction boundary.
  • a system of monitoring non-native binaries executed in a dynamic binary translation environment includes a translator for translating a non-native binary and a processor for executing the translated non-native binary, wherein the processor is configured to pause execution of the translated non-native binary. Additionally, the translator is configured to export a set of information about the non-native binary to a computer readable medium while the non-native binary is in a paused state.
  • a computer system that includes a machine readable medium having computer executable instructions stored thereon.
  • the system includes a processor and a machine readable medium comprising code executable by the processor.
  • the code When executed by the processor, the code may translate a guest executable binary to a host executable binary and export information about the guest executable binary to a location in the machine readable medium accessible to other executable binaries.
  • FIG. 1 illustrates a computer system in accordance with an example embodiment of the present disclosure.
  • FIG. 2 is a block diagram of non-native guest processes operating on a host in accordance with an embodiment of the present disclosure.
  • FIG. 3 is a block diagram of memory having a dynamic binary translator and a page located an offset from the translator in memory in accordance with an embodiment of the present disclosure.
  • FIG. 4 is a block diagram of the non-native guest process and host of FIG. 2 illustrating granularity differences between guest process instructions and translated instructions.
  • FIG. 5 is a flowchart illustration of a technique to bring threads of a translated process to a consistent state in accordance with an embodiment of the present disclosure.
  • FIG. 6 is a flowchart illustrating a technique for managing changes to an address space of a non-native guest process executed in a dynamic binary translation environment.
  • a binary translator may export information to a page located in memory or to another binary translator so that the information may be used in monitoring or controlling the non-native application.
  • the binary translator may export details regarding an emulated state of the non-native application, including the location of a code cache and an in-memory emulated state for each thread, so that a register map may be generated and made available to other applications.
  • a thread may be considered an instance of a process and multiple threads of a single process may be running at any given time.
  • post-processing code is provided to bring a monitored process to a state consistent between a host and a guest.
  • pre-processing code is provided to update a code-cache to reflect changes made to an address space of the non-native application by the monitoring process. The changes are then translated and provided to the host prior to running the process again.
  • FIG. 1 illustrates a host computer system 10 for executing a non-native application in accordance with an embodiment of the present disclosure.
  • the host computer system 10 may include a central processing unit CPU 12 which is communicatively coupled to a memory 14 and a I/O interface 16 .
  • the CPU 12 may be one or more commercially available computer processors or processing cores, such as those manufactured by Intel or Advanced Micro Devices, for example.
  • the memory 14 may include a form of random access memory (RAM) such as dynamic RAM or static RAM, for example.
  • the I/O interface 16 may be coupled to various i/o devices such as a hard disk drive 18 , a keyboard and/or mouse 20 , a network interface device 22 , and a monitor 24 , for example.
  • the network interface device 22 may allow for the computer system 10 to communicate over a network 26 with other computer systems or devices.
  • the host computer system 10 may be configured in accordance with a host computer architecture which may be defined by both the computer hardware implemented in the system 10 , as well as the operating system running on the host computer system 10 .
  • hardware architectures include RISC, CISC and MIPS architectures and, more specifically, may include Sparc and Intel x86 platforms.
  • Operating systems that commonly run on these particular hardware architectures include, Solaris, Linux, Windows, etc.
  • a kernel of the operating systems generally provide tools used to evaluate the status of the operating system and the applications or processes currently running. For example, POSIX operating systems such as Linux and Solaris provide two mechanisms for one process to control and/or monitor another process.
  • IO control operations on a file system called “/proc” may be used to control and/or monitor other processes, as can reading and writing special files created for each running process in the /proc file system.
  • /proc file system For additional information about the /proc file system reference may be made to Solaris 2.5 Reference Manual AnswerBook, available at www.sun.com, which is incorporated by reference herein in its entirety and for all purposes.
  • the /proc file system is a pseudo-file system, meaning files created inside the /proc file system do not exist or reside on the hard disk drive 18 .
  • the operating system emulates file operations in the /proc file system that may be used to monitor or control processes. For example, a file called “/proc/1000/pstatus” may exist in the /proc file system for process id 1000 . This file represents the current state of the process 1000 . When a read operation is called on this file, the operating system fills a read buffer 28 that may be in a cache 30 of the processor 12 with an in-kernel process state 32 . Another example is “/proc/1000/ctl,” which is a pseudo file that accepts control messages from the write system call.
  • Control messages have predefined formats for various operations such as stop the process, run the process, change the register contents of a stopped process, etc. Yet another example is “/proc/1000/as,” which is used to read from or write to the address space of process id 1000 .
  • Proc ioctl operations which are input/output control operations within the /proc file system, have similar equivalents to the above pseudo files and, hence, may similarly be used to monitor processes executing on the host computer system 10 .
  • “ioctl(fid, PIOCSTATUS, buffer)” may be used to obtain the status of a process.
  • the file id (“fid”) can be obtained by opening “/proc/1000,” for example, for the process 1000 .
  • the proc ioctls provide the same functionality as the proc file system but the control and monitor operations are carried out through IO control operations rather than reading or writing of pseudo files.
  • Enabling the use of the /proc file system and proc ioctl operations in adopting dynamic binary translation allows for the development and testing of applications in a non-native environment. More particularly, as non-native /proc tools are used to monitor and control the non-native processes, the native tools remain unmodified. The native operating system is not aware of the architectural considerations of the non-native application and the dynamic translator is responsible for maintaining these considerations even in the presence of fine grained control with the native operating system.
  • FIG. 2 illustrates a block diagram of guest processes 50 and 52 operating in a host operating system 54 through dynamic binary translators 56 and 58 .
  • the guest processes may be applications that were not specifically designed to operate within the host operating system 54 .
  • the guest processes 50 and 52 may appear as a native processes to the host operating system 54 and, thus, the host operating system 54 may have little or no knowledge that the processes 50 and 52 are being translated.
  • guest process 50 is being monitored by guest process 52 .
  • guest process 52 may be a debugger such as dbx, gdb or mdb, for example, or other application that can monitor and/or control another process.
  • a process may be monitored and/or controlled by a first process issuing a set of commands for a second process indicating that it be notified when a particular event happens on the second process.
  • process 52 can ask for notification on signal SIGINT on process 50 .
  • the kernel stops or freezes the process 50 when it detects that a SIGINT has been delivered to the process 50 .
  • the kernel updates its data structures to reflect that a signal (SIGINT) has to be delivered when the process 50 starts running again.
  • the process 52 may be either polling or executing a blocking system call that is unblocked only when process 50 is stopped.
  • the ioctl(fid, PIOCWSTOP, arg) waits for process 50 to stop and only returns when process 50 is stopped (or if the ioctl is interrupted by some other event in process 52 ).
  • process 52 inspects the status of process 50 by reading the /proc/pid/status file or by an ioctl operation, for example.
  • the status file may contain the register state of the guest process 50 , in addition to other information. Because the guest process 52 used to monitor and control the process 50 is also translated, i.e., non-native, details of the underlying dynamic translator 56 can be hidden.
  • a native monitoring and/or controlling tool may be implemented. If native tools, such as a host debugger (not shown), are used to monitor and control the translated process they may have limited success, as the host tools will not understand the non-native architecture state, which is needed to fully enable monitoring and/or controlling of the non-native process. Specifically, the host debugger will receive a native register state but the correspondence between host and guest registers for an emulated process is known only to the emulator running the guest process. In order to fully monitor and control the guest process, the host debugger will need to understand implementation details of the binary translation. the host debugger will also present details of the dynamic binary translation that may be irrelevant to a user developing non-native applications using dynamic binary translation.
  • native tools such as a host debugger (not shown)
  • the host debugger will receive a native register state but the correspondence between host and guest registers for an emulated process is known only to the emulator running the guest process.
  • the host debugger will need to understand implementation details of the binary translation.
  • the architecture neutral files may be relatively easy to handle, as the binary format of the buffer may simply be adjusted.
  • Different architectures such as UltraSPARC and x86 may have different alignment and size (in bytes) requirements for different fields of a data structure. For example, “struct ⁇ int a, double b ⁇ ” can have a size of 12 bytes and is aligned on 4-byte boundary, whereas on UltraSPARC it can have a size of 16 bytes and is aligned on 8-byte boundary.
  • the in-memory data structure representation may be different due to different endian-ness. Such data structures require modification of the date read from the proc files before supplying the data to the non-native debugger.
  • the detailed information (e.g., location of code cache and in-memory emulated state for each thread, etc.) may be extracted from the in-memory state of the binary translator 56 .
  • the binary translator 56 may then export information about the emulated state and other details of the translation so that another binary translator 58 can use the information.
  • the information may be exported in a page 60 allocated by the translator 56 at a location relative to where the translator 56 is loaded in memory 18 .
  • FIG. 3 illustrates a memory stack 70 having a dynamic binary translator 56 and a page 60 located and referenced as an offset from the memory location of the dynamic binary translator 56 .
  • the page 60 can be found quickly by reading information available to the native /proc file system. More specifically, the location where the binary translator 56 is loaded is known, as it is stored by the host operating system 54 and made available by reading the /proc/pid/auxv file. Thus, the page 60 can be accessed with a fixed offset from that location.
  • the information that is passed in the page 60 includes details about the emulator such as, the location of a code-cache, the location of an in-memory emulated state for each thread and other information. Any information that is not available or derivable from the native proc file system may be made available through this page 60 .
  • page 60 provides a map for correlating registers and memory locations between the host 54 and the guest process 50 . Information pointed to by page 60 can be read by opening the /proc/pid/as file of the process 50 that is being monitored.
  • Page 60 contains a data structure that points to internal information of the binary translator.
  • the page 60 may contain information about the current state of DBT 56 , such as, “translating code,” “executing system call,” and “executing in code-cache,” among others.
  • the page 60 is implementation specific protocol so that DBT 58 understands the state of DBT 56 .
  • the layout of the page 60 can start with a 4-byte header (‘p,’ ‘r,’ ‘o,’ ‘c’), followed by a pointer to an instruction boundary map, followed by a pointer to a thread state. This, however, is simply one example of an organization scheme and other schemes may be possible and may present different information and/or pointers in a different order, for example.
  • post-processing of an executed process may fast-forward the executing process to a consistent state between the host and guest.
  • fast-forward may be used to describe executing a thread of a process to an instruction boundary that is common for both a non-native process and the translation of the non-native process after execution of the thread has been stopped.
  • a single instruction is either executed fully or not executed at all.
  • a single non-native process instruction (e.g., from guest process 50 ) may be translated into multiple instructions in a translated process, i.e., the binary translator 56 may convert one guest instruction into several host (native) instructions.
  • FIG. 4 illustrates a translation of sample code from the guest process 50 to the host 54 via the dynamic binary translator 56 .
  • two lines of code in the guest process 50 when translated may be expanded to five or more lines of code for the host 54 .
  • the guest process 50 instructions are expanded to host instructions in the code-cache 30 .
  • the cache 30 may be integrated with the CPU 12 or, in some embodiments, may be a discrete component. It is possible that the guest process 50 is stopped in the middle of some guest instruction, possibly because of the receipt of some signal. For example, process 52 can asynchronously stop process 50 and request register state information.
  • process 50 is stopped by the system at host machine instruction level granularity. So, the process 50 could be stopped in the middle of executing a guest instruction, a possibility that does not occur when process is executed in a native environment. Since the monitored guest process 50 is stopped by the kernel, the process 50 is frozen in an inconsistent state with the translated process on the host 54 .
  • the monitoring application 52 may read the emulated register state and receive intermediate values, as the guest instruction is only partially complete.
  • the monitoring application is native to the host system, it will receive native register states but the correspondence between host and guest registers for an emulated process is known only to the emulator running the guest process. If the debugger is also a guest process, then the read of status file can be intercepted and the emulated register state can be placed in the read buffer of the debugger. However, the emulator running the debugger should know where to look for the emulated register state in the emulator running the process.
  • Post-processing code 80 in the monitoring guest process 52 may remedy the issue.
  • the post-processing 80 code may be activated when the monitoring guest process 52 is informed that the monitored process 50 has stopped.
  • the post-processing code 80 analyzes the state of each thread of execution in the monitored process 50 and brings it to a consistent state. There may be several challenges in doing this. Specifically, information regarding a guest instruction boundary should be passed to the monitoring application 52 .
  • the guest instruction boundary indicates the stopping point of the guest process 50 instructions. For example, there is a guest instruction boundary after instruction 100 , however, the host 54 may have only executed instruction line 1002 before stopping.
  • the monitoring application 52 can then use the guest instruction boundary information and commands in the native /proc file system to bring the execution of the particular thread to the instruction boundary, i.e., through host instruction 1006 .
  • the monitored process 50 is stopped inside a service routine 82 in the binary translator 56 .
  • the service routine 82 might have some locks that are shared across multiple threads.
  • information is exported out in such a way so as to allow the monitoring application to “fast-forward” each thread of the monitored application 50 to reach a consistent state, i.e., a state that is consistent between both the host 54 and the guest processes 50 .
  • a service routine may contain several hundred or thousands of instructions. “Fast forwarding,” may be practical for relatively few of these instructions.
  • DBT 56 When DBT 56 is in a service routine, it may be updating critical information about the emulated and, hence, should be allowed to complete before DBT 58 can interrupt that information.
  • bringing DBT 56 to a consistent state may include clearly providing state information about DBT 56 , as described above, along with points of execution where DBT 56 is consistent. DBT 58 can then use native proc commands to wait for DBT 56 to reach those consistent points.
  • An example of a consistent point is a point where no thread of DBT 56 is in a service routine.
  • a technique 84 to achieve a consistent state is illustrated as a flowchart in FIG. 5 .
  • the state of the monitored application is saved (block 88 ). For example, if the monitored process is stopped on a signal, the state reflects that it is stopped on a signal.
  • the signal may be any event or message passed to the process from the operating system to redirect execution of the process. In some cases the signal may be issued as a result of user input, e.g., mouse click, ctrl +c, etc.
  • the monitoring process is notified upon issuance of signal that the monitored process has been stopped (block 90 ) and the guest instruction boundary information is provided to the monitoring application (block 92 ) or to a location in memory accessible to the monitoring application.
  • the monitoring process analyzes the state of each thread of the monitored process (block 94 ) and fast-forwards the threads to a consistent state (block 96 ).
  • the saved state of the monitored application is then merged with the post fast-forward state (block 98 ) so that upon re-starting the process, the process is consistent at the host and guest instruction boundaries and with the state at which it was stopped.
  • the address space of guest process 50 can be modified by process 52 at any time by controlling execution of the process 50 and writing to the address space (“as”) file in the /proc file-system for process 50 .
  • Address space modification is not an issue for data sections as long as guest instruction granularity is maintained but address space modification for a text section is cause for concern.
  • the controlling process 52 stops the process 50 at the end of guest instruction 100 and at end of 1006 in the host 54 .
  • the controlling process 52 changes the address space at location 104 to a different instruction and issues a command to continue execution.
  • the text section of the guest process 50 was modified but the host program counter is at 1008 and ready to run the old instruction.
  • the translator 56 should to be made aware of the change.
  • FIG. 6 is a flowchart illustrating a technique 110 for updating the code-cache.
  • the monitored process is stopped (block 112 ).
  • the monitoring application 52 may be notified that the monitored process 50 is stopped (block 114 ) and the state of each thread is made consistent, as discussed above with reference to FIG. 5 .
  • Changes may be made to the text section, thus it is determined whether the guest monitoring application 52 made changes to the text section (block 116 ) before continuing execution. This may be accomplished by monitoring the reads and writes to the /proc/pid/as file of the monitored application 50 . If the monitoring process 52 writes to the /proc/pid/as file, then execution is redirected to a special service routine that handles the changes (block 118 ).
  • the special service routine may include flushing the code-cache (block 120 ) and retranslating the code ( 122 ) so the host 54 may execute the new instructions (block 124 ). If no change has been made to the text section, then execution may continue without being routed through the special service routine (block 126 ).
  • the monitoring application 52 may insert breakpoints and replace a regular instruction with a special trap instruction.
  • Replacing a regular instruction with a debugger trap instruction may be a general mechanism used by a debugger to stop execution of a monitored process at a particular place during execution. As this is a general mechanism used by native debuggers, dynamic binary translators should have support for such changes to the address space of non-native applications.
  • the special trap instruction stops execution of the process 50 and notifies the monitoring application 52 .
  • the monitoring application 52 replaces the trap instruction with the original instruction before continuing execution, thus avoiding the confusion of different instructions at the host and the guest. For example, if a debugger wants to inspect the state of an application at the beginning of function “foo,” the debugger may replace the trap instruction with the original instruction and start execution from the replaced instruction.
  • a guest process may be executed, monitored, and controlled in a non-native, binary translation environment. Additionally, the use of “proc tools” translated on a dynamic binary translator and used to monitor and control a translated process requires no modification in the tool itself and the binary translator performs all extra handling.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

Aspects of the invention are directed to a systems and methods for operating a non-native binary in dynamic binary translation environment. In accordance with an embodiment, there is provided a computer program product in a computer readable medium. The product includes program code for receiving a non-native binary in a computer readable medium and program code for translating the non-native binary. Additionally, the product includes program code for executing the translated non-native binary, the non-native binary including one or more threads, and program code for pausing execution of the translated non-native binary. The product also includes program code for providing guest instruction boundary information to a monitoring process and program code for analyzing a state of each thread of the translated non-native binary. Moreover, the product includes program code for fast-forwarding at least one thread so that its state is consistent with the guest instruction boundary

Description

    CROSS-REFERENCE TO RELATED APPLICATIONS
  • The following related applications are incorporated by reference in their entirety and for all purposes: U.S. patent application Ser. No. 12/264,943, filed Nov. 5, 2008 and entitled, “Handling Signals And Exceptions In A Dynamic Translation Environment”; U.S. patent application Ser. No. 12/264,944, filed Nov. 5, 2008 and entitled “Handling Mutex Locks In A Dynamic Binary Translation Against Heterogeneous Computer Systems”; and U.S. patent application Ser. No. 12/345,810, filed Dec. 30, 2008 and entitled, “Dynamic Translator For Requests For System Resources.”
  • FIELD OF THE INVENTION
  • Aspects of the present invention relate to operating computer applications in a non-native environment. More particularly, aspects of the present invention relate to supporting a non-native application in a translation environment.
  • BACKGROUND
  • There are several different computing architectures prevalent today. Generally, each architecture has software applications and programs that are specifically created to properly operate within that particular architecture. When the applications operate in an architecture they were designed to operate within, it is commonly referred to as operating in a “native” environment. However, it may be beneficial or desirable to operate some programs in a non-native environment, i.e., in an architecture for which they were not specifically designed.
  • Binary translation and, specifically, dynamic binary translation provides translation of binary code so that applications may operate in a non-native environment. A guest process running on a host system through a dynamic translator may appear as a native process to the host operating system. The host system may have little or no knowledge that the process is being translated. However, architectural differences may make it difficult to monitor, debug, and/or control the guest process.
  • SUMMARY
  • Aspects of the invention are directed to systems and methods for operating a non-native binary in dynamic binary translation environment. In accordance with an embodiment, there is provided a computer program product in a computer readable medium. The product includes program code for receiving a non-native binary in a computer readable medium and program code for translating the non-native binary. Additionally, the product includes program code for executing the translated non-native binary, the non-native binary including one or more threads, and program code for pausing execution of the translated non-native binary. The product also includes program code for providing guest instruction boundary information to a monitoring process and program code for analyzing the state of each thread of the translated non-native binary. Moreover, the product includes program code for fast-forwarding at least one thread so that its state is consistent with the guest instruction boundary.
  • In another embodiment, there is provided a system of monitoring non-native binaries executed in a dynamic binary translation environment. The system includes a translator for translating a non-native binary and a processor for executing the translated non-native binary, wherein the processor is configured to pause execution of the translated non-native binary. Additionally, the translator is configured to export a set of information about the non-native binary to a computer readable medium while the non-native binary is in a paused state.
  • In yet another embodiment, there is provided a computer system that includes a machine readable medium having computer executable instructions stored thereon. The system includes a processor and a machine readable medium comprising code executable by the processor. When executed by the processor, the code may translate a guest executable binary to a host executable binary and export information about the guest executable binary to a location in the machine readable medium accessible to other executable binaries.
  • BRIEF DESCRIPTION OF THE DRAWINGS
  • FIG. 1 illustrates a computer system in accordance with an example embodiment of the present disclosure.
  • FIG. 2 is a block diagram of non-native guest processes operating on a host in accordance with an embodiment of the present disclosure.
  • FIG. 3 is a block diagram of memory having a dynamic binary translator and a page located an offset from the translator in memory in accordance with an embodiment of the present disclosure.
  • FIG. 4 is a block diagram of the non-native guest process and host of FIG. 2 illustrating granularity differences between guest process instructions and translated instructions.
  • FIG. 5 is a flowchart illustration of a technique to bring threads of a translated process to a consistent state in accordance with an embodiment of the present disclosure.
  • FIG. 6 is a flowchart illustrating a technique for managing changes to an address space of a non-native guest process executed in a dynamic binary translation environment.
  • DETAILED DESCRIPTION
  • In accordance with the present disclosure, there are provided techniques to overcome some architectural issues that may make it difficult to monitor and/or control a non-native application operating in a non-native environment. In one embodiment, a binary translator may export information to a page located in memory or to another binary translator so that the information may be used in monitoring or controlling the non-native application. For example, the binary translator may export details regarding an emulated state of the non-native application, including the location of a code cache and an in-memory emulated state for each thread, so that a register map may be generated and made available to other applications. For the purposes of the disclosure, a thread may be considered an instance of a process and multiple threads of a single process may be running at any given time.
  • In another embodiment, post-processing code is provided to bring a monitored process to a state consistent between a host and a guest. In yet another embodiment, pre-processing code is provided to update a code-cache to reflect changes made to an address space of the non-native application by the monitoring process. The changes are then translated and provided to the host prior to running the process again.
  • Hence, the following description sets forth various embodiments in three sections: 1) exporting information not available or derivable from a native system, 2) maintaining a consistent state, and 3) accounting for modifications to the address space. The disclosed techniques alone and in combination provide for aspect of control and monitoring of non-native guest applications in an unmodified host operating system. Furthermore, the monitoring application maintains the consistency between the host and guest and, thus, the monitored application is not burdened with additional tasks. Various embodiments are described in greater detail in each of their respective sections, preceded by an overview of examples of systems and tools that may be used to perform the techniques disclosed herein.
  • FIG. 1 illustrates a host computer system 10 for executing a non-native application in accordance with an embodiment of the present disclosure. The host computer system 10 may include a central processing unit CPU 12 which is communicatively coupled to a memory 14 and a I/O interface 16. The CPU 12 may be one or more commercially available computer processors or processing cores, such as those manufactured by Intel or Advanced Micro Devices, for example. The memory 14, may include a form of random access memory (RAM) such as dynamic RAM or static RAM, for example. The I/O interface 16 may be coupled to various i/o devices such as a hard disk drive 18, a keyboard and/or mouse 20, a network interface device 22, and a monitor 24, for example. The network interface device 22 may allow for the computer system 10 to communicate over a network 26 with other computer systems or devices.
  • The host computer system 10 may be configured in accordance with a host computer architecture which may be defined by both the computer hardware implemented in the system 10, as well as the operating system running on the host computer system 10. Examples of hardware architectures include RISC, CISC and MIPS architectures and, more specifically, may include Sparc and Intel x86 platforms. Operating systems that commonly run on these particular hardware architectures include, Solaris, Linux, Windows, etc. A kernel of the operating systems generally provide tools used to evaluate the status of the operating system and the applications or processes currently running. For example, POSIX operating systems such as Linux and Solaris provide two mechanisms for one process to control and/or monitor another process. In a POSIX system, IO control operations (ioctl calls) on a file system called “/proc” may be used to control and/or monitor other processes, as can reading and writing special files created for each running process in the /proc file system. For additional information about the /proc file system reference may be made to Solaris 2.5 Reference Manual AnswerBook, available at www.sun.com, which is incorporated by reference herein in its entirety and for all purposes.
  • The /proc file system is a pseudo-file system, meaning files created inside the /proc file system do not exist or reside on the hard disk drive 18. The operating system emulates file operations in the /proc file system that may be used to monitor or control processes. For example, a file called “/proc/1000/pstatus” may exist in the /proc file system for process id 1000. This file represents the current state of the process 1000. When a read operation is called on this file, the operating system fills a read buffer 28 that may be in a cache 30 of the processor 12 with an in-kernel process state 32. Another example is “/proc/1000/ctl,” which is a pseudo file that accepts control messages from the write system call. Control messages have predefined formats for various operations such as stop the process, run the process, change the register contents of a stopped process, etc. Yet another example is “/proc/1000/as,” which is used to read from or write to the address space of process id 1000.
  • Proc ioctl operations, which are input/output control operations within the /proc file system, have similar equivalents to the above pseudo files and, hence, may similarly be used to monitor processes executing on the host computer system 10. For example, “ioctl(fid, PIOCSTATUS, buffer)” may be used to obtain the status of a process. The file id (“fid”) can be obtained by opening “/proc/1000,” for example, for the process 1000. The proc ioctls provide the same functionality as the proc file system but the control and monitor operations are carried out through IO control operations rather than reading or writing of pseudo files.
  • Enabling the use of the /proc file system and proc ioctl operations in adopting dynamic binary translation allows for the development and testing of applications in a non-native environment. More particularly, as non-native /proc tools are used to monitor and control the non-native processes, the native tools remain unmodified. The native operating system is not aware of the architectural considerations of the non-native application and the dynamic translator is responsible for maintaining these considerations even in the presence of fine grained control with the native operating system.
  • A. Exporting Information
  • FIG. 2 illustrates a block diagram of guest processes 50 and 52 operating in a host operating system 54 through dynamic binary translators 56 and 58. The guest processes may be applications that were not specifically designed to operate within the host operating system 54. Through binary translation completed by the binary translators 56 and 58, however, the guest processes 50 and 52 may appear as a native processes to the host operating system 54 and, thus, the host operating system 54 may have little or no knowledge that the processes 50 and 52 are being translated.
  • For the purposes of this discussion, the guest process 50 is being monitored by guest process 52. Thus, guest process 52 may be a debugger such as dbx, gdb or mdb, for example, or other application that can monitor and/or control another process. Generally, a process may be monitored and/or controlled by a first process issuing a set of commands for a second process indicating that it be notified when a particular event happens on the second process. For example, process 52 can ask for notification on signal SIGINT on process 50. The kernel stops or freezes the process 50 when it detects that a SIGINT has been delivered to the process 50. The kernel then updates its data structures to reflect that a signal (SIGINT) has to be delivered when the process 50 starts running again. In the meantime, the process 52 may be either polling or executing a blocking system call that is unblocked only when process 50 is stopped. For example, the ioctl(fid, PIOCWSTOP, arg) waits for process 50 to stop and only returns when process 50 is stopped (or if the ioctl is interrupted by some other event in process 52). Once process 52 is unblocked, it inspects the status of process 50 by reading the /proc/pid/status file or by an ioctl operation, for example. The status file may contain the register state of the guest process 50, in addition to other information. Because the guest process 52 used to monitor and control the process 50 is also translated, i.e., non-native, details of the underlying dynamic translator 56 can be hidden.
  • Alternatively, a native monitoring and/or controlling tool may be implemented. If native tools, such as a host debugger (not shown), are used to monitor and control the translated process they may have limited success, as the host tools will not understand the non-native architecture state, which is needed to fully enable monitoring and/or controlling of the non-native process. Specifically, the host debugger will receive a native register state but the correspondence between host and guest registers for an emulated process is known only to the emulator running the guest process. In order to fully monitor and control the guest process, the host debugger will need to understand implementation details of the binary translation. the host debugger will also present details of the dynamic binary translation that may be irrelevant to a user developing non-native applications using dynamic binary translation.
  • There are several pseudo files in the proc file system, some containing architecture specific information and others that are architecture neutral. The architecture neutral files may be relatively easy to handle, as the binary format of the buffer may simply be adjusted. Different architectures such as UltraSPARC and x86 may have different alignment and size (in bytes) requirements for different fields of a data structure. For example, “struct {int a, double b}” can have a size of 12 bytes and is aligned on 4-byte boundary, whereas on UltraSPARC it can have a size of 16 bytes and is aligned on 8-byte boundary. Also, the in-memory data structure representation may be different due to different endian-ness. Such data structures require modification of the date read from the proc files before supplying the data to the non-native debugger.
  • For files that contain architecture specific information, the detailed information (e.g., location of code cache and in-memory emulated state for each thread, etc.) may be extracted from the in-memory state of the binary translator 56. The binary translator 56 may then export information about the emulated state and other details of the translation so that another binary translator 58 can use the information. The information may be exported in a page 60 allocated by the translator 56 at a location relative to where the translator 56 is loaded in memory 18. FIG. 3 illustrates a memory stack 70 having a dynamic binary translator 56 and a page 60 located and referenced as an offset from the memory location of the dynamic binary translator 56. The page 60 can be found quickly by reading information available to the native /proc file system. More specifically, the location where the binary translator 56 is loaded is known, as it is stored by the host operating system 54 and made available by reading the /proc/pid/auxv file. Thus, the page 60 can be accessed with a fixed offset from that location.
  • The information that is passed in the page 60 includes details about the emulator such as, the location of a code-cache, the location of an in-memory emulated state for each thread and other information. Any information that is not available or derivable from the native proc file system may be made available through this page 60. For example, page 60 provides a map for correlating registers and memory locations between the host 54 and the guest process 50. Information pointed to by page 60 can be read by opening the /proc/pid/as file of the process 50 that is being monitored.
  • Page 60 contains a data structure that points to internal information of the binary translator. For example, the page 60 may contain information about the current state of DBT 56, such as, “translating code,” “executing system call,” and “executing in code-cache,” among others. The page 60 is implementation specific protocol so that DBT 58 understands the state of DBT 56. The layout of the page 60 can start with a 4-byte header (‘p,’ ‘r,’ ‘o,’ ‘c’), followed by a pointer to an instruction boundary map, followed by a pointer to a thread state. This, however, is simply one example of an organization scheme and other schemes may be possible and may present different information and/or pointers in a different order, for example.
  • B. Maintaining a Consistent State
  • In addition to exporting information between the host and guest, post-processing of an executed process may fast-forward the executing process to a consistent state between the host and guest. As used herein, the term “fast-forward” may be used to describe executing a thread of a process to an instruction boundary that is common for both a non-native process and the translation of the non-native process after execution of the thread has been stopped. For a native process in a native environment, a single instruction is either executed fully or not executed at all. However, a single non-native process instruction (e.g., from guest process 50) may be translated into multiple instructions in a translated process, i.e., the binary translator 56 may convert one guest instruction into several host (native) instructions.
  • FIG. 4 illustrates a translation of sample code from the guest process 50 to the host 54 via the dynamic binary translator 56. As can been seen, two lines of code in the guest process 50 when translated may be expanded to five or more lines of code for the host 54. Thus, the guest process 50 instructions are expanded to host instructions in the code-cache 30. As will be appreciated to those of skill in the art, the cache 30 may be integrated with the CPU 12 or, in some embodiments, may be a discrete component. It is possible that the guest process 50 is stopped in the middle of some guest instruction, possibly because of the receipt of some signal. For example, process 52 can asynchronously stop process 50 and request register state information. If, for example, a stop command is issued to the host operating system 54 by process 52 for process 50, process 50 is stopped by the system at host machine instruction level granularity. So, the process 50 could be stopped in the middle of executing a guest instruction, a possibility that does not occur when process is executed in a native environment. Since the monitored guest process 50 is stopped by the kernel, the process 50 is frozen in an inconsistent state with the translated process on the host 54. The monitoring application 52 may read the emulated register state and receive intermediate values, as the guest instruction is only partially complete.
  • If the monitoring application is native to the host system, it will receive native register states but the correspondence between host and guest registers for an emulated process is known only to the emulator running the guest process. If the debugger is also a guest process, then the read of status file can be intercepted and the emulated register state can be placed in the read buffer of the debugger. However, the emulator running the debugger should know where to look for the emulated register state in the emulator running the process.
  • Post-processing code 80 in the monitoring guest process 52 may remedy the issue. The post-processing 80 code may be activated when the monitoring guest process 52 is informed that the monitored process 50 has stopped. The post-processing code 80 analyzes the state of each thread of execution in the monitored process 50 and brings it to a consistent state. There may be several challenges in doing this. Specifically, information regarding a guest instruction boundary should be passed to the monitoring application 52. The guest instruction boundary indicates the stopping point of the guest process 50 instructions. For example, there is a guest instruction boundary after instruction 100, however, the host 54 may have only executed instruction line 1002 before stopping. The monitoring application 52 can then use the guest instruction boundary information and commands in the native /proc file system to bring the execution of the particular thread to the instruction boundary, i.e., through host instruction 1006.
  • In addition to the process being stopped in the middle of execution of a translated instruction, it is also possible that the monitored process 50 is stopped inside a service routine 82 in the binary translator 56. The service routine 82 might have some locks that are shared across multiple threads. Thus, information is exported out in such a way so as to allow the monitoring application to “fast-forward” each thread of the monitored application 50 to reach a consistent state, i.e., a state that is consistent between both the host 54 and the guest processes 50.
  • A service routine may contain several hundred or thousands of instructions. “Fast forwarding,” may be practical for relatively few of these instructions. When DBT 56 is in a service routine, it may be updating critical information about the emulated and, hence, should be allowed to complete before DBT 58 can interrupt that information. In on example, bringing DBT 56 to a consistent state may include clearly providing state information about DBT 56, as described above, along with points of execution where DBT 56 is consistent. DBT 58 can then use native proc commands to wait for DBT 56 to reach those consistent points. An example of a consistent point is a point where no thread of DBT 56 is in a service routine.
  • A technique 84 to achieve a consistent state is illustrated as a flowchart in FIG. 5. Once a process has stopped execution (block 86), the state of the monitored application is saved (block 88). For example, if the monitored process is stopped on a signal, the state reflects that it is stopped on a signal. The signal may be any event or message passed to the process from the operating system to redirect execution of the process. In some cases the signal may be issued as a result of user input, e.g., mouse click, ctrl +c, etc. The monitoring process is notified upon issuance of signal that the monitored process has been stopped (block 90) and the guest instruction boundary information is provided to the monitoring application (block 92) or to a location in memory accessible to the monitoring application. The monitoring process analyzes the state of each thread of the monitored process (block 94) and fast-forwards the threads to a consistent state (block 96). The saved state of the monitored application is then merged with the post fast-forward state (block 98) so that upon re-starting the process, the process is consistent at the host and guest instruction boundaries and with the state at which it was stopped.
  • C. Accounting for Modification of the Address Space
  • The address space of guest process 50 can be modified by process 52 at any time by controlling execution of the process 50 and writing to the address space (“as”) file in the /proc file-system for process 50. Address space modification is not an issue for data sections as long as guest instruction granularity is maintained but address space modification for a text section is cause for concern. Specifically, referring again to FIG. 4, it is possible that the controlling process 52 stops the process 50 at the end of guest instruction 100 and at end of 1006 in the host 54. The controlling process 52 changes the address space at location 104 to a different instruction and issues a command to continue execution. Hence, the text section of the guest process 50 was modified but the host program counter is at 1008 and ready to run the old instruction. On native systems this is not an issue as the hardware can run the modified instruction directly. However, on a translated process, the translator 56 should to be made aware of the change.
  • FIG. 6 is a flowchart illustrating a technique 110 for updating the code-cache. As before, the monitored process is stopped (block 112). The monitoring application 52 may be notified that the monitored process 50 is stopped (block 114) and the state of each thread is made consistent, as discussed above with reference to FIG. 5. Changes may be made to the text section, thus it is determined whether the guest monitoring application 52 made changes to the text section (block 116) before continuing execution. This may be accomplished by monitoring the reads and writes to the /proc/pid/as file of the monitored application 50. If the monitoring process 52 writes to the /proc/pid/as file, then execution is redirected to a special service routine that handles the changes (block 118). The special service routine may include flushing the code-cache (block 120) and retranslating the code (122) so the host 54 may execute the new instructions (block 124). If no change has been made to the text section, then execution may continue without being routed through the special service routine (block 126).
  • In another embodiment, the monitoring application 52 may insert breakpoints and replace a regular instruction with a special trap instruction. Replacing a regular instruction with a debugger trap instruction may be a general mechanism used by a debugger to stop execution of a monitored process at a particular place during execution. As this is a general mechanism used by native debuggers, dynamic binary translators should have support for such changes to the address space of non-native applications.
  • When the executed guest process reaches the special trap instruction, the special trap instruction stops execution of the process 50 and notifies the monitoring application 52. The monitoring application 52 replaces the trap instruction with the original instruction before continuing execution, thus avoiding the confusion of different instructions at the host and the guest. For example, if a debugger wants to inspect the state of an application at the beginning of function “foo,” the debugger may replace the trap instruction with the original instruction and start execution from the replaced instruction.
  • Pre-processing before the start of monitored process to account for any changes made to a text section of a guest process, post-processing to bring threads to a consistent state after stopping the guest process, and exporting information not available or derivable from a native /proc file system, a guest process may be executed, monitored, and controlled in a non-native, binary translation environment. Additionally, the use of “proc tools” translated on a dynamic binary translator and used to monitor and control a translated process requires no modification in the tool itself and the binary translator performs all extra handling.
  • The foregoing merely illustrates certain principles and aspects with reference to implementations that conform to concepts disclosed herein. From the above description and drawings, it will be understood by those of ordinary skill in the art that the particular embodiments shown and described are for purposes of illustration only and are not intended to limit the scope of the present invention. References to details of particular embodiments are not intended to limit the scope of the invention. Hence, it will be appreciated that those skilled in the art may devise numerous systems, arrangements and methods which, although not explicitly shown or described herein, embody the principles of the invention and, thus, are within the spirit and scope of the present invention.

Claims (20)

1. A computer program product in a computer readable medium, the product comprising program code configured to:
receive a non-native binary;
translate the non-native binary;
execute the translated non-native binary, the translated non-native binary including one or more threads;
pause execution of the translated non-native binary;
provide guest instruction boundary information to a monitoring process;
analyze a state of each thread of the translated non-native binary; and
fast-forward at least one thread so that its state is consistent with the guest instruction boundary information.
2. The computer program product of claim 1 comprising program code configured to save the state of at least one thread after pausing execution of the translated non-native binary.
3. The computer program product of claim 2 comprising program code configured to merge the saved state of the threads with the fast-forwarded thread states.
4. The computer program product of claim 1 comprising program code configured to notify the monitoring process when execution of the translated non-native binary is paused.
5. The computer program product of claim 4 wherein the monitoring process comprises a non-native process.
6. The computer program product of claim 4 comprising program code configured to:
determine if an address space of the non-native binary has been modified; and
route execution of the translated non-native binary through a special service routine if the address space is modified.
7. The computer program product of claim 6 wherein routing execution of the translated non-native binary through a special service routine comprises:
flushing cache code; and
translating the modified address space.
8. The computer program product of claim 1 comprising program code configured to export information of the non-native binary to a location in the computer readable medium such that a process monitoring the execution of the translated non-native binary may access the information.
9. The computer program product of claim 8 wherein the monitoring process accesses the information by reading a /proc/pid/as file of the executed non-native binary.
10. A system of monitoring non-native binaries executed on a host computer architecture comprising:
a translator for translating a non-native binary;
a processor for executing the translated non-native binary, wherein the processor is configured to pause execution of the translated non-native binary; and
wherein the translator is configured to export a set of information about the non-native binary to a computer readable medium while the translated non-native binary is in a paused state.
11. The system of claim 10 wherein the exported set of information comprises a register state of the non-native binary.
12. The system of claim 10 wherein the translator module comprises a binary translator and the set of exported information is located an offset address relative to the binary translator in a computer readable medium.
13. The system of claim 10 wherein the processor is configured to run a host binary adapted to read the set of exported information.
14. The system of claim 10 comprising a second translator, the second translator adapted to read the set of exported information by opening a /proc/pid/as file of the translated non-native binary.
15. The system of claim 11 wherein the second translator is a non-native binary.
16. A computer system comprising a machine readable medium having computer executable instructions, the system comprising:
a processor; and
a machine readable medium comprising code executable by the processor to:
translate a guest executable binary to a host executable binary; and
export information about the guest executable binary to a location in the machine readable medium accessible to other executable binaries.
17. The computer system of claim 16 wherein the exported information comprises one or more of a guest executable binary boundary information, an internal binary translation state, and custom signal handlers.
18. The computer system of claim 16 further comprising code to:
execute the host executable binary, execution of the host executable binary including one or more threads;
analyze a state of at least one thread of the host executable binary; and
fast-forward the at least one thread state to be consistent with the guest executable instruction boundary information.
19. The computer system of claim 17 further comprising code to:
determine whether an address section of the guest executable binary has been modified; and
route execution of the guest executable binary through a service routine if the address space has been modified.
20. The computer system of claim 18 wherein the service routine comprises code to:
flush code-cache; and
translate the modified address space to a host executable binary.
US12/429,399 2009-04-24 2009-04-24 Support for a non-native application Active 2034-01-26 US9766911B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US12/429,399 US9766911B2 (en) 2009-04-24 2009-04-24 Support for a non-native application

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
US12/429,399 US9766911B2 (en) 2009-04-24 2009-04-24 Support for a non-native application

Publications (2)

Publication Number Publication Date
US20100274551A1 true US20100274551A1 (en) 2010-10-28
US9766911B2 US9766911B2 (en) 2017-09-19

Family

ID=42992892

Family Applications (1)

Application Number Title Priority Date Filing Date
US12/429,399 Active 2034-01-26 US9766911B2 (en) 2009-04-24 2009-04-24 Support for a non-native application

Country Status (1)

Country Link
US (1) US9766911B2 (en)

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100169308A1 (en) * 2008-12-30 2010-07-01 Abhinav Das Dynamic translator for requests for system resources
WO2013100996A1 (en) * 2011-12-28 2013-07-04 Intel Corporation Binary translation in asymmetric multiprocessor system
US20150193284A1 (en) * 2012-10-24 2015-07-09 OpenMobile World Wide, Inc. Host/hosted hybrid apps in multi-operating system mobile and other computing devices
US9223553B2 (en) * 2013-09-26 2015-12-29 Intel Corporation Methods and apparatus to validate translated guest code in a dynamic binary translator
US20160026486A1 (en) * 2014-07-25 2016-01-28 Soft Machines, Inc. An allocation and issue stage for reordering a microinstruction sequence into an optimized microinstruction sequence to implement an instruction set agnostic runtime architecture
US20160026482A1 (en) * 2014-07-25 2016-01-28 Soft Machines, Inc. Using a plurality of conversion tables to implement an instruction set agnostic runtime architecture
US9348594B2 (en) 2011-12-29 2016-05-24 Intel Corporation Core switching acceleration in asymmetric multiprocessor system
US9405937B2 (en) 2013-06-28 2016-08-02 Intel Corporation Method and apparatus for securing a dynamic binary translation system
US9658870B2 (en) 2014-02-27 2017-05-23 OpenMobile World Wide, Inc. In-process trapping for service substitution in hosted applications executing on mobile devices with multi-operating system environment
US9891936B2 (en) 2013-09-27 2018-02-13 Intel Corporation Method and apparatus for page-level monitoring
US10007497B2 (en) * 2015-04-10 2018-06-26 Google Llc Binary translation on shared object level
US10162617B2 (en) * 2015-04-10 2018-12-25 Google Llc Binary translation into native client
US10203942B2 (en) 2017-06-09 2019-02-12 National Chiao Tung University Binary-code translation device and method
US10353680B2 (en) 2014-07-25 2019-07-16 Intel Corporation System converter that implements a run ahead run time guest instruction conversion/decoding process and a prefetching process where guest code is pre-fetched from the target of guest branches in an instruction sequence
US10621092B2 (en) 2008-11-24 2020-04-14 Intel Corporation Merging level cache and data cache units having indicator bits related to speculative execution
US10649746B2 (en) 2011-09-30 2020-05-12 Intel Corporation Instruction and logic to perform dynamic binary translation
US10713146B2 (en) * 2015-06-26 2020-07-14 AVAST Software s.r.o. Dynamic binary translation and instrumentation with postponed attachment to running native threads
US10725755B2 (en) 2008-11-24 2020-07-28 Intel Corporation Systems, apparatuses, and methods for a hardware and software system to automatically decompose a program to multiple parallel threads
US10740217B1 (en) * 2018-05-22 2020-08-11 Parallels International Gmbh Non-native system-level debugging using symbolic information

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10795681B2 (en) * 2014-12-23 2020-10-06 Intel Corporation Instruction length decoding

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050050389A1 (en) * 2003-08-25 2005-03-03 Chaurasia Rajesh Kumar Method of and apparatus for cross-platform core dumping during dynamic binary translation
US20050071824A1 (en) * 2003-08-22 2005-03-31 K. N. Keerthi Bhushan Method and system for executing software on non-native platforms
US20070168979A1 (en) * 2005-12-30 2007-07-19 Intel Corporation Transparent debugging of programs in dynamic translation systems
US20080270107A1 (en) * 2007-04-26 2008-10-30 Hewlett-Packard Development Company, L.P. Method of Debugging an Executable Computer Program Having Instructions for Different Computer Architectures
US20090210649A1 (en) * 2008-02-14 2009-08-20 Transitive Limited Multiprocessor computing system with multi-mode memory consistency protection
US20100223600A1 (en) * 2009-02-27 2010-09-02 Microsoft Corporation Thread execution analyzer

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050071824A1 (en) * 2003-08-22 2005-03-31 K. N. Keerthi Bhushan Method and system for executing software on non-native platforms
US20050050389A1 (en) * 2003-08-25 2005-03-03 Chaurasia Rajesh Kumar Method of and apparatus for cross-platform core dumping during dynamic binary translation
US7149929B2 (en) * 2003-08-25 2006-12-12 Hewlett-Packard Development Company, L.P. Method of and apparatus for cross-platform core dumping during dynamic binary translation
US20070168979A1 (en) * 2005-12-30 2007-07-19 Intel Corporation Transparent debugging of programs in dynamic translation systems
US20080270107A1 (en) * 2007-04-26 2008-10-30 Hewlett-Packard Development Company, L.P. Method of Debugging an Executable Computer Program Having Instructions for Different Computer Architectures
US20090210649A1 (en) * 2008-02-14 2009-08-20 Transitive Limited Multiprocessor computing system with multi-mode memory consistency protection
US20100223600A1 (en) * 2009-02-27 2010-09-02 Microsoft Corporation Thread execution analyzer

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
CallahanRemote Debugging with Controllable OverheadTechnical Report FSL-08-02, March 7, 2008, pp. i-43 *
Kumar et al.Tbd: A Source-Level Debugger for Dynamically Translated ProgramsACM 1-59593-050-7/05/0009, Sept. 2005, pp. 1-10 *

Cited By (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10725755B2 (en) 2008-11-24 2020-07-28 Intel Corporation Systems, apparatuses, and methods for a hardware and software system to automatically decompose a program to multiple parallel threads
US10621092B2 (en) 2008-11-24 2020-04-14 Intel Corporation Merging level cache and data cache units having indicator bits related to speculative execution
US20100169308A1 (en) * 2008-12-30 2010-07-01 Abhinav Das Dynamic translator for requests for system resources
US8521760B2 (en) 2008-12-30 2013-08-27 Oracle America, Inc. Dynamic translator for requests for system resources
US10649746B2 (en) 2011-09-30 2020-05-12 Intel Corporation Instruction and logic to perform dynamic binary translation
WO2013100996A1 (en) * 2011-12-28 2013-07-04 Intel Corporation Binary translation in asymmetric multiprocessor system
TWI493452B (en) * 2011-12-28 2015-07-21 Intel Corp Binary translation in asymmetric multiprocessor system
US9348594B2 (en) 2011-12-29 2016-05-24 Intel Corporation Core switching acceleration in asymmetric multiprocessor system
US20150193284A1 (en) * 2012-10-24 2015-07-09 OpenMobile World Wide, Inc. Host/hosted hybrid apps in multi-operating system mobile and other computing devices
US9405937B2 (en) 2013-06-28 2016-08-02 Intel Corporation Method and apparatus for securing a dynamic binary translation system
US9223553B2 (en) * 2013-09-26 2015-12-29 Intel Corporation Methods and apparatus to validate translated guest code in a dynamic binary translator
US9858057B2 (en) 2013-09-26 2018-01-02 Intel Corporation Methods and apparatus to validate translated guest code in a dynamic binary translator
US9891936B2 (en) 2013-09-27 2018-02-13 Intel Corporation Method and apparatus for page-level monitoring
US9658870B2 (en) 2014-02-27 2017-05-23 OpenMobile World Wide, Inc. In-process trapping for service substitution in hosted applications executing on mobile devices with multi-operating system environment
US10353680B2 (en) 2014-07-25 2019-07-16 Intel Corporation System converter that implements a run ahead run time guest instruction conversion/decoding process and a prefetching process where guest code is pre-fetched from the target of guest branches in an instruction sequence
US20160026482A1 (en) * 2014-07-25 2016-01-28 Soft Machines, Inc. Using a plurality of conversion tables to implement an instruction set agnostic runtime architecture
US20160026486A1 (en) * 2014-07-25 2016-01-28 Soft Machines, Inc. An allocation and issue stage for reordering a microinstruction sequence into an optimized microinstruction sequence to implement an instruction set agnostic runtime architecture
US11281481B2 (en) * 2014-07-25 2022-03-22 Intel Corporation Using a plurality of conversion tables to implement an instruction set agnostic runtime architecture
US10007497B2 (en) * 2015-04-10 2018-06-26 Google Llc Binary translation on shared object level
US10162617B2 (en) * 2015-04-10 2018-12-25 Google Llc Binary translation into native client
US10713146B2 (en) * 2015-06-26 2020-07-14 AVAST Software s.r.o. Dynamic binary translation and instrumentation with postponed attachment to running native threads
US10203942B2 (en) 2017-06-09 2019-02-12 National Chiao Tung University Binary-code translation device and method
TWI660307B (en) * 2017-06-09 2019-05-21 國立交通大學 Binary translation device and method
US10740217B1 (en) * 2018-05-22 2020-08-11 Parallels International Gmbh Non-native system-level debugging using symbolic information

Also Published As

Publication number Publication date
US9766911B2 (en) 2017-09-19

Similar Documents

Publication Publication Date Title
US9766911B2 (en) Support for a non-native application
JP7328255B2 (en) Execution control with cross-level tracking mapping
US11609840B2 (en) Systems, methods, and devices for vertically integrated instrumentation and trace reconstruction
EP2359247B1 (en) Transforming user script code for debugging
US8903703B2 (en) Dynamically adjusting speed versus accuracy of computer platform simulation
US7783867B2 (en) Controlling instruction execution in a processing environment
JP6138142B2 (en) Hardware-based runtime instrumentation for managed runtimes
JP2005018760A (en) System and method for facilitating profiling of application
EP3785125B1 (en) Selectively tracing portions of computer process execution
JP2001519956A (en) A memory controller that detects the failure of thinking of the addressed component
EP3340059A1 (en) Debugging method
US20120017204A1 (en) String cache file for optimizing memory usage in a java virtual machine
US7882336B2 (en) Employing a buffer to facilitate instruction execution
US12001316B2 (en) Systems, methods, and devices for vertically integrated instrumentation and trace reconstruction
JP2004054807A (en) Method and device for information processing
Swiech et al. Electrical Engineering and Computer Science Department

Legal Events

Date Code Title Description
AS Assignment

Owner name: SUN MICROSYSTEMS, INC., CALIFORNIA

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNORS:DAS, ABHINAV;LU, JIWEI;CHEN, WILLIAM Y.;AND OTHERS;REEL/FRAME:022593/0256

Effective date: 20090420

AS Assignment

Owner name: ORACLE AMERICA, INC., DELAWARE

Free format text: MERGER AND CHANGE OF NAME;ASSIGNORS:ORACLE USA, INC.;SUN MICROSYSTEMS, INC.;ORACLE AMERICA, INC.;REEL/FRAME:038247/0671

Effective date: 20100212

AS Assignment

Owner name: ORACLE AMERICA, INC., CALIFORNIA

Free format text: CORRECTIVE ASSIGNMENT TO CORRECT THE MERGED ENTITY'S ADDRESS PREVIOUSLY RECORDED AT REEL: 038247 FRAME: 0671. ASSIGNOR(S) HEREBY CONFIRMS THE ASSIGNMENT;ASSIGNORS:ORACLE USA, INC.;SUN MICROSYSTEMS, INC.;REEL/FRAME:039113/0303

Effective date: 20100212

STCF Information on status: patent grant

Free format text: PATENTED CASE

MAFP Maintenance fee payment

Free format text: PAYMENT OF MAINTENANCE FEE, 4TH YEAR, LARGE ENTITY (ORIGINAL EVENT CODE: M1551); ENTITY STATUS OF PATENT OWNER: LARGE ENTITY

Year of fee payment: 4