summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2017-04-05 17:10:38 +0200
committerUlf Hermann <ulf.hermann@qt.io>2017-04-05 17:10:38 +0200
commiteeb50e07bb3d6705c1053eab1c02be0a1f7ec866 (patch)
treef98256783f81ed213f1eda289bf0ff0cf022b906
parentd15660f48b531c6f2ef3004b60990ed2c8ab0212 (diff)
parentf147dde52f8bc6157fe10fe43fed6b2e406c6854 (diff)
Merge remote-tracking branch 'origin/4.3'
Conflicts: app/perfsymboltable.cpp Change-Id: I66e3a8aa490628246a507769daa32d69ec7b4bd3
-rw-r--r--app/perfsymboltable.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/app/perfsymboltable.cpp b/app/perfsymboltable.cpp
index bc3f18c..2193c15 100644
--- a/app/perfsymboltable.cpp
+++ b/app/perfsymboltable.cpp
@@ -159,8 +159,6 @@ static bool findInExtraPath(QFileInfo &path, const QString &fileName)
path.setFile(path.absoluteFilePath() + QDir::separator() + fileName);
if (path.isFile())
return true;
- else if (!path.isDir())
- return false;
QDir absDir = path.absoluteDir();
foreach (const QString &entry, absDir.entryList(QStringList(),
@@ -422,8 +420,20 @@ int PerfSymbolTable::lookupFrame(Dwarf_Addr ip, bool isKernel,
if (elf.isValid()) {
binaryId = m_unwind->resolveString(elf.originalFileName);
elfStart = elf.addr;
- if (m_dwfl && !mod)
- mod = reportElf(elf);
+ if (m_dwfl) {
+ if (mod) {
+ // If dwfl has a module and it's not the same as what we want, report the module
+ // we want. Many modules overlap ld.so, so if we've reported even one sample from
+ // ld.so we would otherwise be blocked from reporting anything that overlaps it.
+ Dwarf_Addr mod_start = 0;
+ dwfl_module_info(mod, nullptr, &mod_start, nullptr, nullptr, nullptr, nullptr,
+ nullptr);
+ if (elfStart != mod_start)
+ mod = reportElf(elf);
+ } else {
+ mod = reportElf(elf);
+ }
+ }
}
PerfUnwind::Location addressLocation(