From aa9b4e6a6809bb1f7551cf9231376e1a7fbb54ad Mon Sep 17 00:00:00 2001 From: Nathan Binkert Date: Wed, 22 Apr 2009 13:38:01 -0700 Subject: stats: Move flags into info.hh and use base/flags.hh to manage the flags --- src/base/stats/info.hh | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) (limited to 'src/base/stats/info.hh') 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 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. */ -- cgit v1.2.3