summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilian Wolff <milian.wolff@kdab.com>2020-06-13 13:34:37 +0200
committerMilian Wolff <milian.wolff@kdab.com>2020-06-15 08:28:45 +0000
commit32be1f61f86f48280658adf7e3ca9d00be4b9a60 (patch)
tree01c00991f7666e2f1141a7968f0f4b5e02a944e9
parent9cdf95c8c81b7a1422da52099e8fb9544090fc5a (diff)
Don't try to open perf.map file when it doesn't exist
Removes a lot of open() syscalls that are bound to fail anyways. Change-Id: I1b1d6d574dd5148922630aa84b8996b6b9d55af7 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
-rw-r--r--app/perfsymboltable.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/perfsymboltable.cpp b/app/perfsymboltable.cpp
index bedee81..f82f4f2 100644
--- a/app/perfsymboltable.cpp
+++ b/app/perfsymboltable.cpp
@@ -1061,6 +1061,9 @@ QByteArray PerfSymbolTable::symbolFromPerfMap(quint64 ip, GElf_Off *offset) cons
void PerfSymbolTable::updatePerfMap()
{
+ if (!m_perfMapFile.exists())
+ return;
+
if (!m_perfMapFile.isOpen())
m_perfMapFile.open(QIODevice::ReadOnly);