|
From: <sv...@va...> - 2005-12-05 20:46:07
|
Author: njn
Date: 2005-12-05 20:45:59 +0000 (Mon, 05 Dec 2005)
New Revision: 5287
Log:
Change hp2ps to output .ps files in the same dir that the .hp input files
are in. This fixes bug #117686.
Modified:
trunk/cachegrind/cg-ppc32.c
trunk/cachegrind/cg-ppc64.c
trunk/cachegrind/tests/filter_stderr
trunk/coregrind/m_main.c
trunk/coregrind/m_translate.c
trunk/docs/internals/roadmap.txt
trunk/include/vki-amd64-linux.h
trunk/include/vki-ppc32-linux.h
trunk/include/vki-ppc64-linux.h
trunk/massif/hp2ps/Main.c
Modified: trunk/cachegrind/cg-ppc32.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/cachegrind/cg-ppc32.c 2005-12-05 19:17:37 UTC (rev 5286)
+++ trunk/cachegrind/cg-ppc32.c 2005-12-05 20:45:59 UTC (rev 5287)
@@ -49,6 +49,10 @@
// 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,=20
"Warning: Cannot auto-detect cache config on PPC32, u=
sing one "
Modified: trunk/cachegrind/cg-ppc64.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/cachegrind/cg-ppc64.c 2005-12-05 19:17:37 UTC (rev 5286)
+++ trunk/cachegrind/cg-ppc64.c 2005-12-05 20:45:59 UTC (rev 5287)
@@ -49,6 +49,10 @@
// 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,=20
"Warning: Cannot auto-detect cache config on PPC64, u=
sing one "
Modified: trunk/cachegrind/tests/filter_stderr
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/cachegrind/tests/filter_stderr 2005-12-05 19:17:37 UTC (rev 528=
6)
+++ trunk/cachegrind/tests/filter_stderr 2005-12-05 20:45:59 UTC (rev 528=
7)
@@ -17,4 +17,4 @@
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 mo=
re defaults/d"
+sed "/Warning: Cannot auto-detect cache config on PPC.., using one or mo=
re defaults/d"
Modified: trunk/coregrind/m_main.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_main.c 2005-12-05 19:17:37 UTC (rev 5286)
+++ trunk/coregrind/m_main.c 2005-12-05 20:45:59 UTC (rev 5287)
@@ -66,6 +66,7 @@
=20
static void print_all_stats ( void )
{
+ VG_(print_translation_stats)();
VG_(print_tt_tc_stats)();
VG_(print_scheduler_stats)();
VG_(print_ExeContext_stats)();
Modified: trunk/coregrind/m_translate.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_translate.c 2005-12-05 19:17:37 UTC (rev 5286)
+++ trunk/coregrind/m_translate.c 2005-12-05 20:45:59 UTC (rev 5287)
@@ -51,6 +51,35 @@
=20
=20
/*------------------------------------------------------------*/
+/*--- Stats ---*/
+/*------------------------------------------------------------*/
+
+static UInt n_SP_updates_fast =3D 0;
+static UInt n_SP_updates_generic_known =3D 0;
+static UInt n_SP_updates_generic_unknown =3D 0;
+
+void VG_(print_translation_stats) ( void )
+{
+ Char buf[6];
+ UInt n_SP_updates =3D 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 ---*/
/*------------------------------------------------------------*/
=20
@@ -147,6 +176,9 @@
dcall->fxState[0].size =3D layout->sizeof_SP; =
\
=
\
addStmtToIRBB( bb, IRStmt_Dirty(dcall) ); =
\
+ =
\
+ n_SP_updates_fast++; =
\
+ =
\
} while (0)
=20
for (i =3D 0; i < bb_in->stmts_used; i++) {
@@ -211,10 +243,14 @@
case -16: DO(new, 16); addStmtToIRBB(bb,st); delta =3D 0; co=
ntinue;
case 32: DO(die, 32); addStmtToIRBB(bb,st); delta =3D 0; co=
ntinue;
case -32: DO(new, 32); addStmtToIRBB(bb,st); delta =3D 0; co=
ntinue;
- default: goto generic;
+ default: =20
+ 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 =3D newIRTemp(bb->tyenv, typeof_SP);
Modified: trunk/docs/internals/roadmap.txt
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/docs/internals/roadmap.txt 2005-12-05 19:17:37 UTC (rev 5286)
+++ trunk/docs/internals/roadmap.txt 2005-12-05 20:45:59 UTC (rev 5287)
@@ -29,7 +29,17 @@
=20
* Try to accelerate development for Darwin ?
=20
+Smaller things
+--------------
+* Consider using the following defaults:
+ --leak-check=3Dyes
+ --num-callers=3D20
=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
------------------------------------------------------------------------=
-----
Modified: trunk/include/vki-amd64-linux.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/include/vki-amd64-linux.h 2005-12-05 19:17:37 UTC (rev 5286)
+++ trunk/include/vki-amd64-linux.h 2005-12-05 20:45:59 UTC (rev 5287)
@@ -1,7 +1,6 @@
=20
/*--------------------------------------------------------------------*/
-/*--- AMD64/Linux-specific kernel interface. ---*/
-/*--- vki-amd64-linux.h ---*/
+/*--- AMD64/Linux-specific kernel interface. vki-amd64-linux.h ---*/
/*--------------------------------------------------------------------*/
=20
/*
Modified: trunk/include/vki-ppc32-linux.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/include/vki-ppc32-linux.h 2005-12-05 19:17:37 UTC (rev 5286)
+++ trunk/include/vki-ppc32-linux.h 2005-12-05 20:45:59 UTC (rev 5287)
@@ -1,7 +1,6 @@
=20
/*--------------------------------------------------------------------*/
-/*--- PPC32/Linux-specific kernel interface. ---*/
-/*--- ppc32-linux/vki-ppc32-linux.h ---*/
+/*--- PPC32/Linux-specific kernel interface. vki-ppc32-linux.h ---*/
/*--------------------------------------------------------------------*/
=20
/*
Modified: trunk/include/vki-ppc64-linux.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/include/vki-ppc64-linux.h 2005-12-05 19:17:37 UTC (rev 5286)
+++ trunk/include/vki-ppc64-linux.h 2005-12-05 20:45:59 UTC (rev 5287)
@@ -1,7 +1,6 @@
=20
/*--------------------------------------------------------------------*/
-/*--- PPC64/Linux-specific kernel interface. ---*/
-/*--- ppc64-linux/vki-ppc64-linux.h ---*/
+/*--- PPC64/Linux-specific kernel interface. vki-ppc64-linux.h ---*/
/*--------------------------------------------------------------------*/
=20
/*
Modified: trunk/massif/hp2ps/Main.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/massif/hp2ps/Main.c 2005-12-05 19:17:37 UTC (rev 5286)
+++ trunk/massif/hp2ps/Main.c 2005-12-05 20:45:59 UTC (rev 5287)
@@ -147,9 +147,16 @@
baseName =3D copystring(Basename(pathName));
=20
hpfp =3D Fp(pathName, &hpfile, ".hp", "r");=20
- psfp =3D Fp(baseName, &psfile, ".ps", "w");=20
=20
- if (pflag) auxfp =3D 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 i=
n
+ // the same directory as the .hp file. This solved Valgrind bug=
t
+ // #117686. --njn=20
+// psfp =3D Fp(baseName, &psfile, ".ps", "w");=20
+ psfp =3D Fp(pathName, &psfile, ".ps", "w");=20
+
+// if (pflag) auxfp =3D Fp(baseName, &auxfile, ".aux", "r");
+ if (pflag) auxfp =3D Fp(pathName, &auxfile, ".aux", "r");
}
=20
GetHpFile(hpfp);
|