From f2592a89a6be4b654218ee253e89ee28c7ac58fb Mon Sep 17 00:00:00 2001 From: Jaroslav Bachorik Date: Wed, 22 Apr 2026 12:55:30 +0200 Subject: [PATCH] Fix WallClockASGCT::timerLoop skipping every other thread Remove the spurious extra ThreadList::next() call in the no-filter fallback branch of collectThreads. The loop already reads one tid per iteration via the hasNext()/next() pattern; the trailing next() advanced the cursor a second time, so tids was populated with only the 1st, 3rd, 5th, ... entries. Impact: when threadFilter->enabled() is false, wallclock ticks sampled only half of eligible threads. The context-filtered path is unaffected. JIRA: PROF-14332 Co-Authored-By: Claude Opus 4.7 (1M context) --- ddprof-lib/src/main/cpp/wallClock.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/ddprof-lib/src/main/cpp/wallClock.cpp b/ddprof-lib/src/main/cpp/wallClock.cpp index 8e262a72e..1f8982eda 100644 --- a/ddprof-lib/src/main/cpp/wallClock.cpp +++ b/ddprof-lib/src/main/cpp/wallClock.cpp @@ -170,7 +170,6 @@ void WallClockASGCT::timerLoop() { if (tid != OS::threadId()) { tids.push_back(tid); } - tid = thread_list->next(); } delete thread_list; }