summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2021-04-27 14:02:43 +0300
committerTor Lillqvist <tml@collabora.com>2021-04-29 14:13:27 +0200
commit576082417393d8be35aea998a13fd3f79551db1c (patch)
treebdf95690841ea01bf963c016b6dd4463b62c6515
parent7afd3d08093371e797506c6b75223d0c2bead352 (diff)
Enable turning on trace event recording in a dbgutil build with an env var
Change-Id: Ie0efdd2d5da0a45ba5e82be455d36dc777b5efb9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114782 Tested-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
-rw-r--r--comphelper/source/misc/traceevent.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/comphelper/source/misc/traceevent.cxx b/comphelper/source/misc/traceevent.cxx
index 30bc3d51e2d8..d95cb1fd9067 100644
--- a/comphelper/source/misc/traceevent.cxx
+++ b/comphelper/source/misc/traceevent.cxx
@@ -22,8 +22,11 @@
namespace comphelper
{
+#ifdef DBG_UTIL
+std::atomic<bool> TraceEvent::s_bRecording = (getenv("TRACE_EVENT_RECORDING") != nullptr);
+#else
std::atomic<bool> TraceEvent::s_bRecording = false;
-
+#endif
int ProfileZone::s_nNesting = 0;
namespace