website: Bug fixes for the stats-api page.
* Updated the example code for Stats::Group macros so the Constructor
name matches the struct name, and the base class is initialized.
* Fixed the table formatting for the Stats Flags documentation.
Change-Id: If3f5f1132243b598f4286845085b6c9899cd2b06
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5-website/+/41793
Reviewed-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: Bobby R. Bruce <bbruce@ucdavis.edu>
diff --git a/_pages/documentation/general_docs/statistics/stats-api.md b/_pages/documentation/general_docs/statistics/stats-api.md
index 12d469b..b9f86bc 100644
--- a/_pages/documentation/general_docs/statistics/stats-api.md
+++ b/_pages/documentation/general_docs/statistics/stats-api.md
@@ -54,8 +54,9 @@
Stats::Scalar scalar0;
Stats::Scalar scalar1;
- Group()
- : ADD_STAT(scalar0, "Description of scalar0"), // equivalent to scalar0(this, "scalar0", "Description of scalar0"), where scalar0 has the follwing constructor
+ MyStats(Stats::Group *parent)
+ : Stats::Group(parent),
+ ADD_STAT(scalar0, "Description of scalar0"), // equivalent to scalar0(this, "scalar0", "Description of scalar0"), where scalar0 has the follwing constructor
// Stats::Scalar(Group *parent = nullptr, const char *name = nullptr, const char *desc = nullptr)
scalar1(this, "scalar1", "Description of scalar1")
{
@@ -131,6 +132,7 @@
---
## Stats Flags
+
| Flags | Descriptions |
|------------------|----------------------------------------------------------------|
| `Stats::none` | Nothing extra to print. |