Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mpickering committed Mar 31, 2023
1 parent dede7bd commit 327311d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/Eventlog/Args.hs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import Data.Semigroup ((<>))
import Control.Applicative (optional)

data Option
= ShowVersion
= ShowVersion
| Run Args

data Sort = Size | StdDev | Name | Gradient
Expand Down
4 changes: 2 additions & 2 deletions src/Eventlog/Events.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
11 changes: 6 additions & 5 deletions src/Eventlog/Ticky.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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 ""
Expand All @@ -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))
Expand All @@ -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


Expand Down

0 comments on commit 327311d

Please sign in to comment.