summaryrefslogtreecommitdiffstats
path: root/comphelper
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2021-04-27 13:32:19 +0300
committerTor Lillqvist <tml@collabora.com>2021-04-29 14:12:53 +0200
commit7afd3d08093371e797506c6b75223d0c2bead352 (patch)
tree9345f378677b2a8424d2519682bb4734ff017df2 /comphelper
parentMove some static functions from ProfileZone to TraceEvent where they belong (diff)
downloadcore-7afd3d08093371e797506c6b75223d0c2bead352.tar.gz
core-7afd3d08093371e797506c6b75223d0c2bead352.zip
Re-think what the nesting means in ProfileZones
The "Complete" type of Trace Events should be properly nested. Use the nesting counter to verify that. Add a nesting level indication to the ProfileZone object. Assert that it is used properly. Change-Id: I3a1f0e55ea6054dab9baf8550097446f07b0fbf3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114781 Tested-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/source/misc/traceevent.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/comphelper/source/misc/traceevent.cxx b/comphelper/source/misc/traceevent.cxx
index 59191884374c..30bc3d51e2d8 100644
--- a/comphelper/source/misc/traceevent.cxx
+++ b/comphelper/source/misc/traceevent.cxx
@@ -24,7 +24,7 @@ namespace comphelper
{
std::atomic<bool> TraceEvent::s_bRecording = false;
-int TraceEvent::s_nNesting = 0; // level of overlapped zones
+int ProfileZone::s_nNesting = 0;
namespace
{
@@ -70,7 +70,6 @@ void TraceEvent::addInstantEvent(const char* sProfileId)
void TraceEvent::startRecording()
{
::osl::MutexGuard aGuard(g_aMutex);
- s_nNesting = 0;
s_bRecording = true;
}