diff options
author | Tor Lillqvist <tml@collabora.com> | 2021-04-27 13:32:19 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2021-04-28 16:32:28 +0200 |
commit | 969ddb6899b453194001e6743cc4d8003d5b050a (patch) | |
tree | 5813cf0745778c0b5ec69101baa3e855b0af27d8 /comphelper | |
parent | d57ac8ff9c0b4ec8706d1d64c4a0ee9eb23de66c (diff) |
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/+/114735
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'comphelper')
-rw-r--r-- | comphelper/source/misc/traceevent.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/comphelper/source/misc/traceevent.cxx b/comphelper/source/misc/traceevent.cxx index 325ba59b131d..2cd2db829169 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; } |