Skip to content

Commit 9ad9987

Browse files
committed
Add a workaround for #46 (assumed to be caused by wrong order of events)
1 parent 3fb1a2a commit 9ad9987

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

GUI/SummaryView.hs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -769,15 +769,16 @@ accumEvent !statsAccum (CapEvent mcap ev) =
769769
}
770770
-- Cap is not in the GC. Mark it as idle to complete
771771
-- the identification of caps that take part
772-
-- in the current GC. Without overwritin the mode,
772+
-- in the current GC. Without overwriting the mode,
773773
-- the cap could be processed later on as if
774774
-- it took part in the GC, giving wrong results.
775775
ModeEnd -> dGC { gcMode = ModeIdle }
776776
ModeIdle -> dGC
777777
-- Impossible.
778778
ModeInit -> error "scanEvents: GlobalSyncGC ModeInit"
779779
ModeSync{} -> error "scanEvents: GlobalSyncGC ModeSync"
780-
ModeGHC{} -> error "scanEvents: GlobalSyncGC ModeGHC"
780+
ModeGHC{} -> -- error "scanEvents: GlobalSyncGC ModeGHC"
781+
dGC -- workaround for #46
781782
GCStatsGHC{..} ->
782783
-- All caps must be stopped. Those that take part in the GC
783784
-- are in ModeInit or ModeSync, those that do not
@@ -838,7 +839,8 @@ accumEvent !statsAccum (CapEvent mcap ev) =
838839
ModeIdle -> dGC
839840
-- Impossible.
840841
ModeInit -> error "scanEvents: GCStatsGHC ModeInit"
841-
ModeGHC{} -> error "scanEvents: GCStatsGHC ModeGHC"
842+
ModeGHC{} -> -- error "scanEvents: GCStatsGHC ModeGHC"
843+
dGC -- workaround for #46
842844
-- The last two cases are copied from case @GlobalSyncGC@
843845
-- to work around low-resolution timestamps (#35).
844846
-- Normally, these states would be impossible here, because

0 commit comments

Comments
 (0)