trace test. Take a look at trace.cpp for details.