On Jan 17, 2004, at 2:51 AM, Leopold Toetsch wrote:

Jeff Clites <[EMAIL PROTECTED]> wrote:

Where in the stream would we patch? If not in a loop, you may never hit
the single patched location again, but still might not end for a very
long time....

Same as with prederefed run cores: backward branches, invoke*

What I meant was, _every_ backward branch (etc.) in the bytecode, or just one location that we thought would execute "soon". (But you implicitly answered this, below.)


If we are patching all locations with branches and such, in large
bytecode this could take a long time, and the executing thread might
outrun the "patching" thread.

We have of course to benchmark this scheme against other approaches.
Albeit finding/writing such benchmarks and measuring responsiveness will
be some fun ;)
But we can of course measure how long it takes to patch a certain
amount of code twice.

It just seems bad that the efficiency of event delivery would be proportional to the size of the bytecode (or segment). So it's slower to deliver events in large programs. That seems like a bad omen.


... Also, once the handler is entered we'd
have to fix all of patched locations, which again could be
time-consuming for large bytecode.

Please remember: only the current code segment has to be patched, which theoretically could be very large, but that's unlikely.

I don't think that's correct--the thread to which we are trying to deliver the event could have branched to a new segment before we finished patching.


JEff



Reply via email to