摘要 |
A computer is programmed to automatically have multiple sessions update a common counter which is shared therebetween, when interpreting a given method so that system-wide statistics are collected for each method. The single counter is commonly accessed for updating by the respective interpreters in the multiple sessions which are executing the method. The computer is further programmed to asynchronously compile the method (regardless of the state of the multiple sessions), to obtain compiled software in the form of executable machine instructions. Specifically, asynchronous compilation starts dynamically, whenever a method's common multi-session counter satisfies a predetermined condition. Finally, each session is informed when compilation is completed so that the next time the method needs to be run, it is not interpreted and instead the compiled software is executed. The compiled software is kept in a shared memory which is accessible to each session.
|