Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
ghc-debug
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ian-Woo Kim
ghc-debug
Commits
c7f531f4
Commit
c7f531f4
authored
3 years ago
by
Matthew Pickering
Browse files
Options
Downloads
Patches
Plain Diff
Refine retainer calculation
parent
f6c1d25d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
client/src/GHC/Debug/Retainers.hs
+2
-0
2 additions, 0 deletions
client/src/GHC/Debug/Retainers.hs
with
2 additions
and
0 deletions
client/src/GHC/Debug/Retainers.hs
+
2
−
0
View file @
c7f531f4
...
@@ -53,12 +53,14 @@ findRetainers limit rroots p = (\(_, r, _) -> snd r) <$> runRWST (traceFromM fun
...
@@ -53,12 +53,14 @@ findRetainers limit rroots p = (\(_, r, _) -> snd r) <$> runRWST (traceFromM fun
->
SizedClosure
->
SizedClosure
->
RWST
[
ClosurePtr
]
()
(
Maybe
Int
,
[[
ClosurePtr
]])
DebugM
()
->
RWST
[
ClosurePtr
]
()
(
Maybe
Int
,
[[
ClosurePtr
]])
DebugM
()
->
RWST
[
ClosurePtr
]
()
(
Maybe
Int
,
[[
ClosurePtr
]])
DebugM
()
->
RWST
[
ClosurePtr
]
()
(
Maybe
Int
,
[[
ClosurePtr
]])
DebugM
()
closAccum
_
(
noSize
->
WeakClosure
{})
_
=
return
()
closAccum
cp
sc
k
=
do
closAccum
cp
sc
k
=
do
b
<-
lift
$
p
cp
sc
b
<-
lift
$
p
cp
sc
if
b
if
b
then
do
then
do
ctx
<-
ask
ctx
<-
ask
modify'
(
addOne
(
cp
:
ctx
))
modify'
(
addOne
(
cp
:
ctx
))
local
(
cp
:
)
k
-- Don't call k, there might be more paths to the pointer but we
-- Don't call k, there might be more paths to the pointer but we
-- probably just care about this first one.
-- probably just care about this first one.
else
do
else
do
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment