From: <sv...@va...> - 2005-07-08 09:46:46
|
Author: sewardj Date: 2005-07-08 10:45:43 +0100 (Fri, 08 Jul 2005) New Revision: 4131 Log: Don't bomb cachegrind at startup. Modified: trunk/cachegrind/cg-ppc32.c Modified: trunk/cachegrind/cg-ppc32.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/cachegrind/cg-ppc32.c 2005-07-08 04:08:59 UTC (rev 4130) +++ trunk/cachegrind/cg-ppc32.c 2005-07-08 09:45:43 UTC (rev 4131) @@ -307,24 +307,22 @@ void VG_(configure_caches)(cache_t* I1c, cache_t* D1c, cache_t* L2c, Bool all_caches_clo_defined) { - tl_assert(0); + Int res; + =20 + // Set caches to default. + *I1c =3D (cache_t) { 65536, 2, 64 }; + *D1c =3D (cache_t) { 65536, 2, 64 }; + *L2c =3D (cache_t) { 262144, 8, 64 }; =20 -//.. Int res; -//.. =20 -//.. // Set caches to default. -//.. *I1c =3D (cache_t) { 65536, 2, 64 }; -//.. *D1c =3D (cache_t) { 65536, 2, 64 }; -//.. *L2c =3D (cache_t) { 262144, 8, 64 }; -//..=20 -//.. // Then replace with any info we can get from CPUID. -//.. res =3D get_caches_from_CPUID(I1c, D1c, L2c); -//..=20 -//.. // Warn if CPUID failed and config not completely specified from= cmd line. -//.. if (res !=3D 0 && !all_caches_clo_defined) { -//.. VG_(message)(Vg_DebugMsg,=20 -//.. "Warning: Couldn't auto-detect cache config, usi= ng one " -//.. "or more defaults "); -//.. } + // Then replace with any info we can get from CPUID. + res =3D 1; /*get_caches_from_CPUID(I1c, D1c, L2c);*/ + + // Warn if CPUID failed and config not completely specified from cmd = line. + if (res !=3D 0 && !all_caches_clo_defined) { + VG_(message)(Vg_DebugMsg,=20 + "Warning: Couldn't auto-detect cache config, using on= e " + "or more defaults "); + } } =20 /*--------------------------------------------------------------------*/ |