[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 5 commits: configure: bump version to 9.15

Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC Commits: 4acf3a86 by Ben Gamari at 2025-07-15T05:46:32-04:00 configure: bump version to 9.15 - - - - - 45efaf71 by Teo Camarasu at 2025-07-15T05:47:13-04:00 rts/nonmovingGC: remove n_free We remove the nonmovingHeap.n_free variable. We wanted this to track the length of nonmovingHeap.free. But this isn't possible to do atomically. When this isn't accurate we can get a segfault by going past the end of the list. Instead, we just count the length of the list when we grab it in nonmovingPruneFreeSegment. Resolves #26186 - - - - - f7247a8d by Ben Gamari at 2025-07-15T09:55:33-04:00 configure: Drop probing of ld.gold As noted in #25716, `gold` has been dropped from binutils-2.44. Fixes #25716. Metric Increase: size_hello_artifact_gzip size_hello_unicode_gzip ghc_prim_so - - - - - 1c4c8097 by Ben Gamari at 2025-07-15T09:55:33-04:00 testsuite/recomp015: Ignore stderr This is necessary since ld.bfd complains that we don't have a .note.GNU-stack section, potentially resulting in an executable stack. - - - - - 86943ca2 by Wen Kokke at 2025-07-15T09:55:36-04:00 Fix documentation for heap profile ID - - - - - 10 changed files: - configure.ac - docs/users_guide/eventlog-formats.rst - m4/find_ld.m4 - rts/sm/NonMoving.c - rts/sm/NonMoving.h - rts/sm/NonMovingAllocate.c - rts/sm/Sanity.c - testsuite/tests/driver/recomp015/all.T - utils/ghc-toolchain/src/GHC/Toolchain/Tools/Link.hs - utils/haddock/haddock-api/haddock-api.cabal Changes: ===================================== configure.ac ===================================== @@ -13,7 +13,7 @@ dnl # see what flags are available. (Better yet, read the documentation!) # -AC_INIT([The Glorious Glasgow Haskell Compilation System], [9.14.0], [glasgow-haskell-bugs@haskell.org], [ghc-AC_PACKAGE_VERSION]) +AC_INIT([The Glorious Glasgow Haskell Compilation System], [9.15], [glasgow-haskell-bugs@haskell.org], [ghc-AC_PACKAGE_VERSION]) # Version on master must be X.Y (not X.Y.Z) for ProjectVersionMunged variable # to be useful (cf #19058). However, the version must have three components # (X.Y.Z) on stable branches (e.g. ghc-9.2) to ensure that pre-releases are ===================================== docs/users_guide/eventlog-formats.rst ===================================== @@ -693,6 +693,8 @@ A single fixed-width event emitted during program start-up describing the sample :field String: retainer filter :field String: biography filter +The profile ID field is reserved for future use. + Cost centre definitions ^^^^^^^^^^^^^^^^^^^^^^^ @@ -792,6 +794,7 @@ Otherwise, a :event-type:`HEAP_PROF_SAMPLE_STRING` event is emitted instead. :field Word8: stack depth :field Word32[]: cost centre stack starting with inner-most (cost centre numbers) +The profile ID field is reserved for future use. String break-down ^^^^^^^^^^^^^^^^^ @@ -818,6 +821,8 @@ If the heap profile type is set to :rts-flag:`-hc` or :rts-flag:`-hb`, a :event- :field Word64: heap residency in bytes :field String: sample label +The profile ID field is reserved for future use. + .. _time-profiler-events: Time profiler event log output ===================================== m4/find_ld.m4 ===================================== @@ -21,14 +21,7 @@ AC_DEFUN([FIND_LD],[ return fi - case $CPU in - i386) - # We refuse to use ld.gold on i386 due to #23579, which we don't - # have a good autoconf check for. - linkers="ld.lld ld" ;; - *) - linkers="ld.lld ld.gold ld" ;; - esac + linkers="ld.lld ld" # Manually iterate over possible names since we want to ensure that, e.g., # if ld.lld is installed but gcc doesn't support -fuse-ld=lld, that we ===================================== rts/sm/NonMoving.c ===================================== @@ -603,7 +603,6 @@ void nonmovingPushFreeSegment(struct NonmovingSegment *seg) if (cas((StgVolatilePtr) &nonmovingHeap.free, (StgWord) old, (StgWord) seg) == (StgWord) old) break; } - __sync_add_and_fetch(&nonmovingHeap.n_free, 1); } static int @@ -621,20 +620,26 @@ cmp_segment_ptr (const void *x, const void *y) void nonmovingPruneFreeSegmentList(void) { trace(TRACE_nonmoving_gc, "Pruning free segment list."); + // Atomically grab the entire free list. struct NonmovingSegment *free; - size_t length; while (true) { free = ACQUIRE_LOAD(&nonmovingHeap.free); - length = ACQUIRE_LOAD(&nonmovingHeap.n_free); if (cas((StgVolatilePtr) &nonmovingHeap.free, (StgWord) free, (StgWord) NULL) == (StgWord) free) { - atomic_dec((StgVolatilePtr) &nonmovingHeap.n_free, length); break; } - // Save the current free list so the sanity checker can see these segments. - nonmovingHeap.saved_free = free; + } + // Save the current free list so the sanity checker can see these segments. + nonmovingHeap.saved_free = free; + + // Calculate the length of the list we've taken + size_t length = 0; + struct NonmovingSegment *free1 = free; + while (free1) { + length++; + free1 = free1->link; } // Sort the free list by address. @@ -692,7 +697,6 @@ void nonmovingPruneFreeSegmentList(void) if (cas((StgVolatilePtr) &nonmovingHeap.free, (StgWord) rest, (StgWord) free) == (StgWord) rest) { - __sync_add_and_fetch(&nonmovingHeap.n_free, new_length); break; } } ===================================== rts/sm/NonMoving.h ===================================== @@ -134,8 +134,6 @@ struct NonmovingHeap { // saved free segment list, so the sanity checker can // see the segments while the free list is being pruned. struct NonmovingSegment *saved_free; - // how many segments in free segment list? accessed atomically. - unsigned int n_free; // records the current length of the nonmovingAllocator.current arrays unsigned int n_caps; ===================================== rts/sm/NonMovingAllocate.c ===================================== @@ -183,7 +183,6 @@ static struct NonmovingSegment *nonmovingPopFreeSegment(void) if (cas((StgVolatilePtr) &nonmovingHeap.free, (StgWord) seg, (StgWord) seg->link) == (StgWord) seg) { - __sync_sub_and_fetch(&nonmovingHeap.n_free, 1); return seg; } } ===================================== rts/sm/Sanity.c ===================================== @@ -990,7 +990,6 @@ static void checkGeneration (generation *gen, #endif if (isNonmovingGen(gen)) { - ASSERT(countNonMovingSegments(nonmovingHeap.free) == (W_) nonmovingHeap.n_free * NONMOVING_SEGMENT_BLOCKS); ASSERT(countBlocks(nonmoving_large_objects) == n_nonmoving_large_blocks); ASSERT(countBlocks(nonmoving_marked_large_objects) == n_nonmoving_marked_large_blocks); ===================================== testsuite/tests/driver/recomp015/all.T ===================================== @@ -5,7 +5,11 @@ test('recomp015', # See ticket:11022#comment:7 unless(opsys('linux') or opsys('solaris2') or opsys('openbsd'), skip), when(arch('arm'), skip), - js_skip # JS backend doesn't support .s assembly files + js_skip, # JS backend doesn't support .s assembly files + + # the linker sometimes throws warnings since we don't + # generate a .note.GNU-stack section + ignore_stderr, ], makefile_test, []) ===================================== utils/ghc-toolchain/src/GHC/Toolchain/Tools/Link.hs ===================================== @@ -91,7 +91,7 @@ findLinkFlags enableOverride cc ccLink -- executable exists before trying cc. do _ <- findProgram (linker ++ " linker") emptyProgOpt ["ld."++linker] prog <$ checkLinkWorks cc prog - | linker <- ["lld", "gold", "bfd"] + | linker <- ["lld", "bfd"] , let prog = over _prgFlags (++["-fuse-ld="++linker]) ccLink ] <|> (ccLink <$ checkLinkWorks cc ccLink) ===================================== utils/haddock/haddock-api/haddock-api.cabal ===================================== @@ -79,7 +79,7 @@ library -- this package typically supports only single major versions build-depends: base >= 4.16 && < 4.23 - , ghc ^>= 9.14 + , ghc ^>= 9.15 , haddock-library ^>= 1.11 , xhtml ^>= 3000.2.2 , parsec ^>= 3.1.13.0 View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/0e801a05b8b3749c646e6777b692004... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/0e801a05b8b3749c646e6777b692004... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Marge Bot (@marge-bot)