1) I don't think you have to register a stat before you use it in a
formula.  If you do, that should be pretty easy to undo. Also,
formulas define +=, so you could define Formula in the base class, and
use += to add child values from the child class.  The order of
construction is the same order as init functions.  Generally, we
initialize from bottom up.  So, regStats should be called from bottom
up.  (Cycles will mess this up).

2) If you don't give a statistic a name, then it won't get printed.

  Nate

On Sun, Aug 25, 2013 at 3:06 PM, Nilay Vaish <[email protected]> wrote:
> I have two questions regarding the functionality of the Stats package.
>
> 1. Is it possible to aggregate (say using a Formula) statistics across
> different objects? For example, suppose there are two objects p and q, both
> of the same class C. Both register a Stats::Average variable that keeps
> track of the average occupancy of some structure. Is it possible to define a
> new Stats::Formula variable that represents that sum (or average) of these
> two variables? Where should I define this Formula -- in class C as a static
> variable, or in the object that is parent of both p and q? I would prefer
> later. I think the problem here is that it is not possible to ensure that
> the regStats() function for p and q gets called before the regStats()
> function of the parent.
>
> 2. Is it possible to use a Stats::<some type> variable without having to
> print it as well? The variable would be ultimately used in some formula that
> I care about.
>
>
> To me it seems that the answer to both these questions is a no. Can some one
> confirm?
>
>
> Thanks
> Nilay
> _______________________________________________
> gem5-dev mailing list
> [email protected]
> http://m5sim.org/mailman/listinfo/gem5-dev
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to