Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
40dd50a9
Commit
40dd50a9
authored
Dec 12, 2011
by
Simon Marlow
Browse files
Add a comment about oddity with yieldThread() and timing results on Linux
parent
66b047ee
Changes
1
Hide whitespace changes
Inline
Side-by-side
rts/sm/GC.c
View file @
40dd50a9
...
...
@@ -1060,6 +1060,11 @@ gcWorkerThread (Capability *cap)
// Wait until we're told to wake up
RELEASE_SPIN_LOCK
(
&
gct
->
mut_spin
);
// yieldThread();
// Strangely, adding a yieldThread() here makes the CPU time
// measurements more accurate on Linux, perhaps because it syncs
// the CPU time across the multiple cores. Without this, CPU time
// is heavily skewed towards GC rather than MUT.
gct
->
wakeup
=
GC_THREAD_STANDING_BY
;
debugTrace
(
DEBUG_gc
,
"GC thread %d standing by..."
,
gct
->
thread_index
);
ACQUIRE_SPIN_LOCK
(
&
gct
->
gc_spin
);
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment