are in. This fixes bug #117686.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5287
// not important) in the regression test suite without filtering the
// x86/AMD64 one (which we want to see if it ever occurs in the
// regression test suite).
+ //
+ // If you change this message, please update
+ // cachegrind/tests/filter_stderr!
+ //
if (!all_caches_clo_defined) {
VG_(message)(Vg_DebugMsg,
"Warning: Cannot auto-detect cache config on PPC32, using one "
// not important) in the regression test suite without filtering the
// x86/AMD64 one (which we want to see if it ever occurs in the
// regression test suite).
+ //
+ // If you change this message, please update
+ // cachegrind/tests/filter_stderr!
+ //
if (!all_caches_clo_defined) {
VG_(message)(Vg_DebugMsg,
"Warning: Cannot auto-detect cache config on PPC64, using one "
sed "/warning: Pentium 4 with 12 KB micro-op instruction trace cache/d" |
sed "/Simulating a 16 KB I-cache with 32 B lines/d" |
sed "/warning: L3 cache detected but ignored/d" |
-sed "/Warning: Cannot auto-detect cache config on PPC32, using one or more defaults/d"
+sed "/Warning: Cannot auto-detect cache config on PPC.., using one or more defaults/d"
static void print_all_stats ( void )
{
+ VG_(print_translation_stats)();
VG_(print_tt_tc_stats)();
VG_(print_scheduler_stats)();
VG_(print_ExeContext_stats)();
#include "pub_core_transtab.h"
+/*------------------------------------------------------------*/
+/*--- Stats ---*/
+/*------------------------------------------------------------*/
+
+static UInt n_SP_updates_fast = 0;
+static UInt n_SP_updates_generic_known = 0;
+static UInt n_SP_updates_generic_unknown = 0;
+
+void VG_(print_translation_stats) ( void )
+{
+ Char buf[6];
+ UInt n_SP_updates = n_SP_updates_fast + n_SP_updates_generic_known
+ + n_SP_updates_generic_unknown;
+ VG_(percentify)(n_SP_updates_fast, n_SP_updates, 1, 6, buf);
+ VG_(message)(Vg_DebugMsg,
+ "translate: fast SP updates identified: %,u (%s)",
+ n_SP_updates_fast, buf );
+
+ VG_(percentify)(n_SP_updates_generic_known, n_SP_updates, 1, 6, buf);
+ VG_(message)(Vg_DebugMsg,
+ "translate: generic_known SP updates identified: %,u (%s)",
+ n_SP_updates_generic_known, buf );
+
+ VG_(percentify)(n_SP_updates_generic_unknown, n_SP_updates, 1, 6, buf);
+ VG_(message)(Vg_DebugMsg,
+ "translate: generic_unknown SP updates identified: %,u (%s)",
+ n_SP_updates_generic_unknown, buf );
+}
+
/*------------------------------------------------------------*/
/*--- %SP-update pass ---*/
/*------------------------------------------------------------*/
dcall->fxState[0].size = layout->sizeof_SP; \
\
addStmtToIRBB( bb, IRStmt_Dirty(dcall) ); \
+ \
+ n_SP_updates_fast++; \
+ \
} while (0)
for (i = 0; i < bb_in->stmts_used; i++) {
case -16: DO(new, 16); addStmtToIRBB(bb,st); delta = 0; continue;
case 32: DO(die, 32); addStmtToIRBB(bb,st); delta = 0; continue;
case -32: DO(new, 32); addStmtToIRBB(bb,st); delta = 0; continue;
- default: goto generic;
+ default:
+ n_SP_updates_generic_known++;
+ goto generic;
}
} else {
IRTemp old_SP;
+ n_SP_updates_generic_unknown++;
+
generic:
/* Pass both the old and new SP values to this helper. */
old_SP = newIRTemp(bb->tyenv, typeof_SP);
* Try to accelerate development for Darwin ?
+Smaller things
+--------------
+* Consider using the following defaults:
+ --leak-check=yes
+ --num-callers=20
+
+* Expose some of m_redir's functionality to tools so that Memcheck
+ can replace strlen/strcmp on PPC32 (remove the 3.1.0 hack for this
+ which checked in m_redir.c if the current tool was Memcheck).
+
-----------------------------------------------------------------------------
3.1.1
/*--------------------------------------------------------------------*/
-/*--- AMD64/Linux-specific kernel interface. ---*/
-/*--- vki-amd64-linux.h ---*/
+/*--- AMD64/Linux-specific kernel interface. vki-amd64-linux.h ---*/
/*--------------------------------------------------------------------*/
/*
/*--------------------------------------------------------------------*/
-/*--- PPC32/Linux-specific kernel interface. ---*/
-/*--- ppc32-linux/vki-ppc32-linux.h ---*/
+/*--- PPC32/Linux-specific kernel interface. vki-ppc32-linux.h ---*/
/*--------------------------------------------------------------------*/
/*
/*--------------------------------------------------------------------*/
-/*--- PPC64/Linux-specific kernel interface. ---*/
-/*--- ppc64-linux/vki-ppc64-linux.h ---*/
+/*--- PPC64/Linux-specific kernel interface. vki-ppc64-linux.h ---*/
/*--------------------------------------------------------------------*/
/*
baseName = copystring(Basename(pathName));
hpfp = Fp(pathName, &hpfile, ".hp", "r");
- psfp = Fp(baseName, &psfile, ".ps", "w");
- if (pflag) auxfp = Fp(baseName, &auxfile, ".aux", "r");
+ // I changed these two lines to use 'pathName' instead of
+ // 'baseName'. This means that the .ps and .aux files get put in
+ // the same directory as the .hp file. This solved Valgrind bugt
+ // #117686. --njn
+// psfp = Fp(baseName, &psfile, ".ps", "w");
+ psfp = Fp(pathName, &psfile, ".ps", "w");
+
+// if (pflag) auxfp = Fp(baseName, &auxfile, ".aux", "r");
+ if (pflag) auxfp = Fp(pathName, &auxfile, ".aux", "r");
}
GetHpFile(hpfp);