Richard Cooper has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/50427 )

Change subject: scons: Re-enable TRACING_ON flag
......................................................................

scons: Re-enable TRACING_ON flag

The TRACING_ON flag was removed in a previous commit [1], but is still
used by the _check_tracing() function in main.py. This breaks gem5
simulations when debug flags are enabled.

This patch re-enables the TRACING_ON flag.

[1] https://gem5-review.googlesource.com/c/public/gem5/+/48379

Change-Id: I90ed8a46938fa2748b96c1b378329a4ba1ef047e
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50427
Reviewed-by: Jason Lowe-Power <[email protected]>
Maintainer: Jason Lowe-Power <[email protected]>
Tested-by: kokoro <[email protected]>
---
M src/python/m5/main.py
M src/python/pybind11/core.cc
2 files changed, 4 insertions(+), 2 deletions(-)

Approvals:
  Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass




diff --git a/src/python/m5/main.py b/src/python/m5/main.py
index a4af295..92878af 100644
--- a/src/python/m5/main.py
+++ b/src/python/m5/main.py
@@ -205,9 +205,9 @@


 def _check_tracing():
-    from . import defines
+    import _m5.core

-    if defines.TRACING_ON:
+    if _m5.core.TRACING_ON:
         return

     fatal("Tracing is not enabled.  Compile with TRACING_ON")
diff --git a/src/python/pybind11/core.cc b/src/python/pybind11/core.cc
index 965160f..6fe2efd 100644
--- a/src/python/pybind11/core.cc
+++ b/src/python/pybind11/core.cc
@@ -289,6 +289,8 @@
     m_core.attr("compileDate") = py::cast(compileDate);
     m_core.attr("gem5Version") = py::cast(gem5Version);

+    m_core.attr("TRACING_ON") = py::cast(TRACING_ON);
+
     m_core.attr("MaxTick") = py::cast(MaxTick);

     /*

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/50427
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: I90ed8a46938fa2748b96c1b378329a4ba1ef047e
Gerrit-Change-Number: 50427
Gerrit-PatchSet: 2
Gerrit-Owner: Richard Cooper <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Richard Cooper <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to