1. A method comprising: on a virtual machine hosted by a physical device, running a program configured to execute one or more operations; at a virtual machine manager hosted by the physical device and configured to manage the virtual machine, monitoring execution of the program to detect a trapping event that causes the virtual machine manager to take over operation of the program; and upon detecting at the virtual machine manager the trapping event, performing a specific operation of the program that differs from an operation implied by static analysis of the program.