gem5  [DEVELOP-FOR-23.0]
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
storage.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2021 Daniel R. Carvalho
3  * Copyright (c) 2003-2005 The Regents of The University of Michigan
4  * All rights reserved.
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions are
8  * met: redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer;
10  * redistributions in binary form must reproduce the above copyright
11  * notice, this list of conditions and the following disclaimer in the
12  * documentation and/or other materials provided with the distribution;
13  * neither the name of the copyright holders nor the names of its
14  * contributors may be used to endorse or promote products derived from
15  * this software without specific prior written permission.
16  *
17  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28  */
29 
30 #ifndef __BASE_STATS_STORAGE_HH__
31 #define __BASE_STATS_STORAGE_HH__
32 
33 #include <cassert>
34 #include <cmath>
35 
36 #include "base/cast.hh"
37 #include "base/compiler.hh"
38 #include "base/logging.hh"
39 #include "base/stats/types.hh"
40 #include "sim/cur_tick.hh"
41 
42 namespace gem5
43 {
44 
45 namespace statistics
46 {
47 
49 {
50  virtual ~StorageParams() = default;
51 };
52 
56 class StatStor
57 {
58  private:
61 
62  public:
63  struct Params : public StorageParams {};
64 
69  StatStor(const StorageParams* const storage_params)
70  : data(Counter())
71  { }
72 
77  void set(Counter val) { data = val; }
78 
83  void inc(Counter val) { data += val; }
84 
89  void dec(Counter val) { data -= val; }
90 
95  Counter value() const { return data; }
96 
101  Result result() const { return (Result)data; }
102 
106  void prepare(const StorageParams* const storage_params) { }
107 
111  void reset(const StorageParams* const storage_params) { data = Counter(); }
112 
116  bool zero() const { return data == Counter(); }
117 };
118 
126 class AvgStor
127 {
128  private:
134  mutable Result total;
136  mutable Tick last;
137 
138  public:
139  struct Params : public StorageParams {};
140 
144  AvgStor(const StorageParams* const storage_params)
145  : current(0), lastReset(0), total(0), last(0)
146  { }
147 
153  void
155  {
156  total += current * (curTick() - last);
157  last = curTick();
158  current = val;
159  }
160 
165  void inc(Counter val) { set(current + val); }
166 
171  void dec(Counter val) { set(current - val); }
172 
177  Counter value() const { return current; }
178 
183  Result
184  result() const
185  {
186  assert(last == curTick());
187  return (Result)(total + current) / (Result)(curTick() - lastReset + 1);
188  }
189 
193  bool zero() const { return total == 0.0; }
194 
198  void
199  prepare(const StorageParams* const storage_params)
200  {
201  total += current * (curTick() - last);
202  last = curTick();
203  }
204 
208  void
209  reset(const StorageParams* const storage_params)
210  {
211  total = 0.0;
212  last = curTick();
213  lastReset = curTick();
214  }
215 
216 };
217 
219 struct DistParams : public StorageParams
220 {
221  const DistType type;
223 };
224 
232 class DistStor
233 {
234  private:
241 
258 
259  public:
261  struct Params : public DistParams
262  {
271 
272  Params(Counter _min, Counter _max, Counter _bucket_size)
273  : DistParams(Dist), min(_min), max(_max), bucket_size(_bucket_size),
274  buckets(0)
275  {
276  fatal_if(bucket_size <= 0,
277  "Bucket size (%f) must be greater than zero", bucket_size);
278  warn_if(std::floor((max - min + 1.0) / bucket_size) !=
279  std::ceil((max - min + 1.0) / bucket_size),
280  "Bucket size (%f) does not divide range [%f:%f] into equal-" \
281  "sized buckets. Rounding up.", bucket_size, min + 1.0, max);
282 
283  buckets = std::ceil((max - min + 1.0) / bucket_size);
284  }
285  };
286 
287  DistStor(const StorageParams* const storage_params)
288  : cvec(safe_cast<const Params *>(storage_params)->buckets)
289  {
290  reset(storage_params);
291  }
292 
298  void sample(Counter val, int number);
299 
304  size_type size() const { return cvec.size(); }
305 
310  bool
311  zero() const
312  {
313  return samples == Counter();
314  }
315 
316  void
317  prepare(const StorageParams* const storage_params, DistData &data)
318  {
319  const Params *params = safe_cast<const Params *>(storage_params);
320 
321  assert(params->type == Dist);
322  data.type = params->type;
323  data.min = params->min;
324  data.max = params->max;
325  data.bucket_size = params->bucket_size;
326 
327  data.min_val = (min_val == CounterLimits::max()) ? 0 : min_val;
328  data.max_val = (max_val == CounterLimits::min()) ? 0 : max_val;
329  data.underflow = underflow;
330  data.overflow = overflow;
331 
332  data.cvec.resize(params->buckets);
333  for (off_type i = 0; i < params->buckets; ++i)
334  data.cvec[i] = cvec[i];
335 
336  data.sum = sum;
337  data.squares = squares;
338  data.samples = samples;
339  }
340 
344  void
345  reset(const StorageParams* const storage_params)
346  {
347  const Params *params = safe_cast<const Params *>(storage_params);
348  min_track = params->min;
349  max_track = params->max;
350  bucket_size = params->bucket_size;
351 
352  min_val = CounterLimits::max();
353  max_val = CounterLimits::min();
354  underflow = Counter();
355  overflow = Counter();
356 
357  size_type size = cvec.size();
358  for (off_type i = 0; i < size; ++i)
359  cvec[i] = Counter();
360 
361  sum = Counter();
362  squares = Counter();
363  samples = Counter();
364  }
365 };
366 
398 class HistStor
399 {
400  private:
407 
418 
428  void growUp();
429 
441  void growOut();
442 
455  void growDown();
456 
457  public:
459  struct Params : public DistParams
460  {
463 
464  Params(size_type _buckets)
465  : DistParams(Hist)
466  {
467  fatal_if(_buckets < 2,
468  "There must be at least two buckets in a histogram");
469  buckets = _buckets;
470  }
471  };
472 
473  HistStor(const StorageParams* const storage_params)
474  : cvec(safe_cast<const Params *>(storage_params)->buckets)
475  {
476  reset(storage_params);
477  }
478 
483  void add(HistStor *other);
484 
490  void sample(Counter val, int number);
491 
496  size_type size() const { return cvec.size(); }
497 
502  bool
503  zero() const
504  {
505  return samples == Counter();
506  }
507 
508  void
509  prepare(const StorageParams* const storage_params, DistData &data)
510  {
511  const Params *params = safe_cast<const Params *>(storage_params);
512 
513  assert(params->type == Hist);
514  data.type = params->type;
515  data.min = min_bucket;
516  data.max = max_bucket + bucket_size - 1;
517  data.bucket_size = bucket_size;
518 
519  data.min_val = min_bucket;
520  data.max_val = max_bucket;
521 
522  int buckets = params->buckets;
523  data.cvec.resize(buckets);
524  for (off_type i = 0; i < buckets; ++i)
525  data.cvec[i] = cvec[i];
526 
527  data.sum = sum;
528  data.logs = logs;
529  data.squares = squares;
530  data.samples = samples;
531  }
532 
536  void
537  reset(const StorageParams* const storage_params)
538  {
539  const Params *params = safe_cast<const Params *>(storage_params);
540  min_bucket = 0;
541  max_bucket = params->buckets - 1;
542  bucket_size = 1;
543 
544  size_type size = cvec.size();
545  for (off_type i = 0; i < size; ++i)
546  cvec[i] = Counter();
547 
548  sum = Counter();
549  squares = Counter();
550  samples = Counter();
551  logs = Counter();
552  }
553 };
554 
560 {
561  private:
568 
569  public:
570  struct Params : public DistParams
571  {
573  };
574 
578  SampleStor(const StorageParams* const storage_params)
580  { }
581 
589  void
590  sample(Counter val, int number)
591  {
592  sum += val * number;
593  squares += val * val * number;
594  samples += number;
595  }
596 
601  size_type size() const { return 1; }
602 
607  bool zero() const { return samples == Counter(); }
608 
609  void
610  prepare(const StorageParams* const storage_params, DistData &data)
611  {
612  const Params *params = safe_cast<const Params *>(storage_params);
613 
614  assert(params->type == Deviation);
615  data.type = params->type;
616  data.sum = sum;
617  data.squares = squares;
618  data.samples = samples;
619  }
620 
624  void
625  reset(const StorageParams* const storage_params)
626  {
627  sum = Counter();
628  squares = Counter();
629  samples = Counter();
630  }
631 };
632 
638 {
639  private:
644 
645  public:
646  struct Params : public DistParams
647  {
649  };
650 
654  AvgSampleStor(const StorageParams* const storage_params)
655  : sum(Counter()), squares(Counter())
656  {}
657 
664  void
665  sample(Counter val, int number)
666  {
667  sum += val * number;
668  squares += val * val * number;
669  }
670 
675  size_type size() const { return 1; }
676 
681  bool zero() const { return sum == Counter(); }
682 
683  void
684  prepare(const StorageParams* const storage_params, DistData &data)
685  {
686  const Params *params = safe_cast<const Params *>(storage_params);
687 
688  assert(params->type == Deviation);
689  data.type = params->type;
690  data.sum = sum;
691  data.squares = squares;
692  data.samples = curTick();
693  }
694 
698  void
699  reset(const StorageParams* const storage_params)
700  {
701  sum = Counter();
702  squares = Counter();
703  }
704 };
705 
714 {
715  private:
720 
721  public:
723  struct Params : public DistParams
724  {
726  };
727 
728  SparseHistStor(const StorageParams* const storage_params)
729  {
730  reset(storage_params);
731  }
732 
738  void
739  sample(Counter val, int number)
740  {
741  cmap[val] += number;
742  samples += number;
743  }
744 
749  size_type size() const { return cmap.size(); }
750 
755  bool
756  zero() const
757  {
758  return samples == Counter();
759  }
760 
761  void
762  prepare(const StorageParams* const storage_params, SparseHistData &data)
763  {
764  MCounter::iterator it;
765  data.cmap.clear();
766  for (it = cmap.begin(); it != cmap.end(); it++) {
767  data.cmap[(*it).first] = (*it).second;
768  }
769 
770  data.samples = samples;
771  }
772 
776  void
777  reset(const StorageParams* const storage_params)
778  {
779  cmap.clear();
780  samples = 0;
781  }
782 };
783 
784 } // namespace statistics
785 } // namespace gem5
786 
787 #endif // __BASE_STATS_STORAGE_HH__
gem5::statistics::SampleStor::Params
Definition: storage.hh:570
gem5::curTick
Tick curTick()
The universal simulation clock.
Definition: cur_tick.hh:46
gem5::statistics::DistStor
Templatized storage and interface for a distribution stat.
Definition: storage.hh:232
gem5::statistics::AvgStor::zero
bool zero() const
Definition: storage.hh:193
gem5::statistics::SparseHistStor
Templatized storage and interface for a sparse histogram stat.
Definition: storage.hh:713
gem5::statistics::DistStor::prepare
void prepare(const StorageParams *const storage_params, DistData &data)
Definition: storage.hh:317
gem5::statistics::HistStor::cvec
VCounter cvec
Counter for each bucket.
Definition: storage.hh:417
types.hh
gem5::statistics::SampleStor::sum
Counter sum
The current sum.
Definition: storage.hh:563
gem5::statistics::DistStor::Params::min
Counter min
The minimum value to track.
Definition: storage.hh:264
gem5::statistics::AvgSampleStor
Templatized storage for distribution that calculates per tick mean and variance.
Definition: storage.hh:637
gem5::statistics::AvgStor::dec
void dec(Counter val)
Deccrement the current count by the provided value, calls set.
Definition: storage.hh:171
gem5::statistics::AvgSampleStor::sum
Counter sum
Current total.
Definition: storage.hh:641
gem5::statistics::SampleStor::prepare
void prepare(const StorageParams *const storage_params, DistData &data)
Definition: storage.hh:610
gem5::statistics::Result
double Result
All results are doubles.
Definition: types.hh:55
gem5::statistics::HistStor::sample
void sample(Counter val, int number)
Add a value to the distribution for the given number of times.
Definition: storage.cc:176
gem5::statistics::AvgStor::current
Counter current
The current count.
Definition: storage.hh:130
data
const char data[]
Definition: circlebuf.test.cc:48
gem5::statistics::DistStor::Params::bucket_size
Counter bucket_size
The number of entries in each bucket.
Definition: storage.hh:268
gem5::statistics::SampleStor
Templatized storage and interface for a distribution that calculates mean and variance.
Definition: storage.hh:559
gem5::statistics::AvgSampleStor::size
size_type size() const
Return the number of entries, in this case 1.
Definition: storage.hh:675
gem5::statistics::AvgSampleStor::prepare
void prepare(const StorageParams *const storage_params, DistData &data)
Definition: storage.hh:684
gem5::statistics::HistStor::logs
Counter logs
The sum of logarithm of each sample, used to compute geometric mean.
Definition: storage.hh:411
gem5::statistics::SparseHistStor::sample
void sample(Counter val, int number)
Add a value to the distribution for the given number of times.
Definition: storage.hh:739
gem5::statistics::AvgSampleStor::AvgSampleStor
AvgSampleStor(const StorageParams *const storage_params)
Create and initialize this storage.
Definition: storage.hh:654
gem5::statistics::SampleStor::squares
Counter squares
The sum of squares.
Definition: storage.hh:565
gem5::statistics::AvgSampleStor::Params
Definition: storage.hh:646
gem5::statistics::DistStor::Params::Params
Params(Counter _min, Counter _max, Counter _bucket_size)
Definition: storage.hh:272
gem5::statistics::DistStor::min_val
Counter min_val
The smallest value sampled.
Definition: storage.hh:243
gem5::statistics::DistStor::Params::buckets
size_type buckets
The number of buckets.
Definition: storage.hh:270
gem5::statistics::SparseHistStor::Params::Params
Params()
Definition: storage.hh:725
gem5::statistics::DistStor::zero
bool zero() const
Returns true if any calls to sample have been made.
Definition: storage.hh:311
cur_tick.hh
gem5::statistics::AvgSampleStor::reset
void reset(const StorageParams *const storage_params)
Reset stat value to default.
Definition: storage.hh:699
gem5::statistics::HistStor::size
size_type size() const
Return the number of buckets in this distribution.
Definition: storage.hh:496
gem5::statistics::HistStor::zero
bool zero() const
Returns true if any calls to sample have been made.
Definition: storage.hh:503
gem5::statistics::SparseHistData
Data structure of sparse histogram.
Definition: types.hh:84
gem5::statistics::AvgSampleStor::zero
bool zero() const
Return true if no samples have been added.
Definition: storage.hh:681
gem5::X86ISA::val
Bitfield< 63 > val
Definition: misc.hh:776
cast.hh
gem5::statistics::AvgSampleStor::squares
Counter squares
Current sum of squares.
Definition: storage.hh:643
std::vector< Counter >
gem5::statistics::AvgStor::result
Result result() const
Return the current average.
Definition: storage.hh:184
gem5::statistics::StatStor::value
Counter value() const
Return the value of this stat as its base type.
Definition: storage.hh:95
gem5::statistics::HistStor::bucket_size
Counter bucket_size
The number of entries in each bucket.
Definition: storage.hh:406
gem5::statistics::AvgStor::AvgStor
AvgStor(const StorageParams *const storage_params)
Build and initializes this stat storage.
Definition: storage.hh:144
gem5::statistics::StatStor::data
Counter data
The statistic value.
Definition: storage.hh:60
gem5::statistics::HistStor::sum
Counter sum
The current sum.
Definition: storage.hh:409
gem5::statistics::DistStor::min_track
Counter min_track
The minimum value to track.
Definition: storage.hh:236
gem5::statistics::SampleStor::sample
void sample(Counter val, int number)
Add a value the given number of times to this running average.
Definition: storage.hh:590
gem5::ArmISA::i
Bitfield< 7 > i
Definition: misc_types.hh:67
gem5::statistics::SampleStor::reset
void reset(const StorageParams *const storage_params)
Reset stat value to default.
Definition: storage.hh:625
gem5::statistics::HistStor::Params::Params
Params(size_type _buckets)
Definition: storage.hh:464
gem5::statistics::DistStor::max_track
Counter max_track
The maximum value to track.
Definition: storage.hh:238
gem5::statistics::SparseHistStor::samples
Counter samples
Counter for number of samples.
Definition: storage.hh:717
gem5::statistics::DistStor::cvec
VCounter cvec
Counter for each bucket.
Definition: storage.hh:257
gem5::statistics::HistStor::Params
The parameters for a distribution stat.
Definition: storage.hh:459
gem5::statistics::AvgStor::Params
Definition: storage.hh:139
gem5::statistics::HistStor::max_bucket
Counter max_bucket
Lower bound of the last bucket's range.
Definition: storage.hh:404
gem5::statistics::SampleStor::samples
Counter samples
The number of samples.
Definition: storage.hh:567
gem5::statistics::AvgStor::last
Tick last
The tick that current last changed.
Definition: storage.hh:136
gem5::statistics::StatStor::prepare
void prepare(const StorageParams *const storage_params)
Prepare stat data for dumping or serialization.
Definition: storage.hh:106
gem5::statistics::StatStor::set
void set(Counter val)
The the stat to the given value.
Definition: storage.hh:77
gem5::statistics::Hist
@ Hist
Definition: types.hh:62
gem5::statistics::HistStor::growUp
void growUp()
Given a bucket size B, and a range of values [0, N], this function doubles the bucket size to double ...
Definition: storage.cc:154
gem5::statistics::off_type
unsigned int off_type
Definition: types.hh:60
gem5::statistics::HistStor::prepare
void prepare(const StorageParams *const storage_params, DistData &data)
Definition: storage.hh:509
gem5::VegaISA::t
Bitfield< 51 > t
Definition: pagetable.hh:56
gem5::statistics::StatStor::StatStor
StatStor(const StorageParams *const storage_params)
Builds this storage element and calls the base constructor of the datatype.
Definition: storage.hh:69
gem5::statistics::HistStor::samples
Counter samples
The number of samples.
Definition: storage.hh:415
gem5::statistics::DistStor::sum
Counter sum
The current sum.
Definition: storage.hh:251
gem5::statistics::AvgStor::lastReset
Tick lastReset
The tick of the last reset.
Definition: storage.hh:132
gem5::statistics::DistStor::max_val
Counter max_val
The largest value sampled.
Definition: storage.hh:245
gem5::statistics::HistStor::Params::buckets
size_type buckets
The number of buckets.
Definition: storage.hh:462
gem5::statistics::AvgStor::reset
void reset(const StorageParams *const storage_params)
Reset stat value to default.
Definition: storage.hh:209
gem5::Tick
uint64_t Tick
Tick count type.
Definition: types.hh:58
gem5::statistics::StatStor::reset
void reset(const StorageParams *const storage_params)
Reset stat value to default.
Definition: storage.hh:111
gem5::statistics::StatStor::zero
bool zero() const
Definition: storage.hh:116
gem5::statistics::Deviation
@ Deviation
Definition: types.hh:62
gem5::statistics::AvgSampleStor::sample
void sample(Counter val, int number)
Add a value to the distribution for the given number of times.
Definition: storage.hh:665
gem5::statistics::DistStor::overflow
Counter overflow
The number of values sampled more than max.
Definition: storage.hh:249
gem5::statistics::StatStor::Params
Definition: storage.hh:63
gem5::statistics::StatStor::dec
void dec(Counter val)
Decrement the stat by the given value.
Definition: storage.hh:89
gem5::statistics::SampleStor::size
size_type size() const
Return the number of entries in this stat, 1.
Definition: storage.hh:601
gem5::statistics::StatStor::result
Result result() const
Return the value of this stat as a result type.
Definition: storage.hh:101
compiler.hh
gem5::statistics::HistStor::HistStor
HistStor(const StorageParams *const storage_params)
Definition: storage.hh:473
gem5::statistics::DistStor::sample
void sample(Counter val, int number)
Add a value to the distribution for the given number of times.
Definition: storage.cc:53
gem5::statistics::HistStor::growDown
void growDown()
Given a bucket size B, and a range of values [0, N], this function doubles the bucket size to double ...
Definition: storage.cc:115
gem5::statistics::size_type
unsigned int size_type
Definition: types.hh:59
gem5::statistics::SparseHistStor::zero
bool zero() const
Returns true if any calls to sample have been made.
Definition: storage.hh:756
gem5::statistics::SparseHistStor::prepare
void prepare(const StorageParams *const storage_params, SparseHistData &data)
Definition: storage.hh:762
gem5::statistics::DistStor::squares
Counter squares
The sum of squares.
Definition: storage.hh:253
gem5::statistics::DistStor::underflow
Counter underflow
The number of values sampled less than min.
Definition: storage.hh:247
gem5::statistics::MCounter
std::map< Counter, int > MCounter
map of counters
Definition: types.hh:50
gem5::statistics::AvgStor::total
Result total
The total count for all tick.
Definition: storage.hh:134
warn_if
#define warn_if(cond,...)
Conditional warning macro that checks the supplied condition and only prints a warning if the conditi...
Definition: logging.hh:283
gem5::statistics::DistStor::DistStor
DistStor(const StorageParams *const storage_params)
Definition: storage.hh:287
gem5::statistics::AvgStor::inc
void inc(Counter val)
Increment the current count by the provided value, calls set.
Definition: storage.hh:165
gem5::safe_cast
T safe_cast(U &&ref_or_ptr)
Definition: cast.hh:74
gem5::statistics::AvgSampleStor::Params::Params
Params()
Definition: storage.hh:648
gem5::statistics::StorageParams
Definition: storage.hh:48
gem5::statistics::SparseHistStor::reset
void reset(const StorageParams *const storage_params)
Reset stat value to default.
Definition: storage.hh:777
gem5::statistics::DistData
General container for distribution data.
Definition: types.hh:65
gem5::statistics::DistParams::DistParams
DistParams(DistType t)
Definition: storage.hh:222
gem5::statistics::StatStor::inc
void inc(Counter val)
Increment the stat by the given value.
Definition: storage.hh:83
gem5::statistics::SparseHistStor::SparseHistStor
SparseHistStor(const StorageParams *const storage_params)
Definition: storage.hh:728
gem5::statistics::HistStor::reset
void reset(const StorageParams *const storage_params)
Reset stat value to default.
Definition: storage.hh:537
gem5::statistics::SparseHistStor::Params
The parameters for a sparse histogram stat.
Definition: storage.hh:723
gem5::statistics::HistStor::min_bucket
Counter min_bucket
Lower bound of the first bucket's range.
Definition: storage.hh:402
gem5::statistics::Counter
double Counter
All counters are of 64-bit values.
Definition: types.hh:46
gem5::statistics::HistStor::squares
Counter squares
The sum of squares.
Definition: storage.hh:413
logging.hh
gem5::statistics::HistStor
Templatized storage and interface for a histogram stat.
Definition: storage.hh:398
gem5::statistics::Dist
@ Dist
Definition: types.hh:62
gem5::statistics::SparseHistStor::size
size_type size() const
Return the number of buckets in this distribution.
Definition: storage.hh:749
gem5::statistics::StatStor
Templatized storage and interface for a simple scalar stat.
Definition: storage.hh:56
gem5::statistics::DistType
DistType
Definition: types.hh:62
gem5::statistics::SampleStor::SampleStor
SampleStor(const StorageParams *const storage_params)
Create and initialize this storage.
Definition: storage.hh:578
gem5::statistics::DistStor::bucket_size
Counter bucket_size
The number of entries in each bucket.
Definition: storage.hh:240
fatal_if
#define fatal_if(cond,...)
Conditional fatal macro that checks the supplied condition and only causes a fatal error if the condi...
Definition: logging.hh:236
gem5::statistics::DistParams::type
const DistType type
Definition: storage.hh:221
gem5::statistics::AvgStor::value
Counter value() const
Return the current count.
Definition: storage.hh:177
gem5
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Definition: gpu_translation_state.hh:37
gem5::statistics::DistStor::Params
The parameters for a distribution stat.
Definition: storage.hh:261
gem5::statistics::SampleStor::Params::Params
Params()
Definition: storage.hh:572
gem5::statistics::AvgStor::prepare
void prepare(const StorageParams *const storage_params)
Prepare stat data for dumping or serialization.
Definition: storage.hh:199
gem5::statistics::DistStor::size
size_type size() const
Return the number of buckets in this distribution.
Definition: storage.hh:304
gem5::statistics::StorageParams::~StorageParams
virtual ~StorageParams()=default
gem5::statistics::AvgStor::set
void set(Counter val)
Set the current count to the one provided, update the total and last set values.
Definition: storage.hh:154
gem5::statistics::HistStor::growOut
void growOut()
Given a bucket size B, and a range of values [M, N], where M < 0, this function doubles the bucket si...
Definition: storage.cc:76
gem5::statistics::DistStor::Params::max
Counter max
The maximum value to track.
Definition: storage.hh:266
gem5::statistics::DistParams
The parameters for a distribution stat.
Definition: storage.hh:219
gem5::statistics::SparseHistStor::cmap
MCounter cmap
Counter for each bucket.
Definition: storage.hh:719
gem5::statistics::HistStor::add
void add(HistStor *other)
Adds the contents of the given storage to this storage.
Definition: storage.cc:209
gem5::statistics::SampleStor::zero
bool zero() const
Return true if no samples have been added.
Definition: storage.hh:607
gem5::statistics::DistStor::reset
void reset(const StorageParams *const storage_params)
Reset stat value to default.
Definition: storage.hh:345
gem5::statistics::DistStor::samples
Counter samples
The number of samples.
Definition: storage.hh:255
gem5::statistics::AvgStor
Templatized storage and interface to a per-tick average stat.
Definition: storage.hh:126

Generated on Sun Jul 30 2023 01:56:51 for gem5 by doxygen 1.8.17