diff options
author | Nathan Binkert <nate@binkert.org> | 2009-04-22 13:38:01 -0700 |
---|---|---|
committer | Nathan Binkert <nate@binkert.org> | 2009-04-22 13:38:01 -0700 |
commit | aa9b4e6a6809bb1f7551cf9231376e1a7fbb54ad (patch) | |
tree | cb0455b45706af17eca0efaf3521ed7e77eb9d75 /src/base/stats/info.hh | |
parent | 8c3eb1a1922a1129a398a6b6f1d5b11de66ff263 (diff) | |
download | gem5-aa9b4e6a6809bb1f7551cf9231376e1a7fbb54ad.tar.xz |
stats: Move flags into info.hh and use base/flags.hh to manage the flags
Diffstat (limited to 'src/base/stats/info.hh')
-rw-r--r-- | src/base/stats/info.hh | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/src/base/stats/info.hh b/src/base/stats/info.hh index d0ff6b170..f24ad11d7 100644 --- a/src/base/stats/info.hh +++ b/src/base/stats/info.hh @@ -28,11 +28,38 @@ * Authors: Nathan Binkert */ -#include "base/stats/flags.hh" +#include "base/flags.hh" #include "base/stats/types.hh" namespace Stats { +typedef uint16_t FlagsType; +typedef ::Flags<FlagsType> Flags; + +/** Nothing extra to print. */ +const FlagsType none = 0x0000; +/** This Stat is Initialized */ +const FlagsType init = 0x0001; +/** Print this stat. */ +const FlagsType print = 0x0002; +/** Print the total. */ +const FlagsType total = 0x0010; +/** Print the percent of the total that this entry represents. */ +const FlagsType pdf = 0x0020; +/** Print the cumulative percentage of total upto this entry. */ +const FlagsType cdf = 0x0040; +/** Print the distribution. */ +const FlagsType dist = 0x0080; +/** Don't print if this is zero. */ +const FlagsType nozero = 0x0100; +/** Don't print if this is NAN */ +const FlagsType nonan = 0x0200; +/** Used for SS compatability. */ +const FlagsType __substat = 0x8000; + +/** Mask of flags that can't be set directly */ +const FlagsType __reserved = init | print | __substat; + struct StorageParams { virtual ~StorageParams(); @@ -48,7 +75,7 @@ class Info /** The description of the stat. */ std::string desc; /** The formatting flags. */ - StatFlags flags; + Flags flags; /** The display precision. */ int precision; /** A pointer to a prerequisite Stat. */ |