|
From: <sv...@va...> - 2005-12-19 22:23:39
|
Author: njn
Date: 2005-12-19 22:23:35 +0000 (Mon, 19 Dec 2005)
New Revision: 5385
Log:
Remove the old profiling stuff from Memcheck.
Modified:
trunk/memcheck/mac_malloc_wrappers.c
trunk/memcheck/mc_main.c
Modified: trunk/memcheck/mac_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
--- trunk/memcheck/mac_malloc_wrappers.c 2005-12-19 21:27:58 UTC (rev 538=
4)
+++ trunk/memcheck/mac_malloc_wrappers.c 2005-12-19 22:23:35 UTC (rev 538=
5)
@@ -181,7 +181,6 @@
Addr p, SizeT size, SizeT align, UInt rzB,
Bool is_zeroed, MAC_AllocKind kind, VgHashTable =
table)
{
- VGP_PUSHCC(VgpCliMalloc);
cmalloc_n_mallocs ++;
=20
// Allocate and zero if necessary
@@ -191,7 +190,6 @@
tl_assert(MAC_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);
@@ -206,8 +204,6 @@
MAC_(new_mem_heap)( p, size, is_zeroed );
MAC_(ban_mem_heap)( p+size, rzB );
=20
- VGP_POPCC(VgpCliMalloc);
-
return (void*)p;
}
=20
@@ -290,8 +286,6 @@
{
MAC_Chunk* mc;
=20
- VGP_PUSHCC(VgpCliMalloc);
-
cmalloc_n_frees++;
=20
mc =3D VG_(HT_remove) ( MAC_(malloc_list), (UWord)p );
@@ -304,8 +298,6 @@
}
die_and_free_mem ( tid, mc, rzB );
}
-
- VGP_POPCC(VgpCliMalloc);
}
=20
void MAC_(free) ( ThreadId tid, void* p )
@@ -332,8 +324,6 @@
void* p_new;
SizeT old_size;
=20
- VGP_PUSHCC(VgpCliMalloc);
-
cmalloc_n_frees ++;
cmalloc_n_mallocs ++;
cmalloc_bs_mallocd +=3D new_size;
@@ -346,7 +336,6 @@
if (mc =3D=3D NULL) {
MAC_(record_free_error) ( tid, (Addr)p_old );
/* We return to the program regardless. */
- VGP_POPCC(VgpCliMalloc);
return NULL;
}
=20
@@ -406,7 +395,6 @@
// than growing it, and this way simplifies the growing case.
VG_(HT_add_node)( MAC_(malloc_list), mc );
=20
- VGP_POPCC(VgpCliMalloc);
return p_new;
}
=20
Modified: trunk/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
--- trunk/memcheck/mc_main.c 2005-12-19 21:27:58 UTC (rev 5384)
+++ trunk/memcheck/mc_main.c 2005-12-19 22:23:35 UTC (rev 5385)
@@ -1184,8 +1184,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 );
@@ -1205,8 +1203,6 @@
VG_(tool_panic)("mc_check_is_writable: unexpected CorePart");
}
}
-
- VGP_POPCC(VgpCheckMem);
}
=20
static
@@ -1216,8 +1212,6 @@
Addr bad_addr;
MC_ReadResult res;
=20
- VGP_PUSHCC(VgpCheckMem);
- =20
res =3D mc_check_readable ( base, size, &bad_addr );
=20
if (0)
@@ -1247,7 +1241,6 @@
VG_(tool_panic)("mc_check_is_readable: unexpected CorePart");
}
}
- VGP_POPCC(VgpCheckMem);
}
=20
static
@@ -1258,16 +1251,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 );
MAC_(record_param_error) ( tid, bad_addr, /*isReg*/False, isUnaddr=
, s );
}
-
- VGP_POPCC(VgpCheckMem);
}
=20
static
|