gem5 [DEVELOP-FOR-25.1]
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
73std::list<Info *> &statsList();
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
130Text::begin(const std::string &message)
131{
132 if (message.empty()) {
134 "\n---------- Begin Simulation Statistics ----------\n");
135 } else {
137 "\n---------- Begin Simulation Statistics : %s ----------\n",
138 message);
139 }
140}
141
142void
144{
145 ccprintf(*stream, "\n---------- End Simulation Statistics ----------\n");
146 stream->flush();
147}
148
149std::string
150Text::statName(const std::string &name) const
151{
152 if (path.empty())
153 return name;
154 else
155 return csprintf("%s.%s", path.top(), name);
156}
157
158void
160{
161 if (path.empty()) {
162 path.push(name);
163 } else {
164 path.push(csprintf("%s.%s", path.top(), name));
165 }
166}
167
168void
170{
171 assert(!path.empty());
172 path.pop();
173}
174
175bool
177{
178 if (!info.flags.isSet(display))
179 return true;
180
181 if (info.prereq && info.prereq->zero())
182 return true;
183
184 return false;
185}
186
187std::string
188ValueToString(Result value, int precision)
189{
190 std::stringstream val;
191
192 if (!std::isnan(value)) {
193 if (precision != -1)
194 val.precision(precision);
195 else if (value == rint(value))
196 val.precision(0);
197
198 val.unsetf(std::ios::showpoint);
199 val.setf(std::ios::fixed);
200 val << value;
201 } else {
202 val << "nan";
203 }
204
205 return val.str();
206}
207
209{
210 std::string name;
214 std::string desc;
216 std::string unitStr;
217 bool spaces;
218
219 BasePrint(bool _spaces=false) : spaces(_spaces) {}
220
221 void
222 setup(std::string _name, Flags _flags, int _precision,
223 bool enable_descriptions, std::string _desc,
224 bool enable_units, std::string unit_str,
225 bool enable_spaces)
226 {
227 name = _name;
228 flags = _flags;
229 precision = _precision;
230 descriptions = enable_descriptions;
231 desc = _desc;
232 enableUnits = enable_units;
233 unitStr = unit_str;
234 spaces = enable_spaces;
235 }
236
237 void
238 printUnits(std::ostream &stream) const
239 {
240 if (enableUnits && !unitStr.empty()) {
241 ccprintf(stream, " (%s)", unitStr);
242 }
243 }
244};
245
246struct ScalarPrint : public BasePrint
247{
255
258 {
259 if (spaces) {
260 nameSpaces = 40;
261 valueSpaces = 12;
262 pdfstrSpaces = 10;
263 cdfstrSpaces = 10;
264 } else {
265 nameSpaces = 0;
266 valueSpaces = 0;
267 pdfstrSpaces = 0;
268 cdfstrSpaces = 0;
269 }
270 }
272 void operator()(std::ostream &stream, bool oneLine = false) const;
273};
274
275void
277{
278 value = val;
279 if (total) {
280 pdf = val / total;
281 cdf += pdf;
282 }
283}
284
285void
286ScalarPrint::operator()(std::ostream &stream, bool oneLine) const
287{
288 if ((flags.isSet(nozero) && (!oneLine) && value == 0.0) ||
289 (flags.isSet(nonan) && std::isnan(value)))
290 return;
291
292 std::stringstream pdfstr, cdfstr;
293
294 if (!std::isnan(pdf))
295 ccprintf(pdfstr, "%.2f%%", pdf * 100.0);
296
297 if (!std::isnan(cdf))
298 ccprintf(cdfstr, "%.2f%%", cdf * 100.0);
299
300 if (oneLine) {
301 ccprintf(stream, " |");
302 } else {
303 ccprintf(stream, "%-*s ", nameSpaces, name);
304 }
306 if (spaces || pdfstr.rdbuf()->in_avail())
307 ccprintf(stream, " %*s", pdfstrSpaces, pdfstr.str());
308 if (spaces || cdfstr.rdbuf()->in_avail())
309 ccprintf(stream, " %*s", cdfstrSpaces, cdfstr.str());
310 if (!oneLine) {
311 if (descriptions) {
312 if (!desc.empty())
313 ccprintf(stream, " # %s", desc);
314 }
315 printUnits(stream);
316 stream << std::endl;
317 }
318}
319
320struct VectorPrint : public BasePrint
321{
322 std::string separatorString;
329
330 VectorPrint() = delete;
333 {
334 if (spaces) {
335 nameSpaces = 40;
336 } else {
337 nameSpaces = 0;
338 }
339 }
340 void operator()(std::ostream &stream) const;
341};
342
343void
344VectorPrint::operator()(std::ostream &stream) const
345{
346 size_type _size = vec.size();
347 Result _total = 0.0;
348
349 if (flags.isSet(pdf | cdf)) {
350 for (off_type i = 0; i < _size; ++i) {
351 _total += vec[i];
352 }
353 }
354
355 std::string base = name + separatorString;
356
357 ScalarPrint print(spaces);
359 unitStr, spaces);
360 print.pdf = _total ? 0.0 : Nan;
361 print.cdf = _total ? 0.0 : Nan;
362
363 bool havesub = !subnames.empty();
364
365 if (_size == 1) {
366 // If forceSubnames is set, get the first subname (or index in
367 // the case where there are no subnames) and append it to the
368 // base name.
369 if (forceSubnames)
370 print.name = base + (havesub ? subnames[0] : std::to_string(0));
371 print.value = vec[0];
372 print(stream);
373 return;
374 }
375
376 if ((!flags.isSet(nozero)) || (total != 0)) {
377 if (flags.isSet(oneline)) {
378 ccprintf(stream, "%-*s", nameSpaces, name);
379 print.flags = print.flags & (~nozero);
380 }
381
382 for (off_type i = 0; i < _size; ++i) {
383 if (havesub && (i >= subnames.size() || subnames[i].empty()))
384 continue;
385
386 print.name = base + (havesub ? subnames[i] : std::to_string(i));
387 print.desc = subdescs.empty() ? desc : subdescs[i];
388 print.unitStr = unitStr;
389
390 print.update(vec[i], _total);
391 print(stream, flags.isSet(oneline));
392 }
393
394 if (flags.isSet(oneline)) {
395 if (descriptions) {
396 if (!desc.empty())
397 ccprintf(stream, " # %s", desc);
398 }
399 printUnits(stream);
400 stream << std::endl;
401 }
402 }
403
404 if (flags.isSet(statistics::total)) {
405 print.pdf = Nan;
406 print.cdf = Nan;
407 print.name = base + "total";
408 print.desc = desc;
409 print.unitStr = unitStr;
410 print.value = total;
411 print(stream);
412 }
413}
414
415struct DistPrint : public BasePrint
416{
417 std::string separatorString;
419
421
422 DistPrint(const Text *text, const DistInfo &info);
423 DistPrint(const Text *text, const VectorDistInfo &info, int i);
424 void init(const Text *text, const Info &info);
425 void operator()(std::ostream &stream) const;
426};
427
428DistPrint::DistPrint(const Text *text, const DistInfo &info)
429 : data(info.data)
430{
431 init(text, info);
432}
433
434DistPrint::DistPrint(const Text *text, const VectorDistInfo &info,
435 int i) : data(info.data[i])
436{
437 init(text, info);
438
439 name = text->statName(
440 info.name + "_" +
441 (info.subnames[i].empty() ? (std::to_string(i)) : info.subnames[i]));
442
443 if (!info.subdescs[i].empty())
444 desc = info.subdescs[i];
445
446 unitStr = info.unit->getUnitString();
447}
448
449void
450DistPrint::init(const Text *text, const Info &info)
451{
452 setup(text->statName(info.name), info.flags, info.precision,
453 text->descriptions, info.desc, text->enableUnits,
454 info.unit->getUnitString(), text->spaces);
456 if (spaces) {
457 nameSpaces = 40;
458 } else {
459 nameSpaces = 0;
460 }
461}
462
463void
464DistPrint::operator()(std::ostream &stream) const
465{
466 if (flags.isSet(nozero) && data.samples == 0) return;
467 std::string base = name + separatorString;
468
469 ScalarPrint print(spaces);
470 print.precision = precision;
471 print.flags = flags;
473 print.desc = desc;
474 print.enableUnits = enableUnits;
475 print.unitStr = unitStr;
476 print.pdf = Nan;
477 print.cdf = Nan;
478
479 if (flags.isSet(oneline)) {
480 print.name = base + "bucket_size";
481 print.value = data.bucket_size;
482 print(stream);
483
484 print.name = base + "min_bucket";
485 print.value = data.min;
486 print(stream);
487
488 print.name = base + "max_bucket";
489 print.value = data.max;
490 print(stream);
491 }
492
493 print.name = base + "samples";
494 print.value = data.samples;
495 print(stream);
496
497 print.name = base + "mean";
498 print.value = data.samples ? data.sum / data.samples : Nan;
499 print(stream);
500
501 if (data.type == Hist) {
502 print.name = base + "gmean";
503 print.value = data.samples ? exp(data.logs / data.samples) : Nan;
504 print(stream);
505 }
506
507 Result stdev = Nan;
508 if (data.samples) {
509 if (data.samples * (data.samples - 1.0) != 0.0) {
510 stdev = sqrt((data.samples * data.squares - data.sum * data.sum) /
511 (data.samples * (data.samples - 1.0)));
512 }
513 }
514 print.name = base + "stdev";
515 print.value = stdev;
516 print(stream);
517
518 if (data.type == Deviation)
519 return;
520
521 size_t size = data.cvec.size();
522
523 Result total = 0.0;
524 if (data.type == Dist && data.underflow != Nan)
525 total += data.underflow;
526 for (off_type i = 0; i < size; ++i)
527 total += data.cvec[i];
528 if (data.type == Dist && data.overflow != Nan)
529 total += data.overflow;
530
531 if (total) {
532 print.pdf = 0.0;
533 print.cdf = 0.0;
534 }
535
536 if (data.type == Dist && data.underflow != Nan) {
537 print.name = base + "underflows";
538 print.update(data.underflow, total);
539 print(stream);
540 }
541
542 if (flags.isSet(oneline)) {
543 ccprintf(stream, "%-*s", nameSpaces, name);
544 }
545
546 for (off_type i = 0; i < size; ++i) {
547 std::stringstream namestr;
548 namestr << base;
549
550 Counter low = i * data.bucket_size + data.min;
551 Counter high = std::min(low + data.bucket_size - 1.0, data.max);
552 namestr << low;
553 if (low < high)
554 namestr << "-" << high;
555
556 print.name = namestr.str();
557 print.update(data.cvec[i], total);
558 print(stream, flags.isSet(oneline));
559 }
560
561 if (flags.isSet(oneline)) {
562 if (descriptions) {
563 if (!desc.empty())
564 ccprintf(stream, " # %s", desc);
565 }
566 printUnits(stream);
567 stream << std::endl;
568 }
569
570 if (data.type == Dist && data.overflow != Nan) {
571 print.name = base + "overflows";
572 print.update(data.overflow, total);
573 print(stream);
574 }
575
576 print.pdf = Nan;
577 print.cdf = Nan;
578
579 if (data.type == Dist && data.min_val != Nan) {
580 print.name = base + "min_value";
581 print.value = data.min_val;
582 print(stream);
583 }
584
585 if (data.type == Dist && data.max_val != Nan) {
586 print.name = base + "max_value";
587 print.value = data.max_val;
588 print(stream);
589 }
590
591 print.name = base + "total";
592 print.value = total;
593 print(stream);
594}
595
596void
598{
599 if (noOutput(info))
600 return;
601
602 ScalarPrint print(spaces);
603 print.setup(statName(info.name), info.flags, info.precision, descriptions,
604 info.desc, enableUnits, info.unit->getUnitString(), spaces);
605 print.value = info.result();
606 print.pdf = Nan;
607 print.cdf = Nan;
608
609 print(*stream);
610}
611
612void
614{
615 if (noOutput(info))
616 return;
617
618 size_type size = info.size();
619 VectorPrint print(spaces);
620 print.setup(statName(info.name), info.flags, info.precision, descriptions,
621 info.desc, enableUnits, info.unit->getUnitString(), spaces);
622 print.separatorString = info.separatorString;
623 print.vec = info.result();
624 print.total = info.total();
625 print.forceSubnames = false;
626
627 if (!info.subnames.empty()) {
628 for (off_type i = 0; i < size; ++i) {
629 if (!info.subnames[i].empty()) {
630 print.subnames = info.subnames;
631 print.subnames.resize(size);
632 for (off_type i = 0; i < size; ++i) {
633 if (!info.subnames[i].empty() &&
634 !info.subdescs[i].empty()) {
635 print.subdescs = info.subdescs;
636 print.subdescs.resize(size);
637 break;
638 }
639 }
640 break;
641 }
642 }
643 }
644
645 print(*stream);
646}
647
648void
650{
651 if (noOutput(info))
652 return;
653
654 bool havesub = false;
655 VectorPrint print(spaces);
656 if (!info.y_subnames.empty()) {
657 for (off_type i = 0; i < info.y; ++i) {
658 if (!info.y_subnames[i].empty()) {
659 print.subnames = info.y_subnames;
660 break;
661 }
662 }
663 }
664 print.flags = info.flags;
665 print.separatorString = info.separatorString;
667 print.enableUnits = enableUnits;
668 print.precision = info.precision;
669 print.forceSubnames = true;
670
671 if (!info.subnames.empty()) {
672 for (off_type i = 0; i < info.x; ++i)
673 if (!info.subnames[i].empty())
674 havesub = true;
675 }
676
677 VResult tot_vec(info.y);
678 for (off_type i = 0; i < info.x; ++i) {
679 if (havesub && (i >= info.subnames.size() || info.subnames[i].empty()))
680 continue;
681
682 off_type iy = i * info.y;
683 VResult yvec(info.y);
684
685 Result total = 0.0;
686 for (off_type j = 0; j < info.y; ++j) {
687 yvec[j] = info.cvec[iy + j];
688 tot_vec[j] += yvec[j];
689 total += yvec[j];
690 }
691
692 print.name = statName(
693 info.name + "_" +
694 (havesub ? info.subnames[i] : std::to_string(i)));
695 print.desc = info.desc;
696 print.unitStr = info.unit->getUnitString();
697 print.vec = yvec;
698 print.total = total;
699 print(*stream);
700 }
701
702 // Create a subname for printing the total
703 std::vector<std::string> total_subname;
704 total_subname.push_back("total");
705
706 if (info.flags.isSet(statistics::total) && (info.x > 1)) {
707 print.name = statName(info.name);
708 print.subnames = total_subname;
709 print.desc = info.desc;
710 print.unitStr = info.unit->getUnitString();
711 print.vec = VResult(1, info.total());
712 print.flags = print.flags & ~total;
713 print(*stream);
714 }
715}
716
717void
719{
720 if (noOutput(info))
721 return;
722
723 DistPrint print(this, info);
724 print(*stream);
725}
726
727void
729{
730 if (noOutput(info))
731 return;
732
733 for (off_type i = 0; i < info.size(); ++i) {
734 DistPrint print(this, info, i);
735 print(*stream);
736 }
737}
738
739void
741{
742 visit((const VectorInfo &)info);
743}
744
745/*
746 This struct implements the output methods for the sparse
747 histogram stat
748*/
750{
751 std::string separatorString;
752
754
755 SparseHistPrint(const Text *text, const SparseHistInfo &info);
756 void init(const Text *text, const Info &info);
757 void operator()(std::ostream &stream) const;
758};
759
760/* Call initialization function */
762 : data(info.data)
763{
764 init(text, info);
765}
766
767/* Initialization function */
768void
769SparseHistPrint::init(const Text *text, const Info &info)
770{
771 setup(text->statName(info.name), info.flags, info.precision,
772 text->descriptions, info.desc, text->enableUnits,
773 info.unit->getUnitString(), text->spaces);
775}
776
777/* Grab data from map and write to output stream */
778void
779SparseHistPrint::operator()(std::ostream &stream) const
780{
781 std::string base = name + separatorString;
782
783 ScalarPrint print(spaces);
784 print.setup(base + "samples", flags, precision, descriptions, desc,
786 print.pdf = Nan;
787 print.cdf = Nan;
788 print.value = data.samples;
789 print(stream);
790
791 MCounter::const_iterator it;
792 for (it = data.cmap.begin(); it != data.cmap.end(); it++) {
793 std::stringstream namestr;
794 namestr << base;
795
796 namestr <<(*it).first;
797 print.name = namestr.str();
798 print.value = (*it).second;
799 print(stream);
800 }
801}
802
803void
805{
806 if (noOutput(info))
807 return;
808
809 SparseHistPrint print(this, info);
810 print(*stream);
811}
812
813Output *
814initText(const std::string &filename, bool desc, bool spaces)
815{
816 static Text text;
817 static bool connected = false;
818
819 if (!connected) {
820 text.open(*simout.findOrCreate(filename)->stream());
821 text.descriptions = desc;
822 text.enableUnits = desc; // the units are printed if descs are
823 text.spaces = spaces;
824 connected = true;
825 }
826
827 return &text;
828}
829
830} // namespace statistics
831} // namespace gem5
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:176
std::string statName(const std::string &name) const
Definition text.cc:150
void beginGroup(const char *name) override
Definition text.cc:159
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:143
void open(std::ostream &stream)
Definition text.cc:100
void begin(const std::string &message="") override
Definition text.cc:130
void endGroup() override
Definition text.cc:169
void visit(const ScalarInfo &info) override
Definition text.cc:597
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 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:220
#define fatal(...)
This implements a cprintf based fatal() function.
Definition logging.hh:232
Bitfield< 7 > i
Definition misc_types.hh:67
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:188
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
gem5::Flags< FlagsType > Flags
Definition info.hh:50
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:814
Copyright (c) 2024 Arm Limited 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:219
void printUnits(std::ostream &stream) const
Definition text.cc:238
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:222
General container for distribution data.
Definition types.hh:66
void operator()(std::ostream &stream) const
Definition text.cc:464
std::string separatorString
Definition text.cc:417
const DistData & data
Definition text.cc:420
void init(const Text *text, const Info &info)
Definition text.cc:450
DistPrint(const Text *text, const DistInfo &info)
Definition text.cc:428
void operator()(std::ostream &stream, bool oneLine=false) const
Definition text.cc:286
void update(Result val, Result total)
Definition text.cc:276
Data structure of sparse histogram.
Definition types.hh:85
const SparseHistData & data
Definition text.cc:753
void init(const Text *text, const Info &info)
Definition text.cc:769
void operator()(std::ostream &stream) const
Definition text.cc:779
SparseHistPrint(const Text *text, const SparseHistInfo &info)
Definition text.cc:761
void operator()(std::ostream &stream) const
Definition text.cc:344
std::string separatorString
Definition text.cc:322
std::vector< std::string > subdescs
Definition text.cc:324
std::vector< std::string > subnames
Definition text.cc:323
const std::string & name()
Definition trace.cc:48

Generated on Mon Oct 27 2025 04:13:00 for gem5 by doxygen 1.14.0