Gabe Black has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/29408 )

Change subject: sim: Remove the "Event" debug flag and mechanism.
......................................................................

sim: Remove the "Event" debug flag and mechanism.

Tracing everything that happens to every event would be an overwhelming
amount of information and so would probably not be useful. If the event
scheduler needs to be debugged, that would be much better done with a
specialized unit test than trying to wade through enormous logs trying
to find what happened.

By removing this trace facility, we can also break a circular dependency
between header files and remove the awkward eventq.hh and eventq_impl.hh
pair. That arrangement can lead to very non-obvious bugs if the wrong
header was included because whether some functions are and/or are
expected to be inline depends on which you use.

Change-Id: Ie254053197da9b651909b2a48882dfd3572ac326
---
M src/sim/SConscript
M src/sim/eventq.cc
M src/sim/eventq.hh
M src/sim/eventq_impl.hh
4 files changed, 0 insertions(+), 33 deletions(-)



diff --git a/src/sim/SConscript b/src/sim/SConscript
index bf8cbf5..768b11e 100644
--- a/src/sim/SConscript
+++ b/src/sim/SConscript
@@ -103,7 +103,6 @@
 DebugFlag('Config')
 DebugFlag('CxxConfig')
 DebugFlag('Drain')
-DebugFlag('Event')
 DebugFlag('Fault')
 DebugFlag('Flow')
 DebugFlag('IPI')
diff --git a/src/sim/eventq.cc b/src/sim/eventq.cc
index 25131b3..4447ac9 100644
--- a/src/sim/eventq.cc
+++ b/src/sim/eventq.cc
@@ -216,8 +216,6 @@
     if (!event->squashed()) {
         // forward current cycle to the time when this event occurs.
         setCurTick(event->when());
-        if (DTRACE(Event))
-            event->trace("executed");
         event->process();
         if (event->isExitEvent()) {
             assert(!event->flags.isSet(Event::Managed) ||
@@ -373,22 +371,6 @@
     return "generic";
 }

-void
-Event::trace(const char *action)
-{
-    // This DPRINTF is unconditional because calls to this function
-    // are protected by an 'if (DTRACE(Event))' in the inlined Event
-    // methods.
-    //
-    // This is just a default implementation for derived classes where
-    // it's not worth doing anything special.  If you want to put a
-    // more informative message in the trace, override this method on
-    // the particular subclass where you have the information that
-    // needs to be printed.
-    DPRINTF_UNCONDITIONAL(Event, "%s %s %s @ %d\n",
-            description(), instanceString(), action, when());
-}
-
 const std::string
 Event::instanceString() const
 {
diff --git a/src/sim/eventq.hh b/src/sim/eventq.hh
index 2976e11..2a93029 100644
--- a/src/sim/eventq.hh
+++ b/src/sim/eventq.hh
@@ -46,7 +46,6 @@

 #include "base/flags.hh"
 #include "base/types.hh"
-#include "debug/Event.hh"
 #include "sim/serialize.hh"

 class EventQueue;       // forward declaration
@@ -281,9 +280,6 @@
         flags.clear(PublicWrite);
     }

-    // This function isn't really useful if TRACING_ON is not defined
-    virtual void trace(const char *action);     //!< trace event activity
-
     /// Return the instance number as a string.
     const std::string instanceString() const;

diff --git a/src/sim/eventq_impl.hh b/src/sim/eventq_impl.hh
index 39bf00b..a23f7df 100644
--- a/src/sim/eventq_impl.hh
+++ b/src/sim/eventq_impl.hh
@@ -31,7 +31,6 @@
 #ifndef __SIM_EVENTQ_IMPL_HH__
 #define __SIM_EVENTQ_IMPL_HH__

-#include "base/trace.hh"
 #include "sim/eventq.hh"

 inline void
@@ -56,9 +55,6 @@
     }
     event->flags.set(Event::Scheduled);
     event->acquire();
-
-    if (DTRACE(Event))
-        event->trace("scheduled");
 }

 inline void
@@ -73,9 +69,6 @@
     event->flags.clear(Event::Squashed);
     event->flags.clear(Event::Scheduled);

-    if (DTRACE(Event))
-        event->trace("descheduled");
-
     event->release();
 }

@@ -97,9 +90,6 @@
     insert(event);
     event->flags.clear(Event::Squashed);
     event->flags.set(Event::Scheduled);
-
-    if (DTRACE(Event))
-        event->trace("rescheduled");
 }

 #endif // __SIM_EVENTQ_IMPL_HH__

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/29408
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Ie254053197da9b651909b2a48882dfd3572ac326
Gerrit-Change-Number: 29408
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black <gabebl...@google.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to