From: Julian Seward Date: Sat, 13 Jul 2002 13:31:20 +0000 (+0000) Subject: get_caches(): ensure caches are initialised on targets where X-Git-Tag: svn/VALGRIND_1_0_3~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c20e620efabeb0987876843a48edd02fade69943;p=thirdparty%2Fvalgrind.git get_caches(): ensure caches are initialised on targets where get_caches_from_CPUID fails. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@501 --- diff --git a/cachegrind/cg_main.c b/cachegrind/cg_main.c index 2756243ade..4f1bf10716 100644 --- a/cachegrind/cg_main.c +++ b/cachegrind/cg_main.c @@ -1060,6 +1060,10 @@ void get_caches(cache_t* I1c, cache_t* D1c, cache_t* L2c) -1 != VG_(clo_##L##_cache).assoc || \ -1 != VG_(clo_##L##_cache).line_size) + *I1c = VG_(clo_I1_cache); + *D1c = VG_(clo_D1_cache); + *L2c = VG_(clo_L2_cache); + /* If any undefined on command-line, try CPUID */ if (! CMD_LINE_DEFINED(I1) || ! CMD_LINE_DEFINED(D1) || diff --git a/vg_cachesim.c b/vg_cachesim.c index 2756243ade..4f1bf10716 100644 --- a/vg_cachesim.c +++ b/vg_cachesim.c @@ -1060,6 +1060,10 @@ void get_caches(cache_t* I1c, cache_t* D1c, cache_t* L2c) -1 != VG_(clo_##L##_cache).assoc || \ -1 != VG_(clo_##L##_cache).line_size) + *I1c = VG_(clo_I1_cache); + *D1c = VG_(clo_D1_cache); + *L2c = VG_(clo_L2_cache); + /* If any undefined on command-line, try CPUID */ if (! CMD_LINE_DEFINED(I1) || ! CMD_LINE_DEFINED(D1) ||