Modularised the profiling stuff as m_profile.c.  It's much more 
sensible now -- no vg_dummy_profile.c, no silly #including of
vg_profile.c from tools.  

Unfortunately, it still doesn't work, due to bad interactions
with signal handling that I don't understand.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3833 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/m_translate.c b/coregrind/m_translate.c
index 74c3207..bef168a 100644
--- a/coregrind/m_translate.c
+++ b/coregrind/m_translate.c
@@ -33,6 +33,7 @@
 #include "pub_core_aspacemgr.h"
 #include "pub_core_main.h"       // for VG_(bbs_done)
 #include "pub_core_options.h"
+#include "pub_core_profile.h"
 #include "pub_core_redir.h"
 #include "pub_core_signals.h"
 #include "pub_core_tooliface.h"
@@ -468,6 +469,8 @@
       verbosity = VG_(clo_trace_flags);
    }
 
+   VGP_PUSHCC(VgpVexTime);
+   
    /* Actually do the translation. */
    tl_assert2(VG_(tdict).tool_instrument,
               "you forgot to set VgToolInterface function 'tool_instrument'");
@@ -492,6 +495,8 @@
    vg_assert(tmpbuf_used <= N_TMPBUF);
    vg_assert(tmpbuf_used > 0);
 
+   VGP_POPCC(VgpVexTime);
+
 #undef DECIDE_IF_PRINTING_CODEGEN
 
    /* Copy data at trans_addr into the translation cache. */