gem5 v24.0.0.0
Loading...
Searching...
No Matches
text.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2019-2020 Arm Limited
3 * All rights reserved.
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software
9 * licensed hereunder. You may use the software subject to the license
10 * terms below provided that you ensure that this notice is replicated
11 * unmodified and in its entirety in all distributions of the software,
12 * modified or unmodified, in source code or in binary form.
13 *
14 * Copyright (c) 2004-2005 The Regents of The University of Michigan
15 * All rights reserved.
16 *
17 * Redistribution and use in source and binary forms, with or without
18 * modification, are permitted provided that the following conditions are
19 * met: redistributions of source code must retain the above copyright
20 * notice, this list of conditions and the following disclaimer;
21 * redistributions in binary form must reproduce the above copyright
22 * notice, this list of conditions and the following disclaimer in the
23 * documentation and/or other materials provided with the distribution;
24 * neither the name of the copyright holders nor the names of its
25 * contributors may be used to endorse or promote products derived from
26 * this software without specific prior written permission.
27 *
28 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
31 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
32 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
33 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
34 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
35 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
36 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
37 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
38 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39 */
40
41#if defined(__APPLE__)
42#define _GLIBCPP_USE_C99 1
43#endif
44
45#include "base/stats/text.hh"
46
47#include <cassert>
48#include <cmath>
49#include <fstream>
50#include <iostream>
51#include <limits>
52#include <sstream>
53#include <string>
54
55#include "base/cast.hh"
56#include "base/logging.hh"
57#include "base/stats/info.hh"
58#include "base/str.hh"
59
60namespace gem5
61{
62
63namespace
64{
65
66constexpr auto Nan = std::numeric_limits<float>::quiet_NaN();
67
68} // anonymous namespace
69
70namespace statistics
71{
72
74
76 : mystream(false), stream(NULL), descriptions(false), spaces(false)
77{
78}
79
80Text::Text(std::ostream &stream) : Text()
81{
82 open(stream);
83}
84
85Text::Text(const std::string &file) : Text()
86{
87 open(file);
88}
89
90
92{
93 if (mystream) {
94 assert(stream);
95 delete stream;
96 }
97}
98
99void
100Text::open(std::ostream &_stream)
101{
102 if (stream)
103 panic("stream already set!");
104
105 mystream = false;
106 stream = &_stream;
107 if (!valid())
108 fatal("Unable to open output stream for writing\n");
109}
110
111void
112Text::open(const std::string &file)
113{
114 if (stream)
115 panic("stream already set!");
116
117 mystream = true;
118 stream = new std::ofstream(file.c_str(), std::ios::trunc);
119 if (!valid())
120 fatal("Unable to open statistics file for writing\n");
121}
122
123bool
125{
126 return stream != NULL && stream->good();
127}
128
129void
131{
132 ccprintf(*stream, "\n---------- Begin Simulation Statistics ----------\n");
133}
134
135void
137{
138 ccprintf(*stream, "\n---------- End Simulation Statistics ----------\n");
139 stream->flush();
140}
141
142std::string
143Text::statName(const std::string &name) const
144{
145 if (path.empty())
146 return name;
147 else
148 return csprintf("%s.%s", path.top(), name);
149}
150
151void
153{
154 if (path.empty()) {
155 path.push(name);
156 } else {
157 path.push(csprintf("%s.%s", path.top(), name));
158 }
159}
160
161void
163{
164 assert(!path.empty());
165 path.pop();
166}
167
168bool
170{
171 if (!info.flags.isSet(display))
172 return true;
173
174 if (info.prereq && info.prereq->zero())
175 return true;
176
177 return false;
178}
179
180std::string
181ValueToString(Result value, int precision)
182{
183 std::stringstream val;
184
185 if (!std::isnan(value)) {
186 if (precision != -1)
187 val.precision(precision);
188 else if (value == rint(value))
189 val.precision(0);
190
191 val.unsetf(std::ios::showpoint);
192 val.setf(std::ios::fixed);
193 val << value;
194 } else {
195 val << "nan";
196 }
197
198 return val.str();
199}
200
202{
203 std::string name;
207 std::string desc;
209 std::string unitStr;
210 bool spaces;
211
212 BasePrint(bool _spaces=false) : spaces(_spaces) {}
213
214 void
215 setup(std::string _name, Flags _flags, int _precision,
216 bool enable_descriptions, std::string _desc,
217 bool enable_units, std::string unit_str,
218 bool enable_spaces)
219 {
220 name = _name;
221 flags = _flags;
222 precision = _precision;
223 descriptions = enable_descriptions;
224 desc = _desc;
225 enableUnits = enable_units;
226 unitStr = unit_str;
227 spaces = enable_spaces;
228 }
229
230 void
231 printUnits(std::ostream &stream) const
232 {
233 if (enableUnits && !unitStr.empty()) {
234 ccprintf(stream, " (%s)", unitStr);
235 }
236 }
237};
238
239struct ScalarPrint : public BasePrint
240{
248
251 {
252 if (spaces) {
253 nameSpaces = 40;
254 valueSpaces = 12;
255 pdfstrSpaces = 10;
256 cdfstrSpaces = 10;
257 } else {
258 nameSpaces = 0;
259 valueSpaces = 0;
260 pdfstrSpaces = 0;
261 cdfstrSpaces = 0;
262 }
263 }
265 void operator()(std::ostream &stream, bool oneLine = false) const;
266};
267
268void
270{
271 value = val;
272 if (total) {
273 pdf = val / total;
274 cdf += pdf;
275 }
276}
277
278void
279ScalarPrint::operator()(std::ostream &stream, bool oneLine) const
280{
281 if ((flags.isSet(nozero) && (!oneLine) && value == 0.0) ||
283 return;
284
285 std::stringstream pdfstr, cdfstr;
286
287 if (!std::isnan(pdf))
288 ccprintf(pdfstr, "%.2f%%", pdf * 100.0);
289
290 if (!std::isnan(cdf))
291 ccprintf(cdfstr, "%.2f%%", cdf * 100.0);
292
293 if (oneLine) {
294 ccprintf(stream, " |");
295 } else {
296 ccprintf(stream, "%-*s ", nameSpaces, name);
297 }
299 if (spaces || pdfstr.rdbuf()->in_avail())
300 ccprintf(stream, " %*s", pdfstrSpaces, pdfstr.str());
301 if (spaces || cdfstr.rdbuf()->in_avail())
302 ccprintf(stream, " %*s", cdfstrSpaces, cdfstr.str());
303 if (!oneLine) {
304 if (descriptions) {
305 if (!desc.empty())
306 ccprintf(stream, " # %s", desc);
307 }
308 printUnits(stream);
309 stream << std::endl;
310 }
311}
312
313struct VectorPrint : public BasePrint
314{
315 std::string separatorString;
322
323 VectorPrint() = delete;
326 {
327 if (spaces) {
328 nameSpaces = 40;
329 } else {
330 nameSpaces = 0;
331 }
332 }
333 void operator()(std::ostream &stream) const;
334};
335
336void
337VectorPrint::operator()(std::ostream &stream) const
338{
339 size_type _size = vec.size();
340 Result _total = 0.0;
341
342 if (flags.isSet(pdf | cdf)) {
343 for (off_type i = 0; i < _size; ++i) {
344 _total += vec[i];
345 }
346 }
347
348 std::string base = name + separatorString;
349
350 ScalarPrint print(spaces);
352 unitStr, spaces);
353 print.pdf = _total ? 0.0 : Nan;
354 print.cdf = _total ? 0.0 : Nan;
355
356 bool havesub = !subnames.empty();
357
358 if (_size == 1) {
359 // If forceSubnames is set, get the first subname (or index in
360 // the case where there are no subnames) and append it to the
361 // base name.
362 if (forceSubnames)
363 print.name = base + (havesub ? subnames[0] : std::to_string(0));
364 print.value = vec[0];
365 print(stream);
366 return;
367 }
368
369 if ((!flags.isSet(nozero)) || (total != 0)) {
370 if (flags.isSet(oneline)) {
371 ccprintf(stream, "%-*s", nameSpaces, name);
372 print.flags = print.flags & (~nozero);
373 }
374
375 for (off_type i = 0; i < _size; ++i) {
376 if (havesub && (i >= subnames.size() || subnames[i].empty()))
377 continue;
378
379 print.name = base + (havesub ? subnames[i] : std::to_string(i));
380 print.desc = subdescs.empty() ? desc : subdescs[i];
381 print.unitStr = unitStr;
382
383 print.update(vec[i], _total);
384 print(stream, flags.isSet(oneline));
385 }
386
387 if (flags.isSet(oneline)) {
388 if (descriptions) {
389 if (!desc.empty())
390 ccprintf(stream, " # %s", desc);
391 }
392 printUnits(stream);
393 stream << std::endl;
394 }
395 }
396
398 print.pdf = Nan;
399 print.cdf = Nan;
400 print.name = base + "total";
401 print.desc = desc;
402 print.unitStr = unitStr;
403 print.value = total;
404 print(stream);
405 }
406}
407
408struct DistPrint : public BasePrint
409{
410 std::string separatorString;
412
414
415 DistPrint(const Text *text, const DistInfo &info);
416 DistPrint(const Text *text, const VectorDistInfo &info, int i);
417 void init(const Text *text, const Info &info);
418 void operator()(std::ostream &stream) const;
419};
420
421DistPrint::DistPrint(const Text *text, const DistInfo &info)
422 : data(info.data)
423{
424 init(text, info);
425}
426
427DistPrint::DistPrint(const Text *text, const VectorDistInfo &info,
428 int i) : data(info.data[i])
429{
430 init(text, info);
431
432 name = text->statName(
433 info.name + "_" +
434 (info.subnames[i].empty() ? (std::to_string(i)) : info.subnames[i]));
435
436 if (!info.subdescs[i].empty())
437 desc = info.subdescs[i];
438
439 unitStr = info.unit->getUnitString();
440}
441
442void
443DistPrint::init(const Text *text, const Info &info)
444{
445 setup(text->statName(info.name), info.flags, info.precision,
446 text->descriptions, info.desc, text->enableUnits,
447 info.unit->getUnitString(), text->spaces);
449 if (spaces) {
450 nameSpaces = 40;
451 } else {
452 nameSpaces = 0;
453 }
454}
455
456void
457DistPrint::operator()(std::ostream &stream) const
458{
459 if (flags.isSet(nozero) && data.samples == 0) return;
460 std::string base = name + separatorString;
461
462 ScalarPrint print(spaces);
463 print.precision = precision;
464 print.flags = flags;
466 print.desc = desc;
467 print.enableUnits = enableUnits;
468 print.unitStr = unitStr;
469 print.pdf = Nan;
470 print.cdf = Nan;
471
472 if (flags.isSet(oneline)) {
473 print.name = base + "bucket_size";
474 print.value = data.bucket_size;
475 print(stream);
476
477 print.name = base + "min_bucket";
478 print.value = data.min;
479 print(stream);
480
481 print.name = base + "max_bucket";
482 print.value = data.max;
483 print(stream);
484 }
485
486 print.name = base + "samples";
487 print.value = data.samples;
488 print(stream);
489
490 print.name = base + "mean";
491 print.value = data.samples ? data.sum / data.samples : Nan;
492 print(stream);
493
494 if (data.type == Hist) {
495 print.name = base + "gmean";
496 print.value = data.samples ? exp(data.logs / data.samples) : Nan;
497 print(stream);
498 }
499
500 Result stdev = Nan;
501 if (data.samples)
502 stdev = sqrt((data.samples * data.squares - data.sum * data.sum) /
503 (data.samples * (data.samples - 1.0)));
504 print.name = base + "stdev";
505 print.value = stdev;
506 print(stream);
507
508 if (data.type == Deviation)
509 return;
510
511 size_t size = data.cvec.size();
512
513 Result total = 0.0;
514 if (data.type == Dist && data.underflow != Nan)
516 for (off_type i = 0; i < size; ++i)
517 total += data.cvec[i];
518 if (data.type == Dist && data.overflow != Nan)
520
521 if (total) {
522 print.pdf = 0.0;
523 print.cdf = 0.0;
524 }
525
526 if (data.type == Dist && data.underflow != Nan) {
527 print.name = base + "underflows";
528 print.update(data.underflow, total);
529 print(stream);
530 }
531
532 if (flags.isSet(oneline)) {
533 ccprintf(stream, "%-*s", nameSpaces, name);
534 }
535
536 for (off_type i = 0; i < size; ++i) {
537 std::stringstream namestr;
538 namestr << base;
539
540 Counter low = i * data.bucket_size + data.min;
541 Counter high = std::min(low + data.bucket_size - 1.0, data.max);
542 namestr << low;
543 if (low < high)
544 namestr << "-" << high;
545
546 print.name = namestr.str();
547 print.update(data.cvec[i], total);
548 print(stream, flags.isSet(oneline));
549 }
550
551 if (flags.isSet(oneline)) {
552 if (descriptions) {
553 if (!desc.empty())
554 ccprintf(stream, " # %s", desc);
555 }
556 printUnits(stream);
557 stream << std::endl;
558 }
559
560 if (data.type == Dist && data.overflow != Nan) {
561 print.name = base + "overflows";
562 print.update(data.overflow, total);
563 print(stream);
564 }
565
566 print.pdf = Nan;
567 print.cdf = Nan;
568
569 if (data.type == Dist && data.min_val != Nan) {
570 print.name = base + "min_value";
571 print.value = data.min_val;
572 print(stream);
573 }
574
575 if (data.type == Dist && data.max_val != Nan) {
576 print.name = base + "max_value";
577 print.value = data.max_val;
578 print(stream);
579 }
580
581 print.name = base + "total";
582 print.value = total;
583 print(stream);
584}
585
586void
588{
589 if (noOutput(info))
590 return;
591
592 ScalarPrint print(spaces);
593 print.setup(statName(info.name), info.flags, info.precision, descriptions,
594 info.desc, enableUnits, info.unit->getUnitString(), spaces);
595 print.value = info.result();
596 print.pdf = Nan;
597 print.cdf = Nan;
598
599 print(*stream);
600}
601
602void
604{
605 if (noOutput(info))
606 return;
607
608 size_type size = info.size();
609 VectorPrint print(spaces);
610 print.setup(statName(info.name), info.flags, info.precision, descriptions,
611 info.desc, enableUnits, info.unit->getUnitString(), spaces);
612 print.separatorString = info.separatorString;
613 print.vec = info.result();
614 print.total = info.total();
615 print.forceSubnames = false;
616
617 if (!info.subnames.empty()) {
618 for (off_type i = 0; i < size; ++i) {
619 if (!info.subnames[i].empty()) {
620 print.subnames = info.subnames;
621 print.subnames.resize(size);
622 for (off_type i = 0; i < size; ++i) {
623 if (!info.subnames[i].empty() &&
624 !info.subdescs[i].empty()) {
625 print.subdescs = info.subdescs;
626 print.subdescs.resize(size);
627 break;
628 }
629 }
630 break;
631 }
632 }
633 }
634
635 print(*stream);
636}
637
638void
640{
641 if (noOutput(info))
642 return;
643
644 bool havesub = false;
645 VectorPrint print(spaces);
646 if (!info.y_subnames.empty()) {
647 for (off_type i = 0; i < info.y; ++i) {
648 if (!info.y_subnames[i].empty()) {
649 print.subnames = info.y_subnames;
650 break;
651 }
652 }
653 }
654 print.flags = info.flags;
655 print.separatorString = info.separatorString;
657 print.enableUnits = enableUnits;
658 print.precision = info.precision;
659 print.forceSubnames = true;
660
661 if (!info.subnames.empty()) {
662 for (off_type i = 0; i < info.x; ++i)
663 if (!info.subnames[i].empty())
664 havesub = true;
665 }
666
667 VResult tot_vec(info.y);
668 for (off_type i = 0; i < info.x; ++i) {
669 if (havesub && (i >= info.subnames.size() || info.subnames[i].empty()))
670 continue;
671
672 off_type iy = i * info.y;
673 VResult yvec(info.y);
674
675 Result total = 0.0;
676 for (off_type j = 0; j < info.y; ++j) {
677 yvec[j] = info.cvec[iy + j];
678 tot_vec[j] += yvec[j];
679 total += yvec[j];
680 }
681
682 print.name = statName(
683 info.name + "_" +
684 (havesub ? info.subnames[i] : std::to_string(i)));
685 print.desc = info.desc;
686 print.unitStr = info.unit->getUnitString();
687 print.vec = yvec;
688 print.total = total;
689 print(*stream);
690 }
691
692 // Create a subname for printing the total
693 std::vector<std::string> total_subname;
694 total_subname.push_back("total");
695
696 if (info.flags.isSet(statistics::total) && (info.x > 1)) {
697 print.name = statName(info.name);
698 print.subnames = total_subname;
699 print.desc = info.desc;
700 print.unitStr = info.unit->getUnitString();
701 print.vec = VResult(1, info.total());
702 print.flags = print.flags & ~total;
703 print(*stream);
704 }
705}
706
707void
709{
710 if (noOutput(info))
711 return;
712
713 DistPrint print(this, info);
714 print(*stream);
715}
716
717void
719{
720 if (noOutput(info))
721 return;
722
723 for (off_type i = 0; i < info.size(); ++i) {
724 DistPrint print(this, info, i);
725 print(*stream);
726 }
727}
728
729void
731{
732 visit((const VectorInfo &)info);
733}
734
735/*
736 This struct implements the output methods for the sparse
737 histogram stat
738*/
740{
741 std::string separatorString;
742
744
745 SparseHistPrint(const Text *text, const SparseHistInfo &info);
746 void init(const Text *text, const Info &info);
747 void operator()(std::ostream &stream) const;
748};
749
750/* Call initialization function */
752 : data(info.data)
753{
754 init(text, info);
755}
756
757/* Initialization function */
758void
759SparseHistPrint::init(const Text *text, const Info &info)
760{
761 setup(text->statName(info.name), info.flags, info.precision,
762 text->descriptions, info.desc, text->enableUnits,
763 info.unit->getUnitString(), text->spaces);
765}
766
767/* Grab data from map and write to output stream */
768void
769SparseHistPrint::operator()(std::ostream &stream) const
770{
771 std::string base = name + separatorString;
772
773 ScalarPrint print(spaces);
774 print.setup(base + "samples", flags, precision, descriptions, desc,
776 print.pdf = Nan;
777 print.cdf = Nan;
778 print.value = data.samples;
779 print(stream);
780
781 MCounter::const_iterator it;
782 for (it = data.cmap.begin(); it != data.cmap.end(); it++) {
783 std::stringstream namestr;
784 namestr << base;
785
786 namestr <<(*it).first;
787 print.name = namestr.str();
788 print.value = (*it).second;
789 print(stream);
790 }
791}
792
793void
795{
796 if (noOutput(info))
797 return;
798
799 SparseHistPrint print(this, info);
800 print(*stream);
801}
802
803Output *
804initText(const std::string &filename, bool desc, bool spaces)
805{
806 static Text text;
807 static bool connected = false;
808
809 if (!connected) {
810 text.open(*simout.findOrCreate(filename)->stream());
811 text.descriptions = desc;
812 text.enableUnits = desc; // the units are printed if descs are
813 text.spaces = spaces;
814 connected = true;
815 }
816
817 return &text;
818}
819
820} // namespace statistics
821} // namespace gem5
const char data[]
OutputStream * findOrCreate(const std::string &name, bool binary=false)
Definition output.cc:262
std::ostream * stream() const
Get the output underlying output stream.
Definition output.hh:62
Flags flags
The formatting flags.
Definition info.hh:91
const units::Base * unit
The unit of the stat.
Definition info.hh:87
std::string name
The name of the stat.
Definition info.hh:83
std::string desc
The description of the stat.
Definition info.hh:89
virtual bool zero() const =0
static std::string separatorString
The separator string used for vectors, dist, etc.
Definition info.hh:85
int precision
The display precision.
Definition info.hh:93
const Info * prereq
A pointer to a prerequisite Stat.
Definition info.hh:95
virtual Result result() const =0
bool noOutput(const Info &info)
Definition text.cc:169
std::string statName(const std::string &name) const
Definition text.cc:143
void beginGroup(const char *name) override
Definition text.cc:152
std::ostream * stream
Definition text.hh:63
std::stack< std::string > path
Definition text.hh:66
bool valid() const override
Definition text.cc:124
void end() override
Definition text.cc:136
void open(std::ostream &stream)
Definition text.cc:100
void begin() override
Definition text.cc:130
void endGroup() override
Definition text.cc:162
void visit(const ScalarInfo &info) override
Definition text.cc:587
std::vector< std::string > y_subnames
Definition info.hh:231
std::vector< std::string > subnames
Names and descriptions of subfields.
Definition info.hh:229
VCounter cvec
Local storage for the entry values, used for printing.
Definition info.hh:237
virtual Result total() const =0
virtual size_type size() const =0
std::vector< std::string > subdescs
Definition info.hh:214
std::vector< std::string > subnames
Names and descriptions of subfields.
Definition info.hh:213
virtual const VResult & result() const =0
virtual Result total() const =0
virtual size_type size() const =0
std::vector< std::string > subdescs
Definition info.hh:188
std::vector< std::string > subnames
Names and descriptions of subfields.
Definition info.hh:187
virtual std::string getUnitString() const =0
STL list class.
Definition stl.hh:51
STL vector class.
Definition stl.hh:37
bool isSet(Type mask) const
Verifies whether any bit matching the given mask is set.
Definition flags.hh:83
#define panic(...)
This implements a cprintf based panic() function.
Definition logging.hh:188
#define fatal(...)
This implements a cprintf based fatal() function.
Definition logging.hh:200
Bitfield< 7 > i
Definition misc_types.hh:67
Bitfield< 51, 12 > base
Definition pagetable.hh:141
Bitfield< 63 > val
Definition misc.hh:804
unsigned int size_type
Definition types.hh:59
const FlagsType init
This Stat is Initialized.
Definition info.hh:55
std::vector< Result > VResult
vector of results.
Definition types.hh:57
const FlagsType pdf
Print the percent of the total that this entry represents.
Definition info.hh:61
const FlagsType nonan
Don't print if this is NAN.
Definition info.hh:69
std::string ValueToString(Result value, int precision)
Definition text.cc:181
const FlagsType oneline
Print all values on a single line.
Definition info.hh:71
const FlagsType nozero
Don't print if this is zero.
Definition info.hh:67
const FlagsType total
Print the total.
Definition info.hh:59
double Counter
All counters are of 64-bit values.
Definition types.hh:46
unsigned int off_type
Definition types.hh:60
const FlagsType display
Print this stat.
Definition info.hh:57
const FlagsType cdf
Print the cumulative percentage of total upto this entry.
Definition info.hh:63
std::list< Info * > & statsList()
Definition statistics.cc:61
double Result
All results are doubles.
Definition types.hh:55
Output * initText(const std::string &filename, bool desc, bool spaces)
Definition text.cc:804
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
Definition binary32.hh:36
OutputDirectory simout
Definition output.cc:62
std::string csprintf(const char *format, const Args &...args)
Definition cprintf.hh:161
void ccprintf(cp::Print &print)
Definition cprintf.hh:130
constexpr bool isnan(gem5::AMDGPU::fp16_e5m10_info a)
Definition fp16_e5m10.hh:83
BasePrint(bool _spaces=false)
Definition text.cc:212
void printUnits(std::ostream &stream) const
Definition text.cc:231
void setup(std::string _name, Flags _flags, int _precision, bool enable_descriptions, std::string _desc, bool enable_units, std::string unit_str, bool enable_spaces)
Definition text.cc:215
General container for distribution data.
Definition types.hh:66
void operator()(std::ostream &stream) const
Definition text.cc:457
std::string separatorString
Definition text.cc:410
const DistData & data
Definition text.cc:413
void init(const Text *text, const Info &info)
Definition text.cc:443
DistPrint(const Text *text, const DistInfo &info)
Definition text.cc:421
void operator()(std::ostream &stream, bool oneLine=false) const
Definition text.cc:279
void update(Result val, Result total)
Definition text.cc:269
Data structure of sparse histogram.
Definition types.hh:85
const SparseHistData & data
Definition text.cc:743
void init(const Text *text, const Info &info)
Definition text.cc:759
void operator()(std::ostream &stream) const
Definition text.cc:769
SparseHistPrint(const Text *text, const SparseHistInfo &info)
Definition text.cc:751
void operator()(std::ostream &stream) const
Definition text.cc:337
std::string separatorString
Definition text.cc:315
std::vector< std::string > subdescs
Definition text.cc:317
std::vector< std::string > subnames
Definition text.cc:316
const std::string & name()
Definition trace.cc:48

Generated on Tue Jun 18 2024 16:24:01 for gem5 by doxygen 1.11.0