[pypy-dev] Processor simulators
Jacob Hallén
jacob at openend.se
Tue Mar 17 19:50:35 CET 2009
While catching up on todays events on the IRC channel, it struck me that we
are getting to a point where using a simulator for the processor would be
very useful.
Once upon a time I did a lot of development of embedded systems, and using a
simulator was a really nice way of timing and debugging your code. You could
also do neat tricks if you had the source code of the simulator, recreating
rare events and generally break the notion of your hardware being an
unchangeable constant.
I did a quick Goggle search and found that there are plenty of simulators for
the X86 architecture, with several being fully Open Sourced. For instance,
at http://www.ptlsim.org/, there is a simulator that can run code natively on
the machine and then jump into and out of simulation mode. This allows for
precise timing of your selected pieces of code and the possibility of tracing
exactly what happens at the machine level, with cache misses and whatnot.
I think it might be a useful tool for some of the current backend work for the
JIT, and for future optimizations.
Jacob
More information about the Pypy-dev
mailing list