[Vm-dev] CogVM Execution Flow
Ben Coman
btc at openinworld.com
Mon Jun 13 18:44:48 UTC 2016
On Tue, Jun 14, 2016 at 2:21 AM, Ben Coman <btc at openinworld.com> wrote:
> On Tue, Jun 14, 2016 at 12:36 AM, Eliot Miranda <eliot.miranda at gmail.com> wrote:
>>
>> Ben,
>>
>> this looks fabulous. I've just skimmed on my phone and will look in more depth later but this is an extremely valuable and illuminating approach, visualizing something I have in my head but that is difficult to describe. Thanks for doing this!! One thing I would love for you to do (and I can help) is to create two diagrams, one for the simulator and one for the real VM, and relate the two, for example by colour-coding the common activities, and hence identifying simulator-only "distractions".
>>
>> _,,,^..^,,,_ (phone)
>>
>>> On Jun 13, 2016, at 6:24 AM, Ben Coman <btc at openinworld.com> wrote:
>>>
>>> In trying to understand the flow of execution (and in particular the
>>> jumps in the jitted VM, I made a first rough pass to map it in the
>>> attached chart.
>>>
>>> I am trying to colourize it to distinguish between paths that can
>>> return to the interpreter, those that circulate in jitted code, and
>>> the transitions. I'm sure I've missed the mark a bit but its a start.
>>> Of course corrections welcome, even scanned pen sketches.
>>>
>>> cheer -ben
>>> <CogVM-Execution-Flow (2016.06.13c).png>
>
> I consolidated a few boxes and aligned common tasks, particularly the
> returnToExecutive one.
> cheers -ben
Two initial comments:
* It would be nice if the two "(stackPointer >= stackLimit)" and
"(localSP < stackLimit)" were not inverted
* Is the "siglong: /reenterInterpreter/ jmp: ReturnToInterpreter" at
the end of #interpretMethodFromMachineCode required? It executes
after activateNewMethod and returnToExecutive:postContextSwitch which
has a siglong:jump anyway. And it messes with the diagram :)
cheers -ben
More information about the Vm-dev
mailing list