From 327311d1714750dc075feaa19310fc6721da77a8 Mon Sep 17 00:00:00 2001 From: Matthew Pickering Date: Fri, 31 Mar 2023 12:18:33 +0100 Subject: [PATCH] Fix warnings --- src/Eventlog/Args.hs | 2 +- src/Eventlog/Events.hs | 4 ++-- src/Eventlog/Ticky.hs | 11 ++++++----- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/Eventlog/Args.hs b/src/Eventlog/Args.hs index cf5e9f7..d17e628 100644 --- a/src/Eventlog/Args.hs +++ b/src/Eventlog/Args.hs @@ -18,7 +18,7 @@ import Data.Semigroup ((<>)) import Control.Applicative (optional) data Option - = ShowVersion + = ShowVersion | Run Args data Sort = Size | StdDev | Name | Gradient diff --git a/src/Eventlog/Events.hs b/src/Eventlog/Events.hs index 6bc54cf..9bc364e 100644 --- a/src/Eventlog/Events.hs +++ b/src/Eventlog/Events.hs @@ -277,8 +277,8 @@ addBlocksSize :: Timestamp -> Word64 -> EL -> EL addBlocksSize t s el = el { blocksSize = HeapSample (fromNano t) s : blocksSize el} addTickyDef :: Word64 -> Word16 -> Text -> Word64 -> Text -> EL -> EL -addTickyDef a b d e json el = - case decode (TE.encodeUtf8 (TL.fromStrict json)) of +addTickyDef a b d e ticky_json el = + case decode (TE.encodeUtf8 (TL.fromStrict ticky_json)) of Just argInfo -> el { ticky_counter = TickyCounter a b argInfo d (InfoTablePtr e) : ticky_counter el } Nothing -> el diff --git a/src/Eventlog/Ticky.hs b/src/Eventlog/Ticky.hs index c7b7381..cbdcbe4 100644 --- a/src/Eventlog/Ticky.hs +++ b/src/Eventlog/Ticky.hs @@ -221,6 +221,7 @@ renderTickyInfo with_ipe ticky_samples = do case itls of Here itl -> renderInfoTableLoc itl Missing -> emptyItlColumns + None -> mempty emptyItlColumns = do H.td "" @@ -233,14 +234,14 @@ renderTickyInfo with_ipe ticky_samples = do renderEntry :: (InfoTableLocStatus, (TickyCounter, AccumStats, Double)) -> Html renderEntry (loc, ((TickyCounter _id _arity kinds label _), AccumStats {..}, percent)) = do let fvs = tickyCounterFVs kinds - args = tickyCounterArgs kinds - size = closureSize (length fvs) (length args) + ticky_args = tickyCounterArgs kinds + size = closureSize (length fvs) (length ticky_args) alloc_no = fromIntegral allocd `Prelude.div` size H.tr $ do -- H.td (renderSpark (getBandValues n (ts, bs))) H.td (toHtml label) H.td (toHtml fvs) - H.td (toHtml args) + H.td (toHtml ticky_args) renderInfoTableLocStatus loc H.td (toHtml allocs) H.td (toHtml $ render $ trunc (percent * 100)) @@ -260,9 +261,9 @@ renderTickyInfo with_ipe ticky_samples = do -- H.td mempty closureSize :: Int -> Int -> Int -closureSize fvs args +closureSize fvs cl_args -- THUNK, HEADER = 2 - | args == 0 = (2 + fvs) * 8 + | cl_args == 0 = (2 + fvs) * 8 | otherwise = (1 + fvs) * 8