summaryrefslogtreecommitdiff
path: root/include/comphelper
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2021-04-29 11:07:18 +0300
committerTor Lillqvist <tml@collabora.com>2021-04-29 11:26:52 +0200
commit7e8960caa8b49c75e4f1d21ebffe2378359fee69 (patch)
tree6c5903cc6812bd1437344452ed39939af63d4da5 /include/comphelper
parentd0550d1c5d0e27b8fe9d93e2c7a6dc7ffc4f8c21 (diff)
Add SAL_WARN in case ProfileZones are overlapping and not hierarchical
Change-Id: Id09904db762b6d931ab23cce16e55d5213079516 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114834 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'include/comphelper')
-rw-r--r--include/comphelper/profilezone.hxx14
1 files changed, 11 insertions, 3 deletions
diff --git a/include/comphelper/profilezone.hxx b/include/comphelper/profilezone.hxx
index 40e2ee97e502..8eda2d773ac0 100644
--- a/include/comphelper/profilezone.hxx
+++ b/include/comphelper/profilezone.hxx
@@ -12,6 +12,8 @@
#include <sal/config.h>
+#include <sal/log.hxx>
+
#include <comphelper/traceevent.hxx>
// implementation of XToolkitExperimental profiling API
@@ -70,10 +72,16 @@ public:
if (m_nCreateTime > 0)
{
s_nNesting--;
- assert(m_nNesting == s_nNesting);
- if (s_bRecording)
- addRecording();
+ if (m_nNesting != s_nNesting)
+ {
+ SAL_WARN("comphelper.traceevent", "Incorrect ProfileZone nesting for " << m_sName);
+ }
+ else
+ {
+ if (s_bRecording)
+ addRecording();
+ }
if (m_bConsole)
stopConsole();