[GHC] #9105: Profiling binary consumes CPU even when idle on Linux.
GHC
ghc-devs at haskell.org
Tue May 13 18:53:06 UTC 2014
#9105: Profiling binary consumes CPU even when idle on Linux.
----------------------------+---------------------------------
Reporter: robinp | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.8.2
Keywords: | Operating System: Linux
Architecture: x86 | Type of failure: None/Unknown
Difficulty: Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: |
----------------------------+---------------------------------
The program is
main = forever $ threadDelay 1000000 >> return () .
Compiled with 32bit GHC 7.6.3 or 7.8.2 on Debian (inside a VM), GHC 7.4.1
on Ubuntu (not VM).
The non-profiling binary doesn't consume CPU, the profiling does ~10% (of
a 2Ghz machine). Running with +RTS -I0, so this is not the idle gc.
When strace-ing, the profiling one seems to receive a constant flow of
SIGVTALRM, while the normal receives one burst each second.
I see I can switch off "master tick interval" with -V0, and then CPU is
not used, but the consequences of this are not very well documented (apart
from context switching becoming deterministic).
Interestingly, if I compile using profiling on Windows (latest haskell-
platform, 64bit), it doesn't use more CPU than the non-profiling.
So, the question is, why does this happen on Linux, and if it can be
avoided somehow.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9105>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list