Duncan Coutts pushed to branch wip/dcoutts/remove-signal-tickers-docs at Glasgow Haskell Compiler / GHC Commits: 410748f3 by Duncan Coutts at 2026-05-10T16:47:32+01:00 Document removal of the signal-based interval timer Update mentions within the RTS section of the users guide. Add a changelog entry. - - - - - a2bee349 by Duncan Coutts at 2026-05-10T16:47:41+01:00 Fix section for an recent changelog entry - - - - - 4 changed files: - changelog.d/dynamic-trace-flags - + changelog.d/no-more-timer-signal - docs/users_guide/profiling.rst - docs/users_guide/runtime_control.rst Changes: ===================================== changelog.d/dynamic-trace-flags ===================================== @@ -1,4 +1,4 @@ -section: compiler +section: rts synopsis: Support dynamic trace flags in RTS issues: #27186 mrs: !15936 ===================================== changelog.d/no-more-timer-signal ===================================== @@ -0,0 +1,20 @@ +section: rts +synopsis: The RTS no longer uses signals for its interval timer +issues: #27073 +mrs: !15757 +description: { + Historically, on unix platforms, the RTS used a signal for its interval + timer. The interval timer is used for thread context switching amongst other + things. This would use either SIGVTALRM or SIGALRM. It was always somewhat + problematic: signals can cause system calls to be interrupted, the signal + must be disabled before forking a new process or the child process will also + receive the signals, and code executed within a signal handler is very + limited in what it can do. + + Most unix platforms were already using other interval timer implementations. + In particular OSX and recent Linux were using thread-based timers. As of + this release, no platforms use a signal based interval timer. So it is no + longer necessary to mitigate the issues that arise. In particular the + `stopTimer` and `startTimer` RTS C functions (used by some libraries) are + now no-ops and are deprecated. +} ===================================== docs/users_guide/profiling.rst ===================================== @@ -678,11 +678,11 @@ enclosed between ``+RTS ... -RTS`` as usual): Sets the interval that the RTS clock ticks at, which is also the sampling interval of the time and allocation profile. The default is 0.001 seconds - when profiling, and 0.01 otherwise. The runtime uses a single timer signal - to count ticks; this timer signal is used to control the context switch + when profiling, and 0.01 otherwise. The runtime uses a single timer event + to count ticks; this timer event is used to control the context switch timer (:ref:`using-concurrent`) and the heap profiling timer :ref:`rts-options-heap-prof`. Also, the time profiler uses the RTS timer - signal directly to record time profiling samples. + event directly to record time profiling samples. Normally, setting the :rts-flag:`-V ⟨secs⟩` option directly is not necessary: the resolution of the RTS timer is adjusted automatically if a ===================================== docs/users_guide/runtime_control.rst ===================================== @@ -259,12 +259,6 @@ Miscellaneous RTS options using the Haskell code as a DLL, and want to set your own signal handlers. - Note that even with ``--install-signal-handlers=no``, the RTS - interval timer signal is still enabled. The timer signal is either - SIGVTALRM or SIGALRM, depending on the RTS configuration and OS - capabilities. To disable the timer signal, use the ``-V0`` RTS - option (see :rts-flag:`-V ⟨secs⟩`). - .. rts-flag:: --install-seh-handlers=⟨yes|no⟩ If yes (the default), the RTS on Windows installs exception handlers to View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/80b5312a5256b4b898a57488b026637... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/80b5312a5256b4b898a57488b026637... You're receiving this email because of your account on gitlab.haskell.org.