[Git][ghc/ghc][master] Add log messages for Iface serialisation compression level
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Wed May 22 04:33:46 UTC 2024
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
f50f46c3 by Fendor at 2024-05-22T00:32:59-04:00
Add log messages for Iface serialisation compression level
Fix the label of the number of 'IfaceType' entries in the log message.
Add log message for the compression level that is used to serialise a an
interface file.
Adds `Outputable` instance for 'CompressionIFace'.
- - - - -
1 changed file:
- compiler/GHC/Iface/Binary.hs
Changes:
=====================================
compiler/GHC/Iface/Binary.hs
=====================================
@@ -97,6 +97,10 @@ data CompressionIFace
-- ^ Try to compress as much as possible.
--
-- Yields the smallest '.hi' files but at the cost of additional run-time.
+ deriving (Show, Eq, Ord, Bounded, Enum)
+
+instance Outputable CompressionIFace where
+ ppr = text . show
-- | Read an interface file header, checking the magic number, version, and
-- way. Returns the hash of the source file and a BinHandle which points at the
@@ -227,6 +231,11 @@ getTables name_cache bh = do
-- See Note [Deduplication during iface binary serialisation] for details.
writeBinIface :: Profile -> TraceBinIFace -> CompressionIFace -> FilePath -> ModIface -> IO ()
writeBinIface profile traceBinIface compressionLevel hi_path mod_iface = do
+ case traceBinIface of
+ QuietBinIFace -> pure ()
+ TraceBinIFace printer -> do
+ printer (text "writeBinIface compression level:" <+> ppr compressionLevel)
+
bh <- openBinMem initBinMemSize
let platform = profilePlatform profile
put_ bh (binaryInterfaceMagic platform)
@@ -266,7 +275,7 @@ putWithUserData traceBinIface compressionLevel bh payload = do
printer (text "writeBinIface:" <+> int fs_count
<+> text "dict entries")
printer (text "writeBinIface:" <+> int ifacetype_count
- <+> text "dict entries")
+ <+> text "iface type entries")
-- | Write name/symbol/ifacetype tables
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f50f46c37bdad6ec38f704f4806e2086e42f4ab2
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f50f46c37bdad6ec38f704f4806e2086e42f4ab2
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/20240522/c7b9ed7c/attachment-0001.html>
More information about the ghc-commits
mailing list