Complete overhaul of the storage of translations to properly support
translation chaining.  The old LRU system has gone, since it required
marking each translation each time it was used -- simulating a
reference bit.  This is unacceptably expensive.

New scheme uses FIFO discard.  TC is split into a variable number
(currently 8) parts.  When all 8 parts are full, the oldest is
discarded and reused for allocation.  This somewhat guards against
discarding recently-made translations and performs well in practice.

TT entries are simplified: the orig and trans size fields are now
stored in the TC, not in the TT.  The TC entries are "self
describing", so it is possible to scan forwards through the TC entries
and rebuild the TT from them.  TC entries are now word-aligned.

VG_(tt_fast) entries now point to TC entries, not TT entries.

The main dispatch loop now is 2 insns shorter since there's no need to
mark the current epoch on each TT entry as it is used.  For that
matter, there's no longer any need for the notion of a current epoch
anyway.

It's all a great deal simpler than the old scheme, and it seems
significantly faster too.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1333 a5019735-40e9-0310-863c-91ae7b9d1cf9
5 files changed