Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
GHC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
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
haskell-wasm
GHC
Commits
37fb61d8
Commit
37fb61d8
authored
2 years ago
by
Ben Gamari
Committed by
Marge Bot
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
rts: Introduce printGlobalThreads
parent
73b1e87c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
rts/Threads.c
+14
-0
14 additions, 0 deletions
rts/Threads.c
rts/Threads.h
+1
-0
1 addition, 0 deletions
rts/Threads.h
with
15 additions
and
0 deletions
rts/Threads.c
+
14
−
0
View file @
37fb61d8
...
...
@@ -1007,6 +1007,20 @@ printAllThreads(void)
}
}
void
printGlobalThreads
(
void
)
{
for
(
uint32_t
g
=
0
;
g
<
RtsFlags
.
GcFlags
.
generations
;
g
++
)
{
debugBelch
(
"
\n
gen %d
\n
"
,
g
);
for
(
StgTSO
*
t
=
generations
[
g
].
threads
;
t
!=
END_TSO_QUEUE
;
t
=
t
->
global_link
)
{
debugBelch
(
"thread %p (id=%lu)
\n
"
,
t
,
t
->
id
);
}
for
(
StgTSO
*
t
=
generations
[
g
].
old_threads
;
t
!=
END_TSO_QUEUE
;
t
=
t
->
global_link
)
{
debugBelch
(
"thread %p (id=%lu) (old)
\n
"
,
t
,
t
->
id
);
}
}
}
// useful from gdb
void
printThreadQueue
(
StgTSO
*
t
)
...
...
This diff is collapsed.
Click to expand it.
rts/Threads.h
+
1
−
0
View file @
37fb61d8
...
...
@@ -46,6 +46,7 @@ bool performTryPutMVar(Capability *cap, StgMVar *mvar, StgClosure *value);
void
printThreadBlockage
(
StgTSO
*
tso
);
void
printThreadStatus
(
StgTSO
*
t
);
void
printAllThreads
(
void
);
void
printGlobalThreads
(
void
);
void
printThreadQueue
(
StgTSO
*
t
);
#endif
...
...
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