From 6fc98722e212c1ba134f00cc44ac92369330021b Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Tue, 24 May 2022 10:29:33 +0200 Subject: [PATCH] Valgrind: Fix callgrind function call calculation Broke with 7450bcb2b91af. Change-Id: Ib5e2506bc69fa9bdbda7a95c064727069b430a06 Reviewed-by: Artem Sokolovskii Reviewed-by: Reviewed-by: hjk --- src/plugins/valgrind/callgrind/callgrindfunctioncycle.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/valgrind/callgrind/callgrindfunctioncycle.cpp b/src/plugins/valgrind/callgrind/callgrindfunctioncycle.cpp index c9c43cb3021..ca943b5ce0f 100644 --- a/src/plugins/valgrind/callgrind/callgrindfunctioncycle.cpp +++ b/src/plugins/valgrind/callgrind/callgrindfunctioncycle.cpp @@ -83,7 +83,8 @@ void FunctionCycle::setFunctions(const QVector &functions) d->accumulateCall(call, Function::Private::Outgoing); } // add incoming calls from functions that are not part of the cycle - for (const FunctionCall *call : calls) { + const QVector inCalls = func->incomingCalls(); + for (const FunctionCall *call : inCalls) { if (!functions.contains(call->caller())) { d->accumulateCall(call, Function::Private::Incoming); d->m_called += call->calls();