Moved dtxn profiling code to the right location