base: Cleanup debug flags API
authorAndreas Sandberg <andreas.sandberg@arm.com>
Fri, 4 Sep 2020 15:01:24 +0000 (16:01 +0100)
committerAndreas Sandberg <andreas.sandberg@arm.com>
Mon, 7 Sep 2020 08:42:07 +0000 (08:42 +0000)
commit93ccc23b4ac40b92f4f7c310c17d798e686dcd71
tree4ecd8db0ea7f78da8cffb1eee36ac9cd95c9cbbc
parent15a37b7dc5f3c2ba53c625d6536b756744578cfe
base: Cleanup debug flags API

The debug flags API has a couple of quirks that should be cleaned
up. Specifically:

 * Only CompoundFlag should expose a list of children.
 * The global enable flag is just called "active", this isn't very
   descriptive.
 * Only SimpleFlag exposed a status member. This should be in the base
   class to make the API symmetric.
 * Flag::Sync() is an implementation detail and needs to be protected.

Change-Id: I4d7fd32c80891191aa04f0bd0c334c8cf8d372f5
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34118
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/base/debug.cc
src/base/debug.hh
src/base/trace.cc
src/python/m5/debug.py
src/python/pybind11/debug.cc