When profiling memory events in memcheck, event counts larget

than INT_MAX have been observed in practice. Make counters
64 bit entities.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15516
This commit is contained in:
Florian Krohm 2015-08-09 20:55:39 +00:00
parent 5685245df0
commit 70bfaf9c9f
2 changed files with 3 additions and 3 deletions

View File

@ -320,7 +320,7 @@ enum {
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); \

View File

@ -6746,7 +6746,7 @@ static Bool mc_handle_client_request ( ThreadId tid, UWord* arg, UWord* ret )
#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 @@ static void done_prof_mem ( void )
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]);
}