Asynchronous dynamic compilation based on multi-session profiling to produce shared native code
First Claim
1. A computer-implemented method of creating machine instructions, the method comprising:
- each session in a plurality of sessions updating a multi-session counter in response to an interpreter executing within said each session, a given method comprising a plurality of to-be-interpreted instructions;
wherein the multi-session counter is updated by multiple sessions concurrently or simultaneously without locking, wherein in the event that one session starts updating the multi-session counter before another session finishes updating the multi-session counter, the multi-session counter becomes inaccurate relative to a number of interpretations of the given method in the plurality of sessions;
a common process for the plurality of sessions compiling the given method to obtain compiled software, in response to the multi-session counter exceeding a preset limit, regardless of whether the multi-session counter has become inaccurate; and
after completion of the compiling, said each session executing the compiled software from a shared memory accessible to the plurality of sessions.
1 Assignment
0 Petitions
Accused Products
Abstract
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.
66 Citations
20 Claims
-
1. A computer-implemented method of creating machine instructions, the method comprising:
-
each session in a plurality of sessions updating a multi-session counter in response to an interpreter executing within said each session, a given method comprising a plurality of to-be-interpreted instructions; wherein the multi-session counter is updated by multiple sessions concurrently or simultaneously without locking, wherein in the event that one session starts updating the multi-session counter before another session finishes updating the multi-session counter, the multi-session counter becomes inaccurate relative to a number of interpretations of the given method in the plurality of sessions; a common process for the plurality of sessions compiling the given method to obtain compiled software, in response to the multi-session counter exceeding a preset limit, regardless of whether the multi-session counter has become inaccurate; and after completion of the compiling, said each session executing the compiled software from a shared memory accessible to the plurality of sessions. - View Dependent Claims (2, 3, 6, 7, 8, 9, 20)
-
-
4. A non-transitory computer-readable storage medium comprising a plurality of instructions, the plurality of instructions comprising:
-
instructions to each session in a plurality of sessions to update a multi-session counter in response to an interpreter executing within said each session, a given method comprising a plurality of to-be-interpreted instructions; wherein on execution of the instructions, the multi-session counter is updated by multiple sessions concurrently or simultaneously without locking, wherein in the event that one session starts updating the multi-session counter before another session finishes updating the multi-session counter, the multi-session counter becomes inaccurate relative to a number of interpretations of the given method in the plurality of sessions; instructions to a common process compiling the given method to obtain compiled software, in response to the multi-session counter exceeding a preset limit, regardless of whether the multi-session counter has become inaccurate; and instructions to said each session to execute the compiled software from a shared memory accessible to the plurality of sessions, after completion of compiling by the common process. - View Dependent Claims (10, 11, 12, 13, 14, 15)
-
-
5. An apparatus for creating and executing machine instructions, the apparatus comprising:
-
means for each session in a plurality of sessions for updating a multi-session counter in response to an interpreter executing a predetermined software within said each session; wherein the multi-session counter is updated by the means of multiple sessions concurrently or simultaneously without locking, wherein in the event that the means of one session starts updating the multi-session counter before the means of another session finishes updating the multi-session counter, the multi-session counter becomes inaccurate relative to a number of interpretations of the predetermined software in the plurality of sessions; means for a common process for compiling the predetermined software to obtain compiled software comprising machine instructions, in response to the multi-session counter exceeding a preset limit, regardless of whether the multi-session counter has become inaccurate; and means for said each session for executing the compiled software from a shared memory accessible to the plurality of sessions, after completion of compiling by the common process. - View Dependent Claims (16, 17, 18, 19)
-
Specification