From: Nicholas Nethercote Date: Mon, 5 Dec 2005 20:45:59 +0000 (+0000) Subject: Change hp2ps to output .ps files in the same dir that the .hp input files X-Git-Tag: svn/VALGRIND_3_2_0~540 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fe3cc3bdf96c67cbb755d194e7a66ba55f607451;p=thirdparty%2Fvalgrind.git Change hp2ps to output .ps files in the same dir that the .hp input files are in. This fixes bug #117686. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5287 --- diff --git a/cachegrind/cg-ppc32.c b/cachegrind/cg-ppc32.c index d988141bcd..485d0dc477 100644 --- a/cachegrind/cg-ppc32.c +++ b/cachegrind/cg-ppc32.c @@ -49,6 +49,10 @@ void VG_(configure_caches)(cache_t* I1c, cache_t* D1c, cache_t* L2c, // 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 " diff --git a/cachegrind/cg-ppc64.c b/cachegrind/cg-ppc64.c index 18a0e07aa0..7c09f702f0 100644 --- a/cachegrind/cg-ppc64.c +++ b/cachegrind/cg-ppc64.c @@ -49,6 +49,10 @@ void VG_(configure_caches)(cache_t* I1c, cache_t* D1c, cache_t* L2c, // 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 " diff --git a/cachegrind/tests/filter_stderr b/cachegrind/tests/filter_stderr index c961a90553..91b8ed5b22 100755 --- a/cachegrind/tests/filter_stderr +++ b/cachegrind/tests/filter_stderr @@ -17,4 +17,4 @@ sed "s/\(\(I1\|D1\|L2\|L2i\|L2d\) *\(misses\|miss rate\):\)[ 0-9,()+rdw%\.]*$/\1 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" diff --git a/coregrind/m_main.c b/coregrind/m_main.c index c4da14fb9c..c01ee65c24 100644 --- a/coregrind/m_main.c +++ b/coregrind/m_main.c @@ -66,6 +66,7 @@ static void print_all_stats ( void ) { + VG_(print_translation_stats)(); VG_(print_tt_tc_stats)(); VG_(print_scheduler_stats)(); VG_(print_ExeContext_stats)(); diff --git a/coregrind/m_translate.c b/coregrind/m_translate.c index f6558a7a86..4adbd68c45 100644 --- a/coregrind/m_translate.c +++ b/coregrind/m_translate.c @@ -50,6 +50,35 @@ #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 ---*/ /*------------------------------------------------------------*/ @@ -147,6 +176,9 @@ IRBB* vg_SP_update_pass ( IRBB* bb_in, 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++) { @@ -211,10 +243,14 @@ IRBB* vg_SP_update_pass ( IRBB* bb_in, 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); diff --git a/docs/internals/roadmap.txt b/docs/internals/roadmap.txt index 15219ba747..28f58a2222 100644 --- a/docs/internals/roadmap.txt +++ b/docs/internals/roadmap.txt @@ -29,6 +29,16 @@ In order of increasing speculativeness * 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 diff --git a/include/vki-amd64-linux.h b/include/vki-amd64-linux.h index 79f96a432d..3911b34c00 100644 --- a/include/vki-amd64-linux.h +++ b/include/vki-amd64-linux.h @@ -1,7 +1,6 @@ /*--------------------------------------------------------------------*/ -/*--- AMD64/Linux-specific kernel interface. ---*/ -/*--- vki-amd64-linux.h ---*/ +/*--- AMD64/Linux-specific kernel interface. vki-amd64-linux.h ---*/ /*--------------------------------------------------------------------*/ /* diff --git a/include/vki-ppc32-linux.h b/include/vki-ppc32-linux.h index 150340e385..7cd2aa49e0 100644 --- a/include/vki-ppc32-linux.h +++ b/include/vki-ppc32-linux.h @@ -1,7 +1,6 @@ /*--------------------------------------------------------------------*/ -/*--- PPC32/Linux-specific kernel interface. ---*/ -/*--- ppc32-linux/vki-ppc32-linux.h ---*/ +/*--- PPC32/Linux-specific kernel interface. vki-ppc32-linux.h ---*/ /*--------------------------------------------------------------------*/ /* diff --git a/include/vki-ppc64-linux.h b/include/vki-ppc64-linux.h index 1e8c1b0fcd..41f4792b8b 100644 --- a/include/vki-ppc64-linux.h +++ b/include/vki-ppc64-linux.h @@ -1,7 +1,6 @@ /*--------------------------------------------------------------------*/ -/*--- PPC64/Linux-specific kernel interface. ---*/ -/*--- ppc64-linux/vki-ppc64-linux.h ---*/ +/*--- PPC64/Linux-specific kernel interface. vki-ppc64-linux.h ---*/ /*--------------------------------------------------------------------*/ /* diff --git a/massif/hp2ps/Main.c b/massif/hp2ps/Main.c index 86621a92f5..7dfffcde60 100644 --- a/massif/hp2ps/Main.c +++ b/massif/hp2ps/Main.c @@ -147,9 +147,16 @@ nextarg: ; 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);