[commit: ghc] master: Better hints when RTS options not available (Trac #9579) (51af102)

git at git.haskell.org git at git.haskell.org
Fri Apr 17 02:50:56 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/51af102e5c6c56e0987432aa5a21fe10e24090e9/ghc

>---------------------------------------------------------------

commit 51af102e5c6c56e0987432aa5a21fe10e24090e9
Author: Javran Cheng <Javran.c at gmail.com>
Date:   Fri Apr 17 10:52:00 2015 +1000

    Better hints when RTS options not available (Trac #9579)
    
    This patch provides user with a better hint when most RTS options
    are not available (not compiled with `-rtsopts`).
    
    A new field "rtsOptsEnabled" is added into RtsFlags.MiscFlags to
    tell the availablity of RTS options.
    
    Some concerns:
    * Unlike other flag fields in "libraries/base/GHC/RTS/Flags.hsc",
      "RtsOptsEnabled" is defined in "includes/RtsAPI.h" and lacks
      constant macros. Therefore In "GHC.RTS", "RtsOptsEnabled" simply
      derives Enum instance and reads as of type "CInt".
    
    * There are other ways to change RTS options (e.g. `-with-rtsopts`),
      but it might be too verbose to mention.
    
    Test Plan: validate
    
    Reviewers: austin, hvr, thomie, simonmar
    
    Reviewed By: thomie
    
    Subscribers: thomie, rwbarton
    
    Differential Revision: https://phabricator.haskell.org/D767
    
    GHC Trac Issues: #9579


>---------------------------------------------------------------

51af102e5c6c56e0987432aa5a21fe10e24090e9
 rts/ProfHeap.c                                     |  9 ++++++-
 rts/hooks/OutOfHeap.c                              | 14 +++++++----
 rts/hooks/StackOverflow.c                          | 10 +++++++-
 testsuite/tests/rts/T9579/Makefile                 | 27 ++++++++++++++++++++
 testsuite/tests/rts/T9579/OutOfHeap.hs             | 10 ++++++++
 testsuite/tests/rts/T9579/StackOverflow.hs         |  4 +++
 .../T9579/T9579_outofheap_rtsall.stderr}           |  2 +-
 .../tests/rts/T9579/T9579_outofheap_rtsnone.stderr |  3 +++
 .../tests/rts/T9579/T9579_outofheap_rtssome.stderr |  3 +++
 .../rts/T9579/T9579_stackoverflow_rtsall.stderr    |  2 ++
 .../rts/T9579/T9579_stackoverflow_rtsnone.stderr   |  2 ++
 .../rts/T9579/T9579_stackoverflow_rtssome.stderr   |  2 ++
 testsuite/tests/rts/T9579/all.T                    | 29 ++++++++++++++++++++++
 13 files changed, 109 insertions(+), 8 deletions(-)

Diff suppressed because of size. To see it, use:

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 51af102e5c6c56e0987432aa5a21fe10e24090e9


More information about the ghc-commits mailing list