|
From: <sv...@va...> - 2005-10-19 01:32:44
|
Author: sewardj
Date: 2005-10-19 02:32:41 +0100 (Wed, 19 Oct 2005)
New Revision: 4945
Log:
Snap up some easy pickings pointed out by cachegrinding nulgrind on ppc32=
.
Modified:
trunk/coregrind/m_transtab.c
Modified: trunk/coregrind/m_transtab.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/coregrind/m_transtab.c 2005-10-19 01:14:22 UTC (rev 4944)
+++ trunk/coregrind/m_transtab.c 2005-10-19 01:32:41 UTC (rev 4945)
@@ -615,10 +615,20 @@
static void invalidateFastCache ( void )
{
UInt j;
- for (j =3D 0; j < VG_TT_FAST_SIZE; j++) {
- VG_(tt_fast)[j] =3D &bogus_tc_entry;
- VG_(tt_fastN)[j] =3D NULL;
+ /* This loop is popular enough to make it worth unrolling a
+ bit, at least on ppc32. */
+ vg_assert(VG_TT_FAST_SIZE > 0 && (VG_TT_FAST_SIZE % 4) =3D=3D 0);
+ for (j =3D 0; j < VG_TT_FAST_SIZE; j +=3D 4) {
+ VG_(tt_fast)[j+0] =3D &bogus_tc_entry;
+ VG_(tt_fast)[j+1] =3D &bogus_tc_entry;
+ VG_(tt_fast)[j+2] =3D &bogus_tc_entry;
+ VG_(tt_fast)[j+3] =3D &bogus_tc_entry;
+ VG_(tt_fastN)[j+0] =3D NULL;
+ VG_(tt_fastN)[j+1] =3D NULL;
+ VG_(tt_fastN)[j+2] =3D NULL;
+ VG_(tt_fastN)[j+3] =3D NULL;
}
+ vg_assert(j =3D=3D VG_TT_FAST_SIZE);
n_fast_flushes++;
}
=20
|