|
From: Julian S. <js...@ac...> - 2002-11-17 12:30:58
|
> On Sat, 16 Nov 2002, Julian Seward wrote: > > - how to cleanly deal with jumps to unknown addresses, which always > > require a lookup > > Dynamo has some kind of table for these. That seems unavoidable. We'd probably just recycle the current arrangement, or perhaps a simplified version of it, in this case. Bear in mind that x86 RET instructions are going to pull an original address off the stack and jump to it, so there will still me a significant minority of such lookups needed. > > Finally -- and this is the last part of the trick -- whenever we want to > > move or discard any translations, we first unchain *all* of them. > > I think Dynamo actually flushes the entire code cache in this situation. > But it doesn't have LRU eviction, and their code cache seems to be a lot > smaller. So maybe that's not relevant. Yes, there's a tradeoff between complexity of the cache management and expense of translation. Since we've got a hugely expensive translator by JIT standards (10s of 000s of cycles / byte of generated code) we have to a have a more complex arrangement designed to minimise the miss rate. > Also, w.r.t. indirect jumps, I think Dynamo encodes a lot of them as > direct jumps and then checks before making the jump that the direct jump > is to the right place. This somehow turns out as a win... Yes, known trick. I think VMware probably does this too (it's a light weight JIT, in effect). (How VMware works is really described in an earlier paper from Stanford; I can dig it out if anyone wants). Nevertheless I think this is an optimisation/complication which is probably beyond what we'd want. Mark, I hope we're not flooding you with junk mail. You haven't said a word so far :) and so perhaps you have been abducted by aliens? J |