Tweaked sanity-checking: made function naming more consistent, removed
unnecessarily global functions from vg_include.h, etc.
Also tweaked printing of malloc stats.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2562 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/vg_main.c b/coregrind/vg_main.c
index 7c8f50e..5ef5ea3 100644
--- a/coregrind/vg_main.c
+++ b/coregrind/vg_main.c
@@ -254,12 +254,13 @@
VG_(print_UInstr_histogram)();
// Memory stats
- if (0) {
+ if (VG_(clo_verbosity) > 2) {
VG_(message)(Vg_DebugMsg, "");
VG_(message)(Vg_DebugMsg,
"------ Valgrind's internal memory use stats follow ------" );
- VG_(mallocSanityCheckAll)();
+ VG_(sanity_check_malloc_all)();
VG_(print_all_arena_stats)();
+ VG_(message)(Vg_DebugMsg, "");
VG_(message)(Vg_DebugMsg,
"------ Valgrind's ExeContext management stats follow ------" );
VG_(print_ExeContext_stats)();
@@ -2577,7 +2578,7 @@
/* A fast sanity check -- suitable for calling circa once per
millisecond. */
-void VG_(do_sanity_checks) ( Bool force_expensive )
+void VG_(sanity_check_general) ( Bool force_expensive )
{
VGP_PUSHCC(VgpCoreCheapSanity);
@@ -2607,7 +2608,7 @@
VGP_PUSHCC(VgpCoreExpensiveSanity);
sanity_slow_count++;
- VG_(proxy_sanity)();
+ VG_(sanity_check_proxy)();
# if 0
{ void zzzmemscan(void); zzzmemscan(); }
@@ -2633,7 +2634,7 @@
in the client's code can cause this to fail, so we don't do
this check unless specially asked for. And because it's
potentially very expensive. */
- VG_(mallocSanityCheckAll)();
+ VG_(sanity_check_malloc_all)();
VGP_POPCC(VgpCoreExpensiveSanity);
}
VGP_POPCC(VgpCoreCheapSanity);
@@ -3039,7 +3040,7 @@
SK_(fini)( exitcode );
- VG_(do_sanity_checks)( True /*include expensive checks*/ );
+ VG_(sanity_check_general)( True /*include expensive checks*/ );
if (VG_(clo_verbosity) > 1)
print_all_stats();