base,sim: Move DTRACE into base/debug.hh.
authorGabe Black <gabeblack@google.com>
Mon, 25 May 2020 23:24:42 +0000 (16:24 -0700)
committerGabe Black <gabeblack@google.com>
Wed, 3 Jun 2020 22:32:45 +0000 (22:32 +0000)
commitd64173549b23ecd3fc3c9468f63bf55971d9e769
tree5d2e2823e7898d7fb306668357c9c17244a914dd
parent89f2d5eb54a6617c493c6ad68f85b93b3381b6f0
base,sim: Move DTRACE into base/debug.hh.

All other considerations aside, DTRACE probably fits best in trace.hh
where it is now, but unfortunately that creates an awkward dependence
between that file and eventq.hh and eventq_impl.hh. DTRACE only depends
on flags in the Debug namespace and a universal macro TRACING_ON, so
even though it won't be alongside the things it's most logically
associated with, it will be alongside all of its dependencies.

An alternative would be to re-implement DTRACE in eventq_impl.hh which
wouldn't be too big of a problem because it's so simple, but it's
cleaner and less error prone to still keep a single definition.

Because base/trace.hh includes base/debug.hh, any consumers expecting to
find DTRACE in base/trace.hh will still get that definition, even though
it's no longer direct.

Change-Id: I0dac83295891630686c3a8038eb54138cf40ab44
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29411
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
src/base/debug.hh
src/base/trace.hh
src/sim/eventq_impl.hh