[Git][ghc/ghc][wip/wenkokke/trace-ipe] 4 commits: ghc-internal: Add traceIPE to TraceFlags
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 ghc-internal: Add traceIPE to TraceFlags - - - - - 285eddd3 by Wen Kokke at 2026-05-14T22:17:34+01:00 testsuite: Add test for TraceFlags.traceIpe - - - - - f3e16965 by Wen Kokke at 2026-05-14T22:17:34+01:00 ghc-internal: Add ipe to DebugFlags - - - - - 4e3f01e2 by Wen Kokke at 2026-05-14T22:17:37+01:00 testsuite: Add test for DebugFlags.ipe - - - - - 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: ===================================== libraries/ghc-internal/src/GHC/Internal/RTS/Flags.hsc ===================================== @@ -211,6 +211,8 @@ data DebugFlags = DebugFlags , squeeze :: Bool -- ^ @z@ stack squeezing & lazy blackholing , hpc :: Bool -- ^ @c@ coverage , sparks :: Bool -- ^ @r@ + , ipe :: Bool -- ^ @I@ + -- @since ghc-experimental-9.1001.0 } deriving ( Show -- ^ @since base-4.8.0.0 , Generic -- ^ @since base-4.15.0.0 ) @@ -359,6 +361,8 @@ data TraceFlags = TraceFlags , sparksSampled :: Bool -- ^ trace spark events by a sampled method , sparksFull :: Bool -- ^ trace spark events 100% accurately , user :: Bool -- ^ trace user events (emitted from Haskell code) + , traceIpe :: Bool -- ^ trace IPE events + -- @since ghc-experimental-9.1001.0 } deriving ( Show -- ^ @since base-4.8.0.0 , Generic -- ^ @since base-4.15.0.0 ) @@ -588,6 +592,8 @@ getDebugFlags = do (#{peek DEBUG_FLAGS, hpc} ptr :: IO CBool)) <*> (toBool <$> (#{peek DEBUG_FLAGS, sparks} ptr :: IO CBool)) + <*> (toBool <$> + (#{peek DEBUG_FLAGS, ipe} ptr :: IO CBool)) getCCFlags :: IO CCFlags getCCFlags = do @@ -647,6 +653,8 @@ getTraceFlags = do (#{peek TRACE_FLAGS, sparks_full} ptr :: IO CBool)) <*> (toBool <$> (#{peek TRACE_FLAGS, user} ptr :: IO CBool)) + <*> (toBool <$> + (#{peek TRACE_FLAGS, ipe} ptr :: IO CBool)) #endif getTickyFlags :: IO TickyFlags ===================================== testsuite/tests/rts/T25275/DebugIpe.hs ===================================== @@ -0,0 +1,6 @@ +module Main where + +import GHC.RTS.Flags.Experimental (DebugFlags (..), getDebugFlags) + +main :: IO () +main = print . ipe =<< getDebugFlags ===================================== testsuite/tests/rts/T25275/T25275_A.stdout ===================================== @@ -0,0 +1 @@ +False \ No newline at end of file ===================================== testsuite/tests/rts/T25275/T25275_B.stdout ===================================== @@ -0,0 +1 @@ +True \ No newline at end of file ===================================== testsuite/tests/rts/T25275/T25275_C.stdout ===================================== @@ -0,0 +1 @@ +False \ No newline at end of file ===================================== testsuite/tests/rts/T25275/T25275_D.stdout ===================================== @@ -0,0 +1 @@ +True \ No newline at end of file ===================================== testsuite/tests/rts/T25275/TraceIpe.hs ===================================== @@ -0,0 +1,6 @@ +module Main where + +import GHC.RTS.Flags.Experimental (TraceFlags (..), getTraceFlags) + +main :: IO () +main = print . traceIpe =<< getTraceFlags ===================================== testsuite/tests/rts/T25275/all.T ===================================== @@ -0,0 +1,43 @@ +# Compile and run with default RTS options +test( + 'T25275_A', + [ + extra_files(['TraceIpe.hs']), + ], + multimod_compile_and_run, + ['TraceIpe', ''], +) + +# Compile and run with -lI +test( + 'T25275_B', + [ + extra_files(['TraceIpe.hs']), + extra_run_opts('+RTS -lI -RTS'), + ], + multimod_compile_and_run, + ['TraceIpe', ''], +) + +# Compile and run with default RTS options +test( + 'T25275_C', + [ + only_ways(['debug']), + extra_files(['DebugIpe.hs']), + ], + multimod_compile_and_run, + ['DebugIpe', ''], +) + +# Compile and run with -DI +test( + 'T25275_D', + [ + only_ways(['debug']), + extra_files(['DebugIpe.hs']), + extra_run_opts('+RTS -DI -RTS'), + ], + multimod_compile_and_run, + ['DebugIpe', ''], +) View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/7d96012526bdfcb192453d3f4cdb82b... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/7d96012526bdfcb192453d3f4cdb82b... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Wen Kokke (@wenkokke)