From 1394bfba870a38d7d4edbd3c387b5e87182bc90f Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Thu, 17 Jun 2021 10:05:54 +0300 Subject: Drop the "console" functionality of ProfileZone It was not used anywhere and had not been cherry-picked to the relevant vendor production branches so apparently it was just some temporary experimentation? It is good to reduce complexity and increase code similarity between branches. Change-Id: Ib6717063f96d901d65ec36d65f3683af31065f2b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117364 Tested-by: Jenkins Reviewed-by: Tor Lillqvist --- include/comphelper/profilezone.hxx | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) (limited to 'include/comphelper') diff --git a/include/comphelper/profilezone.hxx b/include/comphelper/profilezone.hxx index 08e6a8b031e8..772a1b6f51be 100644 --- a/include/comphelper/profilezone.hxx +++ b/include/comphelper/profilezone.hxx @@ -25,18 +25,15 @@ class COMPHELPER_DLLPUBLIC ProfileZone : public NamedEvent static int s_nNesting; // level of nested zones. long long m_nCreateTime; - bool m_bConsole; - void stopConsole(); int m_nNesting; void addRecording(); - ProfileZone(const char* sName, const OUString& sArgs, bool bConsole) + ProfileZone(const char* sName, const OUString& sArgs) : NamedEvent(sName, sArgs) - , m_bConsole(bConsole) , m_nNesting(-1) { - if (s_bRecording || m_bConsole) + if (s_bRecording) { TimeValue systemTime; osl_getSystemTime(&systemTime); @@ -56,22 +53,14 @@ public: * Note that the char pointer is stored as such in the ProfileZone object and used in the * destructor, so be sure to pass a pointer that stays valid for the duration of the object's * lifetime. - * - * The second parameter can be used for ad-hoc local measuring by adding a single line of code - * at a C++ scope start. Example: - * - * comphelper::ProfileZone aZone("RtfFilter::filter", true); - * - * Similar to the DEBUG macro in sal/log.hxx, don't forget to remove these lines before - * committing. */ - ProfileZone(const char* sName, const std::map& aArgs, bool bConsole = false) - : ProfileZone(sName, createArgsString(aArgs), bConsole) + ProfileZone(const char* sName, const std::map& aArgs) + : ProfileZone(sName, createArgsString(aArgs)) { } - ProfileZone(const char* sName, bool bConsole = false) - : ProfileZone(sName, OUString(), bConsole) + ProfileZone(const char* sName) + : ProfileZone(sName, OUString()) { } @@ -90,9 +79,6 @@ public: if (s_bRecording) addRecording(); } - - if (m_bConsole) - stopConsole(); } } -- cgit