]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
When doing 'demo' translations for --profile-flags=, make at least
authorJulian Seward <jseward@acm.org>
Mon, 9 Apr 2007 22:24:57 +0000 (22:24 +0000)
committerJulian Seward <jseward@acm.org>
Mon, 9 Apr 2007 22:24:57 +0000 (22:24 +0000)
some attempt to discard existing translations first.  Otherwise
Cachegrind (rightly) asserts on the basis that it is seeing duplicate
translation requests for the same entry point.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6698

coregrind/m_main.c

index e9b4400bb14ae390de6b8e998cf7ed3b3b599db7..80a6ebd58d277376f94fe86030ee01d656db5ce2 100644 (file)
@@ -1059,6 +1059,7 @@ void show_BB_profile ( BBProfEntry tops[], UInt n_tops, ULong score_total )
                   score_cumul, buf_cumul,
                   score_here,  buf_here, tops[r].addr, name );
       VG_(printf)("\n");
+      VG_(discard_translations)(tops[r].addr, 1, "bb profile");
       VG_(translate)(0, tops[r].addr, True, VG_(clo_profile_flags), 0, True);
       VG_(printf)("=-=-=-=-=-=-=-=-=-=-=-=-=-=  end BB rank %d  "
                   "=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n", r);