diff --git a/memcheck/mac_malloc_wrappers.c b/memcheck/mac_malloc_wrappers.c index 0320024b2..727a303ae 100644 --- a/memcheck/mac_malloc_wrappers.c +++ b/memcheck/mac_malloc_wrappers.c @@ -181,7 +181,6 @@ void* MAC_(new_block) ( ThreadId tid, Addr p, SizeT size, SizeT align, UInt rzB, Bool is_zeroed, MAC_AllocKind kind, VgHashTable table) { - VGP_PUSHCC(VgpCliMalloc); cmalloc_n_mallocs ++; // Allocate and zero if necessary @@ -191,7 +190,6 @@ void* MAC_(new_block) ( ThreadId tid, tl_assert(MAC_AllocCustom != kind); p = (Addr)VG_(cli_malloc)( align, size ); if (!p) { - VGP_POPCC(VgpCliMalloc); return NULL; } if (is_zeroed) VG_(memset)((void*)p, 0, size); @@ -206,8 +204,6 @@ void* MAC_(new_block) ( ThreadId tid, MAC_(new_mem_heap)( p, size, is_zeroed ); MAC_(ban_mem_heap)( p+size, rzB ); - VGP_POPCC(VgpCliMalloc); - return (void*)p; } @@ -290,8 +286,6 @@ void MAC_(handle_free) ( ThreadId tid, Addr p, UInt rzB, MAC_AllocKind kind ) { MAC_Chunk* mc; - VGP_PUSHCC(VgpCliMalloc); - cmalloc_n_frees++; mc = VG_(HT_remove) ( MAC_(malloc_list), (UWord)p ); @@ -304,8 +298,6 @@ void MAC_(handle_free) ( ThreadId tid, Addr p, UInt rzB, MAC_AllocKind kind ) } die_and_free_mem ( tid, mc, rzB ); } - - VGP_POPCC(VgpCliMalloc); } void MAC_(free) ( ThreadId tid, void* p ) @@ -332,8 +324,6 @@ void* MAC_(realloc) ( ThreadId tid, void* p_old, SizeT new_size ) void* p_new; SizeT old_size; - VGP_PUSHCC(VgpCliMalloc); - cmalloc_n_frees ++; cmalloc_n_mallocs ++; cmalloc_bs_mallocd += new_size; @@ -346,7 +336,6 @@ void* MAC_(realloc) ( ThreadId tid, void* p_old, SizeT new_size ) if (mc == NULL) { MAC_(record_free_error) ( tid, (Addr)p_old ); /* We return to the program regardless. */ - VGP_POPCC(VgpCliMalloc); return NULL; } @@ -406,7 +395,6 @@ void* MAC_(realloc) ( ThreadId tid, void* p_old, SizeT new_size ) // than growing it, and this way simplifies the growing case. VG_(HT_add_node)( MAC_(malloc_list), mc ); - VGP_POPCC(VgpCliMalloc); return p_new; } diff --git a/memcheck/mc_main.c b/memcheck/mc_main.c index 2e14d86cf..4a845a2f1 100644 --- a/memcheck/mc_main.c +++ b/memcheck/mc_main.c @@ -1184,8 +1184,6 @@ void mc_check_is_writable ( CorePart part, ThreadId tid, Char* s, Bool ok; Addr bad_addr; - VGP_PUSHCC(VgpCheckMem); - /* VG_(message)(Vg_DebugMsg,"check is writable: %x .. %x", base,base+size-1); */ ok = mc_check_writable ( base, size, &bad_addr ); @@ -1205,8 +1203,6 @@ void mc_check_is_writable ( CorePart part, ThreadId tid, Char* s, VG_(tool_panic)("mc_check_is_writable: unexpected CorePart"); } } - - VGP_POPCC(VgpCheckMem); } static @@ -1216,8 +1212,6 @@ void mc_check_is_readable ( CorePart part, ThreadId tid, Char* s, Addr bad_addr; MC_ReadResult res; - VGP_PUSHCC(VgpCheckMem); - res = mc_check_readable ( base, size, &bad_addr ); if (0) @@ -1247,7 +1241,6 @@ void mc_check_is_readable ( CorePart part, ThreadId tid, Char* s, VG_(tool_panic)("mc_check_is_readable: unexpected CorePart"); } } - VGP_POPCC(VgpCheckMem); } static @@ -1258,16 +1251,12 @@ void mc_check_is_readable_asciiz ( CorePart part, ThreadId tid, Addr bad_addr = 0; // shut GCC up /* VG_(message)(Vg_DebugMsg,"check is readable asciiz: 0x%x",str); */ - VGP_PUSHCC(VgpCheckMem); - tl_assert(part == Vg_CoreSysCall); res = mc_check_readable_asciiz ( (Addr)str, &bad_addr ); if (MC_Ok != res) { Bool isUnaddr = ( MC_AddrErr == res ? True : False ); MAC_(record_param_error) ( tid, bad_addr, /*isReg*/False, isUnaddr, s ); } - - VGP_POPCC(VgpCheckMem); } static