[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 13 commits: base: Correct @since annotation for FP<->Integral bit cast operations.

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Thu Feb 23 05:07:13 UTC 2023



Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC


Commits:
9296660b by Andreas Klebinger at 2023-02-21T23:58:05-05:00
base: Correct @since annotation for FP<->Integral bit cast operations.

Fixes #22708

- - - - -
f11d9c27 by romes at 2023-02-21T23:58:42-05:00
fix: Update documentation links

Closes #23008

Additionally batches some fixes to pointers to the Note [Wired-in units],
and a typo in said note.

- - - - -
8c43eb93 by Alexis King at 2023-02-23T00:07:02-05:00
rts: Fix `prompt#` when profiling is enabled

This commit also adds a new -Dk RTS option to the debug RTS to assist
debugging continuation captures. Currently, the printed information is
quite minimal, but more can be added in the future if it proves to be
useful when debugging future issues.

fixes #23001

- - - - -
d271389c by Ben Gamari at 2023-02-23T00:07:03-05:00
Bump terminfo submodule to 0.4.1.6

- - - - -
825500a4 by Ben Gamari at 2023-02-23T00:07:03-05:00
Bump unix submodule to preliminary 2.8 release

- - - - -
3fb73959 by Ben Gamari at 2023-02-23T00:07:03-05:00
Bump deepseq submodule to 1.4.8.1

- - - - -
8718a910 by Ben Gamari at 2023-02-23T00:07:03-05:00
Bump directory to 1.3.8.1

- - - - -
1ab63a2d by Ben Gamari at 2023-02-23T00:07:03-05:00
Bump process submodule to v1.6.17.0

- - - - -
321e7287 by Ben Gamari at 2023-02-23T00:07:03-05:00
Bump hsc2hs submodule to 0.68.8

- - - - -
298e0274 by Ben Gamari at 2023-02-23T00:07:03-05:00
Bump array submodule to 0.5.4.0

- - - - -
ae848169 by Ben Gamari at 2023-02-23T00:07:03-05:00
Bump Cabal submodule to 3.9 pre-release

- - - - -
dd3b7b68 by Ben Gamari at 2023-02-23T00:07:03-05:00
Bump filepath submodule to 1.4.100.1

- - - - -
eaaab6c3 by Ben Gamari at 2023-02-23T00:07:03-05:00
Bump haskeline submodule to 0.8.2.1

- - - - -


21 changed files:

- compiler/GHC/Unit.hs
- compiler/GHC/Unit/State.hs
- docs/users_guide/exts/deriving_strategies.rst
- docs/users_guide/runtime_control.rst
- libraries/Cabal
- libraries/array
- libraries/base/GHC/Float.hs
- libraries/deepseq
- libraries/directory
- libraries/filepath
- libraries/haskeline
- libraries/process
- libraries/terminfo
- libraries/unix
- rts/Continuation.c
- rts/ContinuationOps.cmm
- rts/RtsFlags.c
- rts/Trace.h
- rts/include/rts/Flags.h
- testsuite/tests/rts/continuations/all.T
- utils/hsc2hs


Changes:

=====================================
compiler/GHC/Unit.hs
=====================================
@@ -63,7 +63,7 @@ Wired-in units
 
 Certain libraries (ghc-prim, base, etc.) are known to the compiler and to the
 RTS as they provide some basic primitives.  Hence UnitIds of wired-in libraries
-are fixed. Instead of letting Cabal chose the UnitId for these libraries, their
+are fixed. Instead of letting Cabal choose the UnitId for these libraries, their
 .cabal file uses the following stanza to force it to a specific value:
 
    ghc-options: -this-unit-id ghc-prim    -- taken from ghc-prim.cabal


=====================================
compiler/GHC/Unit/State.hs
=====================================
@@ -1078,7 +1078,7 @@ pprTrustFlag flag = case flag of
 -- -----------------------------------------------------------------------------
 -- Wired-in units
 --
--- See Note [Wired-in units] in GHC.Unit.Module
+-- See Note [Wired-in units] in GHC.Unit.Types
 
 type WiringMap = Map UnitId UnitId
 
@@ -1094,7 +1094,7 @@ findWiredInUnits
 findWiredInUnits logger prec_map pkgs vis_map = do
   -- Now we must find our wired-in units, and rename them to
   -- their canonical names (eg. base-1.0 ==> base), as described
-  -- in Note [Wired-in units] in GHC.Unit.Module
+  -- in Note [Wired-in units] in GHC.Unit.Types
   let
         matches :: UnitInfo -> UnitId -> Bool
         pc `matches` pid = unitPackageName pc == PackageName (unitIdFS pid)
@@ -1177,7 +1177,7 @@ findWiredInUnits logger prec_map pkgs vis_map = do
 
 -- Helper functions for rewiring Module and Unit.  These
 -- rewrite Units of modules in wired-in packages to the form known to the
--- compiler, as described in Note [Wired-in units] in GHC.Unit.Module.
+-- compiler, as described in Note [Wired-in units] in GHC.Unit.Types.
 --
 -- For instance, base-4.9.0.0 will be rewritten to just base, to match
 -- what appears in GHC.Builtin.Names.


=====================================
docs/users_guide/exts/deriving_strategies.rst
=====================================
@@ -70,7 +70,7 @@ If an explicit deriving strategy is not given, multiple strategies may apply.
 In that case, GHC chooses the strategy as follows:
 
 1. Stock type classes, i.e. those specified in the report and those enabled by
-   `language extensions <#deriving-extra>`__, are derived using the ``stock``
+   :ref:`language extensions <deriving-extra>`, are derived using the ``stock``
    strategy, with the following exception:
 
    * For newtypes, ``Eq``, ``Ord``, ``Ix`` and ``Bounded`` are always derived
@@ -82,7 +82,7 @@ In that case, GHC chooses the strategy as follows:
      using the ``newtype`` strategy if ``GeneralizedNewtypeDeriving`` is
      enabled and the derivation succeeds.
 
-2. For other any type class:
+2. For any other type class:
 
    1. When :extension:`DeriveAnyClass` is enabled, use ``anyclass``.
 


=====================================
docs/users_guide/runtime_control.rst
=====================================
@@ -1367,6 +1367,7 @@ recommended for everyday use!
 .. rts-flag::  -Dc  DEBUG: program coverage
 .. rts-flag::  -Dr  DEBUG: sparks
 .. rts-flag::  -DC  DEBUG: compact
+.. rts-flag::  -Dk  DEBUG: continuation
 
     Debug messages will be sent to the binary event log file instead of
     stdout if the :rts-flag:`-l ⟨flags⟩` option is added. This might be useful


=====================================
libraries/Cabal
=====================================
@@ -1 +1 @@
-Subproject commit 6cd29789ca866464dc3af89f62c98c41264ce3cd
+Subproject commit 280a7a71e495da8f25ae33dbc6e743526b9106f9


=====================================
libraries/array
=====================================
@@ -1 +1 @@
-Subproject commit f7a498b880a1fff833699d8417bac155d58ed59e
+Subproject commit f487b8de85f2b271a3831c14ab6439b9bc9b8343


=====================================
libraries/base/GHC/Float.hs
=====================================
@@ -1568,7 +1568,7 @@ is using CMM.
 -- | @'castWord32ToFloat' w@ does a bit-for-bit copy from an integral value
 -- to a floating-point value.
 --
--- @since 4.10.0.0
+-- @since 4.11.0.0
 
 {-# INLINE castWord32ToFloat #-}
 castWord32ToFloat :: Word32 -> Float
@@ -1581,7 +1581,7 @@ foreign import prim "stg_word32ToFloatzh"
 -- | @'castFloatToWord32' f@ does a bit-for-bit copy from a floating-point value
 -- to an integral value.
 --
--- @since 4.10.0.0
+-- @since 4.11.0.0
 
 {-# INLINE castFloatToWord32 #-}
 castFloatToWord32 :: Float -> Word32
@@ -1595,7 +1595,7 @@ foreign import prim "stg_floatToWord32zh"
 -- | @'castWord64ToDouble' w@ does a bit-for-bit copy from an integral value
 -- to a floating-point value.
 --
--- @since 4.10.0.0
+-- @since 4.11.0.0
 
 {-# INLINE castWord64ToDouble #-}
 castWord64ToDouble :: Word64 -> Double
@@ -1608,7 +1608,7 @@ foreign import prim "stg_word64ToDoublezh"
 -- | @'castFloatToWord64' f@ does a bit-for-bit copy from a floating-point value
 -- to an integral value.
 --
--- @since 4.10.0.0
+-- @since 4.11.0.0
 
 {-# INLINE castDoubleToWord64 #-}
 castDoubleToWord64 :: Double -> Word64


=====================================
libraries/deepseq
=====================================
@@ -1 +1 @@
-Subproject commit 7e77698d6a78981bc2649df78021a6c33a5d3913
+Subproject commit 0bfe57809f8ecaf1921b82a6791d1ecc317d1998


=====================================
libraries/directory
=====================================
@@ -1 +1 @@
-Subproject commit 7f9066137c694ab7cef9a4ebd8c19a281fad42e4
+Subproject commit 3ae36d84e44737fa9800d74d55ae1e30b75628cf


=====================================
libraries/filepath
=====================================
@@ -1 +1 @@
-Subproject commit 7139cd3383a2aae440a57b5604a8182d9a983715
+Subproject commit bb0e5cd49655b41bd3209b100f7a5a74698cbe83


=====================================
libraries/haskeline
=====================================
@@ -1 +1 @@
-Subproject commit ad40faf532ca86ae6d0839a299234db2ce4fc424
+Subproject commit 1c2ad91edc936a9836d1ad80a26f8be03a7d8bb0


=====================================
libraries/process
=====================================
@@ -1 +1 @@
-Subproject commit d9a8e6e749d2d60422037f3ef4733d521f18a7fc
+Subproject commit e60ab049b92238b0111654589f17b6ee68249f01


=====================================
libraries/terminfo
=====================================
@@ -1 +1 @@
-Subproject commit 0a05f06bc8a56c43578ce06d4ef1339ee70fb3fc
+Subproject commit 98100776edcf33796ddf2e752233e6ef179b876d


=====================================
libraries/unix
=====================================
@@ -1 +1 @@
-Subproject commit 98adc732bfbfca4fef945d546ecbaae13952a950
+Subproject commit 978e4e781b3a26a3d6b2f17efba7dbc176eca798


=====================================
rts/Continuation.c
=====================================
@@ -12,6 +12,7 @@
 #include "sm/Storage.h"
 #include "sm/Sanity.h"
 #include "Continuation.h"
+#include "Printer.h"
 #include "Threads.h"
 
 #include <string.h>
@@ -392,7 +393,14 @@ StgClosure *captureContinuationAndAbort(Capability *cap, StgTSO *tso, StgPromptT
 
   /* --- Phase 1: Find the matching prompt frame ---------------------------- */
 
+  IF_DEBUG(continuation,
+    debugBelch("captureContinuationAndAbort: searching for prompt\n");
+    debugBelch("  prompt_tag = "); printClosure(prompt_tag));
+
   while (true) {
+    IF_DEBUG(continuation,
+      printStackChunk(frame, frame + stack_frame_sizeW((StgClosure *)frame)));
+
     const StgInfoTable *info_ptr = ((StgClosure *)frame)->header.info;
     const StgRetInfoTable *info = get_ret_itbl((StgClosure *)frame);
     StgWord chunk_words = frame - stack->sp;
@@ -429,6 +437,8 @@ StgClosure *captureContinuationAndAbort(Capability *cap, StgTSO *tso, StgPromptT
                   || info->i.type == ATOMICALLY_FRAME
                   || info->i.type == CATCH_RETRY_FRAME
                   || info->i.type == CATCH_STM_FRAME)) {
+      IF_DEBUG(continuation,
+        debugBelch("captureContinuationAndAbort: could not find prompt, bailing out\n"));
       return NULL; // Bail out
     }
 
@@ -452,6 +462,10 @@ StgClosure *captureContinuationAndAbort(Capability *cap, StgTSO *tso, StgPromptT
 
   /* --- Phase 2: Perform the capture --------------------------------------- */
 
+  IF_DEBUG(continuation,
+    debugBelch("captureContinuationAndAbort: found prompt, "
+               "capturing %" FMT_Word " words of stack\n", total_words));
+
   dirty_TSO(cap, tso);
   dirty_STACK(cap, stack);
 


=====================================
rts/ContinuationOps.cmm
=====================================
@@ -49,7 +49,12 @@ stg_newPromptTagzh()
   return (tag);
 }
 
-INFO_TABLE_RET(stg_prompt_frame, RET_SMALL, W_ info_ptr, P_ tag /* :: PromptTag# a */)
+#define PROMPT_FRAME_FIELDS(w_,p_,info_ptr,p1,p2,tag) \
+  w_ info_ptr,                                        \
+  PROF_HDR_FIELDS(w_,p1,p2)                           \
+  p_ tag
+
+INFO_TABLE_RET(stg_prompt_frame, RET_SMALL, PROMPT_FRAME_FIELDS(W_,P_, info_ptr, p1, p2, tag /* :: PromptTag# a */))
   return (P_ ret /* :: a */)
 {
   return (ret);
@@ -61,7 +66,9 @@ stg_promptzh(P_ tag /* :: PromptTag# a */, P_ io /* :: IO a */)
   STK_CHK_GEN();
   TICK_UNKNOWN_CALL();
   TICK_SLOW_CALL_fast_v();
-  jump stg_ap_v_fast (stg_prompt_frame_info, tag) (io);
+  jump stg_ap_v_fast
+    (PROMPT_FRAME_FIELDS(,,stg_prompt_frame_info, CCCS, 0, tag))
+    (io);
 }
 
 /* --------------------------------------------------------------------------


=====================================
rts/RtsFlags.c
=====================================
@@ -205,6 +205,7 @@ void initRtsFlagsDefaults(void)
     RtsFlags.DebugFlags.sparks          = false;
     RtsFlags.DebugFlags.numa            = false;
     RtsFlags.DebugFlags.compact         = false;
+    RtsFlags.DebugFlags.continuation    = false;
 
 #if defined(PROFILING)
     RtsFlags.CcFlags.doCostCentres      = COST_CENTRES_NONE;
@@ -476,6 +477,7 @@ usage_text[] = {
 "  -Dc  DEBUG: program coverage",
 "  -Dr  DEBUG: sparks",
 "  -DC  DEBUG: compact",
+"  -Dk  DEBUG: continuation",
 "",
 "     NOTE: DEBUG events are sent to stderr by default; add -l to create a",
 "     binary event log file instead.",
@@ -2190,6 +2192,9 @@ static void read_debug_flags(const char* arg)
         case 'C':
             RtsFlags.DebugFlags.compact = true;
             break;
+        case 'k':
+            RtsFlags.DebugFlags.continuation = true;
+            break;
         default:
             bad_option( arg );
         }


=====================================
rts/Trace.h
=====================================
@@ -67,6 +67,7 @@ enum CapsetType { CapsetTypeCustom = CAPSET_TYPE_CUSTOM,
 #define DEBUG_hpc         RtsFlags.DebugFlags.hpc
 #define DEBUG_sparks      RtsFlags.DebugFlags.sparks
 #define DEBUG_compact     RtsFlags.DebugFlags.compact
+#define DEBUG_continuation RtsFlags.DebugFlags.continuation
 
 // Event-enabled flags
 // These semantically booleans but we use a dense packing to minimize their


=====================================
rts/include/rts/Flags.h
=====================================
@@ -113,6 +113,7 @@ typedef struct _DEBUG_FLAGS {
     bool sparks;         /* 'r' */
     bool numa;           /* '--debug-numa' */
     bool compact;        /* 'C' */
+    bool continuation;   /* 'k' */
 } DEBUG_FLAGS;
 
 /* See Note [Synchronization of flags and base APIs] */


=====================================
testsuite/tests/rts/continuations/all.T
=====================================
@@ -1,4 +1,6 @@
 setTestOpts(js_broken(22261))
+if have_profiling():
+  setTestOpts(extra_ways(['prof']))
 
 test('cont_simple_shift', [extra_files(['ContIO.hs'])], multimod_compile_and_run, ['cont_simple_shift', ''])
 test('cont_exn_masking', [extra_files(['ContIO.hs'])], multimod_compile_and_run, ['cont_exn_masking', ''])


=====================================
utils/hsc2hs
=====================================
@@ -1 +1 @@
-Subproject commit 0811ae8f29d0cc2591bbe89bc034ae14143d0443
+Subproject commit 1ba092932f86c1fda15091d355ba7975b8554437



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/f8e79d96bd7e9be648c80909c7dbc789ebdaff58...eaaab6c3a2a82f891c7339ba7a228e830e486a5f

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/f8e79d96bd7e9be648c80909c7dbc789ebdaff58...eaaab6c3a2a82f891c7339ba7a228e830e486a5f
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230223/6b477836/attachment-0001.html>


More information about the ghc-commits mailing list