Wen Kokke pushed to branch wip/wenkokke/trace-ipe at Glasgow Haskell Compiler / GHC
Commits:
-
9effb6f5
by Wen Kokke at 2026-05-14T22:17:27+01:00
-
285eddd3
by Wen Kokke at 2026-05-14T22:17:34+01:00
-
f3e16965
by Wen Kokke at 2026-05-14T22:17:34+01:00
-
4e3f01e2
by Wen Kokke at 2026-05-14T22:17:37+01:00
8 changed files:
- libraries/ghc-internal/src/GHC/Internal/RTS/Flags.hsc
- + 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-9.1001.0
|
|
| 214 | 216 | } deriving ( Show -- ^ @since base-4.8.0.0
|
| 215 | 217 | , Generic -- ^ @since base-4.15.0.0
|
| 216 | 218 | )
|
| ... | ... | @@ -359,6 +361,8 @@ data TraceFlags = TraceFlags |
| 359 | 361 | , sparksSampled :: Bool -- ^ trace spark events by a sampled method
|
| 360 | 362 | , sparksFull :: Bool -- ^ trace spark events 100% accurately
|
| 361 | 363 | , user :: Bool -- ^ trace user events (emitted from Haskell code)
|
| 364 | + , traceIpe :: Bool -- ^ trace IPE events
|
|
| 365 | + -- @since ghc-experimental-9.1001.0
|
|
| 362 | 366 | } deriving ( Show -- ^ @since base-4.8.0.0
|
| 363 | 367 | , Generic -- ^ @since base-4.15.0.0
|
| 364 | 368 | )
|
| ... | ... | @@ -588,6 +592,8 @@ getDebugFlags = do |
| 588 | 592 | (#{peek DEBUG_FLAGS, hpc} ptr :: IO CBool))
|
| 589 | 593 | <*> (toBool <$>
|
| 590 | 594 | (#{peek DEBUG_FLAGS, sparks} ptr :: IO CBool))
|
| 595 | + <*> (toBool <$>
|
|
| 596 | + (#{peek DEBUG_FLAGS, ipe} ptr :: IO CBool))
|
|
| 591 | 597 | |
| 592 | 598 | getCCFlags :: IO CCFlags
|
| 593 | 599 | getCCFlags = do
|
| ... | ... | @@ -647,6 +653,8 @@ getTraceFlags = do |
| 647 | 653 | (#{peek TRACE_FLAGS, sparks_full} ptr :: IO CBool))
|
| 648 | 654 | <*> (toBool <$>
|
| 649 | 655 | (#{peek TRACE_FLAGS, user} ptr :: IO CBool))
|
| 656 | + <*> (toBool <$>
|
|
| 657 | + (#{peek TRACE_FLAGS, ipe} ptr :: IO CBool))
|
|
| 650 | 658 | #endif
|
| 651 | 659 | |
| 652 | 660 | getTickyFlags :: IO TickyFlags
|
| 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 | + ],
|
|
| 7 | + multimod_compile_and_run,
|
|
| 8 | + ['TraceIpe', ''],
|
|
| 9 | +)
|
|
| 10 | + |
|
| 11 | +# Compile and run with -lI
|
|
| 12 | +test(
|
|
| 13 | + 'T25275_B',
|
|
| 14 | + [
|
|
| 15 | + extra_files(['TraceIpe.hs']),
|
|
| 16 | + extra_run_opts('+RTS -lI -RTS'),
|
|
| 17 | + ],
|
|
| 18 | + multimod_compile_and_run,
|
|
| 19 | + ['TraceIpe', ''],
|
|
| 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 | +) |