]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Report the detected cache configuration with "-v -v" before we
authorTom Hughes <tom@compton.nu>
Fri, 19 Aug 2011 09:01:22 +0000 (09:01 +0000)
committerTom Hughes <tom@compton.nu>
Fri, 19 Aug 2011 09:01:22 +0000 (09:01 +0000)
validate it to make validation failures easier to diagnose.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11994

cachegrind/cg_main.c

index ecdd706f0100918c1eff28282651dec6ffe6e0ff..5772520f75eaa815b92d256c2468c7f1effdd67c 100644 (file)
@@ -1289,6 +1289,16 @@ void configure_caches(cache_t* I1c, cache_t* D1c, cache_t* LLc)
    // architecture).
    VG_(configure_caches)( I1c, D1c, LLc, all_caches_clo_defined );
 
+   if (VG_(clo_verbosity) > 2) {
+      VG_(umsg)("Cache configuration detected:\n");
+      VG_(umsg)("  I1: %dB, %d-way, %dB lines\n",
+                I1c->size, I1c->assoc, I1c->line_size);
+      VG_(umsg)("  D1: %dB, %d-way, %dB lines\n",
+                D1c->size, D1c->assoc, D1c->line_size);
+      VG_(umsg)("  LL: %dB, %d-way, %dB lines\n",
+                LLc->size, LLc->assoc, LLc->line_size);
+   }
+
    // Check the default/auto-detected values.
    checkRes = check_cache(I1c);  tl_assert(!checkRes);
    checkRes = check_cache(D1c);  tl_assert(!checkRes);