ladybird/Libraries/LibTest
Andreas Kling adfc9d263f LibGC: Defer per-block madvise to a global background worker
deallocate_block() used to call MADV_FREE_REUSABLE / MADV_FREE /
MADV_DONTNEED inline on every freed block. With sweep typically
freeing many blocks per GC, the cumulative syscall cost shows up
as real GC pause time.

Move the work onto a single global "decommit worker" thread:

- deallocate_block now just poisons the slot and pushes it onto a
  per-allocator m_freshly_freed queue. No syscalls.
- allocate_block prefers m_freshly_freed over m_blocks, so a slot
  that's recycled before the worker sees it skips the
  REUSABLE/REUSE pair entirely. This is the main payoff.
- Heap::sweep_dead_cells kicks the worker at the end of sweep.
  The worker sleeps 50 ms after each kick to give the JS thread
  breathing room, then drains each registered allocator's
  m_freshly_freed, madvises slots in batches of 64 with
  sched_yield between batches, and splices them onto m_blocks.
- Per-allocator refcount + condvar lets ~BlockAllocator wait
  until the worker has dropped its reference before our storage
  goes away. (Chunks themselves remain leaked: type-isolated VM
  is permanent, so we never tear them down.)
2026-05-07 20:09:05 +02:00
..
Randomized Everywhere: Remove sv suffix from format string literals 2025-04-08 20:00:18 -04:00
AssertionHandler.cpp LibTest: Prevent -dead_strip from removing assertion handler 2026-03-19 18:36:27 +01:00
AssertionHandler.h LibTest: Fix custom assertion handler on FreeBSD and OpenBSD 2026-01-12 20:58:21 +01:00
CMakeLists.txt LibGC: Defer per-block madvise to a global background worker 2026-05-07 20:09:05 +02:00
JavaScriptTestRunner.h LibTest: Add verbose test file output 2026-05-03 13:10:48 +02:00
JavaScriptTestRunnerMain.cpp LibTest: Add verbose test file output 2026-05-03 13:10:48 +02:00
LiveDisplay.h LibWeb+LibTest: Move the progress bar/status printing stuff to LibTest 2026-04-23 18:48:56 +02:00
Macros.h LibTest: Support death tests without child process cloning 2025-05-16 13:23:32 -06:00
Results.h AK+Everywhere: Remove now-unecessary use of ByteString with JSON types 2025-02-20 19:27:51 -05:00
TestCase.h LibTest: Support death tests without child process cloning 2025-05-16 13:23:32 -06:00
TestMain.cpp AK: Expose helpers to invoke Windows runtime config directly in main() 2025-10-29 21:07:52 -06:00
TestResult.h LibTest: Explicitly export symbols 2025-05-16 13:23:32 -06:00
TestRunner.h LibTest: Add verbose test file output 2026-05-03 13:10:48 +02:00
TestRunnerUtil.h LibTest/Tests: Build and run test-js on windows 2025-06-05 22:00:55 -06:00
TestSuite.cpp Tests: Fix calculation of elapsed time in tests 2025-07-12 14:05:32 +02:00
TestSuite.h LibTest: Explicitly export symbols 2025-05-16 13:23:32 -06:00