Opened 8 years ago
Closed 4 years ago
#5364 closed feature request (fixed)
Access RTS flag values from inside Haskell programs
Reported by: | ezyang | Owned by: | ekmett |
---|---|---|---|
Priority: | normal | Milestone: | 7.10.1 |
Component: | Core Libraries | Version: | 7.3 |
Keywords: | Cc: | johan.tibell@…, hvr, core-libraries-committee@… | |
Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
Type of failure: | None/Unknown | Test Case: | |
Blocked By: | Blocking: | ||
Related Tickets: | #10022 | Differential Rev(s): | Phab:D306 |
Wiki Page: |
Description (last modified by )
Strictly speaking, it is already possible to do this since includes/rts/Flags.h
exports RtsFlags
, which can be accessed with a mini wrapper function. We should add this wrapper function so we can import it, and then write code which reads out the contents of all the various parameters so that users can introspect this at runtime. Maybe put them in the GHC.RTS
module.
Change History (12)
comment:1 Changed 7 years ago by
Milestone: | → 7.6.1 |
---|
comment:2 Changed 7 years ago by
Cc: | johan.tibell@… added |
---|
comment:3 Changed 6 years ago by
Milestone: | 7.6.1 → 7.6.2 |
---|
comment:4 Changed 5 years ago by
Cc: | hvr added |
---|---|
Description: | modified (diff) |
difficulty: | → Unknown |
comment:5 Changed 5 years ago by
Milestone: | 7.6.2 → 7.10.1 |
---|
comment:6 Changed 4 years ago by
Component: | libraries/base → Core Libraries |
---|---|
Owner: | set to ekmett |
Moving over to new owning component 'Core Libraries'.
comment:7 Changed 4 years ago by
Cc: | core-libraries-committee@… added |
---|---|
Differential Rev(s): | → Phab:D306 |
comment:9 Changed 4 years ago by
Milestone: | 7.10.1 → 7.12.1 |
---|
Moving to 7.12.1 milestone; if you feel this is an error and should be addressed sooner, please move it back to the 7.10.1 milestone.
comment:11 Changed 4 years ago by
Milestone: | 7.12.1 → 7.10.1 |
---|
btw, I noticed that the API exposed by GHC.RTS.Flags varies depending on unsigned int
:
-- | @'nat'@ defined in @rts/Types.h@ type Nat = #{type unsigned int} data GCFlags = GCFlags { statsFile :: Maybe FilePath , giveStats :: GiveGCStats , maxStkSize :: Nat , initialStkSize :: Nat , stkChunkSize :: Nat ...
Is this really a good idea rather simply using Word
which I assume should always be large enough to contain the range of CULong
?
Moreover, shouldn't most of those small-fields be !
-ed to avoid thunks and unecessary pointer chasing?
comment:12 Changed 4 years ago by
Related Tickets: | → #10022 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Yes, we should make those cleanups. I've filed another ticket: #10022. However, this ticket is (in general) worth closing.
Moving to 7.10.1.