|
From: <sv...@va...> - 2015-08-09 20:55:46
|
Author: florian
Date: Sun Aug 9 21:55:39 2015
New Revision: 15516
Log:
When profiling memory events in memcheck, event counts larget
than INT_MAX have been observed in practice. Make counters
64 bit entities.
Modified:
trunk/memcheck/mc_include.h
trunk/memcheck/mc_main.c
Modified: trunk/memcheck/mc_include.h
==============================================================================
--- trunk/memcheck/mc_include.h (original)
+++ trunk/memcheck/mc_include.h Sun Aug 9 21:55:39 2015
@@ -320,7 +320,7 @@
MCPE_LAST
};
-extern UInt MC_(event_ctr)[MCPE_LAST];
+extern ULong MC_(event_ctr)[MCPE_LAST];
# define PROF_EVENT(ev) \
do { tl_assert((ev) >= 0 && (ev) < MCPE_LAST); \
Modified: trunk/memcheck/mc_main.c
==============================================================================
--- trunk/memcheck/mc_main.c (original)
+++ trunk/memcheck/mc_main.c Sun Aug 9 21:55:39 2015
@@ -6746,7 +6746,7 @@
#ifdef MC_PROFILE_MEMORY
-UInt MC_(event_ctr)[MCPE_LAST];
+ULong MC_(event_ctr)[MCPE_LAST];
/* Event counter names. Use the name of the function that increases the
event counter. Drop any MC_() and mc_ prefices. */
@@ -6896,7 +6896,7 @@
if (MC_(event_ctr)[i] > 0) {
spaced = False;
++n;
- VG_(printf)( "prof mem event %3d: %9u %s\n",
+ VG_(printf)( "prof mem event %3d: %11llu %s\n",
i, MC_(event_ctr)[i],
MC_(event_ctr_name)[i]);
}
|