|
From: Oswald B. <os...@kd...> - 2005-10-09 09:52:31
|
On Sat, Oct 08, 2005 at 06:49:52PM -0500, Nicholas Nethercote wrote: > On Sat, 8 Oct 2005, Josef Weidendorfer wrote: > > >Hmmm... this leads to a further question: Could a persistant > >translation cache speed up Valgrind, by simply executing the > >"pre-translated" code chunks from an earlier run? In multiple runs, > >shared objects can be mapped to different addresses. So the > >translation cache should be separated by shared objects. But this > >would need a (object/offset) tuple as lookup key instead of a simple > >code address. > > See this paper from the recent WBIA workshop: > > http://rogue.colorado.edu/draco/papers/wbia05-persistence.pdf > i have the impression that these guys were told to produce six pages, so they did ... with the content for max four pages. oh, well. :) a critical aspect: valgrind is a debugging tool. that means that a particular binary is usually executed exactly once. consequently a wholesale consistency check would drastically lower the effect of persistence (there still would be a gain for separately cached dynamic objects). so we need function-level granularity, based on function signatures. however, static linking will most often yield different binary images for unmodified functions due to offset changes stemming from unrelated code changes. i *think* such locations are easy to spot - they are either dynamic relocations of some type or they are involved into PLT or GOT references, and debug info certainly provides the info directly. they would be made wildcards in the signatures, and their values would have to be propagated into the translated code. fetching from the cache could be done at the function translation stage, but i guess the global view (function order) one has at object load time would help improving the overall overhead. an orthogonal issue: V could detect tight loops and optimize them further (anybody willing to incorporate gcc's optimizer into V? :). with persistent translations, expensive optimizations could be applied more liberally. -- Hi! I'm a .signature virus! Copy me into your ~/.signature, please! -- Chaos, panic, and disorder - my work here is done. |