Wen Kokke pushed to branch wip/wenkokke/trace-ipe at Glasgow Haskell Compiler / GHC
Commits:
-
1973f657
by Wen Kokke at 2026-05-17T16:52:04+01:00
-
d43aa05a
by Wen Kokke at 2026-05-17T16:52:07+01:00
-
26db7027
by Wen Kokke at 2026-05-17T16:52:08+01:00
10 changed files:
- libraries/ghc-internal/src/GHC/Internal/RTS/Flags.hsc
- testsuite/tests/interface-stability/ghc-experimental-exports.stdout
- testsuite/tests/interface-stability/ghc-experimental-exports.stdout-mingw32
- + testsuite/tests/rts/T25275/DebugIpe.hs
- + testsuite/tests/rts/T25275/T25275_A.stdout
- + testsuite/tests/rts/T25275/T25275_B.stdout
- + testsuite/tests/rts/T25275/T25275_C.stdout
- + testsuite/tests/rts/T25275/T25275_D.stdout
- + testsuite/tests/rts/T25275/TraceIpe.hs
- + testsuite/tests/rts/T25275/all.T
Changes:
| ... | ... | @@ -211,6 +211,8 @@ data DebugFlags = DebugFlags |
| 211 | 211 | , squeeze :: Bool -- ^ @z@ stack squeezing & lazy blackholing
|
| 212 | 212 | , hpc :: Bool -- ^ @c@ coverage
|
| 213 | 213 | , sparks :: Bool -- ^ @r@
|
| 214 | + , ipe :: Bool -- ^ @I@
|
|
| 215 | + -- @since ghc-experimental-10.0.0
|
|
| 214 | 216 | } deriving ( Show -- ^ @since base-4.8.0.0
|
| 215 | 217 | , Generic -- ^ @since base-4.15.0.0
|
| 216 | 218 | )
|
| ... | ... | @@ -590,6 +592,8 @@ getDebugFlags = do |
| 590 | 592 | (#{peek DEBUG_FLAGS, hpc} ptr :: IO CBool))
|
| 591 | 593 | <*> (toBool <$>
|
| 592 | 594 | (#{peek DEBUG_FLAGS, sparks} ptr :: IO CBool))
|
| 595 | + <*> (toBool <$>
|
|
| 596 | + (#{peek DEBUG_FLAGS, ipe} ptr :: IO CBool))
|
|
| 593 | 597 | |
| 594 | 598 | getCCFlags :: IO CCFlags
|
| 595 | 599 | getCCFlags = do
|
| ... | ... | @@ -6428,7 +6428,7 @@ module GHC.RTS.Flags.Experimental where |
| 6428 | 6428 | type ConcFlags :: *
|
| 6429 | 6429 | data ConcFlags = ConcFlags {ctxtSwitchTime :: RtsTime, ctxtSwitchTicks :: GHC.Internal.Types.Int}
|
| 6430 | 6430 | type DebugFlags :: *
|
| 6431 | - data DebugFlags = DebugFlags {scheduler :: GHC.Internal.Types.Bool, interpreter :: GHC.Internal.Types.Bool, weak :: GHC.Internal.Types.Bool, gccafs :: GHC.Internal.Types.Bool, gc :: GHC.Internal.Types.Bool, nonmoving_gc :: GHC.Internal.Types.Bool, block_alloc :: GHC.Internal.Types.Bool, sanity :: GHC.Internal.Types.Bool, stable :: GHC.Internal.Types.Bool, prof :: GHC.Internal.Types.Bool, linker :: GHC.Internal.Types.Bool, apply :: GHC.Internal.Types.Bool, stm :: GHC.Internal.Types.Bool, squeeze :: GHC.Internal.Types.Bool, hpc :: GHC.Internal.Types.Bool, sparks :: GHC.Internal.Types.Bool}
|
|
| 6431 | + data DebugFlags = DebugFlags {scheduler :: GHC.Internal.Types.Bool, interpreter :: GHC.Internal.Types.Bool, weak :: GHC.Internal.Types.Bool, gccafs :: GHC.Internal.Types.Bool, gc :: GHC.Internal.Types.Bool, nonmoving_gc :: GHC.Internal.Types.Bool, block_alloc :: GHC.Internal.Types.Bool, sanity :: GHC.Internal.Types.Bool, stable :: GHC.Internal.Types.Bool, prof :: GHC.Internal.Types.Bool, linker :: GHC.Internal.Types.Bool, apply :: GHC.Internal.Types.Bool, stm :: GHC.Internal.Types.Bool, squeeze :: GHC.Internal.Types.Bool, hpc :: GHC.Internal.Types.Bool, sparks :: GHC.Internal.Types.Bool, ipe :: GHC.Internal.Types.Bool}
|
|
| 6432 | 6432 | type DoCostCentres :: *
|
| 6433 | 6433 | data DoCostCentres = CostCentresNone | CostCentresSummary | CostCentresVerbose | CostCentresAll | CostCentresJSON
|
| 6434 | 6434 | type DoHeapProfile :: *
|
| ... | ... | @@ -6431,7 +6431,7 @@ module GHC.RTS.Flags.Experimental where |
| 6431 | 6431 | type ConcFlags :: *
|
| 6432 | 6432 | data ConcFlags = ConcFlags {ctxtSwitchTime :: RtsTime, ctxtSwitchTicks :: GHC.Internal.Types.Int}
|
| 6433 | 6433 | type DebugFlags :: *
|
| 6434 | - data DebugFlags = DebugFlags {scheduler :: GHC.Internal.Types.Bool, interpreter :: GHC.Internal.Types.Bool, weak :: GHC.Internal.Types.Bool, gccafs :: GHC.Internal.Types.Bool, gc :: GHC.Internal.Types.Bool, nonmoving_gc :: GHC.Internal.Types.Bool, block_alloc :: GHC.Internal.Types.Bool, sanity :: GHC.Internal.Types.Bool, stable :: GHC.Internal.Types.Bool, prof :: GHC.Internal.Types.Bool, linker :: GHC.Internal.Types.Bool, apply :: GHC.Internal.Types.Bool, stm :: GHC.Internal.Types.Bool, squeeze :: GHC.Internal.Types.Bool, hpc :: GHC.Internal.Types.Bool, sparks :: GHC.Internal.Types.Bool}
|
|
| 6434 | + data DebugFlags = DebugFlags {scheduler :: GHC.Internal.Types.Bool, interpreter :: GHC.Internal.Types.Bool, weak :: GHC.Internal.Types.Bool, gccafs :: GHC.Internal.Types.Bool, gc :: GHC.Internal.Types.Bool, nonmoving_gc :: GHC.Internal.Types.Bool, block_alloc :: GHC.Internal.Types.Bool, sanity :: GHC.Internal.Types.Bool, stable :: GHC.Internal.Types.Bool, prof :: GHC.Internal.Types.Bool, linker :: GHC.Internal.Types.Bool, apply :: GHC.Internal.Types.Bool, stm :: GHC.Internal.Types.Bool, squeeze :: GHC.Internal.Types.Bool, hpc :: GHC.Internal.Types.Bool, sparks :: GHC.Internal.Types.Bool, ipe :: GHC.Internal.Types.Bool}
|
|
| 6435 | 6435 | type DoCostCentres :: *
|
| 6436 | 6436 | data DoCostCentres = CostCentresNone | CostCentresSummary | CostCentresVerbose | CostCentresAll | CostCentresJSON
|
| 6437 | 6437 | type DoHeapProfile :: *
|
| 1 | +module Main where
|
|
| 2 | + |
|
| 3 | +import GHC.RTS.Flags.Experimental (DebugFlags (..), getDebugFlags)
|
|
| 4 | + |
|
| 5 | +main :: IO ()
|
|
| 6 | +main = print . ipe =<< getDebugFlags |
| 1 | +False |
|
| \ No newline at end of file |
| 1 | +True |
|
| \ No newline at end of file |
| 1 | +False |
|
| \ No newline at end of file |
| 1 | +True |
|
| \ No newline at end of file |
| 1 | +module Main where
|
|
| 2 | + |
|
| 3 | +import GHC.RTS.Flags.Experimental (TraceFlags (..), getTraceFlags)
|
|
| 4 | + |
|
| 5 | +main :: IO ()
|
|
| 6 | +main = print . traceIpe =<< getTraceFlags |
| 1 | +# Compile and run with default RTS options
|
|
| 2 | +test(
|
|
| 3 | + 'T25275_A',
|
|
| 4 | + [
|
|
| 5 | + extra_files(['TraceIpe.hs']),
|
|
| 6 | + js_skip
|
|
| 7 | + ],
|
|
| 8 | + multimod_compile_and_run,
|
|
| 9 | + ['TraceIpe', ''],
|
|
| 10 | +)
|
|
| 11 | + |
|
| 12 | +# Compile and run with -lI
|
|
| 13 | +test(
|
|
| 14 | + 'T25275_B',
|
|
| 15 | + [
|
|
| 16 | + extra_files(['TraceIpe.hs']),
|
|
| 17 | + extra_run_opts('+RTS -lI -RTS'),
|
|
| 18 | + js_skip
|
|
| 19 | + ],
|
|
| 20 | + multimod_compile_and_run,
|
|
| 21 | + ['TraceIpe', ''],
|
|
| 22 | +)
|
|
| 23 | + |
|
| 24 | +# Compile and run with default RTS options
|
|
| 25 | +test(
|
|
| 26 | + 'T25275_C',
|
|
| 27 | + [
|
|
| 28 | + only_ways(['debug']),
|
|
| 29 | + extra_files(['DebugIpe.hs']),
|
|
| 30 | + ],
|
|
| 31 | + multimod_compile_and_run,
|
|
| 32 | + ['DebugIpe', ''],
|
|
| 33 | +)
|
|
| 34 | + |
|
| 35 | +# Compile and run with -DI
|
|
| 36 | +test(
|
|
| 37 | + 'T25275_D',
|
|
| 38 | + [
|
|
| 39 | + only_ways(['debug']),
|
|
| 40 | + extra_files(['DebugIpe.hs']),
|
|
| 41 | + extra_run_opts('+RTS -DI -RTS'),
|
|
| 42 | + ],
|
|
| 43 | + multimod_compile_and_run,
|
|
| 44 | + ['DebugIpe', ''],
|
|
| 45 | +) |