Simplified the way Cachegrind configures the caches; it was really
strange before. Also aborting if any command-line-provided cache
configuration is unacceptable, rather than falling back on defaults;
it's simpler and arguably better than just emitting a warning.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3118 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/cachegrind/x86/cg_arch.c b/cachegrind/x86/cg_arch.c
index 7d6cafa..6e2b710 100644
--- a/cachegrind/x86/cg_arch.c
+++ b/cachegrind/x86/cg_arch.c
@@ -331,18 +331,14 @@
void VGA_(configure_caches)(cache_t* I1c, cache_t* D1c, cache_t* L2c,
- cache_t* I1_dflt, cache_t* D1_dflt, cache_t* L2_dflt,
- Bool all_caches_clo_defined)
+ Bool all_caches_clo_defined)
{
Int res;
// Set caches to default.
- *I1_dflt = (cache_t) { 65536, 2, 64 };
- *D1_dflt = (cache_t) { 65536, 2, 64 };
- *L2_dflt = (cache_t) { 262144, 8, 64 };
- *I1c = *I1_dflt;
- *D1c = *D1_dflt;
- *L2c = *L2_dflt;
+ *I1c = (cache_t) { 65536, 2, 64 };
+ *D1c = (cache_t) { 65536, 2, 64 };
+ *L2c = (cache_t) { 262144, 8, 64 };
// Then replace with any info we can get from CPUID.
res = get_caches_from_CPUID(I1c, D1c, L2c);