]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/valgrind/src/valgrind-3.6.0-svn/cachegrind/cg-s390x.c
update
[l4.git] / l4 / pkg / valgrind / src / valgrind-3.6.0-svn / cachegrind / cg-s390x.c
1
2 /*--------------------------------------------------------------------*/
3 /*--- s390x-specific definitions.                       cg-s390x.c ---*/
4 /*--------------------------------------------------------------------*/
5
6 /*
7    This file is part of Cachegrind, a Valgrind tool for cache
8    profiling programs.
9
10    Copyright IBM Corp. 2010-2011
11
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.
16
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.
21
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
25    02111-1307, USA.
26
27    The GNU General Public License is contained in the file COPYING.
28 */
29
30 /* Contributed by Christian Borntraeger */
31
32 #if defined(VGA_s390x)
33
34 #include "pub_tool_basics.h"
35 #include "pub_tool_libcbase.h"
36 #include "pub_tool_libcassert.h"
37 #include "pub_tool_libcprint.h"
38
39 #include "cg_arch.h"
40
41 void VG_(configure_caches)(cache_t* I1c, cache_t* D1c, cache_t* L2c,
42                            Bool all_caches_clo_defined)
43 {
44    // Set caches to z10 default.
45    // See IBM Journal of Research and Development
46    // Issue Date: Jan. 2009
47    // Volume: 53 Issue:1
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 };
52
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).
59    //
60    // If you change this message, please update
61    // cachegrind/tests/filter_stderr!
62    //
63    if (!all_caches_clo_defined) {
64       VG_(dmsg)("Warning: Cannot auto-detect cache config on s390x, using one "
65                 "or more defaults \n");
66    }
67 }
68
69 #endif
70
71 /*--------------------------------------------------------------------*/
72 /*--- end                                               cg-s390x.c ---*/
73 /*--------------------------------------------------------------------*/