Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC

Commits:

26 changed files:

Changes:

  • docs/users_guide/runtime_control.rst
    ... ... @@ -1588,6 +1588,7 @@ recommended for everyday use!
    1588 1588
     
    
    1589 1589
     .. rts-flag::  -Ds  DEBUG: scheduler
    
    1590 1590
     .. rts-flag::  -Di  DEBUG: interpreter
    
    1591
    +.. rts-flag::  -DI  DEBUG: IPE
    
    1591 1592
     .. rts-flag::  -Dw  DEBUG: weak
    
    1592 1593
     .. rts-flag::  -DG  DEBUG: gccafs
    
    1593 1594
     .. rts-flag::  -Dg  DEBUG: gc
    

  • hadrian/doc/user-settings.md
    ... ... @@ -19,14 +19,18 @@ A build _flavour_ is a collection of build settings that fully define a GHC buil
    19 19
     data Flavour = Flavour {
    
    20 20
         -- | Flavour name, to select this flavour from command line.
    
    21 21
         name :: String,
    
    22
    -    -- | Use these command line arguments.
    
    23
    -    args :: Args,
    
    22
    +    -- | Use these extra command line arguments.
    
    23
    +    -- This can't depend on the result of configuring a package (ie, using readContextData)
    
    24
    +    extraArgs :: Args,
    
    24 25
         -- | Build these packages.
    
    25 26
         packages :: Stage -> Action [Package],
    
    26 27
         -- | Bignum backend: 'native', 'gmp', 'ffi', etc.
    
    27 28
         bignumBackend :: String,
    
    28 29
         -- | Check selected bignum backend against native backend
    
    29 30
         bignumCheck :: Bool,
    
    31
    +    -- | Build the @text@ package with @simdutf@ support. Disabled by
    
    32
    +    -- default due to packaging difficulties described in #20724.
    
    33
    +    textWithSIMDUTF :: Bool,
    
    30 34
         -- | Build libraries these ways.
    
    31 35
         libraryWays :: Ways,
    
    32 36
         -- | Build RTS these ways.
    
    ... ... @@ -45,11 +49,18 @@ data Flavour = Flavour {
    45 49
         -- | Build the GHC executable against the threaded runtime system.
    
    46 50
         ghcThreaded :: Stage -- ^ stage of the /built/ compiler
    
    47 51
                     -> Bool,
    
    52
    +
    
    53
    +    ghcSplitSections :: Bool, -- ^ Whether to enable split sections
    
    48 54
         -- | Whether to build docs and which ones
    
    49 55
         --   (haddocks, user manual, haddock manual)
    
    50 56
         ghcDocs :: Action DocTargets,
    
    57
    +
    
    58
    +    -- | Whether to uses hashes or inplace for unit ids
    
    59
    +    hashUnitIds :: Bool,
    
    60
    +
    
    51 61
         -- | Whether to generate .hie files
    
    52 62
         ghcHieFiles :: Stage -> Bool
    
    63
    +
    
    53 64
         }
    
    54 65
     ```
    
    55 66
     Hadrian provides several built-in flavours (`default`, `quick`, and a few
    

  • hadrian/src/Flavour.hs
    ... ... @@ -384,9 +384,15 @@ omitPragmas = addArgs
    384 384
     -- | Build stage2 dependencies with options to enable IPE debugging
    
    385 385
     -- information.
    
    386 386
     enableIPE :: Flavour -> Flavour
    
    387
    -enableIPE = addArgs
    
    388
    -    $ notStage0 ? builder (Ghc CompileHs)
    
    389
    -    ? pure ["-finfo-table-map", "-fdistinct-constructor-tables"]
    
    387
    +enableIPE =
    
    388
    +  addArgs $
    
    389
    +    mconcat
    
    390
    +      [ notStage0
    
    391
    +          ? builder (Ghc CompileHs)
    
    392
    +          ? pure
    
    393
    +            ["-finfo-table-map", "-fdistinct-constructor-tables"],
    
    394
    +        builder Testsuite ? arg "--config=ghc_with_ipe=True"
    
    395
    +      ]
    
    390 396
     
    
    391 397
     enableLateCCS :: Flavour -> Flavour
    
    392 398
     enableLateCCS = addArgs
    

  • hadrian/src/Rules/Documentation.hs
    ... ... @@ -74,6 +74,8 @@ needDocDeps = do
    74 74
         let templatedCabalFiles = map pkgCabalFile
    
    75 75
                 [ ghcBoot
    
    76 76
                 , ghcBootTh
    
    77
    +            , ghcExperimental
    
    78
    +            , ghcInternal
    
    77 79
                 , ghci
    
    78 80
                 , compiler
    
    79 81
                 , ghcHeap
    

  • hadrian/src/Settings/Packages.hs
    ... ... @@ -53,7 +53,7 @@ packageArgs = do
    53 53
             -- for Stage0 only so we can link ghc-pkg against it, so there is little
    
    54 54
             -- reason to spend the effort to optimise it.
    
    55 55
             , package cabal ?
    
    56
    -          stage0 ? builder Ghc ? arg "-O0"
    
    56
    +          andM [stage0, notCross] ? builder Ghc ? arg "-O0"
    
    57 57
     
    
    58 58
             ------------------------------- compiler -------------------------------
    
    59 59
             , package compiler ? mconcat
    
    ... ... @@ -71,7 +71,7 @@ packageArgs = do
    71 71
                 -- These files take a very long time to compile with -O1,
    
    72 72
                 -- so we use -O0 for them just in Stage0 to speed up the
    
    73 73
                 -- build but not affect Stage1+ executables
    
    74
    -            , inputs ["**/GHC/Hs/Instances.hs", "**/GHC/Driver/Session.hs"] ? stage0 ?
    
    74
    +            , inputs ["**/GHC/Hs/Instances.hs", "**/GHC/Driver/Session.hs"] ? andM [stage0, notCross] ?
    
    75 75
                   pure ["-O0"] ]
    
    76 76
     
    
    77 77
               , builder (Cabal Setup) ? mconcat
    

  • libraries/ghc-compact/tests/all.T
    ... ... @@ -20,7 +20,8 @@ test('compact_gc', [fragile_for(17253, ['ghci']), ignore_stdout], compile_and_ru
    20 20
     # this test computes closure sizes and those are affected
    
    21 21
     # by the ghci and prof ways, because of BCOs and profiling headers.
    
    22 22
     # Optimization levels slightly change what is/isn't shared so only run in normal mode
    
    23
    -test('compact_share', only_ways(['normal']), compile_and_run, [''])
    
    23
    +test('compact_share', [only_ways(['normal']), when(ghc_with_ipe(), skip)], # IPE changes allocation/layout affecting compactSize output.
    
    24
    +     compile_and_run, [''])
    
    24 25
     test('compact_bench', [ ignore_stdout, extra_run_opts('100') ],
    
    25 26
                            compile_and_run, [''])
    
    26 27
     test('T17044', normal, compile_and_run, [''])
    

  • libraries/ghc-experimental/ghc-experimental.cabal.in
    ... ... @@ -44,6 +44,7 @@ library
    44 44
           GHC.Stats.Experimental
    
    45 45
           Prelude.Experimental
    
    46 46
           System.Mem.Experimental
    
    47
    +      GHC.Exception.Backtrace.Experimental
    
    47 48
         if arch(wasm32)
    
    48 49
             exposed-modules:  GHC.Wasm.Prim
    
    49 50
         other-extensions:
    

  • libraries/ghc-experimental/src/GHC/Exception/Backtrace/Experimental.hs
    ... ... @@ -15,7 +15,7 @@ module GHC.Exception.Backtrace.Experimental
    15 15
         , getBacktraceMechanismState
    
    16 16
         , setBacktraceMechanismState
    
    17 17
         -- * Collecting backtraces
    
    18
    -    , Backtraces(..),
    
    18
    +    , Backtraces(..)
    
    19 19
         , displayBacktraces
    
    20 20
         , collectBacktraces
    
    21 21
         -- * Collecting exception annotations on throwing 'Exception's
    

  • libraries/ghc-internal/tests/backtraces/all.T
    ... ... @@ -2,5 +2,5 @@ test('T14532a', [], compile_and_run, [''])
    2 2
     test('T14532b', [], compile_and_run, [''])
    
    3 3
     test('T26507', [ when(have_profiling(), extra_ways(['prof']))
    
    4 4
                    , when(js_arch(), skip)
    
    5
    -	       , exit_code(1)], compile_and_run, [''])
    
    6
    -
    5
    +               , when(ghc_with_ipe(), skip) # IPE builds include an IPE backtrace section on stderr.
    
    6
    +               , exit_code(1)], compile_and_run, [''])

  • rts/AllocArray.c
    ... ... @@ -5,6 +5,7 @@
    5 5
     
    
    6 6
     StgMutArrPtrs *allocateMutArrPtrs (Capability *cap,
    
    7 7
                                        StgWord nelements,
    
    8
    +                                   StgClosure *init,
    
    8 9
                                        CostCentreStack *ccs USED_IF_PROFILING)
    
    9 10
     {
    
    10 11
         /* All sizes in words */
    
    ... ... @@ -25,6 +26,12 @@ StgMutArrPtrs *allocateMutArrPtrs (Capability *cap,
    25 26
         arr->ptrs = nelements;
    
    26 27
         arr->size = arrsize;
    
    27 28
     
    
    29
    +    if (init != NULL) {
    
    30
    +        for (StgWord i = 0; i < nelements; ++i) {
    
    31
    +            arr->payload[i] = init;
    
    32
    +        }
    
    33
    +    }
    
    34
    +
    
    28 35
         /* Initialize the card array. Note that memset needs sizes in bytes. */
    
    29 36
         memset(&(arr->payload[nelements]), 0, mutArrPtrsCards(nelements));
    
    30 37
     
    
    ... ... @@ -33,6 +40,7 @@ StgMutArrPtrs *allocateMutArrPtrs (Capability *cap,
    33 40
     
    
    34 41
     StgSmallMutArrPtrs *allocateSmallMutArrPtrs (Capability *cap,
    
    35 42
                                                  StgWord nelements,
    
    43
    +                                             StgClosure *init,
    
    36 44
                                                  CostCentreStack *ccs
    
    37 45
                                                    USED_IF_PROFILING)
    
    38 46
     {
    
    ... ... @@ -47,6 +55,13 @@ StgSmallMutArrPtrs *allocateSmallMutArrPtrs (Capability *cap,
    47 55
         /* No write barrier needed since this is a new allocation. */
    
    48 56
         SET_HDR(arr, &stg_SMALL_MUT_ARR_PTRS_DIRTY_info, ccs);
    
    49 57
         arr->ptrs = nelements;
    
    58
    +
    
    59
    +    if (init != NULL) {
    
    60
    +        for (StgWord i = 0; i < nelements; ++i) {
    
    61
    +            arr->payload[i] = init;
    
    62
    +        }
    
    63
    +    }
    
    64
    +
    
    50 65
         return arr;
    
    51 66
     }
    
    52 67
     
    

  • rts/AllocArray.h
    ... ... @@ -21,16 +21,19 @@
    21 21
      */
    
    22 22
     
    
    23 23
     /* Allocate a StgMutArrPtrs for a given number of elements. It is allocated in
    
    24
    - * the DIRTY state.
    
    24
    + * the DIRTY state. If init is non-NULL, initialize payload elements to init.
    
    25 25
      */
    
    26 26
     StgMutArrPtrs *allocateMutArrPtrs (Capability *cap,
    
    27 27
                                        StgWord nelements,
    
    28
    +                                   StgClosure *init,
    
    28 29
                                        CostCentreStack *ccs);
    
    29 30
     
    
    30
    -/* Allocate a StgSmallMutArrPtrs for a given number of elements.
    
    31
    +/* Allocate a StgSmallMutArrPtrs for a given number of elements. If init is
    
    32
    + * non-NULL, initialize payload elements to init.
    
    31 33
      */
    
    32 34
     StgSmallMutArrPtrs *allocateSmallMutArrPtrs (Capability *cap,
    
    33 35
                                                  StgWord nelements,
    
    36
    +                                             StgClosure *init,
    
    34 37
                                                  CostCentreStack *ccs);
    
    35 38
     
    
    36 39
     /* Allocate a StgArrBytes for a given number of bytes.
    

  • rts/ClosureTable.c
    ... ... @@ -46,7 +46,7 @@ bool enlargeClosureTable(Capability *cap, ClosureTable *t, int newcapacity)
    46 46
         ASSERT(newcapacity > oldcapacity);
    
    47 47
     
    
    48 48
         StgMutArrPtrs *newarr;
    
    49
    -    newarr = allocateMutArrPtrs(cap, newcapacity, CCS_SYSTEM_OR_NULL);
    
    49
    +    newarr = allocateMutArrPtrs(cap, newcapacity, NULL, CCS_SYSTEM_OR_NULL);
    
    50 50
         if (RTS_UNLIKELY(newarr == NULL)) return false;
    
    51 51
     
    
    52 52
         StgArrBytes *newfree;
    
    ... ... @@ -276,4 +276,3 @@ static bool isCompactClosureTable(ClosureTable *t)
    276 276
         }
    
    277 277
         return isCompact;
    
    278 278
     }
    279
    -

  • rts/Heap.c
    ... ... @@ -279,7 +279,7 @@ StgMutArrPtrs *heap_view_closurePtrs(Capability *cap, StgClosure *closure) {
    279 279
         StgClosure **ptrs = (StgClosure **) stgMallocBytes(sizeof(StgClosure *) * size, "heap_view_closurePtrs");
    
    280 280
         StgWord nptrs = collect_pointers(closure, ptrs);
    
    281 281
     
    
    282
    -    StgMutArrPtrs *arr = allocateMutArrPtrs(cap, nptrs, cap->r.rCCCS);
    
    282
    +    StgMutArrPtrs *arr = allocateMutArrPtrs(cap, nptrs, NULL, cap->r.rCCCS);
    
    283 283
         if (RTS_UNLIKELY(arr == NULL)) goto end;
    
    284 284
         SET_INFO((StgClosure *) arr, &stg_MUT_ARR_PTRS_FROZEN_CLEAN_info);
    
    285 285
     
    

  • rts/PrimOps.cmm
    ... ... @@ -386,24 +386,11 @@ stg_newArrayzh ( W_ n /* words */, gcptr init )
    386 386
     
    
    387 387
         again: MAYBE_GC(again);
    
    388 388
     
    
    389
    -    ("ptr" arr) = ccall allocateMutArrPtrs(MyCapability() "ptr", n, CCCS);
    
    389
    +    ("ptr" arr) = ccall allocateMutArrPtrs(MyCapability() "ptr", n, init "ptr", CCCS);
    
    390 390
         if (arr == NULL) (likely: False) {
    
    391 391
             jump stg_raisezh(HsIface_heapOverflow_closure(W_[ghc_hs_iface]));
    
    392 392
         }
    
    393 393
     
    
    394
    -    // Initialise all elements of the array with the value init
    
    395
    -    W_ p;
    
    396
    -    p = arr + SIZEOF_StgMutArrPtrs;
    
    397
    -    // Avoid the shift for `WDS(n)` in the inner loop
    
    398
    -    W_ limit;
    
    399
    -    limit = arr + SIZEOF_StgMutArrPtrs + WDS(n);
    
    400
    -  for:
    
    401
    -    if (p < limit) (likely: True) {
    
    402
    -        W_[p] = init;
    
    403
    -        p = p + WDS(1);
    
    404
    -        goto for;
    
    405
    -    }
    
    406
    -
    
    407 394
         return (arr);
    
    408 395
     }
    
    409 396
     
    
    ... ... @@ -496,24 +483,11 @@ stg_newSmallArrayzh ( W_ n /* words */, gcptr init )
    496 483
     
    
    497 484
         again: MAYBE_GC(again);
    
    498 485
     
    
    499
    -    ("ptr" arr) = ccall allocateSmallMutArrPtrs(MyCapability() "ptr", n, CCCS);
    
    486
    +    ("ptr" arr) = ccall allocateSmallMutArrPtrs(MyCapability() "ptr", n, init "ptr", CCCS);
    
    500 487
         if (arr == NULL) (likely: False) {
    
    501 488
             jump stg_raisezh(HsIface_heapOverflow_closure(W_[ghc_hs_iface]));
    
    502 489
         }
    
    503 490
     
    
    504
    -    // Initialise all elements of the array with the value init
    
    505
    -    W_ p;
    
    506
    -    p = arr + SIZEOF_StgSmallMutArrPtrs;
    
    507
    -    // Avoid the shift for `WDS(n)` in the inner loop
    
    508
    -    W_ limit;
    
    509
    -    limit = arr + SIZEOF_StgSmallMutArrPtrs + WDS(n);
    
    510
    -  for:
    
    511
    -    if (p < limit) (likely: True) {
    
    512
    -        W_[p] = init;
    
    513
    -        p = p + WDS(1);
    
    514
    -        goto for;
    
    515
    -    }
    
    516
    -
    
    517 491
         return (arr);
    
    518 492
     }
    
    519 493
     
    

  • rts/RtsFlags.c
    ... ... @@ -209,6 +209,8 @@ void initRtsFlagsDefaults(void)
    209 209
         RtsFlags.DebugFlags.numa            = false;
    
    210 210
         RtsFlags.DebugFlags.compact         = false;
    
    211 211
         RtsFlags.DebugFlags.continuation    = false;
    
    212
    +    RtsFlags.DebugFlags.iomanager       = false;
    
    213
    +    RtsFlags.DebugFlags.ipe             = false;
    
    212 214
     
    
    213 215
     #if defined(PROFILING)
    
    214 216
         RtsFlags.CcFlags.doCostCentres      = COST_CENTRES_NONE;
    
    ... ... @@ -482,6 +484,7 @@ usage_text[] = {
    482 484
     #if defined(DEBUG)
    
    483 485
     "  -Ds  DEBUG: scheduler",
    
    484 486
     "  -Di  DEBUG: interpreter",
    
    487
    +"  -DI  DEBUG: IPE",
    
    485 488
     "  -Dw  DEBUG: weak",
    
    486 489
     "  -DG  DEBUG: gccafs",
    
    487 490
     "  -Dg  DEBUG: gc",
    
    ... ... @@ -2311,6 +2314,9 @@ static void read_debug_flags(const char* arg)
    2311 2314
             case 'o':
    
    2312 2315
                 RtsFlags.DebugFlags.iomanager = true;
    
    2313 2316
                 break;
    
    2317
    +        case 'I':
    
    2318
    +            RtsFlags.DebugFlags.ipe = true;
    
    2319
    +            break;
    
    2314 2320
             default:
    
    2315 2321
                 bad_option( arg );
    
    2316 2322
             }
    

  • rts/Threads.c
    ... ... @@ -894,7 +894,7 @@ StgMutArrPtrs *listThreads(Capability *cap)
    894 894
         }
    
    895 895
     
    
    896 896
         // Allocate a suitably-sized array...
    
    897
    -    StgMutArrPtrs *arr = allocateMutArrPtrs(cap, n_threads, cap->r.rCCCS);
    
    897
    +    StgMutArrPtrs *arr = allocateMutArrPtrs(cap, n_threads, NULL, cap->r.rCCCS);
    
    898 898
         if (RTS_UNLIKELY(arr == NULL)) goto end;
    
    899 899
     
    
    900 900
         // Populate it...
    

  • rts/Trace.c
    ... ... @@ -685,7 +685,8 @@ void traceHeapProfSampleString(const char *label, StgWord residency)
    685 685
     void traceIPE(const InfoProvEnt *ipe)
    
    686 686
     {
    
    687 687
     #if defined(DEBUG)
    
    688
    -    if (RtsFlags.TraceFlags.tracing == TRACE_STDERR) {
    
    688
    +    if (RtsFlags.TraceFlags.tracing == TRACE_STDERR
    
    689
    +        && RtsFlags.DebugFlags.ipe) {
    
    689 690
             ACQUIRE_LOCK(&trace_utx);
    
    690 691
     
    
    691 692
             char closure_desc_buf[CLOSURE_DESC_BUFFER_SIZE] = {};
    

  • rts/Weak.c
    ... ... @@ -146,7 +146,7 @@ scheduleFinalizers(Capability *cap, StgWeak *list)
    146 146
     
    
    147 147
         debugTrace(DEBUG_weak, "weak: batching %d finalizers", n);
    
    148 148
     
    
    149
    -    StgMutArrPtrs *arr = allocateMutArrPtrs(cap, n, CCS_SYSTEM_OR_NULL);
    
    149
    +    StgMutArrPtrs *arr = allocateMutArrPtrs(cap, n, NULL, CCS_SYSTEM_OR_NULL);
    
    150 150
         if (RTS_UNLIKELY(arr == NULL)) exitHeapOverflow();
    
    151 151
         // No write barrier needed here; this array is only going to referred to by this core.
    
    152 152
         SET_INFO((StgClosure *) arr, &stg_MUT_ARR_PTRS_FROZEN_CLEAN_info);
    

  • rts/include/rts/Flags.h
    ... ... @@ -118,6 +118,7 @@ typedef struct _DEBUG_FLAGS {
    118 118
         bool compact;        /* 'C' */
    
    119 119
         bool continuation;   /* 'k' */
    
    120 120
         bool iomanager;      /* 'o' */
    
    121
    +    bool ipe;            /* 'I' */
    
    121 122
     } DEBUG_FLAGS;
    
    122 123
     
    
    123 124
     /* See Note [Synchronization of flags and base APIs] */
    

  • testsuite/driver/testglobals.py
    ... ... @@ -72,6 +72,10 @@ class TestConfig:
    72 72
             # Was the compiler compiled with -debug?
    
    73 73
             self.debug_rts = False
    
    74 74
     
    
    75
    +        # Were the compiler + libraries built with IPE-related options
    
    76
    +        # (e.g. -finfo-table-map, -fdistinct-constructor-tables)?
    
    77
    +        self.ghc_with_ipe = False
    
    78
    +
    
    75 79
             # Was the compiler compiled with LLVM?
    
    76 80
             self.ghc_built_by_llvm = False
    
    77 81
     
    

  • testsuite/driver/testlib.py
    ... ... @@ -1074,6 +1074,9 @@ def have_profiling( ) -> bool:
    1074 1074
     def have_threaded( ) -> bool:
    
    1075 1075
         return config.ghc_with_threaded_rts
    
    1076 1076
     
    
    1077
    +def ghc_with_ipe( ) -> bool:
    
    1078
    +    return config.ghc_with_ipe
    
    1079
    +
    
    1077 1080
     def in_tree_compiler( ) -> bool:
    
    1078 1081
         return config.in_tree_compiler
    
    1079 1082
     
    

  • testsuite/tests/interface-stability/ghc-experimental-exports.stdout
    ... ... @@ -4454,6 +4454,22 @@ module Data.Tuple.Experimental where
    4454 4454
       data Unit# = ...
    
    4455 4455
       getSolo :: forall a. Solo a -> a
    
    4456 4456
     
    
    4457
    +module GHC.Exception.Backtrace.Experimental where
    
    4458
    +  -- Safety: None
    
    4459
    +  type BacktraceMechanism :: *
    
    4460
    +  data BacktraceMechanism = CostCentreBacktrace | HasCallStackBacktrace | ExecutionBacktrace | IPEBacktrace
    
    4461
    +  type Backtraces :: *
    
    4462
    +  data Backtraces = Backtraces {btrCostCentre :: GHC.Internal.Maybe.Maybe (GHC.Internal.Ptr.Ptr GHC.Internal.Stack.CCS.CostCentreStack), btrHasCallStack :: GHC.Internal.Maybe.Maybe GHC.Internal.Stack.Types.CallStack, btrExecutionStack :: GHC.Internal.Maybe.Maybe GHC.Internal.ExecutionStack.Internal.StackTrace, btrIpe :: GHC.Internal.Maybe.Maybe GHC.Internal.Stack.CloneStack.StackSnapshot}
    
    4463
    +  type CollectExceptionAnnotationMechanism :: *
    
    4464
    +  data CollectExceptionAnnotationMechanism = ...
    
    4465
    +  collectBacktraces :: (?callStack::GHC.Internal.Stack.Types.CallStack) => GHC.Internal.Types.IO Backtraces
    
    4466
    +  collectExceptionAnnotation :: GHC.Internal.Stack.Types.HasCallStack => GHC.Internal.Types.IO GHC.Internal.Exception.Context.SomeExceptionAnnotation
    
    4467
    +  displayBacktraces :: Backtraces -> GHC.Internal.Base.String
    
    4468
    +  getBacktraceMechanismState :: BacktraceMechanism -> GHC.Internal.Types.IO GHC.Internal.Types.Bool
    
    4469
    +  getCollectExceptionAnnotationMechanism :: GHC.Internal.Types.IO CollectExceptionAnnotationMechanism
    
    4470
    +  setBacktraceMechanismState :: BacktraceMechanism -> GHC.Internal.Types.Bool -> GHC.Internal.Types.IO ()
    
    4471
    +  setCollectExceptionAnnotation :: forall a. GHC.Internal.Exception.Context.ExceptionAnnotation a => (GHC.Internal.Stack.Types.HasCallStack => GHC.Internal.Types.IO a) -> GHC.Internal.Types.IO ()
    
    4472
    +
    
    4457 4473
     module GHC.PrimOps where
    
    4458 4474
       -- Safety: Unsafe
    
    4459 4475
       (*#) :: Int# -> Int# -> Int#
    
    ... ... @@ -11182,6 +11198,7 @@ instance GHC.Internal.Enum.Enum GHC.Internal.RTS.Flags.DoTrace -- Defined in ‘
    11182 11198
     instance GHC.Internal.Enum.Enum GHC.Internal.RTS.Flags.GiveGCStats -- Defined in ‘GHC.Internal.RTS.Flags’
    
    11183 11199
     instance GHC.Internal.Enum.Enum GHC.Internal.RTS.Flags.IoManagerFlag -- Defined in ‘GHC.Internal.RTS.Flags’
    
    11184 11200
     instance GHC.Internal.Enum.Enum GHC.Internal.IO.SubSystem.IoSubSystem -- Defined in ‘GHC.Internal.IO.SubSystem’
    
    11201
    +instance GHC.Internal.Exception.Context.ExceptionAnnotation GHC.Internal.Exception.Backtrace.Backtraces -- Defined in ‘GHC.Internal.Exception.Backtrace’
    
    11185 11202
     instance forall a. GHC.Internal.Float.Floating a => GHC.Internal.Float.Floating (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’
    
    11186 11203
     instance forall a. GHC.Internal.Float.RealFloat a => GHC.Internal.Float.RealFloat (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’
    
    11187 11204
     instance forall a. GHC.Internal.Foreign.Storable.Storable a => GHC.Internal.Foreign.Storable.Storable (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’
    

  • testsuite/tests/interface-stability/ghc-experimental-exports.stdout-mingw32
    ... ... @@ -4454,6 +4454,22 @@ module Data.Tuple.Experimental where
    4454 4454
       data Unit# = ...
    
    4455 4455
       getSolo :: forall a. Solo a -> a
    
    4456 4456
     
    
    4457
    +module GHC.Exception.Backtrace.Experimental where
    
    4458
    +  -- Safety: None
    
    4459
    +  type BacktraceMechanism :: *
    
    4460
    +  data BacktraceMechanism = CostCentreBacktrace | HasCallStackBacktrace | ExecutionBacktrace | IPEBacktrace
    
    4461
    +  type Backtraces :: *
    
    4462
    +  data Backtraces = Backtraces {btrCostCentre :: GHC.Internal.Maybe.Maybe (GHC.Internal.Ptr.Ptr GHC.Internal.Stack.CCS.CostCentreStack), btrHasCallStack :: GHC.Internal.Maybe.Maybe GHC.Internal.Stack.Types.CallStack, btrExecutionStack :: GHC.Internal.Maybe.Maybe GHC.Internal.ExecutionStack.Internal.StackTrace, btrIpe :: GHC.Internal.Maybe.Maybe GHC.Internal.Stack.CloneStack.StackSnapshot}
    
    4463
    +  type CollectExceptionAnnotationMechanism :: *
    
    4464
    +  data CollectExceptionAnnotationMechanism = ...
    
    4465
    +  collectBacktraces :: (?callStack::GHC.Internal.Stack.Types.CallStack) => GHC.Internal.Types.IO Backtraces
    
    4466
    +  collectExceptionAnnotation :: GHC.Internal.Stack.Types.HasCallStack => GHC.Internal.Types.IO GHC.Internal.Exception.Context.SomeExceptionAnnotation
    
    4467
    +  displayBacktraces :: Backtraces -> GHC.Internal.Base.String
    
    4468
    +  getBacktraceMechanismState :: BacktraceMechanism -> GHC.Internal.Types.IO GHC.Internal.Types.Bool
    
    4469
    +  getCollectExceptionAnnotationMechanism :: GHC.Internal.Types.IO CollectExceptionAnnotationMechanism
    
    4470
    +  setBacktraceMechanismState :: BacktraceMechanism -> GHC.Internal.Types.Bool -> GHC.Internal.Types.IO ()
    
    4471
    +  setCollectExceptionAnnotation :: forall a. GHC.Internal.Exception.Context.ExceptionAnnotation a => (GHC.Internal.Stack.Types.HasCallStack => GHC.Internal.Types.IO a) -> GHC.Internal.Types.IO ()
    
    4472
    +
    
    4457 4473
     module GHC.PrimOps where
    
    4458 4474
       -- Safety: Unsafe
    
    4459 4475
       (*#) :: Int# -> Int# -> Int#
    
    ... ... @@ -11185,6 +11201,7 @@ instance GHC.Internal.Enum.Enum GHC.Internal.RTS.Flags.DoTrace -- Defined in ‘
    11185 11201
     instance GHC.Internal.Enum.Enum GHC.Internal.RTS.Flags.GiveGCStats -- Defined in ‘GHC.Internal.RTS.Flags’
    
    11186 11202
     instance GHC.Internal.Enum.Enum GHC.Internal.RTS.Flags.IoManagerFlag -- Defined in ‘GHC.Internal.RTS.Flags’
    
    11187 11203
     instance GHC.Internal.Enum.Enum GHC.Internal.IO.SubSystem.IoSubSystem -- Defined in ‘GHC.Internal.IO.SubSystem’
    
    11204
    +instance GHC.Internal.Exception.Context.ExceptionAnnotation GHC.Internal.Exception.Backtrace.Backtraces -- Defined in ‘GHC.Internal.Exception.Backtrace’
    
    11188 11205
     instance forall a. GHC.Internal.Float.Floating a => GHC.Internal.Float.Floating (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’
    
    11189 11206
     instance forall a. GHC.Internal.Float.RealFloat a => GHC.Internal.Float.RealFloat (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’
    
    11190 11207
     instance forall a. GHC.Internal.Foreign.Storable.Storable a => GHC.Internal.Foreign.Storable.Storable (GHC.Internal.Data.Ord.Down a) -- Defined in ‘GHC.Internal.Data.Ord’
    

  • testsuite/tests/rts/Makefile
    ... ... @@ -140,7 +140,7 @@ T20199:
    140 140
     .PHONY: EventlogOutput_IPE
    
    141 141
     EventlogOutput_IPE:
    
    142 142
     	"$(TEST_HC)" $(TEST_HC_OPTS) -debug -finfo-table-map -v0 EventlogOutput.hs
    
    143
    -	./EventlogOutput +RTS -va 2> EventlogOutput_IPE.stderr.log
    
    143
    +	./EventlogOutput +RTS -va -DI 2> EventlogOutput_IPE.stderr.log
    
    144 144
     	grep "IPE:" EventlogOutput_IPE.stderr.log
    
    145 145
     
    
    146 146
     .PHONY: T23142
    

  • testsuite/tests/rts/all.T
    ... ... @@ -535,6 +535,7 @@ test('T13676',
    535 535
     test('InitEventLogging',
    
    536 536
          [ only_ways(['normal'])
    
    537 537
          , extra_run_opts('+RTS -RTS')
    
    538
    +     , when(ghc_with_ipe(), skip) # IPE builds can change eventlog writer call counts.
    
    538 539
          , req_c
    
    539 540
          ],
    
    540 541
          compile_and_run, ['InitEventLogging_c.c'])
    
    ... ... @@ -588,6 +589,7 @@ test('cloneThreadStack', [req_c, only_ways(['threaded1']), extra_ways(['threaded
    588 589
     
    
    589 590
     test('decodeMyStack',
    
    590 591
       [ omit_ghci, js_broken(22261) # cloneMyStack# not yet implemented
    
    592
    +  , when(ghc_with_ipe(), skip) # IPE builds can change decoded stack output.
    
    591 593
       ], compile_and_run, ['-finfo-table-map'])
    
    592 594
     
    
    593 595
     # Options:
    
    ... ... @@ -595,6 +597,7 @@ test('decodeMyStack',
    595 597
     test('decodeMyStack_underflowFrames',
    
    596 598
       [ extra_run_opts('+RTS -kc8K -RTS')
    
    597 599
       , omit_ghci, js_broken(22261) # cloneMyStack# not yet implemented
    
    600
    +  , when(ghc_with_ipe(), skip) # IPE builds can change decoded stack layout/length.
    
    598 601
       ], compile_and_run, ['-finfo-table-map -rtsopts'])
    
    599 602
     
    
    600 603
     # -finfo-table-map intentionally missing
    
    ... ... @@ -602,6 +605,7 @@ test('decodeMyStack_emptyListForMissingFlag',
    602 605
       [ ignore_stdout
    
    603 606
       , ignore_stderr
    
    604 607
       , js_broken(22261) # cloneMyStack# not yet implemented
    
    608
    +  , when(ghc_with_ipe(), skip) # IPE builds can populate IPE info even without -finfo-table-map on this module.
    
    605 609
       ], compile_and_run, [''])
    
    606 610
     
    
    607 611
     # Tests RTS flag parsing. Skipped on JS as it uses a distinct RTS.
    
    ... ... @@ -646,7 +650,7 @@ test('T25280', [unless(opsys('linux'),skip),req_process,js_skip], compile_and_ru
    646 650
     test('T25560', [req_c_rts, ignore_stderr], compile_and_run, [''])
    
    647 651
     
    
    648 652
     test('TestProddableBlockSet', [req_c_rts], multimod_compile_and_run, ['TestProddableBlockSet.c', '-no-hs-main'])
    
    649
    -test('T22859', 
    
    653
    +test('T22859',
    
    650 654
          [js_skip,
    
    651 655
           # This test is vulnerable to changes in allocation behaviour, so we disable it in some ways
    
    652 656
           when(arch('wasm32'), skip),
    

  • testsuite/tests/rts/ipe/all.T
    ... ... @@ -8,7 +8,7 @@ test('ipeMap', [extra_files(['ipe_lib.c', 'ipe_lib.h']), c_src, omit_ghci], comp
    8 8
     test('ipeEventLog',
    
    9 9
          [ c_src,
    
    10 10
            extra_files(['ipe_lib.c', 'ipe_lib.h']),
    
    11
    -       extra_run_opts('+RTS -va -RTS'),
    
    11
    +       extra_run_opts('+RTS -va -DI -RTS'),
    
    12 12
            grep_errmsg('table_name_'),
    
    13 13
            only_ways(debug_ways),
    
    14 14
            normalise_errmsg_fun(noCapabilityOutputFilter),
    
    ... ... @@ -24,7 +24,7 @@ test('ipeEventLog',
    24 24
     test('ipeEventLog_fromMap',
    
    25 25
          [ c_src,
    
    26 26
            extra_files(['ipe_lib.c', 'ipe_lib.h']),
    
    27
    -       extra_run_opts('+RTS -va -RTS'),
    
    27
    +       extra_run_opts('+RTS -va -DI -RTS'),
    
    28 28
            grep_errmsg('table_name_'),
    
    29 29
            only_ways(debug_ways),
    
    30 30
            normalise_errmsg_fun(noCapabilityOutputFilter),
    
    ... ... @@ -34,4 +34,3 @@ test('ipeEventLog_fromMap',
    34 34
            when(opsys('darwin'), fragile(0))
    
    35 35
          ],
    
    36 36
          compile_and_run, ['ipe_lib.c'])
    37
    -