Julian Seward wrote: > In order to do a minimal > partitioning at translation time, you need to know all the branch targets > in the program, and that's just not doable. Not only from a practical > perspective but also because it's undecidable.
For nearly all practical programs, almost anything that is executed today on commodity hardware (compiled from C, C++, Fortran, Algol, Ada, Java, ...), it is easy and quick to compute all the branch targets. Beginning with the ElfXX_Ehdr, PT_LOAD, and .e_entry: disassemble and take the transitive closure of the possible succeeding instructions. The only difficult part is the idioms that are used for multiway branching (such as C 'switch' with large dense ranges of 'case'). In practice, appropriate software can process several megabytes of instructions in a couple seconds. In theory this may be undecidable, but in practice the goal can be accomplished quickly nearly all the time. -- ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ Valgrind-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/valgrind-users
