[Libreoffice-commits] core.git: include/comphelper

Luboš Luňák (via logerrit) logerrit at kemper.freedesktop.org
Mon Sep 27 09:36:34 UTC 2021


 include/comphelper/traceevent.hxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 26c40d37922b48b7f28953e4ab3049bafb97917d
Author:     Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Fri Sep 24 23:01:00 2021 +0200
Commit:     Luboš Luňák <l.lunak at collabora.com>
CommitDate: Mon Sep 27 11:36:01 2021 +0200

    do not call osl_getProcessInfo() for ProfileZone if not recording
    
    This call actually shows up as 6% for me when CPU profiling
    CallbackFlushHandler. And I assume ProfileZone is not designed
    for switching pid's or starting recording in the middle of profile
    zones, so this should be fine.
    
    Change-Id: Ibfa0ccd2d89a80c3e62d6f3c99c036df8508b44a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122677
    Reviewed-by: Tor Lillqvist <tml at collabora.com>
    Tested-by: Jenkins

diff --git a/include/comphelper/traceevent.hxx b/include/comphelper/traceevent.hxx
index 044d1686b35e..0bf4428b73ac 100644
--- a/include/comphelper/traceevent.hxx
+++ b/include/comphelper/traceevent.hxx
@@ -86,7 +86,7 @@ protected:
     const OUString m_sArgs;
 
     TraceEvent(const OUString& sArgs)
-        : m_nPid(getPid())
+        : m_nPid(s_bRecording ? getPid() : 1)
         , m_sArgs(sArgs)
     {
     }


More information about the Libreoffice-commits mailing list