2 /*--------------------------------------------------------------------*/
3 /*--- s390x-specific definitions. cg-s390x.c ---*/
4 /*--------------------------------------------------------------------*/
7 This file is part of Cachegrind, a Valgrind tool for cache
10 Copyright IBM Corp. 2010-2011
12 This program is free software; you can redistribute it and/or
13 modify it under the terms of the GNU General Public License as
14 published by the Free Software Foundation; either version 2 of the
15 License, or (at your option) any later version.
17 This program is distributed in the hope that it will be useful, but
18 WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 General Public License for more details.
22 You should have received a copy of the GNU General Public License
23 along with this program; if not, write to the Free Software
24 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
27 The GNU General Public License is contained in the file COPYING.
30 /* Contributed by Christian Borntraeger */
32 #if defined(VGA_s390x)
34 #include "pub_tool_basics.h"
35 #include "pub_tool_libcbase.h"
36 #include "pub_tool_libcassert.h"
37 #include "pub_tool_libcprint.h"
41 void VG_(configure_caches)(cache_t* I1c, cache_t* D1c, cache_t* L2c,
42 Bool all_caches_clo_defined)
44 // Set caches to z10 default.
45 // See IBM Journal of Research and Development
46 // Issue Date: Jan. 2009
48 // fixs390: have a table for all available models and check /proc/cpuinfo
49 *I1c = (cache_t) { 65536, 4, 256 };
50 *D1c = (cache_t) { 131072, 8, 256 };
51 *L2c = (cache_t) { 3145728, 12, 256 };
53 // Warn if config not completely specified from cmd line. Note that
54 // this message is slightly different from the one we give on x86/AMD64
55 // when auto-detection fails; this lets us filter out this one (which is
56 // not important) in the regression test suite without filtering the
57 // x86/AMD64 one (which we want to see if it ever occurs in the
58 // regression test suite).
60 // If you change this message, please update
61 // cachegrind/tests/filter_stderr!
63 if (!all_caches_clo_defined) {
64 VG_(dmsg)("Warning: Cannot auto-detect cache config on s390x, using one "
65 "or more defaults \n");
71 /*--------------------------------------------------------------------*/
72 /*--- end cg-s390x.c ---*/
73 /*--------------------------------------------------------------------*/