]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Improves the way arena statistics are shown
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Sun, 10 May 2015 22:40:38 +0000 (22:40 +0000)
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Sun, 10 May 2015 22:40:38 +0000 (22:40 +0000)
The mmap'd max/curr and max/curr nr of bytes will be shown e.g. as
   11,440,408/    4,508,968
instead of
     114406564509200

So, using more space, but more readable (in particular when the
nr exceeds the width, and so are not aligned anymore)

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

coregrind/m_gdbserver/server.c
coregrind/m_mallocfree.c

index 94aec301bf2342ea80813c920846ab8a32794161..deedddf1180eec96fe64aeb82c748094e4ba16e5 100644 (file)
@@ -157,9 +157,10 @@ void VG_(print_all_stats) (Bool memory_stats, Bool tool_stats)
       VG_(message)(Vg_DebugMsg, 
          "------ Valgrind's internal memory use stats follow ------\n" );
       VG_(sanity_check_malloc_all)();
-       VG_(message)(Vg_DebugMsg,
-                    "------ %llu bytes have already been mmap-ed ANONYMOUS.\n",
-                    VG_(am_get_anonsize_total)());
+       VG_(message)
+          (Vg_DebugMsg,
+           "------ %'13llu bytes have already been mmap-ed ANONYMOUS.\n",
+           VG_(am_get_anonsize_total)());
       VG_(print_all_arena_stats)();
       if (VG_(clo_profile_heap))
          VG_(print_arena_cc_analysis) ();
@@ -386,7 +387,7 @@ int handle_gdb_valgrind_command (char *mon, OutputSink *sink_wanted_at_return)
          VG_(gdbserver_status_output)();
          break;
       case  4: /* memory */
-         VG_(printf) ("%llu bytes have already been mmap-ed ANONYMOUS.\n",
+         VG_(printf) ("%'13llu bytes have already been mmap-ed ANONYMOUS.\n",
                       VG_(am_get_anonsize_total)());
          VG_(print_all_arena_stats) ();
          if (VG_(clo_profile_heap))
index 51441b87e89c9b1bcf1dcb8f383ababb4e46121b..d8d354487a6236bcd40c2c1ae3bd40dc219e06ef 100644 (file)
@@ -625,9 +625,9 @@ void VG_(print_all_arena_stats) ( void )
    for (i = 0; i < VG_N_ARENAS; i++) {
       Arena* a = arenaId_to_ArenaP(i);
       VG_(message)(Vg_DebugMsg,
-                   "%-8s: %8lu/%8lu  max/curr mmap'd, "
+                   "%-8s: %'13lu/%'13lu max/curr mmap'd, "
                    "%llu/%llu unsplit/split sb unmmap'd,  "
-                   "%8lu/%8lu max/curr,  "
+                   "%'13lu/%'13lu max/curr,  "
                    "%10llu/%10llu totalloc-blocks/bytes,"
                    "  %10llu searches %lu rzB\n",
                    a->name,
@@ -758,7 +758,7 @@ void VG_(out_of_memory_NORETURN) ( const HChar* who, SizeT szB )
       "\n"
       "    Valgrind's memory management: out of memory:\n"
       "       %s's request for %llu bytes failed.\n"
-      "       %llu bytes have already been mmap-ed ANONYMOUS.\n"
+      "       %'13llu bytes have already been mmap-ed ANONYMOUS.\n"
       "    Valgrind cannot continue.  Sorry.\n\n"
       "    There are several possible reasons for this.\n"
       "    - You have some kind of memory limit in place.  Look at the\n"