Concept

Dynamic recompilation

Résumé
In computer science, dynamic recompilation is a feature of some emulators and virtual machines, where the system may recompile some part of a program during execution. By compiling during execution, the system can tailor the generated code to reflect the program's run-time environment, and potentially produce more efficient code by exploiting information that is not available to a traditional static compiler. Most dynamic recompilers are used to convert machine code between architectures at runtime. This is a task often needed in the emulation of legacy gaming platforms. In other cases, a system may employ dynamic recompilation as part of an adaptive optimization strategy to execute a portable program representation such as Java or .NET Common Language Runtime bytecodes. Full-speed debuggers also utilize dynamic recompilation to reduce the space overhead incurred in most deoptimization techniques, and other features such as dynamic thread migration. The main tasks a dynamic recompiler has to perform are: Reading in machine code from the source platform Emitting machine code for the target platform A dynamic recompiler may also perform some auxiliary tasks: Managing a cache of recompiled code Updating of elapsed cycle counts on platforms with cycle count registers Management of interrupt checking Providing an interface to virtualized support hardware, for example a GPU Optimizing higher-level code structures to run efficiently on the target hardware (see below) Many Java virtual machines feature dynamic recompilation. Apple's Rosetta for Mac OS X on x86, allows PowerPC code to be run on the x86 architecture. Later versions of the Mac 68K emulator used in classic Mac OS to run 680x0 code on the PowerPC hardware. Psyco, a specializing compiler for Python. The HP Dynamo project, an example of a transparent binary dynamic optimizer. DynamoRIO, an open-source successor to Dynamo that works with the ARM, x86-64 and IA-64 (Itanium) instruction sets. The Vx32 virtual machine employs dynamic recompilation to create OS-independent x86 architecture sandboxes for safe application plugins.
À propos de ce résultat
Cette page est générée automatiquement et peut contenir des informations qui ne sont pas correctes, complètes, à jour ou pertinentes par rapport à votre recherche. Il en va de même pour toutes les autres pages de ce site. Veillez à vérifier les informations auprès des sources officielles de l'EPFL.