Andrea Vezzosi pushed to branch wip/andrea/gbc-backport at Glasgow Haskell Compiler / GHC Commits: 56acfc96 by Andrea Vezzosi at 2026-09-21T14:03:29+02:00 Backport of bytecode objects relevant bugfixes. Cherry-pick of these commits and what they depend on - 28f07d702a Make HPC work with bytecode interpreter - d95a19366f Add constants for bytecode in-memory buffer size - 9b64ad3a45 determinism: Use a deterministic renaming when writing bytecode files ------------------------- Metric Decrease: interpreter_steplocal Metric Increase: MultiComponentModules MultiComponentModulesRecomp MultiLayerModulesRecomp MultiLayerModulesTH_Make MultiLayerModulesTH_OneShot T13701 TcPlugin_RewritePerf -------------------------- All cherry-picked commits, oldest first: driver: Hide source paths at verbosity level 1 by default (cherry picked from commit aa9c5e2ca0d42f7361fc465d79f5beb056987a41) determinism: Use a deterministic renaming when writing bytecode files Fixes #26499 (cherry picked from commit 9b64ad3a458bf4e4165f125059e4bc3d518c5834) compiler: implement string interning logic for BCONPtrFS (cherry picked from commit d054b4676298ea2189cd48fcf175676b97f559e7) compiler: use `Binary` instance of `BCOByteArray` for bytecode objects (cherry picked from commit fdf828aef8c78ae23ad058ed4696910b6beba232) Support arbitrary size unboxed tuples in bytecode (cherry picked from commit a85bd503a480cfa31f5afa09eb38f56c85c237de) Add specialized frames for small tuples (cherry picked from commit e2209031734770a51f04883e5b538b562449cba1) Extract Binary instances to `GHC.ByteCode.Binary` (cherry picked from commit acffb1b1da1a59dbded9ec2dcb65e495aee31f40) Add `seqNonEmpty` for evaluating `NonEmpty a` (cherry picked from commit e2ea8e25c5128afa8191669c751942348ab3043b) Record `LinkableUsage` instead of `Linkable` in `LoaderState` (cherry picked from commit 048b00b7c231dec199a4441caac279f3bbcd75f4) bytecode: Add magic header/version to bytecode files (cherry picked from commit 5cbc2c823fb0710c37f6e9144382dd59e0353782) Add constants for bytecode in-memory buffer size (cherry picked from commit d95a19366f64e6d866c8df0b1ab917884cc015dc) testsuite: filter stderr for static001 on darwin (cherry picked from commit b822c30aa6c0bf008c06c5bd4ee86313c40f652d) ghci: use ShortByteString for LookupSymbol/LookupSymbolInDLL/LookupClosure messages (cherry picked from commit 8dd6f453348e467686bd222551c89ecc466d36f0) ghci: use ShortByteString for MkCostCentres message (cherry picked from commit 371ef200bcb2664c4511daca75f72a52c1473950) Expose startupHpc as an rts symbol (cherry picked from commit f3485446d8c90aa39ee633606b488253ae23a255) Make HPC work with bytecode interpreter (cherry picked from commit 28f07d702a1b47230122df22e84b60fda49897c5) - - - - - 154 changed files: - + changelog.d/bytecode-interpreter-hpc-support - compiler/GHC/ByteCode/Asm.hs - + compiler/GHC/ByteCode/Binary.hs - compiler/GHC/ByteCode/Breakpoints.hs - compiler/GHC/ByteCode/Instr.hs - compiler/GHC/ByteCode/Linker.hs - + compiler/GHC/ByteCode/Recomp/Binary.hs - compiler/GHC/ByteCode/Serialize.hs - compiler/GHC/ByteCode/Types.hs - compiler/GHC/Driver/Backend.hs - compiler/GHC/Driver/CodeOutput.hs - compiler/GHC/Driver/Hooks.hs - compiler/GHC/Driver/Main.hs - compiler/GHC/Driver/Pipeline.hs - compiler/GHC/Driver/Plugins.hs - compiler/GHC/Driver/Session.hs - compiler/GHC/HsToCore.hs - compiler/GHC/HsToCore/Breakpoints.hs - compiler/GHC/HsToCore/Coverage.hs - compiler/GHC/HsToCore/Ticks.hs - compiler/GHC/HsToCore/Usage.hs - compiler/GHC/Iface/Recomp.hs - compiler/GHC/Iface/Recomp/Types.hs - compiler/GHC/Iface/Tidy.hs - compiler/GHC/Linker/ByteCode.hs - compiler/GHC/Linker/Deps.hs - compiler/GHC/Linker/Loader.hs - compiler/GHC/Linker/Types.hs - compiler/GHC/Runtime/Interpreter.hs - compiler/GHC/Runtime/Interpreter/Init.hs - compiler/GHC/Runtime/Interpreter/Types.hs - compiler/GHC/Runtime/Loader.hs - compiler/GHC/StgToByteCode.hs - compiler/GHC/Tc/Types.hs - compiler/GHC/Tc/Utils/Monad.hs - compiler/GHC/Types/HpcInfo.hs - compiler/GHC/Unit/Home/ModInfo.hs - compiler/GHC/Unit/Module/Deps.hs - compiler/GHC/Unit/Module/ModGuts.hs - compiler/GHC/Unit/Module/Status.hs - compiler/GHC/Utils/Misc.hs - compiler/ghc.cabal.in - ghc/GHCi/Leak.hs - hadrian/src/Settings/Builders/RunTest.hs - + libraries/ghci/GHCi/Coverage.hs - libraries/ghci/GHCi/Message.hs - libraries/ghci/GHCi/ObjLink.hs - libraries/ghci/GHCi/Run.hs - libraries/ghci/ghci.cabal.in - rts/Apply.cmm - rts/Continuation.c - rts/ContinuationOps.cmm - rts/Disassembler.c - rts/Hpc.c - rts/Interpreter.c - rts/Printer.c - rts/RaiseAsync.c - rts/RtsSymbols.c - rts/Schedule.c - rts/StgMiscClosures.cmm - rts/Threads.c - rts/Threads.h - rts/include/rts/Bytecodes.h - rts/include/rts/storage/TSO.h - rts/include/stg/MiscClosures.h - testsuite/driver/testlib.py - testsuite/mk/test.mk - testsuite/tests/backpack/cabal/bkpcabal08/bkpcabal08.stdout - + testsuite/tests/bytecode/TLinkable/BCOTemplate.hs - + testsuite/tests/bytecode/TLinkable/LinkableUsage01.stderr - + testsuite/tests/bytecode/TLinkable/LinkableUsage02.stderr - + testsuite/tests/bytecode/TLinkable/Makefile - + testsuite/tests/bytecode/TLinkable/all.T - + testsuite/tests/bytecode/TLinkable/genLinkables.sh - + testsuite/tests/bytecode/TLinkable/linkable-space.hs - + testsuite/tests/bytecode/TLinkable/linkable-space.stdout - + testsuite/tests/bytecode/tuplestress/ByteCode.hs - + testsuite/tests/bytecode/tuplestress/Common.hs-incl - + testsuite/tests/bytecode/tuplestress/Obj.hs - + testsuite/tests/bytecode/tuplestress/TupleStress.hs - + testsuite/tests/bytecode/tuplestress/TupleStress.stdout - + testsuite/tests/bytecode/tuplestress/all.T - testsuite/tests/count-deps/CountDepsAst.stdout - testsuite/tests/count-deps/CountDepsParser.stdout - testsuite/tests/driver/T20030/test1/all.T - testsuite/tests/driver/T20030/test2/all.T - testsuite/tests/driver/T20030/test3/all.T - testsuite/tests/driver/T20030/test4/all.T - testsuite/tests/driver/T20030/test5/all.T - testsuite/tests/driver/T20030/test6/all.T - testsuite/tests/driver/T8526/T8526.script - testsuite/tests/driver/all.T - testsuite/tests/driver/bytecode-object/Makefile - testsuite/tests/driver/bytecode-object/all.T - testsuite/tests/driver/bytecode-object/bytecode_object19.stdout - testsuite/tests/driver/dynamicToo/dynamicToo001/Makefile - testsuite/tests/driver/fat-iface/fat014.script - testsuite/tests/driver/implicit-dyn-too/Makefile - testsuite/tests/driver/linkwhole/Main.hs - testsuite/tests/driver/multipleHomeUnits/all.T - testsuite/tests/driver/multipleHomeUnits/multipleHomeUnits_recomp_th.stdout - + testsuite/tests/driver/recomp022/A1.hs - + testsuite/tests/driver/recomp022/A2.hs - + testsuite/tests/driver/recomp022/A3.hs - + testsuite/tests/driver/recomp022/B.hs - + testsuite/tests/driver/recomp022/C.hs - + testsuite/tests/driver/recomp022/Makefile - + testsuite/tests/driver/recomp022/all.T - + testsuite/tests/driver/recomp022/recomp022a.stdout - + testsuite/tests/driver/recomp022/recomp022b.stdout - − testsuite/tests/ghci/linking/T11531.stderr - testsuite/tests/ghci/prog018/prog018.script - testsuite/tests/ghci/scripts/T13869.script - testsuite/tests/ghci/scripts/T13997.script - testsuite/tests/ghci/scripts/T17669.script - testsuite/tests/ghci/scripts/T18330.script - testsuite/tests/ghci/scripts/T18330.stdout - testsuite/tests/ghci/scripts/T1914.script - testsuite/tests/ghci/scripts/T20217.script - testsuite/tests/ghci/scripts/T6105.script - testsuite/tests/ghci/scripts/T8042.script - testsuite/tests/ghci/scripts/T8042recomp.script - testsuite/tests/ghci/should_run/Makefile - testsuite/tests/ghci/should_run/T18064.script - testsuite/tests/hpc/Makefile - testsuite/tests/hpc/T17073.stdout → testsuite/tests/hpc/T17073a.stdout - + testsuite/tests/hpc/T17073b.stdout - testsuite/tests/hpc/T20568.stdout → testsuite/tests/hpc/T20568a.stdout - + testsuite/tests/hpc/T20568b.stdout - testsuite/tests/hpc/all.T - testsuite/tests/hpc/fork/Makefile - testsuite/tests/hpc/function/Makefile - testsuite/tests/hpc/function/test.T - + testsuite/tests/hpc/function/tough1.stderr - + testsuite/tests/hpc/function/tough1.stdout - testsuite/tests/hpc/function2/test.T - + testsuite/tests/hpc/function2/tough3.script - + testsuite/tests/hpc/ghc_ghci/BytecodeMain.hs - testsuite/tests/hpc/ghc_ghci/Makefile - + testsuite/tests/hpc/ghc_ghci/hpc_ghc_ghci_bytecode.stdout - + testsuite/tests/hpc/ghc_ghci/hpc_ghci01.stdout - + testsuite/tests/hpc/ghc_ghci/hpc_ghci02.stdout - testsuite/tests/hpc/ghc_ghci/test.T - testsuite/tests/hpc/simple/Makefile - + testsuite/tests/hpc/simple/hpc002.hs - + testsuite/tests/hpc/simple/hpc002.stdout - + testsuite/tests/hpc/simple/hpc003.hs - + testsuite/tests/hpc/simple/hpc003.script - + testsuite/tests/hpc/simple/hpc003.stdout - testsuite/tests/hpc/simple/test.T - testsuite/tests/rts/KeepCafsMain.hs - testsuite/tests/rts/T13676.script - utils/deriveConstants/Main.hs - utils/jsffi/dyld.mjs The diff was not included because it is too large. View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/56acfc96e8fc4b2a6a0d12aa872f6b95... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/56acfc96e8fc4b2a6a0d12aa872f6b95... You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help
participants (1)
-
Andrea Vezzosi (@trac-Saizan)