Skip to content

[JSC] Do not broadcast termination from the thread that is about to stop draining - #72377

Merged
webkit-commit-queue merged 1 commit into
WebKit:mainfrom
Constellation:eng/JSC-Do-not-broadcast-termination-from-the-thread-that-is-about-to-stop-draining
Aug 26, 2026
Merged

webkit-commit-queue merged 1 commit into
WebKit:mainfrom
Constellation:eng/JSC-Do-not-broadcast-termination-from-the-thread-that-is-about-to-stop-draining

Conversation

@Constellation

@Constellation Constellation commented Aug 25, 2026 •

Copy link
Copy Markdown
Member

f733e45

[JSC] Do not broadcast termination from the thread that is about to stop draining
https://bugs.webkit.org/show_bug.cgi?id=322475
rdar://185763143

Reviewed by Yijia Huang.

When reaching to termination, there is no work. Then waking up helper
threads do not offer anything since it is waiting until (1) there is a
work, (2) bonus visitor task exists, or (3) m_parallelMarkersShouldExit.
This patch removes these unnecessary wakeup.

* Source/JavaScriptCore/heap/SlotVisitor.cpp:
(JSC::SlotVisitor::drainFromShared):
(JSC::SlotVisitor::drainInParallelPassively):
(JSC::SlotVisitor::waitForTermination):
* Source/JavaScriptCore/heap/SlotVisitor.h:

Canonical link: https://commits.webkit.org/319889@main

7212e73

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows Apple Internal
✅ 🧪 style   🛠 ios ❌ 🛠 mac   🛠 wpe   🛠 win ⏳ 🛠 ios-apple
  🛠 ios-sim   🛠 mac-AS-debug   🧪 wpe-wk2   🧪 win-tests ⏳ 🛠 mac-apple
✅ 🧪 webkitperl   🧪 ios-wk2 ❌ 🧪 api-mac   🧪 api-wpe ⏳ 🛠 vision-apple
  🧪 ios-wk2-wpt   🧪 api-mac-debug   🧪 jsc-wpe
❌ 🧪 jsc-x86-64   🧪 api-ios ❌ 🧪 mac-wk2 ✅ 🛠 gtk3-gcc
❌ 🛠 🧪 jsc-debug-arm64   🛠 ios-safer-cpp   🧪 mac-AS-debug-wk2 ✅ 🛠 gtk
  🛠 vision ❌ 🧪 mac-wk2-stress   🧪 gtk-wk2
  🛠 vision-sim ❌ 🧪 mac-intel-wk2   🧪 api-gtk
✅ 🛠 🧪 unsafe-merge   🧪 vision-wk2   🛠 mac-safer-cpp   🛠 playstation
  🛠 tv ❌ 🧪 mac-site-isolation
  🛠 tv-sim
  🛠 watch
  🛠 watch-sim

@Constellation
Constellation requested a review from a team as a code owner August 25, 2026 06:51
@Constellation Constellation self-assigned this Aug 25, 2026
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Aug 25, 2026
@Constellation Constellation removed the merging-blocked Applied to prevent a change from being merged label Aug 25, 2026
@Constellation
Constellation force-pushed the eng/JSC-Do-not-broadcast-termination-from-the-thread-that-is-about-to-stop-draining branch from 5d2924b to 1b3ac03 Compare August 25, 2026 07:12
@Constellation
Constellation force-pushed the eng/JSC-Do-not-broadcast-termination-from-the-thread-that-is-about-to-stop-draining branch from 1b3ac03 to 4cdf5f3 Compare August 26, 2026 18:38
@Constellation
Constellation force-pushed the eng/JSC-Do-not-broadcast-termination-from-the-thread-that-is-about-to-stop-draining branch from 4cdf5f3 to 7212e73 Compare August 26, 2026 18:40
@Constellation Constellation added the JavaScriptCore For bugs in JavaScriptCore, the JS engine used by WebKit, other than kxmlcore issues. label Aug 26, 2026
@Constellation Constellation added the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Aug 26, 2026
…top draining

https://bugs.webkit.org/show_bug.cgi?id=322475
rdar://185763143

Reviewed by Yijia Huang.

When reaching to termination, there is no work. Then waking up helper
threads do not offer anything since it is waiting until (1) there is a
work, (2) bonus visitor task exists, or (3) m_parallelMarkersShouldExit.
This patch removes these unnecessary wakeup.

* Source/JavaScriptCore/heap/SlotVisitor.cpp:
(JSC::SlotVisitor::drainFromShared):
(JSC::SlotVisitor::drainInParallelPassively):
(JSC::SlotVisitor::waitForTermination):
* Source/JavaScriptCore/heap/SlotVisitor.h:

Canonical link: https://commits.webkit.org/319889@main
@webkit-commit-queue
webkit-commit-queue force-pushed the eng/JSC-Do-not-broadcast-termination-from-the-thread-that-is-about-to-stop-draining branch from 7212e73 to f733e45 Compare August 26, 2026 18:43
@webkit-commit-queue

Copy link
Copy Markdown
Collaborator

Committed 319889@main (f733e45): https://commits.webkit.org/319889@main

Reviewed commits have been landed. Closing PR #72377 and removing active labels.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

JavaScriptCore For bugs in JavaScriptCore, the JS engine used by WebKit, other than kxmlcore issues.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants