more initial checking of stats
[gem5.git] / base / stats / flags.hh
1 /*
2 * Copyright (c) 2003-2004 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;
9 * redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution;
12 * neither the name of the copyright holders nor the names of its
13 * contributors may be used to endorse or promote products derived from
14 * this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29 #ifndef __BASE_STATS_FLAGS_HH__
30 #define __BASE_STATS_FLAGS_HH__
31 namespace Stats {
32
33 /**
34 * Define the storage for format flags.
35 * @todo Can probably shrink this.
36 */
37 typedef u_int32_t StatFlags;
38
39 /** Nothing extra to print. */
40 const StatFlags none = 0x00000000;
41 /** This Stat is Initialized */
42 const StatFlags init = 0x00000001;
43 /** Print this stat. */
44 const StatFlags print = 0x00000002;
45 /** Print the total. */
46 const StatFlags total = 0x00000010;
47 /** Print the percent of the total that this entry represents. */
48 const StatFlags pdf = 0x00000020;
49 /** Print the cumulative percentage of total upto this entry. */
50 const StatFlags cdf = 0x00000040;
51 /** Print the distribution. */
52 const StatFlags dist = 0x00000080;
53 /** Don't print if this is zero. */
54 const StatFlags nozero = 0x00000100;
55 /** Don't print if this is NAN */
56 const StatFlags nonan = 0x00000200;
57 /** Used for SS compatability. */
58 const StatFlags __substat = 0x80000000;
59
60 /** Mask of flags that can't be set directly */
61 const StatFlags __reserved = init | print | __substat;
62
63 enum DisplayMode
64 {
65 mode_m5,
66 mode_simplescalar
67 };
68
69 extern DisplayMode DefaultMode;
70
71 /* namespace Stats */ }
72
73 #endif // __BASE_STATS_FLAGS_HH__