|
From: <sv...@va...> - 2005-12-19 22:29:06
|
Author: njn
Date: 2005-12-19 22:28:58 +0000 (Mon, 19 Dec 2005)
New Revision: 5386
Log:
Merge 5385 from trunk -- remove VGP profiling gunk from Memcheck.
Modified:
branches/COMPVBITS/memcheck/mc_main.c
branches/COMPVBITS/memcheck/mc_malloc_wrappers.c
Modified: branches/COMPVBITS/memcheck/mc_main.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/COMPVBITS/memcheck/mc_main.c 2005-12-19 22:23:35 UTC (rev 53=
85)
+++ branches/COMPVBITS/memcheck/mc_main.c 2005-12-19 22:28:58 UTC (rev 53=
86)
@@ -1600,8 +1600,6 @@
Bool ok;
Addr bad_addr;
=20
- VGP_PUSHCC(VgpCheckMem);
-
/* VG_(message)(Vg_DebugMsg,"check is writable: %x .. %x",
base,base+size-1); */
ok =3D mc_check_writable ( base, size, &bad_addr );
@@ -1621,8 +1619,6 @@
VG_(tool_panic)("mc_check_is_writable: unexpected CorePart");
}
}
-
- VGP_POPCC(VgpCheckMem);
}
=20
static
@@ -1632,8 +1628,6 @@
Addr bad_addr;
MC_ReadResult res;
=20
- VGP_PUSHCC(VgpCheckMem);
- =20
res =3D mc_check_readable ( base, size, &bad_addr );
=20
if (0)
@@ -1663,7 +1657,6 @@
VG_(tool_panic)("mc_check_is_readable: unexpected CorePart");
}
}
- VGP_POPCC(VgpCheckMem);
}
=20
static
@@ -1674,16 +1667,12 @@
Addr bad_addr =3D 0; // shut GCC up
/* VG_(message)(Vg_DebugMsg,"check is readable asciiz: 0x%x",str); */
=20
- VGP_PUSHCC(VgpCheckMem);
-
tl_assert(part =3D=3D Vg_CoreSysCall);
res =3D mc_check_readable_asciiz ( (Addr)str, &bad_addr );
if (MC_Ok !=3D res) {
Bool isUnaddr =3D ( MC_AddrErr =3D=3D res ? True : False );
mc_record_param_error ( tid, bad_addr, /*isReg*/False, isUnaddr, s=
);
}
-
- VGP_POPCC(VgpCheckMem);
}
=20
static
Modified: branches/COMPVBITS/memcheck/mc_malloc_wrappers.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- branches/COMPVBITS/memcheck/mc_malloc_wrappers.c 2005-12-19 22:23:35 =
UTC (rev 5385)
+++ branches/COMPVBITS/memcheck/mc_malloc_wrappers.c 2005-12-19 22:28:58 =
UTC (rev 5386)
@@ -180,7 +180,6 @@
Addr p, SizeT size, SizeT align, UInt rzB,
Bool is_zeroed, MC_AllocKind kind, VgHashTable t=
able)
{
- VGP_PUSHCC(VgpCliMalloc);
cmalloc_n_mallocs ++;
=20
// Allocate and zero if necessary
@@ -190,7 +189,6 @@
tl_assert(MC_AllocCustom !=3D kind);
p =3D (Addr)VG_(cli_malloc)( align, size );
if (!p) {
- VGP_POPCC(VgpCliMalloc);
return NULL;
}
if (is_zeroed) VG_(memset)((void*)p, 0, size);
@@ -205,8 +203,6 @@
MC_(new_mem_heap)( p, size, is_zeroed );
MC_(ban_mem_heap)( p+size, rzB );
=20
- VGP_POPCC(VgpCliMalloc);
-
return (void*)p;
}
=20
@@ -289,8 +285,6 @@
{
MC_Chunk* mc;
=20
- VGP_PUSHCC(VgpCliMalloc);
-
cmalloc_n_frees++;
=20
mc =3D VG_(HT_remove) ( MC_(malloc_list), (UWord)p );
@@ -303,8 +297,6 @@
}
die_and_free_mem ( tid, mc, rzB );
}
-
- VGP_POPCC(VgpCliMalloc);
}
=20
void MC_(free) ( ThreadId tid, void* p )
@@ -331,8 +323,6 @@
void* p_new;
SizeT old_size;
=20
- VGP_PUSHCC(VgpCliMalloc);
-
cmalloc_n_frees ++;
cmalloc_n_mallocs ++;
cmalloc_bs_mallocd +=3D new_size;
@@ -345,7 +335,6 @@
if (mc =3D=3D NULL) {
MC_(record_free_error) ( tid, (Addr)p_old );
/* We return to the program regardless. */
- VGP_POPCC(VgpCliMalloc);
return NULL;
}
=20
@@ -405,7 +394,6 @@
// than growing it, and this way simplifies the growing case.
VG_(HT_add_node)( MC_(malloc_list), mc );
=20
- VGP_POPCC(VgpCliMalloc);
return p_new;
}
=20
|