info.hh (6129:05405c5b8c16) info.hh (6130:0fb959250892)
1/*
2 * Copyright (c) 2003-2005 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;

--- 14 unchanged lines hidden (view full) ---

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 * Authors: Nathan Binkert
29 */
30
1/*
2 * Copyright (c) 2003-2005 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;

--- 14 unchanged lines hidden (view full) ---

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 * Authors: Nathan Binkert
29 */
30
31#include "base/stats/flags.hh"
31#include "base/flags.hh"
32#include "base/stats/types.hh"
33
34namespace Stats {
35
32#include "base/stats/types.hh"
33
34namespace Stats {
35
36typedef uint16_t FlagsType;
37typedef ::Flags<FlagsType> Flags;
38
39/** Nothing extra to print. */
40const FlagsType none = 0x0000;
41/** This Stat is Initialized */
42const FlagsType init = 0x0001;
43/** Print this stat. */
44const FlagsType print = 0x0002;
45/** Print the total. */
46const FlagsType total = 0x0010;
47/** Print the percent of the total that this entry represents. */
48const FlagsType pdf = 0x0020;
49/** Print the cumulative percentage of total upto this entry. */
50const FlagsType cdf = 0x0040;
51/** Print the distribution. */
52const FlagsType dist = 0x0080;
53/** Don't print if this is zero. */
54const FlagsType nozero = 0x0100;
55/** Don't print if this is NAN */
56const FlagsType nonan = 0x0200;
57/** Used for SS compatability. */
58const FlagsType __substat = 0x8000;
59
60/** Mask of flags that can't be set directly */
61const FlagsType __reserved = init | print | __substat;
62
36struct StorageParams
37{
38 virtual ~StorageParams();
39};
40
41struct Visit;
42
43class Info
44{
45 public:
46 /** The name of the stat. */
47 std::string name;
48 /** The description of the stat. */
49 std::string desc;
50 /** The formatting flags. */
63struct StorageParams
64{
65 virtual ~StorageParams();
66};
67
68struct Visit;
69
70class Info
71{
72 public:
73 /** The name of the stat. */
74 std::string name;
75 /** The description of the stat. */
76 std::string desc;
77 /** The formatting flags. */
51 StatFlags flags;
78 Flags flags;
52 /** The display precision. */
53 int precision;
54 /** A pointer to a prerequisite Stat. */
55 const Info *prereq;
56 /**
57 * A unique stat ID for each stat in the simulator.
58 * Can be used externally for lookups as well as for debugging.
59 */

--- 161 unchanged lines hidden ---
79 /** The display precision. */
80 int precision;
81 /** A pointer to a prerequisite Stat. */
82 const Info *prereq;
83 /**
84 * A unique stat ID for each stat in the simulator.
85 * Can be used externally for lookups as well as for debugging.
86 */

--- 161 unchanged lines hidden ---