diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2018-05-18 16:54:14 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2018-05-22 11:04:04 +0000 |
commit | 9e4fca7562b0cda2616adb4c1649460f87a3bf8f (patch) | |
tree | 3b0576e476bcd54c2e4b8a5f5daa4fd15f054de1 | |
parent | baa68e95a6c0f4df1ab04aa7cecefe95d360c691 (diff) |
Don't look for ELF files in /dev
It would be very strange to find any there, but device files are indeed
sometimes mmap'd.
Change-Id: I78799b435512c4dae085c7e0afdf889d17758e0d
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
-rw-r--r-- | app/perfsymboltable.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/perfsymboltable.cpp b/app/perfsymboltable.cpp index 644e947..c5b3c6b 100644 --- a/app/perfsymboltable.cpp +++ b/app/perfsymboltable.cpp @@ -294,7 +294,8 @@ void PerfSymbolTable::registerElf(const PerfRecordMmap &mmap, const QByteArray & { QLatin1String filePath(mmap.filename()); // special regions, such as [heap], [vdso], [stack], ... as well as //anon - const bool isSpecialRegion = (mmap.filename().startsWith('[') && mmap.filename().endsWith(']')) + const bool isSpecialRegion = (filePath.startsWith('[') && filePath.endsWith(']')) + || filePath.startsWith(QLatin1String("/dev/")) || filePath == QLatin1String("//anon") || filePath == QLatin1String("/SYSV00000000 (deleted)"); const auto fileName = QFileInfo(filePath).fileName(); |