Skip to content

Commit 747fed4

Browse files
committed
Emit parsing finished at the very end of the background thread
Otherwise, we might get unlucky and crash when our tests await this signal and then destroy the parser object as a result, leading to crashes.
1 parent 845ff48 commit 747fed4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/parsers/perf/perfparser.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1563,14 +1563,14 @@ void PerfParser::startParseFile(const QString& path)
15631563
emit tracepointDataAvailable(d.tracepointResult);
15641564
emit eventsAvailable(d.eventResult);
15651565
emit frequencyDataAvailable(d.frequencyResult);
1566-
emit parsingFinished();
1567-
15681566
emit threadNamesAvailable(d.commands);
15691567

15701568
if (d.m_numSamplesWithMoreThanOneFrame == 0) {
15711569
emit parserWarning(tr("Samples contained no call stack frames. Consider passing <code>--call-graph "
15721570
"dwarf</code> to <code>perf record</code>."));
15731571
}
1572+
1573+
emit parsingFinished();
15741574
};
15751575

15761576
if (path.endsWith(QLatin1String(".perfparser"))) {

0 commit comments

Comments
 (0)