diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2021-09-24 23:01:00 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2021-09-27 11:36:01 +0200 |
commit | 26c40d37922b48b7f28953e4ab3049bafb97917d (patch) | |
tree | f3256d6659ee47a211ac0c50b998bae806d34ecd /include/comphelper | |
parent | 89f162abb25168afe942247b77454e45145f1ab8 (diff) |
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@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'include/comphelper')
-rw-r--r-- | include/comphelper/traceevent.hxx | 2 |
1 files changed, 1 insertions, 1 deletions
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) { } |