Wen Kokke pushed to branch wip/wenkokke/trace-ipe at Glasgow Haskell Compiler / GHC
Commits:
-
334ba7f8
by Wen Kokke at 2026-05-14T16:44:50+01:00
-
72a5375b
by Wen Kokke at 2026-05-14T16:44:53+01:00
-
b1a695cd
by Wen Kokke at 2026-05-14T16:44:53+01:00
-
97983c96
by Wen Kokke at 2026-05-14T16:44:53+01:00
5 changed files:
- libraries/ghc-internal/src/GHC/Internal/RTS/Flags.hsc
- + testsuite/tests/rts/T25275/DebugIpe.hs
- + testsuite/tests/rts/T25275/T25275_C.stdout
- + testsuite/tests/rts/T25275/T25275_D.stdout
- 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-9.1001.0
|
|
| 214 | 216 | } deriving ( Show -- ^ @since base-4.8.0.0
|
| 215 | 217 | , Generic -- ^ @since base-4.15.0.0
|
| 216 | 218 | )
|
| ... | ... | @@ -360,6 +362,7 @@ data TraceFlags = TraceFlags |
| 360 | 362 | , sparksFull :: Bool -- ^ trace spark events 100% accurately
|
| 361 | 363 | , user :: Bool -- ^ trace user events (emitted from Haskell code)
|
| 362 | 364 | , traceIpe :: Bool -- ^ trace IPE events
|
| 365 | + -- @since ghc-experimental-9.1001.0
|
|
| 363 | 366 | } deriving ( Show -- ^ @since base-4.8.0.0
|
| 364 | 367 | , Generic -- ^ @since base-4.15.0.0
|
| 365 | 368 | )
|
| ... | ... | @@ -589,6 +592,8 @@ getDebugFlags = do |
| 589 | 592 | (#{peek DEBUG_FLAGS, hpc} ptr :: IO CBool))
|
| 590 | 593 | <*> (toBool <$>
|
| 591 | 594 | (#{peek DEBUG_FLAGS, sparks} ptr :: IO CBool))
|
| 595 | + <*> (toBool <$>
|
|
| 596 | + (#{peek DEBUG_FLAGS, ipe} ptr :: IO CBool))
|
|
| 592 | 597 | |
| 593 | 598 | getCCFlags :: IO CCFlags
|
| 594 | 599 | getCCFlags = do
|
| 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 |
| ... | ... | @@ -18,3 +18,26 @@ test( |
| 18 | 18 | multimod_compile_and_run,
|
| 19 | 19 | ['TraceIpe', ''],
|
| 20 | 20 | )
|
| 21 | + |
|
| 22 | +# Compile and run with default RTS options
|
|
| 23 | +test(
|
|
| 24 | + 'T25275_C',
|
|
| 25 | + [
|
|
| 26 | + only_ways(['debug']),
|
|
| 27 | + extra_files(['DebugIpe.hs']),
|
|
| 28 | + ],
|
|
| 29 | + multimod_compile_and_run,
|
|
| 30 | + ['DebugIpe', ''],
|
|
| 31 | +)
|
|
| 32 | + |
|
| 33 | +# Compile and run with -DI
|
|
| 34 | +test(
|
|
| 35 | + 'T25275_D',
|
|
| 36 | + [
|
|
| 37 | + only_ways(['debug']),
|
|
| 38 | + extra_files(['DebugIpe.hs']),
|
|
| 39 | + extra_run_opts('+RTS -DI -RTS'),
|
|
| 40 | + ],
|
|
| 41 | + multimod_compile_and_run,
|
|
| 42 | + ['DebugIpe', ''],
|
|
| 43 | +) |